From edeb9d3b8f966d93aff4f101a26e41fdc622004a Mon Sep 17 00:00:00 2001 From: Krystian Wasilewski Date: Tue, 21 Jun 2022 16:37:09 +0200 Subject: [PATCH] fixed propagation speed calculation --- network_attack_propagation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network_attack_propagation.py b/network_attack_propagation.py index ebae1c3..a069a1c 100644 --- a/network_attack_propagation.py +++ b/network_attack_propagation.py @@ -205,7 +205,7 @@ def experiment(network, avg_degree, node_count, iteration): degrees = [] speeds = [] do_graph_animation(f'bus{iteration}.gif', network, 90, nx.spiral_layout) - speeds.append(network.rounds_survived / node_count) + speeds.append(node_count / network.rounds_survived) degrees.append(avg_degree) print(f"\n{node_count} NODE BUS") print(f"average degree = {avg_degree}")