Skip to content

Commit

Permalink
Merge pull request #143 from BayAreaMetro/walk_trn_walk_path_builder
Browse files Browse the repository at this point in the history
Force Transit Boarding in Path Builder (i.e., prohibit walk-all-the-way paths)
  • Loading branch information
DavidOry authored Apr 3, 2024
2 parents 9c305f7 + 2aefe29 commit 53ba617
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions tm2py/components/network/transit/transit_assign.py
Original file line number Diff line number Diff line change
Expand Up @@ -2231,13 +2231,41 @@ def _journey_levels(self) -> EmmeTransitJourneyLevelSpec:

elif self.name == "WLK_TRN_WLK":
new_journey_levels = copy.deepcopy(journey_levels)
transition_rules = copy.deepcopy(journey_levels[0]["transition_rules"])

for i in range(0, len(new_journey_levels)):
jls = new_journey_levels[i]
jls["transition_rules"].extend(
[
{"mode": "e", "next_journey_level": i+1},
{"mode": "w", "next_journey_level": i+1},
{
"mode": "a",
"next_journey_level": i+1,
},
]
)
# level 0: only allow walk access and walk auxilary
# must use the trasit modes to get onto the next level,
transition_rules_walk = copy.deepcopy(journey_levels[0]["transition_rules"])
transition_rules_walk.extend(
[
{
"mode": "e",
"next_journey_level": 0,
},
{
"mode": "w",
"next_journey_level": 0,
},
{"mode": "a", "next_journey_level": 0},
]
)
new_journey_levels.insert(
0,
{
"description": "base",
"destinations_reachable": True,
"transition_rules": transition_rules,
"destinations_reachable": False,
"transition_rules": transition_rules_walk,
"waiting_time": None,
"boarding_time": None,
"boarding_cost": None,
Expand Down

0 comments on commit 53ba617

Please sign in to comment.