Skip to content
Snippets Groups Projects
Commit 00e1d944 authored by Ryan Izard's avatar Ryan Izard Committed by GitHub
Browse files

Merge pull request #717 from MicheleIessi/utilization-link-cost

Fixed link cost calculation
parents ec9cf1e2 ffa7810a
No related branches found
No related tags found
No related merge requests found
......@@ -748,7 +748,7 @@ public class TopologyInstance {
if ((bpsTx / 10^6) / 8 > 1) {
int cost = (int) (bpsTx / 10^6) / 8;
linkCost.put(link, ((1/cost)*1000));
linkCost.put(link, cost);
} else {
linkCost.put(link, MAX_LINK_WEIGHT);
}
......@@ -1430,4 +1430,4 @@ public class TopologyInstance {
public Set<DatapathId> getArchipelagoIds() {
return archipelagos.stream().map(a -> a.getId()).collect(Collectors.toSet());
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment