-
Notifications
You must be signed in to change notification settings - Fork 1.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
Remove itineraries outside the search window in arriveBy search #5433
Remove itineraries outside the search window in arriveBy search #5433
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #5433 +/- ##
=============================================
- Coverage 66.80% 66.80% -0.01%
- Complexity 15557 15563 +6
=============================================
Files 1806 1806
Lines 69821 69839 +18
Branches 7357 7359 +2
=============================================
+ Hits 46646 46653 +7
- Misses 20718 20729 +11
Partials 2457 2457
☔ View full report in Codecov by Sentry. |
src/main/java/org/opentripplanner/routing/algorithm/RoutingWorker.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/routing/algorithm/RoutingWorker.java
Outdated
Show resolved
Hide resolved
...opentripplanner/routing/algorithm/filterchain/deletionflagger/OutsideSearchWindowFilter.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've only noticed typos.
Co-authored-by: Leonard Ehrenfried <[email protected]>
.../java/org/opentripplanner/routing/algorithm/filterchain/ItineraryListFilterChainBuilder.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Johan Torin <[email protected]>
This is not an attempt to fix this. It only fixes the bug in the searchWindow itinerary filter. @eibakke is working on a fix to the paging logic. |
@jtorin I have updated the title of this PR - it was confusing. |
@jtorin I studied the test results again. There is not enough information to tell if the above is an error or not - I do not see that it is related to the thing I have fixed. The debug UI only show minutes, so when walking to the destination it is likely that you arrive there 06:05:01 witch would be to late if the dateTime is set to 06:05:00. So, my question is - is the test you have above working on the current version of OTP? There are another thing tat looks strange in the result as well. There is a very long wait time between the access walk and the transit - to me this is an indication that the search-window is incorrect calculated on the server. |
You need to resolve the conflicts. |
@Bartosz-Kruba will review. |
…rive_by_true # Conflicts: # src/main/java/org/opentripplanner/routing/algorithm/RoutingWorker.java # src/main/java/org/opentripplanner/routing/algorithm/filterchain/ItineraryListFilterChainBuilder.java # src/main/java/org/opentripplanner/routing/algorithm/mapping/RouteRequestToFilterChainMapper.java
Yes. On dev:(same commit as the latest merge) (version: 2.5.0-SNAPSHOT, ser.ver.id: 123, commit: a9b0151, branch: a9b0151) using Java 21.0.1 Results comes first when searching from 6:06. With PR:(version: 2.5.0-SNAPSHOT, ser.ver.id: 123, commit: 299520c, branch: entur/otp2_fix_prev_page_arrive_by_true) using Java 21.0.1 Results comes first when searching from 6:07. Otherwise same data and config. |
For completeness, here are links to the data used to build the graph used in my testing: |
Thank you @jtorin for the findings and the data. I suggest we merge this and look into the bug after #5436 and #5458 is merged. Our client team have reported other bugs on this as well and it is just not possible to test this properly without merging all these fixes. Currently we had to turn "arriveBy" off, because it does not work - so, the one missed trip is a minor thing compared to the other errors. The only explanation I have for the behaviour you have reported is that in that there is something wrong with the heuristic. I find the result a bit odd because of the wait time after the access walk - this does not look right. Another tip is to turn off the itinerary filter, then if the trip is removed by the |
Yes, as expected the missing trip is returned tagged 'outside-search-window'. Increasing the search-window drastically will eventually produce other trips from the previous day. I guess the search-window is only (and obviously) increased backwards in time, not that one second forwards that is required to find the suppressed trip. Still, it's nevertheless interesting that the trip is found and filtered, shows that perhaps the search is correct but the filtering not. |
@jtorin I have tested the reported case with #5458 today. I promised to come back to this. First - The exact arrival time is 6:05:26 am (1697688326000 EPOCH) (use the browser developer tools). So if you set the arrival-time to 06:05, then the expected result should be NOT FOUND.
"but arrival time must be increased" this is a bug in the old version of OTP, as explained above - when setting the arrival time to 06:05:00 - you should not get a result. |
There is still a problem with the arriveBy search and paging. I am looking into this. |
Summary
Paging does not work with
arriveBy=true
. The searchWindowlatest-depature-time
is not enforced, when paging. For more info, see issue.Issue
Closes #5432
Unit tests
This PR updates the filter unit-tests, but I have not added an integration test for the itinerary.
Documentation
JavaDoc is updated, other doc is not changed.
Changelog
✅
Bumping the serialization version id
Not needed