update python sims

This commit is contained in:
Arceliar 2018-02-02 19:37:18 -06:00
parent 40ef1d7125
commit 015078a239
5 changed files with 1855 additions and 4 deletions

View file

@ -174,7 +174,7 @@ class Node:
self.info.coords = self.root.path
return changed
def lookup_old(self, dest):
def lookup(self, dest):
# Note: Can loop in an unconverged network
# The person looking up the route is responsible for checking for loops
best = None
@ -220,7 +220,7 @@ class Node:
current = next
return None
def lookup(self, dest):
def lookup_new(self, dest):
# Use pre-computed lookup table to look up next hop for dest coords
assert self.table
if len(self.info.coords) >= 2: parent = self.info.coords[-2]
@ -895,7 +895,8 @@ if __name__ == "__main__":
if len(args) == 2:
job_number = int(sys.argv[1])
#rootNodeASTest("fc00-2017-08-12.txt", "fc00", None, job_number)
rootNodeASTest("skitter", "out-skitter", None, job_number)
#rootNodeASTest("skitter", "out-skitter", None, job_number)
rootNodeASTest("walk-1517414401.txt.map", "out-walk", None, job_number)
else:
print "Usage: {} job_number".format(args[0])
print "job_number = which job set to run on this node (1-indexed)"