fixed propagation speed calculation

This commit is contained in:
Krystian Wasilewski 2022-06-21 16:37:09 +02:00
parent 182287c23c
commit edeb9d3b8f

View File

@ -205,7 +205,7 @@ def experiment(network, avg_degree, node_count, iteration):
degrees = [] degrees = []
speeds = [] speeds = []
do_graph_animation(f'bus{iteration}.gif', network, 90, nx.spiral_layout) 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) degrees.append(avg_degree)
print(f"\n{node_count} NODE BUS") print(f"\n{node_count} NODE BUS")
print(f"average degree = {avg_degree}") print(f"average degree = {avg_degree}")