Skip to content

Commit

Permalink
Moved skim expansion to more efficient location in code
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeJimFlood committed Oct 16, 2024
1 parent bbc8dd4 commit b193c46
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/main/python/TravelTimeReporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,31 +319,33 @@ def get_transit_time(self):
"""
print("Calculating transit times")

_loc_time = self.expand_skim(
_loc_time = (
self.skims["WALK_LOC_FIRSTWAIT__" + self.settings["time_period"]] +
self.skims["WALK_LOC_XFERWALK__" + self.settings["time_period"]] +
self.skims["WALK_LOC_XFERWAIT__" + self.settings["time_period"]] +
self.skims["WALK_LOC_TOTALIVTT__" + self.settings["time_period"]]
)

_prm_time = self.expand_skim(
_prm_time = (
self.skims["WALK_PRM_FIRSTWAIT__" + self.settings["time_period"]] +
self.skims["WALK_PRM_XFERWALK__" + self.settings["time_period"]] +
self.skims["WALK_PRM_XFERWAIT__" + self.settings["time_period"]] +
self.skims["WALK_PRM_TOTALIVTT__" + self.settings["time_period"]]
)

_mix_time = self.expand_skim(
_mix_time = (
self.skims["WALK_MIX_FIRSTWAIT__" + self.settings["time_period"]] +
self.skims["WALK_MIX_XFERWALK__" + self.settings["time_period"]] +
self.skims["WALK_MIX_XFERWAIT__" + self.settings["time_period"]] +
self.skims["WALK_MIX_TOTALIVTT__" + self.settings["time_period"]]
)

self.skims["transit_time"] = np.minimum(
_loc_time,
_prm_time,
_mix_time
self.skims["transit_time"] = self.expand_skim(
np.minimum(
_loc_time,
_prm_time,
_mix_time
)
)

def get_total_transit_time(self):
Expand Down

0 comments on commit b193c46

Please sign in to comment.