From 4cdb38e88c49088ec66dce100546d2cdd8425d2e Mon Sep 17 00:00:00 2001 From: mariopaolucci Date: Sun, 15 Mar 2020 12:11:10 +0100 Subject: [PATCH] A print instuction multiplies the prints of '''Execution Mode: single_proc: [= 1: total_pats = pats_careless_malicious - claim(ch, total_pats, 'no_activity', s) + claim(ch, total_pats, 'no_activity', s) + print(opportunistic_agents_claiming) return {'update_agents': {'update': compliant_agents_claiming}, 'update_agents': {'update': opportunistic_agents_claiming}, @@ -290,7 +291,7 @@ def random_claim_of_tokens(params, step, sL, s): def create_pat(params, step, sL, s): agents = s['agents'] initial_PAT_nr = len(s['PATs']) - print("timestep", s['timestep']) + print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1--!!!!!!------------------------timestep", s['timestep']) #creation_frequency = config['PAT agents']['number_initial_pats'] #config['PAT agents']['frequency_PAT_creation'] print('creation frequency: ', creation_frequency) @@ -421,6 +422,6 @@ def update_agents(params, step, sL, s, _input): raw_result, tensor = executor.execute() -with open("output.json", 'a') as result_file: +with open("output.json", 'w') as result_file: result_file.write('\n' + str(raw_result) + '\n') result_file.close()