Skip to content

Commit

Permalink
ARA test is added
Browse files Browse the repository at this point in the history
  • Loading branch information
cengwins committed Jan 14, 2022
1 parent feb7c3c commit 6a68a12
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions Routing/testARA.py
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit 6a68a12

Please sign in to comment.