Skip to content

Commit

Permalink
Bugfix: bike vdfs were not overwritten by car vdfs before car assignm…
Browse files Browse the repository at this point in the history
…ent. Changed the logic and applied bike assignment in every iteration.
  • Loading branch information
hsl-petrhaj committed Feb 13, 2025
1 parent ab46c0f commit 35bc693
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Scripts/assignment/assignment_period.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,18 @@ def assign(self, matrices: dict, iteration: Union[int,str]) -> Dict:
self._assign_congested_transit() if param.always_congested else self._assign_transit()
elif iteration==1:
self._set_bike_vdfs()
self._assign_bikes(self.emme_matrices["bike"]["dist"], "all")
self._set_car_and_transit_vdfs()
if not self._separate_emme_scenarios:
self._set_car_and_transit_vdfs()
self._calc_background_traffic()
self._assign_cars(param.stopping_criteria_coarse)
self._calc_extra_wait_time()
self._assign_congested_transit() if param.always_congested else self._assign_transit()
elif isinstance(iteration, int) and iteration>1:
self._set_bike_vdfs()
self._assign_bikes(self.emme_matrices["bike"]["dist"], "all")
self._set_car_and_transit_vdfs()
if not self._separate_emme_scenarios:
self._set_car_and_transit_vdfs()
self._calc_background_traffic(include_trucks=True)
self._assign_cars(
param.stopping_criteria_coarse, lightweight=True)
Expand Down

0 comments on commit 35bc693

Please sign in to comment.