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

Consider transit stop access for in station transfers #4542

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions src/mjolnir/transitbuilder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,6 @@ void ConnectToGraph(GraphTileBuilder& tilebuilder_local,
// Add the node and directed edges
nb.set_edge_index(edge_index);

// reset the access to defaults.
nb.set_access((kPedestrianAccess | kWheelchairAccess | kBicycleAccess));
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the access mask inherited from the GTFS.

This should not break the multimodal costing which doesn't evaluate the node access, nor normal pedestrian routes since those nodes are connections between the transit graph and the pedestrian graph.

nb.set_edge_count(tilebuilder_transit.directededges().size() - edge_index);
tilebuilder_transit.nodes().emplace_back(std::move(nb));
}
Expand Down
12 changes: 9 additions & 3 deletions src/thor/multimodal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,15 @@ bool MultiModalPathAlgorithm::ExpandForward(GraphReader& graphreader,
} else {
if (pred.tripid() > 0) {
// tripId > 0 means the prior edge was a transit edge and this
// is an "in-station" transfer. Add a small transfer time and
// call GetNextDeparture again if we cannot make the current
// departure.
// is an "in-station" transfer.
// This mean changing vehicle (unboard, wait, board again).
// So first check if the pedestrian costing allow traversing
// this node.
if (!pc->Allowed(nodeinfo)) {
continue;
}
Comment on lines +397 to +399
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If wheelchair_boarding was set to false and access mask keeped on the stop node, a normal pedestrian costing won't allow wheelchair users to "walk" (unboard and board) through this node.

// Then add a small transfer time and call GetNextDeparture again
// if we cannot make the current departure.
// TODO - let's get the transfers.txt implemented!
if (offset_time.day_seconds() + 30 > departure->departure_time()) {
departure =
Expand Down