Skip to content

Commit a618a01

Browse files
committed
Remove default accessegress penalty for car modes that use transit.
1 parent fe5c570 commit a618a01

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

application/src/main/java/org/opentripplanner/routing/api/request/preference/AccessEgressPreferences.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ private static TimeAndCostPenaltyForEnum<StreetMode> createDefaultCarPenalty() {
171171
// Add penalty to all car variants with access and/or egress.
172172
var carPenalty = TimeAndCostPenalty.of(TimePenalty.of(ofMinutes(20), 2f), 1.5);
173173
for (var it : StreetMode.values()) {
174-
if (it.includesDriving() && (it.accessAllowed() || it.egressAllowed())) {
174+
if (
175+
it.includesDriving() && (it.accessAllowed() || it.egressAllowed()) && !it.transferAllowed()
176+
) {
175177
penaltyBuilder.with(it, carPenalty);
176178
}
177179
}

application/src/main/resources/org/opentripplanner/apis/transmodel/schema.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ type QueryType {
780780
"Input type for executing a travel search for a trip between two locations. Returns trip patterns describing suggested alternatives for the trip."
781781
trip(
782782
"Time and cost penalty on access/egress modes."
783-
accessEgressPenalty: [PenaltyForStreetMode!] = [{streetMode : car, timePenalty : "20m + 2.0 t", costFactor : 1.5}, {streetMode : car_park, timePenalty : "20m + 2.0 t", costFactor : 1.5}, {streetMode : car_pickup, timePenalty : "20m + 2.0 t", costFactor : 1.5}, {streetMode : car_rental, timePenalty : "20m + 2.0 t", costFactor : 1.5}, {streetMode : flexible, timePenalty : "10m + 1.30 t", costFactor : 1.3}],
783+
accessEgressPenalty: [PenaltyForStreetMode!] = [{streetMode : car_park, timePenalty : "20m + 2.0 t", costFactor : 1.5}, {streetMode : car_pickup, timePenalty : "20m + 2.0 t", costFactor : 1.5}, {streetMode : car_rental, timePenalty : "20m + 2.0 t", costFactor : 1.5}, {streetMode : flexible, timePenalty : "10m + 1.30 t", costFactor : 1.3}],
784784
"The alightSlack is the minimum extra time after exiting a public transport vehicle. This is the default value used, if not overridden by the 'alightSlackList'."
785785
alightSlackDefault: Int = 0,
786786
"List of alightSlack for a given set of modes. Defaults: []"

application/src/test/java/org/opentripplanner/routing/api/request/preference/StreetPreferencesTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ void testToString() {
113113
"elevator: ElevatorPreferences{boardTime: 2m}, " +
114114
"intersectionTraversalModel: CONSTANT, " +
115115
"accessEgress: AccessEgressPreferences{penalty: TimeAndCostPenaltyForEnum{" +
116-
"CAR: (timePenalty: 20m + 2.0 t, costFactor: 1.50), " +
117116
"CAR_TO_PARK: " +
118117
CAR_TO_PARK_PENALTY +
119118
", " +

doc/user/RouteRequest.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,6 @@ performance will be better.
460460

461461
The default values are
462462

463-
- `car` = (timePenalty: 20m + 2.0 t, costFactor: 1.50)
464463
- `car-to-park` = (timePenalty: 20m + 2.0 t, costFactor: 1.50)
465464
- `car-pickup` = (timePenalty: 20m + 2.0 t, costFactor: 1.50)
466465
- `car-rental` = (timePenalty: 20m + 2.0 t, costFactor: 1.50)

0 commit comments

Comments
 (0)