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

keepRoutingOnFoot only in transit access searches #931

Merged
merged 1 commit into from
Feb 16, 2024
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
14 changes: 8 additions & 6 deletions src/main/java/com/conveyal/r5/analyst/TravelTimeComputer.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,16 @@ public OneOriginResult computeTravelTimes() {
// The generalized cost calculations currently increment time and weight by the same amount.
sr.quantityToMinimize = StreetRouter.State.RoutingVariable.DURATION_SECONDS;
sr.route();
// Change to walking in order to reach transit stops in pedestrian-only areas like train stations.
// This implies you are dropped off or have a very easy parking spot for your vehicle.
// This kind of multi-stage search should also be used when building egress distance cost tables.
if (accessMode != StreetMode.WALK) {
sr.keepRoutingOnFoot();
}

if (request.hasTransit()) {
// Change to walking in order to reach transit stops in pedestrian-only areas like train stations.
// This implies you are dropped off or have a very easy parking spot for your vehicle.
// This kind of multi-stage search should also be used when building egress distance cost tables.
// Note that this can take up to twice as long as the initial car/bike search. Do it only when the
// walking is necessary, and when the radius of the car/bike search is limited, as for transit access.
if (accessMode != StreetMode.WALK) {
sr.keepRoutingOnFoot();
}
// Find access times to transit stops, keeping the minimum across all access street modes.
// Note that getReachedStops() returns the routing variable units, not necessarily seconds.
// TODO add logic here if linkedStops are specified in pickupDelay?
Expand Down
Loading