Commit 99aa1aaf authored by Morten Knutsen's avatar Morten Knutsen
Browse files

Fix bug with only one-way linkloads available

parent 1edf917e
......@@ -109,10 +109,14 @@ def read_linkloads(G, host, url):
sanitized_loads = {}
for (u,v) in retloads:
if retloads[(v,u)][1] > retloads[(u,v)][0]:
sanitized_loads[(u,v)] = retloads[(v,u)][1]
if (v,u) in retloads:
if retloads[(v,u)][1] > retloads[(u,v)][0]:
sanitized_loads[(u,v)] = retloads[(v,u)][1]
else:
sanitized_loads[(u,v)] = retloads[(u,v)][0]
else:
sanitized_loads[(u,v)] = retloads[(u,v)][0]
sanitized_loads[(v,u)] = retloads[(u,v)][1]
return sanitized_loads
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment