-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Arrive by direct flex result filtered out because it is too short compared to transit #6046
Comments
We talked about this in today's dev meeting and have come up with a way forward. I will be opening a draft PR which @daniel-heppner-ibigroup can test and Thomas and I will work on the details. |
The search window do not apply to street-direct searches. I think that the direct flex also falls into this category. The direct ittineraries can be time-shifted. This is not always true for flex, but I think we do threat them like this anyway. The direct search is only performed in the first page, not layer on. The search-window filter should only be applied to transit(Raptor) results, because this is where the search-window is relevant. The minTravelTime is used to computer the search-window and is not relevant here. |
@daniel-heppner-ibigroup has reported the following problem with a Seattle data set:
Investigation
This happens because the
OutsideSearchWindowFilter
computes an incorrectlatestArrivalTime
in this case:OpenTripPlanner/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/OutsideSearchWindowFilter.java
Lines 25 to 28 in 07407c2
This is too simplistic, because the latest departure time is not actually
earliestDepartureTime + searchWindow
. The computation inRaptorSearchWindowCalculator
also takes the minimum transit time into account:OpenTripPlanner/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/RaptorSearchWindowCalculator.java
Lines 75 to 91 in 85994c2
This then means that if you have a long minimum transit time and a short direct flex trip, it will be filtered out.
Example
minTransitTime
is 1 hourRaptorSearchWindowCalculator
computes theearliestDepartureTime
to be 9amOutsideSearchWindowFilter
takes the 9am and adds 1 hour, leading to a time window from 9am to 10amVersion of OTP used (exact commit hash or JAR name)
f2d8a1e
Data sets in use (links to GTFS and OSM PBF files)
https://github.com/leonardehrenfried/otp2-setup/ and use the seattle config.
Steps to reproduce the problem
git clone git@github.com:leonardehrenfried/otp2-setup.git
make build-seattle run-seattle
The text was updated successfully, but these errors were encountered: