Skip to content

Routing

In most cases, people need to change train, bus etc. when using public transport. If a customer wants to get from a geographical point A to a point B, he or she will often cover part of the trip on foot and must change between different modes of transport.

The algorithms which do this are called route finders or routing.

Technical description

In the case of routing, the topology is mostly imported using the timetable. Constraints are worked out and the routing algorithm is used to calculate an ideal route for each query, based on various parameters.

Key concepts

Possible parameters for route finder.

There are many different choices possible as to which aspect(s) to optimize.

  • Minimum duration
  • Minimum cost
  • Few tunnel sections
  • As few changes as possible
  • Preference for bus or rail
  • Rapid change
  • Safe change
  • Consideration of aspects relating to the Disability Discrimination Act (DDA)
  • Dining car/Minibar
  • Specifically via
  • Consideration of real-time information

Technical aspects

In its initial phase, routing is very of often based on an analysis of the timetable. The HRDF file contains the key details for establishing routing for public transport in Switzerland.

The following files should be of interest:

  • BAHNHOF: Details about the stops.
  • BFKOORD and BFKOORD_GEO: Coordinates of the stops.
  • BITFELD: This file is used to determine on which days of operation a train runs.
  • FPLAN: Timetable
  • GLEIS: Platform details
  • DURCHBI: If two journeys are carried out by the same train/vehicle, the passengers can remain sitting in such cases. This is a through-service.
  • METABHF: Details about the metastations.
  • UMSTEIG*: Various details about interchanges

Ideal Routing

It is definitely a good idea to implement different routing algorithms as different customers have different ideas as to what an ideal routing is.

Open Data Platform and Routing

OJP Routing

Pages to consider:

Routing TRIAS

The TRIAS2020 interface offers a routing service similar to the OJP. It is ready to use for those who prefer to continue working with TRIAS (instead of switching to the newer OJP).

Pages to consider:

Further information