Skip to content

Commit

Permalink
blacken
Browse files Browse the repository at this point in the history
  • Loading branch information
i-am-sijia committed Jul 11, 2024
1 parent cd51508 commit 744ff45
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
3 changes: 1 addition & 2 deletions tm2py/acceptance/simulated.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,8 @@ def _make_simulated_maz_data(self):
self._make_taz_district_crosswalk()

return

def _make_taz_district_crosswalk(self):

def _make_taz_district_crosswalk(self):
df = self.simulated_maz_data_df[["TAZ_ORIGINAL", "DistID"]].copy()
df = df.rename(columns={"TAZ_ORIGINAL": "taz", "DistID": "district"})
self.taz_to_district_df = df.drop_duplicates().reset_index(drop=True)
Expand Down
5 changes: 3 additions & 2 deletions tm2py/components/network/highway/highway_assign.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,15 @@ def run(self):
demand.run()
else:
demand.run()

for time in self.time_period_names:
scenario = self.highway_emmebank.scenario(time)
with self._setup(scenario, time):
iteration = self.controller.iteration
warmstart = self.controller.config.warmstart.warmstart
assign_classes = [
AssignmentClass(c, time, iteration, warmstart) for c in self.config.classes
AssignmentClass(c, time, iteration, warmstart)
for c in self.config.classes
]
if iteration > 0:
self._copy_maz_flow(scenario)
Expand Down
2 changes: 1 addition & 1 deletion tm2py/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class WarmStartConfig(ConfigItem):
Note that the components will be executed in the order listed.
Properties:
warmstart: Boolean indicating whether warmstart demand matrices are used. If set to True, do not assign zero demand in iteration 0.
warmstart: Boolean indicating whether warmstart demand matrices are used. If set to True, do not assign zero demand in iteration 0.
If set to False, assign zero demand in iteration 0.
warmstart_skim: Boolean indicating whether to use warmstart skims. If set to True, then skips warmstart assignment in iteraton 0.
warmstart_demand: Boolean indicating whether to use warmstart demand. If set to True, then runs warmstart assignment in iteration 0.
Expand Down
2 changes: 1 addition & 1 deletion tm2py/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def _queue_components(self, run_components: Collection[str] = None):
)
_start_c_index = _queued_c_names.index(self.config.run.start_component)
self._queued_components = self._queued_components[_start_c_index:]

print("RUN COMPOMENTS:")
for _queued_component in self._queued_components:
print(f"Global iteration {_queued_component[0]}, {_queued_component[1]}")
Expand Down

0 comments on commit 744ff45

Please sign in to comment.