Timetables are built from individual journeys that are active on the specific date the timetable was requested for, and in the desired direction.

Timetable sorting

Journeys (timetable columns)

When journeys are imported they may optionally contain a sequence number - this can be used to determine the order of the journey column in a timetable.

Historically this data was not of a high enough quality for us to use - instead, we implemented a sorting algorithm so all timetables are sorted consistently. If you would like to switch to using journey sequence numbers, please contact [email protected].

The sorting algorithm sorts journeys by comparing the visit times on matching stops between the journeys. If there are no matching stops, the time of the first departure is compared instead. The journeys are sorted with the earliest departures starting at the left, and ascending to the right.

Stop waypoints (timetable rows)

When journeys are imported, their timing links may optionally contain a sequence number - this can be used to determine the order of the rows in a timetable. 

Historically this data was not of a high enough quality for us to use - instead we implemented a sorting algorithm so all timetables are sorted consistently. Passenger does not currently support using timing link sequence numbers - this is on our road-map. 

The sorting algorithm sorts rows by taking the initial list of stop “waypoints” from the longest journey in the timetable.

New stops will be added from shorter journeys after the previous stop in common with the current list. If the first stop on a shorter journey isn’t in the current list, it will be added to the top.

Continue to the next article on Managing Journey Data: Condensed timetables - major and minor stops.