From 6a68a12a1f21e87e0aa3f7cebb483033d809a888 Mon Sep 17 00:00:00 2001 From: cengwins Date: Fri, 14 Jan 2022 18:13:44 +0300 Subject: [PATCH] ARA test is added --- Routing/testARA.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Routing/testARA.py diff --git a/Routing/testARA.py b/Routing/testARA.py new file mode 100644 index 0000000..9de0c9f --- /dev/null +++ b/Routing/testARA.py @@ -0,0 +1,34 @@ +import os +import sys +import time + +from ahc.Routing.ARA.ExperimentLogger import ExperimentLogger + +sys.path.insert(0, os.getcwd()) + +import networkx as nx +import matplotlib.pyplot as plt + +from ahc.Ahc import Thread, Topology +from ahc.Ahc import ComponentRegistry +from ahc.Channels.Channels import P2PFIFOPerfectChannel + +from ahc.Routing.ARA.ARATestComponent import ARATestComponent + +registry = ComponentRegistry() + +def main(): + node_count = 30 + G = nx.random_geometric_graph(node_count, 0.5) + nx.draw(G, with_labels=True, font_weight='bold') + + topo = Topology() + topo.construct_from_graph(G, ARATestComponent, P2PFIFOPerfectChannel) + + topo.start() + # plt.show() + + while (True): pass + +if __name__ == "__main__": + main()