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

Train Frequency #811

Open
yoyosource opened this issue Jan 22, 2025 · 3 comments
Open

Train Frequency #811

yoyosource opened this issue Jan 22, 2025 · 3 comments
Labels
motis changes to the MOTIS routing engine are necessary

Comments

@yoyosource
Copy link

It would be great that if I look at a Route the Train Frequency is displayed somewhere. This would be helpful for routes where a bit of delay is to be expected, thus someone does not need to research the same connection, but knows how long they would need to wait for the next train to arrive in the same direction.

This would also be a great feature for the Panel that gets shown, when you click on a Train/Bus/Underground inside the Map.

E.g.

Image

Here Both U49 and U44 have a Train Frequency of every 10 Minutes. Knowing this helps me decide if taking the S-Bahn would be faster, if the train I arrived at Dortmund HBF with is delayed, or waiting on the next U49 is. The Bus 466 would only drive every 20 to 30 Minutes (I am not sure right now).

@jbruechert
Copy link
Collaborator

Good point, I think this needs to be done upstream in MOTIS.

@Altonss
Copy link
Collaborator

Altonss commented Jan 22, 2025

This is somewhat related to : motis-project/motis#546

@felixguendling
Copy link
Contributor

From my post there:

There are multiple ways to implement this, especially when it's not the last transfer. Unfortunately, in your example it's the last transfer - so in this case the two following options would yield the same result in the majority of cases.

  1. departures that lead to the next stop at which you also transfer (or the final stop as in this case) in this particular connection. You would only search for an later alternative of the same leg, but the stop where you enter the trip and where you exit the trip would stay the same (no matter if there are better connections at this time where you would change at a different stop).
  2. departures are basically completely new connections computed from this point on. Interchange stops, etc. do not have to match (as there might be faster ways to get to the destination at this point in time than with the original pattern of transfer stops).

Option 2 would just be another routing query from the transfer station (giving you potentially completely different options on how to continue from there on).

Option 1 is not that easy to implement with the existing API. Without adding a new API, you would probably send a RailVizStationRequest (with direction = LATER), then check all returned trips with trip_to_connection requests if they also visit the stop where you would exit in the original connection. However, this doesn't really make sense to implement in the client (lots of ping/pong).

There's now a third option: just give the information from frequencies.txt for this trip. But maybe the other options are better because they don't require information to be encoded as frequencies.txt (which is often not the case).

@Altonss Altonss added the motis changes to the MOTIS routing engine are necessary label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
motis changes to the MOTIS routing engine are necessary
Development

No branches or pull requests

4 participants