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
- Mode of transport
- Journey
- Metastop: Metastops are different stops which belong together for changing transport. A typical example is the bus stop at a railway station, and the railway station itself
- Timetable
- Real-time data
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:
- Open Journey Planner (OJP)
- OJPLocationInformationRequest
- OJPStopEventRequest
- OJPTripRequest
- OJPTripInfoRequest
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:
- OJP und die neue TRIAS- und GTFS-Schnittstelle
- TRIAS LocationInformationRequest
- TRIAS Departure / Arrival Display
- TRIAS TripRequest
- TRIAS Trip Forecast
Further information
- http://stackoverflow.com/questions/483488/strategy-to-find-your-best-route-via-public-transportation-only
- http://transport.okfn.org/2013/09/23/short-history-of-routes-computation/
- https://arxiv.org/pdf/1504.05140.pdf
- http://i11www.iti.uni-karlsruhe.de/extra/publications/dpsw-isftr-13.pdf
- http://ad-publications.informatik.uni-freiburg.de/ESA_transferpatterns_BCEGHRV_2010.pdf