Skip to content
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 serviceDate to Trip model #6241

Closed
miklcct opened this issue Nov 7, 2024 · 2 comments
Closed

Add serviceDate to Trip model #6241

miklcct opened this issue Nov 7, 2024 · 2 comments

Comments

@miklcct
Copy link
Contributor

miklcct commented Nov 7, 2024

Is your feature request related to a problem? Please describe.
The API doesn't have a distinction between Trip and TripOnDate (which can be modified by real-time updates), which causes problem when linking StopTime back to the actual instance of TripOnDate.

In particular, it is not possible to get the full list of StopTimes for a trip from the stop timetable without making an additional API call or using hacks. Also, the API also doesn't support dynamically changing headsigns by real-time updates as well.

Goal / high level use-case
I want to get that a running trip on a date as a model, with real-time diversions in it. It may be different from the schedule.

Describe the solution you'd like
The exact model will need to be discussed. For example, a serviceDate in the Trip model along with the relevant API may be sufficient.

Describe alternatives you've considered
Make Trip an interface and separate them into ScheduledTrip and TripOnDate models. The former can run on multiple dates while the latter represents one of them.

Additional context

@miklcct
Copy link
Contributor Author

miklcct commented Nov 8, 2024

Unfortunately, the model is result of conflating two different concepts which results in bugs such as #6242.

  • A scheduled trip which may run on multiple calendar dates (NeTEx Service Journey)
  • A particular instance for a trip on a date, where any properties can be modified by real time updates (NeTEx Dated Service Journey)

In our internal model, we already have TripOnServiceDate, and I think that we should deprecate the dated fields in the GTFS Trip model and expose TripOnServiceDate on the API instead, like how Transmodel works.

@t2gran does SIRI-ET support modifying the Destination Display (GTFS: headsign) or Train Number for a Service Journey in real-time?

@miklcct
Copy link
Contributor Author

miklcct commented Nov 13, 2024

superseded by TripOnServiceDate in #5393

@miklcct miklcct closed this as completed Nov 13, 2024
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

No branches or pull requests

1 participant