Last active
August 29, 2015 14:15
-
-
Save jamiecook/dc70f6424e8073d2620e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_link_loads(data_hash, pmturis) | |
Logger.showProgress('Getting link loads', data_hash){|(linknr, direction), _| | |
pmturis.each{|pmturi| | |
load = $Ot.network.get_load(pmturi, linknr, direction) | |
data_hash[[linknr, direction]][pmturi] = load | |
} | |
} | |
data_hash | |
end | |
# ----------------------------- | |
def get_link_loads(data_hash, pmturis) | |
data_hash.map_values { |(linknr,dirn), _value| | |
pmturis.as_index_for { |pmturi| $Ot.network.get_load(pmturi, linknr, dirn) } | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment