-
Notifications
You must be signed in to change notification settings - Fork 184
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 duplicated trips in GTFS-realtime #216
Comments
@ritesh-warade-ibigroup the approach that you lay out might even depend on the case. The added trip that you describe is a reinforcement trip. For that I could imagine using 2 concurrently. But for really added or modified trips (different route) I would say that 1 is preferable. |
@ritesh-warade-ibigroup In short, there isn't an official way to duplicate trips in the current GTFS-RT spec. Google supports (2) with Goining forward, the "right" way to duplicate a trip in GTFS-realtime is the new I'm actually in the process of working on a new PR that's a subset of Service Changes, pulling out the fields to support |
@barbeau I hope we can still use ADDED for the other purpose :) |
@skinkie |
Is the goal for ServiceChanges to not only represent near-term temporary conditions such as detours or rail replacement buses but also true real time operating conditions that require adding trips or skipping stops? The current As an LIRR example, when a train (A) is canceled ad-hoc (unplanned), the next train (B) will often add stops to handle the passengers of the first train. In both our internal systems and our forthcoming GTFS-RT release, the output will consist of marking both A and B as |
Yes, ServiceChanges can add entire new trips in real-time via a new There is a draft .proto here with the additions if you want to take a look: ...as well as draft Java bindings for prototyping here:
Yes, with the full ServiceChanges additions you'd mark A and B as CANCELED, and then add the new trip (which is similar to B but adds stops) as a completely new If it was a detour with new stops that aren't in static GTFS CSV files, you can add new |
MBTA uses |
Thank you all! @barbeau re:
Yes, this is probably something that we can use. (Hopefully what you come up with is not super complicated) |
@ritesh-warade-ibigroup Not complicated at all - essentially you'd swap ADDED for DUPLICATED, identify the trip from CSV GTFS via TripDescriptor.trip_id, and specify the new service date and/or time to run in two new fields. I'll work on publishing the draft shortly. |
@barbeau sounds good. can you post a link to the draft here when you publish? |
@ritesh-warade-ibigroup Will do. |
@ritesh-warade-ibigroup I've opened a PR for a proposal to support |
The proposal supporting DUPLICATED trips at #221 was voted on and adopted as an experimental feature, so I'm going to close this out. |
See google/transit#216. There are unofficial cases where stop_id and stop_sequence have differed in the past, that is cleaned up by DUPLICATED proposal.
Case: An added trip is created in a CAD/AVL system by duplicating an existing trip or block and then assigning a schedule offset (so the duplicated trip operates XX mins before or after the original trip)
Question: What is the best way to represent such added trips in GTFS-realtime?
Two possible approaches are (1) assigning a unique entity_id and unique trip_id to the duplicated trip or (2) assigning a unique entity_id with the same trip_id from the schedule but a different start_time than the scheduled trip.
Approach 2 seems better since then consumers would know which trip (and so its shape and stop_times) was duplicated, but 1) can two trips in the same GTFS-realtime feed have the same trip_id? 2) If yes, does this cause any issues for consumers?
Is there a better approach?
The text was updated successfully, but these errors were encountered: