PatternRide Data Type

This class represent the STATE for one possible path up until the point where a given trip is boarded(onboard of a vehicle). It represent the STATE of riding a trip, having boarded at a given stop, but not yet alighted.

Instances of this class only exist in the context of a given pattern for a given round. Hence when comparing instances we may assume that they have the same number-of-transfers and the same Pattern. We take advantage of this by excluding all "constant" criteria from the pattern-ride comparator used by the pareto-set of patternRides.

This implementation of the multi-criteria Range Raptor keep all pareto-optimal _rides_ for each pattern while possessing each stops down the line. This class keep the needed state for these rides to avoid recalculating each value more than once and to be able put then in a .

We do not do this the same way as described in the original Raptor paper. The original McRaptor algorithm keep a bag of labels(stop-arrivals) while traversing the pattern. We keep a "bag" of patternRides in MultiCriteriaRoutingStrategy for the given pattern. The main differences are:

  • Alight-/arrival specific cost is not included when comparing PatternRides. This is ok, since we add this before adding a path to the stop-arrivals at a given stop. This assumes that the cost of alighting/arrival is the same for all paths arriving by the same trip. This allow us to eliminate paths, without doing the actual stop-arrival cost calculation.
  • We do NOT allow a one trip to exclude the pattern-rides of another trip in the pareto-set. Two PatternRides are both optimal, if they have boarded the same pattern, in the same round, but on different trips/vehicles. This have no measurable impact on performance, compared with allowing an earlier trip dominating a later one. But, it allows for a trip to be optimal at some stops, and another trip to be optimal at other stops. This may happen if the generalized-cost is not increasing with the same amount for each trip between each stop.
  • We do not have to update all elements in the "pattern-bag" for every stop visited. The relative-cost is calculated once - when adding the path to the "pattern-bag" of PatternRides.

Properties
name data type description

Example

{ }