Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bike distance for unreachable destinations #447

Merged
merged 1 commit into from
Mar 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Scripts/assignment/assignment_period.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ def assign(self, matrices, iteration):
path_not_found = mtxs["time"][mtx_class] > 999999
mtxs[mtx_type][mtx_class][path_not_found] = 999999
# adjust impedance
mtxs["time"]["bike"] = mtxs["time"]["bike"].clip(None, 9999.)
if iteration != "last":
for ass_cl in ("car_work", "car_leisure"):
mtxs["cost"][ass_cl] += self.dist_unit_cost * mtxs["dist"][ass_cl]
Expand Down Expand Up @@ -434,8 +435,6 @@ def _get_matrices(self, mtx_type, is_last_iteration=False):
mtx = self._damp_travel_time(subtype)
else:
mtx = self._get_matrix(mtx_type, subtype)
if mtx_type == "time" and subtype == "bike":
mtx = mtx.clip(None, 9999.)
matrices[subtype] = mtx
if not is_last_iteration:
matrices["transit_leisure"] = matrices["transit_work"]
Expand Down