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
Fix validation of running period for NeTEx flexible lines #5007
Fix validation of running period for NeTEx flexible lines #5007
Conversation
I think you want to have trip times so you can look them up in the API, isn't it? That was the reason we added them. Can you check that the Transmodel API still returns the same values before and after this change? |
This is poor design, reusing TripTimes to pass on information - breaking some core assumptions in TripTimes (purpose is scheduled routing). I think we need to discuss it. |
The mapping is required for trips containing at least two scheduled fixed stops, as they will be used in RAPTOR routing for intermediate legs. However those might not have a scheduled time on the first stop, which will break the sorting. This information need to be stored somewhere, so that we can show the time windows for the flex trips in the APIs |
Then obviously if these trips are used in Raptor, they cannot be filtered out at mapping time. |
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #5007 +/- ##
==========================================
Coverage 64.08% 64.08%
Complexity 13593 13593
==========================================
Files 1676 1676
Lines 66288 66288
Branches 7154 7155 +1
==========================================
+ Hits 42479 42483 +4
+ Misses 21430 21426 -4
Partials 2379 2379
... and 8 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
7bd10ac
to
8f943a6
Compare
Summary
As detailed in #5006 , the calculation of the start and end of the transit period is wrong when a flexible line contains both fixed stops and flexible areas.
The construction of TripTimes in this case is necessary since Raptor makes use of flexible lines when they contain at least 2 fixed stops. Moreover these TripTimes are also used to provide flexible trip information in the TransModel API.
This PR relaxes the validation rule of the running period for flexible trips. Flexible trips are identified with Route.getFlexibleLineType() , so this fix covers only flexible lines imported from NeTEx datasets.
Issue
Partially fixes #5006
Unit tests
✅
Documentation
No