Proposal: Support DUPLICATED trips in GTFS-RT#52
Closed
Conversation
Member
Author
|
Closing to open a PR on the main google/transit repo. |
Member
Author
|
Proposal opened at google#221. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Producers and consumers have identified the need for a lightweight method to take an existing trip defined in static GTFS, and then in real-time say that its pattern (e.g., the stop_times.txt definition) is running at a new service date and/or time [1].
The GTFS-RT spec does not currently define a official way to duplicate trips. The
schedule_relationshipofADDEDis a potential candidate to convey this type of information. However, the GTFS-RT spec has not clearly defined what exactlyADDEDis and how it should be used. As a result, multiple consumers and producers have different interpretations of what anADDEDtrip is [2][3].Proposal
This proposal adds a new trip
schedule_relationshipofDUPLICATED, which can be used to duplicate an existing trip from GTFS (CSV) but then run that trip pattern at a new time (TripProperties.start_time) and/or service date (TripProperties.start_date). The existing fieldTripDescriptor.trip_idis used to identify the trip to be duplicated in GTFS trips.txt (CSV), andTripProperties.trip_iddefines the newtrip_idfor the new trip.This proposal also deprecates the existing trip
schedule_relationshipofADDED, which has be used differently by various producers and consumers with varying meaning due to lack of clarify in the current spec [2][3].ADDEDis soft-deprecated, which means that if existing producers and consumers want to continue using it for their own purposes it will remain usable in the .proto file.This pull request is a subset of the GTFS-ServiceChanges v3.1 spec:
https://bit.ly/gtfs-service-changes-v3_1
A few producers and at least one consumer currently implement this use case via ADDED, so it should be relatively straightforward to change the implementation to using
DUPLICATEDinstead. Therefore, this feature could be adopted prior to the remainder of the ServiceChanges proposal.Future proposals may add other fields defined in GTFS trips.txt to the
TripPropertiesmessage (e.g., route_id, trip_headsign, trip_short_name, block_id, shape_id) so they can be changed in real-time. See the ServiceChanges proposal for details.[1] google#216
[2] google#106
[3] google#113 (comment)