From b193c46d044ae5d0fef1506df19ef4283a08b5e0 Mon Sep 17 00:00:00 2001 From: JoeJimFlood Date: Wed, 16 Oct 2024 13:17:01 -0700 Subject: [PATCH] Moved skim expansion to more efficient location in code --- src/main/python/TravelTimeReporter.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/python/TravelTimeReporter.py b/src/main/python/TravelTimeReporter.py index 310e4e162..aaf00f59f 100644 --- a/src/main/python/TravelTimeReporter.py +++ b/src/main/python/TravelTimeReporter.py @@ -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):