Skip to content

Commit

Permalink
Merge branch 'dev' into path-route-names
Browse files Browse the repository at this point in the history
  • Loading branch information
abyrd authored Feb 29, 2024
2 parents eca7051 + d12f763 commit 4f4985b
Showing 1 changed file with 8 additions and 6 deletions.
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

0 comments on commit 4f4985b

Please sign in to comment.