Skip to content

Commit

Permalink
mode specific transfer wait perception factor and headway fraction
Browse files Browse the repository at this point in the history
  • Loading branch information
AshishKuls committed Apr 19, 2024
1 parent 5143896 commit a89a01f
Showing 1 changed file with 15 additions and 24 deletions.
39 changes: 15 additions & 24 deletions tm2py/components/network/create_tod_scenarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,30 +480,21 @@ def _create_transit_scenarios(self):

# set headway fraction, transfer wait perception and transfer boarding penalty at specific nodes
for line in network.transit_lines():
if line.vehicle.mode.id == "r":
for seg in line.segments():
seg.i_node["@hdw_fraction"] = headway_fraction[
line.vehicle.mode.id
]
seg.j_node["@hdw_fraction"] = headway_fraction[
line.vehicle.mode.id
]
elif line.vehicle.mode.id == "f":
for seg in line.segments():
seg.i_node["@hdw_fraction"] = headway_fraction[
line.vehicle.mode.id
]
seg.i_node["@wait_pfactor"] = transfer_wait_perception_factor[
line.vehicle.mode.id
]
seg.j_node["@hdw_fraction"] = headway_fraction[
line.vehicle.mode.id
]
seg.j_node["@wait_pfactor"] = transfer_wait_perception_factor[
line.vehicle.mode.id
]
elif line.vehicle.mode.id == "h":
for seg in line.segments():
for seg in line.segments():
seg.i_node["@hdw_fraction"] = headway_fraction[
line.vehicle.mode.id
]
seg.j_node["@hdw_fraction"] = headway_fraction[
line.vehicle.mode.id
]
seg.i_node["@wait_pfactor"] = transfer_wait_perception_factor[
line.vehicle.mode.id
]
seg.j_node["@wait_pfactor"] = transfer_wait_perception_factor[
line.vehicle.mode.id
]

if line.vehicle.mode.id == "h":
if (
seg.i_node["#node_id"]
in self.controller.config.transit.timed_transfer_nodes
Expand Down

0 comments on commit a89a01f

Please sign in to comment.