rounds survived correction and add to star experiment
This commit is contained in:
parent
f6e749269a
commit
10ba0fbd9d
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user