-
Notifications
You must be signed in to change notification settings - Fork 183
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
Add trip-to-trip transfers with in-seat option #303
Conversation
Support for consuming these in OpenTripPlanner v2 is added in opentripplanner/OpenTripPlanner#3831 |
| `min_transfer_time` | Non-negative integer | Optional | Amount of time, in seconds, that must be available to permit a transfer between routes at the specified stops. The `min_transfer_time` should be sufficient to permit a typical rider to move between the two stops, including buffer time to allow for schedule variance on each route. | | ||
|
||
#### Linked trips |
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.
💯 for this illustration
+1, I have this as a backlog item from years ago and I will eventually add it to TriMet's GTFS |
Thanks for the feedback everyone! There's no producers currently creating the data described in the PR, so a vote is not possible at the moment. We have a couple producers that we know are interested but none that would be able to create data quickly. If there are any producers interested in producing trip-to-trip transfers with in-seat option, don't hesitate to mention it here or reach out to me. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
We are still waiting on a producer creating that for this PR but we had multiple producers commit on doing it. |
Still waiting on producers, but we're hearing it's actively being worked on! Meanwhile, we now have an open source tool that can convert block-based trip linking into transfers are proposed in this PR. The transition uses heuristics to do the conversion and find if in-seats transfers are possible, so this would be the perfect tool for consumers wanting to use the new specification. However, for producers having the real information about in-seats transfers this might only be a tool to explore the potential result and validation. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still being worked on! |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still being worked on. We're actively using trip-to-trip transfers in production. Several producers are working on generating this data. |
At the MBTA, we're working on producing some of this data in the coming week or two. Specifically, we will be adding However, at least for now, we will not be adding In addition, for some use cases of the data, say an operational dashboard displaying all the trip blocks, it seems to me much easier to generate that using a block ID and sorting. To do the same with We're aware that Google misuses |
@losvedir all the points that you are making are valid, even if mixing transfer_type=4/5 and block_id is not something we envisioned. Mixing the two can create confusions, especially considering that using block_id always requires some guessing and matching. I would suggest duplicating the value but it's still valid to not use if it you don't want to. I added some clarification in the spec to mention the transfers have priority vs block when there's a conflict. |
I’m opening a vote on this PR. Consumer : Transit, OpenTripPlanner. I'd also like to note to any producers wanting to update their backend that we created a converted that takes a GTFS with blocks and converts it to a GTFS with type 4 and 5 transfers. Voting ends on 2022-07-25 at 23:59:59 UTC. |
Good that the N:1 and 1:N cases are documented. I wouldn't have expected this. +1 (OpenGeo) |
+1 from Entur |
+1 from Hove |
+1 Moovit |
+1 OpenTripPlanner |
+1 FlashWeb IT as a producer |
+1 from the MBTA. The MBTA has worked to implement our bus and ferry networks’ in-seat transfers as Note that the MBTA has already been publishing trip-to-trip transfers (using the |
The vote has ended with 7 votes in favour and no opposition. The proposition passes, thanks everyone! |
commit 9d5ebf1 Author: Guillaume Campagna <guillaume.campagna@gmail.com> Date: Tue Jul 26 17:09:35 2022 -0400 Add trip-to-trip transfers with in-seat option (google#303) * Add trip-to-trip transfers with in-seat option * Fix stop_id are **Conditionally Required** and formatting * Add clarification about potential conflict * Fix typo Co-authored-by: Leonard Ehrenfried <mail@leonard.io> Co-authored-by: Nicholas Paun <np@icebergsystems.ca> Co-authored-by: Leonard Ehrenfried <mail@leonard.io> commit a132709 Author: McKenzie Maidl <40008048+mckenzie-maidl-ibigroup@users.noreply.github.com> Date: Tue Jul 26 13:58:04 2022 -0700 addition of cause_detail and effect_detail to the spec (google#332) commit 8993a24 Author: Zsombor Welker <flaktack@users.noreply.github.com> Date: Mon Jul 25 14:49:40 2022 +0200 Add WheelchairAccessible documentation (google#340)
Hey all, I'm adding support for this change to the MobilityData GTFS Validator and I had a question. The spec was amended to indicate that |
It is not that they are forbidden, but that they can't refer to a stop of Also regarding routes, there is pre-existing requirement in the specification.
|
Hi! I'm adding support for linked trips to MOTIS as described in this PR and I'm not sure if I understand the specification correctly. So I wanted to ask/clarify here. Probably I'm missing a detail from the spec. If this is not the right place, I would be grateful for a hint where I can ask. With
For in-seat transfers, the specification only requires the "n" (from 1-to-n/n-to-1) side to be identical.
Question regarding the illustration example:
As I understand it: It's specified that trip A and B need to have the same Let's make an extreme example just to better understand the specification. Although it might happen in practice with long distance night trains. Trip A and B service days bitset: Which traffic days would Trip C need to have so that both A and B are coupled on both days they operate on? If C would have less or more service days than A and B, this would mean that the transfer exists in some cases and in other cases not? Or does the number of My goal is to prevent creating transfers between trips that are not to be connected - especially in cases where times >24:00 are involved and/or the transfer goes over midnight. Is there a reason to not require all involved services to have the same service_id so services can be easily matched like with I found this example in the OTP repository: https://github.com/entur/OpenTripPlanner/tree/6b502d47dc60dad18c6dab66338eea60ae41f3cb/src/test/resources/gtfs/interlining However, the example does not contain one of the corner cases I described above (no times >24:00 and all trips have the same traffic days). It would be very helpful if the GTFS (and maybe GTFS-RT) standards would provide corner-case test suits and a description what is the expected behavior of a system consuming the data. If someone thinks this could be helpful, we could start collecting minimal edge-case datasets (including descriptions) in a central spot (similar to the autobahn testsuite for websockets or Acid3 test for web browsers). Edit: I already implemented this for HAFAS Rohdaten and initially got it wrong there, too. So this time I try to get it right the first time. |
Hi @felixguendling, First, seems you're referencing internal concept you have on service days (service days bitset), so I didn't grasp everything on your questions. But here is my best answer :
If the transfer is active in some days and not others, you can duplicate A and B and have two version of the trip. One with a trip-to-trip transfer to C and one without.
For service lines that operate 24/7 and always have a trip-to-trip transfer (think of a loop route for example), there would be no way to specify with block_id a link between two service days. If we enforce that rule of always the same service_id, it would also be the case for transfer_type 4 and 5. |
Yes, the service day bitset is an internal bitset for the
This is exactly, what I wanted to compute: "What is the set of days where the transfer is active?" Based on the concept of the t1_offset = last_stop_time(t1) / 24h
t2_offset = first_stop_time(t2) / 24h
day_change_offset = last_stop_time(t1) % 24h > first_stop_time(t2) % 24h ? 1 : 0
offset = t2_offset - t1_offset + day_change_offset So if t1 operates on day Thank you for the infinite loop example - this really helped to understand the reason why Thank you for responding so quickly - even if my question was a bit confusing, sorry for that! |
The specification doesn't forbid having frequency based trips that are connected by |
* Squashed commit of the following: commit 2e6887e Author: scmcca <scott@mobilitydata.org> Date: Wed Feb 2 12:42:10 2022 -0500 [Formatting fix] Add newlines before lists Improved syntax for different markdown parsers commit 0033573 Author: Tristram Gräbener <tristramg@gmail.com> Date: Fri Jan 28 15:54:00 2022 +0100 Specify that the filename are case sensitive (google#300) Closes google#297 commit 23d877e Author: scott christian mccallum <scott@mobilitydata.org> Date: Tue Jan 18 19:09:46 2022 -0500 "Fields" and "Values" as non-header (google#302) * Squashed commit of the following: commit 9d5ebf1 Author: Guillaume Campagna <guillaume.campagna@gmail.com> Date: Tue Jul 26 17:09:35 2022 -0400 Add trip-to-trip transfers with in-seat option (google#303) * Add trip-to-trip transfers with in-seat option * Fix stop_id are **Conditionally Required** and formatting * Add clarification about potential conflict * Fix typo Co-authored-by: Leonard Ehrenfried <mail@leonard.io> Co-authored-by: Nicholas Paun <np@icebergsystems.ca> Co-authored-by: Leonard Ehrenfried <mail@leonard.io> commit a132709 Author: McKenzie Maidl <40008048+mckenzie-maidl-ibigroup@users.noreply.github.com> Date: Tue Jul 26 13:58:04 2022 -0700 addition of cause_detail and effect_detail to the spec (google#332) commit 8993a24 Author: Zsombor Welker <flaktack@users.noreply.github.com> Date: Mon Jul 25 14:49:40 2022 +0200 Add WheelchairAccessible documentation (google#340) * Update README.md (#63) * issue templates * update use cases section * update contact links * rename * Delete .github/ISSUE_TEMPLATE/spec_improvement.yml --------- Co-authored-by: scmcca <scott@mobilitydata.org> Co-authored-by: omar-kabbani <78552622+omar-kabbani@users.noreply.github.com> Co-authored-by: Emma Jae Blue <emma@Emma-Jae-Blue.local>
This PR adds new
transfer_type
s for trip to trip transfers to define if a user can do an "in seat transfer" when the same vehicle is operating two consecutive trips and the user can stay onboard. In addition, the transfer type can define when in-seat transfers aren't allowed but can link together two different trips operationally.Why are in-seat transfers useful? Why is vehicle operational information on trips useful?
Some transit systems have in-seat transfers as a core concept on how their system functions. It's also not an edge case or a lightly used feature. It's core to how Trimet, King County Metro1, and others function. With the current definition of block_id, those feeds are not representing their systems correctly.
On the other hand, it's also useful to know how a vehicle continues between trips. The main use case is to help create predictions of vehicle arrival at the start of the trip. Without knowing the link between trips, it's not possible to propagate delay information. This is used by at least Transit and Swiftly for prediction creation, and probably much more I don't know.
I thought block_ids represented this information?
Before Jan 21, 2017, block_id in GTFS would represent in-seat transfers while ignoring the operational-only functionalities. After #44, the definition was changed to represent the "same vehicle" operational definition and ignored the in-seat transfer feature. Confusion about what functionality
block_id
was present before that change, but that change didn't help.Currently, Google Maps is still using
block_id
under the pre-2017 definition of in-seat transfers (Googlers can correct me if I'm wrong). At Transit, we try to deduce via heuristics if block_id represent an in-seat transfer or not, with varying success. I'm assuming other consumers are doing something similar since in-seat transfers are so important in some markets it can't be ignored.Shouldn't the in-seat transfers be based on block_id?
There are multiple problems of the current
block_id
as implemented currentlyblock_id
.Why use
transfer_type
?The recent addition of trip to trip transfers in the spec allows us to make the type of transfer explicit. The idea of using
transfer_type
actually comes from @antrim from an old PR #32.In addition
A downside of this approach is that it's more data heavy. However, data consumers are already required to recreate this data themselves anyway.
Footnotes
Notice the "to route" mention on the right ↩