Include empty rail stops in transfers#6208
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6208 +/- ##
=============================================
- Coverage 69.75% 69.70% -0.05%
- Complexity 17652 17683 +31
=============================================
Files 2006 2008 +2
Lines 75525 75812 +287
Branches 7731 7761 +30
=============================================
+ Hits 52679 52847 +168
- Misses 20134 20251 +117
- Partials 2712 2714 +2 ☔ View full report in Codecov by Sentry. |
I don't think setting this is possible for GTFS feeds. Is it possible to make this work? My deployment returns |
|
@miklcct For the record, it is possible to set This PR is a temporary fix, and we are removing this feature when the underlying bug is fixed. |
I have set the |
leonardehrenfried
left a comment
There was a problem hiding this comment.
A couple of typos but generally this looks good.
Look forward to the more general solution.
Co-authored-by: Leonard Ehrenfried <mail@leonard.io>
| .query(geometry.getEnvelopeInternal()) | ||
| .stream() | ||
| .filter(stop -> flexibleStopTransitMode == stop.getGtfsVehicleType()) | ||
| .filter(stop -> flexibleStopTransitMode == stop.getVehicleType()) |
There was a problem hiding this comment.
What is this used for? Vehicle type information is not required, I don't know how much we should rely on that information in general.
There was a problem hiding this comment.
I just noticed this is in the netex mapping, perhaps it's required there and this is fine.
There was a problem hiding this comment.
I have no clue, I just renamed the very confusing method name - as you noticed, it is used for both GTFS and NeTEx so having GTFS as part of the name is wrong.
There was a problem hiding this comment.
It's used to show a stop's mode in the API. However, since it's not required we also deduce it from the patterns that visit the stop:
…ation/OTPFeature.java Co-authored-by: Joel Lappalainen <lappalj8@gmail.com>
af8c99b to
d1f8e3c
Compare
|
Can you update the generated documentation? |
|
Unfortunately, as expected, this won't work for a real time rail replacement bus where it calls at stops normally unused but reserved for them, because they are not a rail stop. |
|
I have just deployed a version without the rail check and the number of transfers has gone from 31.7k to 33.0k, so it is a minor difference in GB, and it has fixed the issue of routing people to a rail replacement bus from a dedicated stop. |
Summary
Include regular transfers with from/to "empty" rail stops (platforms) when using the
OTPFeature#ConsiderPatternsForDirectTransfers. It is common for stops to be assign at realtime for rail, if so turningOTPFeature#IncludeEmptyRailStopsInTransferson will help to avoid dropping transfers witch is needed when the realtime is applied. We assume the set of truly unused rail stops is limited; Hence the performance overhead of adding them all should be limited.Note! This is only applied to stops witch has vehicleType Rail. If the input feeds does not have a mode set for the stop
this fix will not work! Consider turning off
ConsiderPatternsForDirectTransfersinstead or fix the feeds.Issue
This will help for issue #5461, but is not the ideal fix. The real fix is to generate transfers (both ways) for stops used in realtime - especially stops going from zero patterns to having at least one.
Unit tests
This is hard to test, no test exist for the
PatternConsideringNearbyStopFinderas is. I have manually tested the case in issue #5461 - and this fix does work for it.Documentation
✅ The new feature flag is documented.
Changelog
✅ Minor feature
Bumping the serialization version id
Only a new feature flag is added to the model, so there is no need to bump the ser-ver-id.