Skip to content

Proposal: Support DUPLICATED trips in GTFS-RT#52

Closed
barbeau wants to merge 4 commits intomasterfrom
duplicated
Closed

Proposal: Support DUPLICATED trips in GTFS-RT#52
barbeau wants to merge 4 commits intomasterfrom
duplicated

Conversation

@barbeau
Copy link
Member

@barbeau barbeau commented Apr 29, 2020

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_relationship of ADDED is a potential candidate to convey this type of information. However, the GTFS-RT spec has not clearly defined what exactly ADDED is and how it should be used. As a result, multiple consumers and producers have different interpretations of what an ADDED trip is [2][3].

Proposal

This proposal adds a new trip schedule_relationship of DUPLICATED, 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 field TripDescriptor.trip_id is used to identify the trip to be duplicated in GTFS trips.txt (CSV), and TripProperties.trip_id defines the new trip_id for the new trip.

This proposal also deprecates the existing trip schedule_relationship of ADDED, which has be used differently by various producers and consumers with varying meaning due to lack of clarify in the current spec [2][3]. ADDED is 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 DUPLICATED instead. 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 TripProperties message (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)

@barbeau
Copy link
Member Author

barbeau commented May 4, 2020

Closing to open a PR on the main google/transit repo.

@barbeau barbeau closed this May 4, 2020
@barbeau
Copy link
Member Author

barbeau commented May 4, 2020

Proposal opened at google#221.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant