Skip to content

Public transit

The Public Transit model is an assignment model that uses the Dijkstra algorithm in combination with the Eppstein algorithm. It spread the trips in the OD matrix over the multiple paths from the Eppstein algorithm using a normalised multinomial logit function.

Controls

The model responds to the following controls:

  • Stops

    Alter existing stops as defined in the pt_node_transitline collection.

  • Line frequency

    Alter the frequency per transit line.

Controls are defined in the controltype collection located in the main bin, the default set consists of:

ICON JSON NAME OBJECT_ID OBJECT_TYPE
transitline-control [{"name":"FREQUENCY","type":"text","label":"Frequency of line","default":"","validate":"number","required":true,"placeholder":""}] PT frequency 1 transitline

Parameters

Parameters are defined in the parameters key/value sets and are scenario specific.

Parameter Description Default value
dimensionsPT Points to the object_id in the traf_dimensions collection for which to assign public transit trips
referenceRun Write all matrix results to the reference columns and shut down the model false
writeSkims Write traveltimes, distances to the ODMatrices of the defined dimensions true
outputDimWalk Should both be positive to export to access/egress walk matrix -1
outputDimBike Should both be positive to export to access/egress walk matrix -1
walkSpeedKMH The maximum access/egress speed to walk in km/h 4
bikeSpeedKMH The maximum access/egress speed to bike in km/h 15
carSpeedKMH The maximum access/egress speed to drive in km/h 50
distWalkMax The maximum access/egress distance to walk in meters 333.3
distBikeMax The maximum access/egress distance to bike in meters 4080
accessDistanceTrainMax The maximum access and egress distance to consider using a train stop in meters 10000
accessDistanceOtherMax The maximum access and egress distance to consider using any other transit stop oterh than train in meters 2000
accessEgressDistanceFactor Factor with which the access distance and thus travel time is multiplied 1.2
accessFactor Factor with which the access time is multiplied 1.2
egressFactor Factor with which the egresstime is multiplied 1.2
walkDistanceMetroAndTrainMaxTransfer Maximum walk transfer distance in meters for metro and train 500
walkDistanceMaxTransfer Maximum walk transfer distance in meters for any other transit mode besides metro and train 200
transferPenaltyHours Fixed additive transfer penalty in hours 0.063
walkTimeFactorTransfer Factor with which the transfer time is multiplied (to account for stairs, curves, and so on) 1.5
malusFactor Extra travel time factor for any transit mode besides train and metro 1.5
attractivenessBasePenaltyHours Maximum extra penalty based on the number of and type of stops near the stop of interest 0
waitTimeFactor Factor with which the wait time is multiplied to account for the feeling of waiting for both transfer and access/egress 1.5
focusOriginID Zone ID to only show trips from that zone (<0 means not active) -1
focusDestinationID Zone ID to only show trips to that zone (<0 means not active) -1
numAlternatives Number of alternative paths considered in the Eppstein calculation 5
numMaxTransfers Maximum number of transfers (So lines used is numMaxTransfers + 1) 4
logitEppsteinFactor Factor used in multinomial logit to set the spreading behaviour for the alterantive paths 3

Methodology

The Public Transit model is an assignment model that uses the Dijkstra algorithm in combination with the Eppstein algorithm. It spread the trips in the OD matrix over the multiple paths from the Eppstein algorithm using a normalised multinomial logit function.

The model and its default parameters are based on the Scenarionetwerk Openbaar Vervoer description by Rijkswaterstaat, the executive agency of the Dutch Ministry of Infrastructure and Water Management.

A public transit trip consists of three main parts:

  1. Access part
  2. Public transit part (including potential transfers)
  3. Egress part
  • Access and egress links are created on the fly between zones and access stops as the crow flies. The distance and travel time is estimated using the parameters in Access/Egress parameters, taking a weight factor into account, to account for corners, turns etc.
  • The mode choice for the access and egress part is done implicitly.
  • For a given zone, only one access/egress link is created per transit line. I.e. the stop of the line nearest to the zone.
  • The waiting time to board a line is stored on the access link (with the dwell time subtracted), enabling to use the Dijkstra algorithm without any major modifications
  • Transfer links are also created on the fly between exit stops and access stops as the crows fly. The travel time and distance is estimated using the parameters in Transfer parameters.
  • On the transfer links, the dwell times and averaged wait time based on the frequency are taken into account for the cost.

Public transit network structure

For each transitline, multiple nodes and edges are added per stop to prevent invalid paths (e.g. only using transfers or using a stop but not boarding it). Each stop has a board node, exit node, and travel node:

  • Board node: Enables entering the transitline (No board node for the last stop)

    • Link from board node to travel node
    • Zero cost as frequency penalty is put on the access/transfer link
  • Exit node: Enables exiting the transitline (No exit node for the first stop)

    • Link from travel node to exit node
    • Has a link with the travel time without the dwell time
  • Travel node: Node for staying inside the transitline

    • Link from travel node to next stop travel node
    • Travel time and dwell time combined

Eppstein algorithm - Alternative paths (k-th shortest path)

The alternative paths are determined using shortcuts as described in the study done by Eppstein, D. (Eppstein, D. (1998). Finding the k shortest paths. SIAM Journal on computing, 28(2), 652-673.).

A shortest path tree is traversed from its destination node to the source node. For every encountered node in the path, all other outgoing (or incoming, depending on search direction) edges are investigated. The difference in travel time is determined and the result is a so-called shortcut. A priority queue is kept with the viable shortcuts, sorted on the extra travel time from low to high. This priority queue needs to be of length of at least length k. When the entire shortest path is traversed, the best shortcut is explored next. The path from that shortcut to the source is again traversed and new shortcuts are added to the priority queue with the previous shortcut as the parent node.

Alternative paths that contain the exact same transitlines are removed from the alternative list, as well as paths that make use of the same transitline twice after e.g. a change. This is done by also tracking the transitlines used, and discarding these options if the same combination is already found in the alternative paths.

Discarding alternative paths with the same transitlines should be done with care. To ensure that the transfer chosen is at the most convenient stop, a stop attractiveness is introduced. The attractiveness is based on the number of and type of stops near the stop of interest. The attractiveness is converted to a penalty that is inversely proportional to the attractiveness, resulting in the most convenient alternative being found first, enabling to discard the paths with different transfer stops found afterwards.

The trips from origin to destination are spread over the alternative paths using a normalised multinonial logit function. This is only done for the intensities. For time, distance etc., only the shortest path values are written and no averaging of some sort is done.

For reference time, distance etc., only the shortest path values are written and no spreading is done.