Support in-seat trip transfers in travel time calculations#225
Support in-seat trip transfers in travel time calculations#225
Conversation
- only use departures within time_range, consider initial transfer time - prepare for inseat transfer trips - test departure/arrival time range - update error messages - initial stops are at the top of the returned table
- direct transfers contain in-seat or timed transfers (type 1, 4 and 5) - route-route transfers (type 1) are not yet implemented, only trip-trip
- leads to faster calculations for large feeds. Should be used when stop_ids are aggregated later on anyways (like in travel_times) - run raptor core only for unique departures, join transfers among origin stops afterwards
trim transfer tables to necessary columns
otherwise travel_times() might return from_stop_names differing from the input stop_name
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #225 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 17 19 +2
Lines 1049 1180 +131
==========================================
+ Hits 1049 1180 +131 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks @polettif for always keeping things up to date here! I was really worried when I read your description, but then reading through the specs and looking at what gtfsrouter does, I'm pretty sure those kinds of transfers will be supported anyway. Thankfully. Great work! |
Thank you 😊 Yeah, in general it's more a passenger info issue ("no need to change trains") than routing since the next trip normally departs from the same stop_id as the previous trip. It came up in raptor specifically because there's a |
assert integers for transfer_type and min_transfer_time
differentiate walk, trip-trip and inseat transfers (duck type)
|
I analysed 68 feeds with non-trivial transfer data from MobilityData, results below (number of rows in transfers.txt). The raptor() in this PR covers more than 98% of transfers which I think is close enough. There are not a lot of pure route-to-route transfers "out there".
|
The gtfs specs support so called in-seat transfers for quite some time but I haven't come across a feed that implemented them (in my quite limited exposure to feeds). With this PR,
raptor()andtravel_times()considers such transfers withtransfer_type4 or 5.There are quite a few possibilities how these transfers can be defined.
This PR currently only implements case 1 and 6. I'll add an issue for this work-in-progress.
Other notable changes:
raptor()now takespickup_typeanddrop_off_type(in stop_times) into accountraptor()has a new paramseparate_startswhich can lead to faster calculation times for very large feeds