Skip to content

Commit 18b786f

Browse files
authored
Merge pull request opentripplanner#7093 from opentripplanner/via-access-egress-in-raptor
Add support for via access/egress in Raptor API (API only)
2 parents 2813cca + 0349a59 commit 18b786f

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

raptor/src/main/java/org/opentripplanner/raptor/api/model/RaptorAccessEgress.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,20 @@ default boolean hasTimePenalty() {
123123
*/
124124
int latestArrivalTime(int requestedArrivalTime);
125125

126+
/**
127+
* In a via-search (both pass-through and visit-via) the access/egress may contain one
128+
* ore more via-locations. If so Raptor needs to know how many via-locations are included
129+
* so it can skip these.
130+
* <p>
131+
* If the access/egress {@code stop} is a via-location then this method should include
132+
* it in the count.
133+
* <p>
134+
* The default is zero via-lcations visited.
135+
*/
136+
default int numberOfViaLocationsVisited() {
137+
return RaptorConstants.ZERO;
138+
}
139+
126140
/**
127141
* This method should return {@code true} if, and only if the instance has restricted
128142
* opening-hours.

0 commit comments

Comments
 (0)