diff --git a/network_attack_propagation.py b/network_attack_propagation.py index 209044e..44d00d6 100644 --- a/network_attack_propagation.py +++ b/network_attack_propagation.py @@ -213,6 +213,7 @@ def star_experiment(): print(f"\n{node_count} NODE STAR") print(f"average degree = {star_avg_degree}") print(f"propagation speed = {round(speeds[-1], 2)}") + print(f"rounds survived = {star.rounds_survived + 1}") summary(degrees, speeds) @@ -224,11 +225,11 @@ def main(): ring, star_avg_degree = ring_network(36) do_graph_animation('ring.gif', ring, 90, nx.circular_layout) - print(f'bus survived {bus.rounds_survived} rounds') - print(f'ring survived {ring.rounds_survived} rounds') + print(f'bus survived {bus.rounds_survived + 1} rounds') + print(f'ring survived {ring.rounds_survived + 1} rounds') star_experiment() - + if __name__ == "__main__": main()