Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

4 Journey Planning in Public Transit Networks

This section considers journey planning in (schedule-based) public transit networks. In this scenario, the input is given by a timetable. Roughly speaking, a timetable consists of a set of stops (such as bus stops or train platforms), a set of routes (such as bus or train lines), and a set of trips. Trips correspond to individual vehicles that visit the stops along a certain route at a specific time of the day. Trips can be further subdivided into sequences of elementary connections, each given as a pair of (origin/destination) stops and (departure/arrival) times between which the vehicle travels without stopping. In addition, footpaths model walking connections (transfers) between nearby stops.

A key difference to road networks is that public transit networks are inherently time-dependent, since certain segments of the network can only be traversed at specific, discrete points in time. As such, the first challenge concerns modeling the timetable appropriately in order to enable the computation of journeys, i.e., sequences of trips one can take within a transportation network. While in road networks computing a single shortest path (typically the quickest journey) is often sufficient, in public transit networks it is important to solve more involved problems, often taking several optimization criteria into account. Section 4.1 will address such modeling issues.

Accelerating queries for efficient journey planning is a long-standing problem [45,235,247,248]. A large number of algorithms have been developed not only to answer basic queries fast, but also to deal with extended scenarios that incorporate delays, compute robust journeys, or optimize additional criteria, such as monetary cost.

4.1 Modeling

The first challenge is to model the timetable in order to enable algorithms that compute optimal journeys. Since the shortest-path problem is well understood in the literature, it seems natural to build a graph G = ( V, A) from the timetable such that shortest paths in G correspond to optimal journeys. This section reviews the two main approaches to do so ( timeexpanded and time-dependent), as well as the common types of problems one is interested to solve. For a more detailed overview of these topics, we refer the reader to an overview article by Müller-Hannemann et al. [203].

Time-Expanded Model. Based on the fact that a timetable consists of time-dependent events (e. g., a vehicle departing at a stop) that happen at discrete points in time, the idea of the time-expanded model is to build a space-time graph (often also called an event graph) [211] that “unrolls” time. Roughly speaking, the model creates a vertex for every event of the timetable and uses arcs to connect subsequent events in the direction of time flow. A basic version of the model [196, 235] contains a vertex for every departure and arrival event, with consecutive departure and arrival events connected by connection (or travel) arcs. To enable transfers

Figure 9. Realistic time-expanded (left) and time-dependent (right) models. Different vertex types are highlighted by shape: diamond (arrival), circle (transfer) and square (departure) for the left figure; and circle (stop) and square (route) for the right figure. Connection arcs in the time-expanded model are annotated with its trips ti, and route arcs in the time-dependent model with its routes ri.

between vehicles, all vertices at the same stop are (linearly, in chronological order) interlinked by transfer (or waiting) arcs. Müller-Hannemann and Weihe [204] extend the model to distinguish trains (to optimize the number of transfers taken during queries) by subdividing each connection arc by a new vertex, and then interlinking the vertices of each trip (in order of travel). Pyrga et al. [218,219] and Müller-Hannemann and Schnee [200] extend the time-expanded model to incorporate minimum change times (given by the input) that are required as buffer when changing trips at a station. Their realistic model introduces an additional transfer vertex per departure event, and connects each arrival vertex to the first transfer vertex that obeys the minimum change time constraints. See Figure 9 for an illustration. If there is a footpath from stop pi to stop pj, then for each arrival event at stop pi one adds an arc to the earliest reachable transfer vertex at pj. This model has been further engineered [90] to reduce the number of arcs that are explored “redundantly” during queries.

A timetable is usually valid for a certain period of time (up to one year). Since the timetables of different days of the year are quite similar, a space-saving technique ( compressed model) is to consider events modulo their traffic days [202,219].

Time-Dependent Model.

The main disadvantage of the time-expanded model is that the resulting graphs are quite large [218]. For smaller graphs, the time-dependent approach (see Section 2.7) has been considered by Brodal and Jacob [56]. In their model, vertices correspond to stops, and an arc is added from u to v if there is at least

Figure 10. Travel time function on an arc.

one elementary connection serving the corresponding stops in this order. Precise departure and arrival times are encoded by the travel time function associated with the arc ( u, v). Figure 10 shows the typical shape of a travel time function: each filled circle represents an elementary connection; the line segments (with slope − 1) reflect not only the travel time, but also the waiting time until the next departure. Pyrga et al. [219] further extended this basic model to enable minimum change times by creating, for each stop p and each route that serves p, a dedicated route vertex. Route vertices at p are connected to a common stop vertex by arcs with constant cost depicting the minimum change time of p. Trips are distributed among route arcs that connect the subsequent route vertices of a route, as shown in Figure 9. They also consider a model that allows arbitrary minimum change times between pairs of routes within each stop [219]. Footpaths connecting nearby stops are naturally integrated into the time-dependent model [109]. For some applications, one may merge route vertices of the same stop as long as they never connect trips such that a transfer between them violates the minimum change time [85].

Frequency-Based Model. In real-world timetables trips often operate according to specific frequencies at times of the day. For instance, a bus may run every 5 minutes during rush hour, and every 10 minutes otherwise. Bast and Storandt [27] exploit this fact in the frequency-based model: as in the time-dependent approach, vertices correspond to stops, and an arc between a pair of stops ( u, v) is added if there is at least one elementary connection from u to v. However, instead of storing the departures of an arc explicitly, those with coinciding travel times are compressed into a set of tuples consisting of an initial departure time τ dep, a time interval ∆, and a frequency f. The corresponding original departures can thus be reconstructed by computing each τ dep + fi for those i ∈ Z ≥ 0 that satisfy τ dep + fi ≤ τ dep + ∆. Bast and Storandt compute these tuples by covering the set of departure times by a small set of overlapping arithmetic progressions, then discarding duplicate entries (occurring after decompression) at query time [27].

Problem Variants. Most research on road networks has focused on computing the shortest path according to a given cost function (typically travel times). For public transit networks, in contrast, there is a variety of natural problem formulations.

The simplest variant is the earliest arrival problem. Given a source stop ps, a target stop pt, and a departure time τ, it asks for a journey that departs ps no earlier than τ and arrives at pt as early as possible. A related variant is the range (or profile) problem [206], which replaces the departure time by a time range (e. g. 8–10 am, or the whole day). This problem asks for a set of journeys of minimum travel time that depart within that range.

Both the earliest arrival and the range problems only consider (arrival or travel) time as optimization criterion. In public-transit networks, however, other criteria (such as the number of transfers) are just as important, which leads to the multicriteria problem [204]. Given source and target stops ps, pt and a departure time τ as input, it asks for a (maximal) Pareto set J of nondominating journeys with respect to the optimization criteria considered. A journey J 1 is said to dominate journey J 2 if J 1 is better than or equal to J 2 in all criteria. Further variants of the problem relax or strengthen these domination rules [200].

4.2 Algorithms without Preprocessing

This section discusses algorithms that can answer queries without a preprocessing phase, which makes them a good fit for dynamic scenarios that include delays, route changes, or train cancellations. We group the algorithms by the problems they are meant to solve.

Earliest Arrival Problem. Earliest arrival queries on the time-expanded model can be answered in a straightforward way by Dijkstra’s algorithm [235], in short TED (time-expanded Dijkstra). It is initialized with the vertex that corresponds to the earliest event of the source stop ps that occurs after τ (in the realistic model, a transfer vertex must be selected). The first scanned vertex associated with the target stop pt then represents the earliest arrival s – t journey. In the compressed time-expanded model, slight modifications to Dijkstra’s algorithm are necessary because an event vertex may appear several times on the optimal shortest path (namely for different consecutive days). One possible solution is to use a bag of labels for each vertex as in the multicriteria variants described below. Another solution is described in Pyrga et al. [219].

On time-dependent graphs, Dijkstra’s algorithm can be augmented to compute shortest paths [65, 111], as long as the cost functions are nonnegative and FIFO [208,209]. The only modification is that, when the algorithm scans an arc ( u, v), the arc cost is evaluated at time τ + dist( s, u). Note that the algorithm retains the label-setting property, i. e., each vertex is scanned at most once. In the time-dependent public transit model, the query is run from the stop vertex corresponding to ps and the algorithm may stop as soon as it extracts pt from the priority queue. The algorithm is called TDD (time-dependent Dijkstra).

Another approach is to exploit the fact that the time-expanded graph is directed and acyclic. (Note that overnight connections can be handled by unrolling the timetable for several consecutive periods.) By scanning vertices in topological order, arbitrary queries can be answered in linear time. This simple and well-known observation has been applied for journey planning by Mellouli and Suhl [191], for example. While this idea saves the relatively expensive priority queue operations of Dijkstra’s algorithm, one can do even better by not maintaining the graph structure explicitly, thus improving locality and cache efficiency. The recently developed Connection Scan Algorithm (CSA) [105] organizes the elementary connections of the timetable in a single array, sorted by departure time. The query then only scans this array once, which is very efficient in practice. Note that CSA requires footpaths in the input to be closed under transitivity to ensure correctness.

Range Problem. The range problem can be solved on the time-dependent model by variants of Dijkstra’s algorithm. The first variant [68, 206] maintains, at each vertex u, a travel-time function (instead of a scalar label) representing the optimal travel times from s to u for the considered time range. Whenever the algorithm relaxes an arc ( u, v), it first links the full travel-time function associated with u to the (time-dependent) cost function of the arc ( u, v), resulting in a function that represents the times to travel from s to v via u. This function is then merged into the (tentative) travel time function associated with v, which corresponds to taking the element-wise minimum of the two functions. The algorithm loses the label-setting property, since travel time functions cannot be totally ordered. As a result the algorithm may reinsert vertices into the priority queue whenever it finds a journey that improves the travel time function of an already scanned vertex.

Another algorithm [34] exploits the fact that trips depart at discrete points in time, which helps to avoid redundant work when propagating travel time functions. When it relaxes an arc, it does not consider the full function, but each of its encoded connections individually. It then only propagates the parts of the function that have improved.

The Self-Pruning Connection Setting algorithm (SPCS) [85] is based on the observation that any optimal journey from s to t has to start with one of the trips departing from s. It therefore runs, for each such trip, Dijkstra’s algorithm from s at its respective departure time. SPCS performs these runs simultaneously using a shared priority queue whose entries are ordered by arrival time. Whenever the algorithm scans a vertex u, it checks if u has been already scanned for an associated (departing) trip with a later departure time (at s), in which case it prunes u. Moreover, SPCS can be parallelized by assigning different subsets of departing trips from s to different CPU cores.

Bast and Storandt [27] propose an extension of Dijkstra’s algorithm that operates on the (compressed) frequency-based model directly. It maintains with every vertex u a set of tuples consisting of a time interval, a frequency, and the travel time. Hence, a single tuple may represent multiple optimal journeys, each departing within the tuple’s time interval. Whenever the algorithm relaxes an arc ( u, v), it first extends the tuples from the bag at u with the ones stored at the arc ( u, v) in the compressed graph. The resulting tentative bag of tuples (representing all optimal journeys to v via u) is then merged into the bag of tuples associated with v. The main challenge of this algorithm is efficiently merging tuples with incompatible frequencies and time intervals [27].

Finally, the Connection Scan Algorithm has been extended to the range problem [105]. It uses the same array of connections, ordered by departure time, as for earliest arrival queries. It still suffices to scan this array once, even to obtain optimal journeys to all stops of the network.

Multicriteria Problem. Although Pareto sets can contain exponentially many solutions (see Section 2.7), they are often much smaller for public transit route planning, since common optimization criteria are positively correlated. For example, for the case of optimizing earliest arrival time and number of transfers, the Layered Dijkstra (LD) algorithm [56,219] is efficient. Given an upper bound K on the number of transfers, it (implicitly) copies the timetable graph into K layers, rewiring transfer arcs to point to the next higher level. It then suffices to run a time-dependent (single criterion) Dijkstra query from the lowest level to obtain Pareto sets.

In the time-expanded model, Müller-Hannemann and Schnee [200] consider the Multicriteria Label-Setting (MLS) algorithm (cf. Section 2.7) to optimize arrival time, ticket cost, and number of transfers. In the time-dependent model, Pyrga et al. [219] compute Pareto sets of journeys for arrival time and number of transfers. Disser et al. [109] propose three optimizations to MLS that reduce the number of queue operations: hopping reduction, label forwarding, and dominance by early results (or target pruning). Bast and Storandt [27] extend the frequency-based range query algorithm to also include number of transfers as criterion.

A different approach is RAPTOR (Round-bAsed Public Transit Optimized Router) [92]. It is explicitly developed for public transit networks and its basic version optimizes arrival time and the number of transfers taken. Instead of using a graph, it organizes the input as a few simple arrays of trips and routes. Essentially, RAPTOR is a dynamic program: it works in rounds, with round i computing earliest arrival times for journeys that consist of exactly i transfers. Each round takes as input the stops whose arrival time improved in the previous round (for the first round this is only the source stop). It then scans the routes served by these stops. To scan route r, RAPTOR traverses its stops in order of travel, keeping track of the earliest possible trip (of r) that can be taken. This trip may improve the tentative arrival times at subsequent stops of route r. Note that RAPTOR scans each route at most once per round, which is very efficient in practice (even faster than Dijkstra’s algorithm with a single criterion). Moreover, RAPTOR can be parallelized by distributing non-conflicting routes to different CPU cores. It can also be extended to handle range queries (rRAPTOR) and additional optimization criteria (McRAPTOR). Note that, like CSA, RAPTOR also requires footpaths in the input to be closed under transitivity.

4.3 Speedup Techniques

This section presents an overview of preprocessing-based speedup techniques for journey planning in public transit networks. A natural (and popular) approach is to adapt methods that are effective on road networks (see Fig- ure 7). Unfortunately, the speedups observed in public transit networks are several orders of magnitude lower than in road networks. This is to some extent explained by the quite different structural properties of public transit and road networks [22]. For example, the neighborhood of a stop can be much larger than the number of road segments incident to an intersection. Even more important is the effect of the inherent time-dependency of public transit networks. Thus, developing efficient preprocessing-based methods for public transit remains a challenge.

Some road network methods were tested on public transit graphs without performing realistic queries (i. e., according to one of the problems from Section 4.1). Instead, such studies simply perform point-to-point queries on public-transit graphs. In particular, Holzer et al. [161] evaluate basic combinations of bidirectional search, goal directed search, and Geometric Containers on a simple stop graph (with average travel times). Bauer et al. [41] also evaluated bidirectional search, ALT, Arc Flags, Reach, REAL, Highway Hierarchies, and SHARC on time-expanded graphs. CoreALT, CHASE, and Contraction Hierarchies have also been evaluated on time-expanded graphs [40].

A Search.* On public transit networks, basic A* search has been applied to the time-dependent model [109, 219]. In the context of multicriteria optimization, Disser et al. [109] determine lower bounds for each vertex u to the target stop pt (before the query) by running a backward search (from pt) using the (constant) lower bounds of the travel time functions as arc cost.

ALT. The (unidirectional) ALT [148] algorithm has been adapted to both the time-expanded [90] and the time-dependent [207] models for computing earliest arrival queries. In both cases, landmark selection and distance precomputation is performed on an auxiliary stop graph, in which vertices correspond to stops and an arc is added between two stops pi, pj if there is an elementary connection from pi to pj in the input. Arc costs are lower bounds on the travel time between their endpoints.

Geometric Containers. Geometric containers [235,251] have been extensively tested on the time-expanded model for computing earliest arrival queries. In fact, they were developed in the context of this model. As mentioned in Section 2, bounding boxes perform best [251].

Arc Flags and SHARC. Delling et al. [90] have adapted Arc Flags [157, 178] to the time-expanded model as follows. First, they compute a partition on the stop graph (defined as in ALT). Then, for each boundary stop p of cell C, and each of its arrival vertices, a backward search is performed on the time-expanded graph. The authors observe that public transit networks have many paths of equal length between the same pair of vertices [90], making the choice of tie-breaking rules important. Furthermore, Delling et al. [90] combine Arc Flags, ALT, and a technique called Node Blocking, which avoids exploring multiple arcs from the same route.

SHARC, which combines Arc Flags with shortcuts [39], has been tested on the time-dependent model with earliest arrival queries by Delling [72]. Moreover, Arc Flags with shortcuts for the Multi-Label-Setting algorithm (MLS) have been considered for computing full (i. e., using strict domination) Pareto sets using arrival time and number of transfers as criteria [47]. In time-dependent graphs, a flag must be set if its arc appears on a shortest path toward the corresponding cell at least once during the time horizon [72]. For better performance, one can use different sets of flags for different time periods (e. g., every two hours). The resulting total speedup is still below 15, from which it is concluded that “accelerating time-dependent multicriteria timetable information is harder than expected” [47]. Slight additional speedups can be obtained if one restricts the search space to only those solutions in the Pareto set for which the travel time is within an interval defined by the earliest arrival time and some upper bound. Berger et al. [49] observed that in such a scenario optimal substructure in combination with lower travel time bounds can be exploited and yield additional pruning during search. It is worth noting that this method does not require any preprocessing and is therefore well-suited for a dynamic scenario.

Overlay Graphs. To accelerate earliest arrival queries, Schulz et al. [235] compute single-level overlays between “important” hub stations in the timeexpanded model, with importance values given as input. More precisely, given a subset of important stations, the overlay graph consists of all vertices (events) that are associated with these stations. Edges in the overlay are computed such that distances between any pair of vertices (events) are preserved. Extending this approach to overlay graphs over multiple levels of hub stations (selected by importance or degree) results in speedups of about 11 [236].

Separator-based techniques. Strasser and Wagner [242] combine the Connection Scan Algorithm [105] with ideas of customizable route planning (CRP) [77] resulting in the Accelerated Connection Scan Algorithm (ACSA). It is designed for both earliest arrival and range queries. ACSA first computes a multilevel partition of stops, minimizing the number of elementary connections with endpoints in different cells. Then, it precomputes for each cell the partial journeys (transit connections) that cross the respective cell. For queries, the algorithm essentially runs CSA restricted to the elementary connections of the cells containing the source or target stops, as well as transit connections of other (higher-level) cells. As shown in Section 4.5, it achieves excellent query and preprocessing times on country-sized instances.

Contraction Hierarchies. The Contraction Hierarchies algorithm [142] has been adapted to the realistic time-dependent model with minimum change times for computing earliest arrival and range queries [136]. It turns out that simply applying the algorithm to the route model graph results in too many shortcuts to be practical. Therefore, contraction is performed on a condensed graph that contains only a single vertex per stop. Minimum change times are then ensured by the query algorithm, which must maintain multiple labels per vertex.

Transfer Patterns. A speedup technique specifically developed for public transit networks is called Transfer Patterns [24]. It is based on the observation that many optimal journeys share the same transfer pattern, defined as the sequence of stops where a transfer occurs. Conceptually, these transfer patterns are precomputed using range queries for all pairs of stops and departure times. At query time, a query graph is built as the union of the transfer patterns between the source and target stops. The arcs in the query graph represent direct connections between stops (without transfers), and can be evaluated very fast. Dijkstra’s algorithm (or MLS) is then applied to this much smaller query graph.

If precomputing transfer patterns between all pairs of stops is too expensive, one may resort to the following two-level approach. It first selects a subset of (important) hub stops. From the hubs, global transfer patterns are precomputed to all other stops. For the non-hubs, local transfer patterns are computed only towards relevant hub stops. This approach is similar to TNR, but the idea is applied asymmetrically: transfer patterns are computed from all stops to the hub stops, and from the hub stops to everywhere. If preprocessing is still impractical, one can restrict the local transfer patterns to at most three legs (two transfers). Although this restriction is heuristic, the algorithm still almost always finds the optimal solution in practice, since journeys requiring more than two transfers to reach a hub station are rare [24].

TRANSIT. Finally, Transit Node Routing [28,30,224] has been adapted to public transit journey planning in [14]. Preprocessing of the resulting TRANSIT algorithm uses the (small) stop graph to determine a set of transit nodes (with a similar method as in [28]), between which it maintains a distance table that contains sets of journeys with minimal travel time (over the day). Each stop p maintains, in addition, a set of access nodes A ( p), which is computed on the time-expanded graph by running local searches from each departure event of p toward the transit stops. The query then uses the access nodes of ps and pt and the distance table to resolve global requests. For local requests, it runs goal-directed A* search. Queries are slower than for Transfer Patterns.

4.4 Extended Scenarios

Besides computing journeys according to one of the problems from Section 4.1, extended scenarios (such as incorporating delays) have been studied as well.

Uncertainty and Delays. Trains, buses and other means of transport are often prone to delays in the real world. Thus, handling delays (and other sources of uncertainty) is an important aspect of a practical journey planning system. Firmani et al. [125] recently presented a case study for the public transport network of the metropolitan area of Rome. They provide strong evidence that computing journeys according to the published timetable often fails to deliver optimal or even high-quality solutions. However, incorporating real-time GPS location data of vehicles into the journey planning algorithm helps improve the journey quality (e. g., in terms of the experienced delay) [13,84].

Müller-Hannemann and Schnee [201] consider the online problem where delays, train cancellations, and extra trains arrive as a continuous stream of information. They present an approach which quickly updates the timeexpanded model to enable queries according to current conditions. Delling et al. [74] also discuss updating the time-dependent model and compare the required effort with the time-expanded model. Cionini et al. [63] propose a new graph-based model which is tailored to handle dynamic updates, and they experimentally show its effectiveness in terms of both query and update times. Berger et al. [48] propose a realistic stochastic model that predicts how delays propagate through the network. In particular, this model is evaluated using real (delay) data from Deutsche Bahn. Bast et al. [25] study the robustness of Transfer Patterns with respect to delays. They show that the transfer patterns computed for a scenario without any delays give optimal results for 99 % of queries, even when large and area-wide (random) delays are injected into the networks.

Disser et al. [109] and Delling et al. [93] study the computation of reliable journeys via multicriteria optimization. The reliability of a transfer is defined as a function of the available buffer time for the transfer. Roughly speaking, the larger the buffer time, the more likely it is that the transfer will be successful. According to this notion, transfers with a high chance of success are still considered reliable even if there is no backup alternative in case they fail.

To address this issue, Dibbelt et al. [105] minimize the expected arrival time (with respect to a simple model for the probability that a transfer breaks). Instead of journeys, their method (which is based on the CSA algorithm) outputs a decision graph representing optimal instructions to the user at each point of their journey, including cases in which a connecting trip is missed. Interestingly, minimizing the expected arrival time implicitly helps minimizing the number of transfers, since each “unnecessary” transfer introduces additional uncertainty, hurting the expected arrival time.

Finally, Goerigk et al. [146] study the computation of robust journeys, considering both strict robustness (i. e., computing journeys that are always feasible for a given set of delay scenarios) and light robustness (i. e., computing journeys that are most reliable when given some extra slack time). While strict robustness turns out to be too conservative in practice, the notion of light robustness seems more promising. Recoverable robust journeys (which can always be updated when delays occur) have recently been considered in [145]. A different, new robustness concept has been proposed by Böhmová et al. [51]. In order to propose solutions that are robust for typical delays, past observations of real traffic situations are used. Roughly speaking, a route is more robust the better it has performed in the past under different scenarios.

Night Trains. Gunkel et al. [153] have considered the computation of overnight train journeys, whose optimization goals are quite different from regular “daytime” journeys. From a customer’s point of view, the primary objective is usually to have a reasonably long sleeping period. Moreover, arriving too early in the morning at the destination is often not desired. Gunkel et al. present two approaches to compute overnight journeys. The first approach explicitly enumerates all overnight trains (which are given by the input) and computes, for each such train, the optimal feeding connections. The second approach runs multicriteria search with sleeping time as a maximization criterion.

Fares. Müller-Hannemann and Schnee [199] have analyzed several pricing schemes, integrating them as an optimization criterion (cost) into MOTIS, a multicriteria search algorithm that works on the time-expanded model. In general, however, optimizing exact monetary cost is a challenging problem, since real-world pricing schemes are hard to capture by a mathematical model [199].

Delling et al. [92] consider computing Pareto sets of journeys that optimize fare zones with the McRAPTOR algorithm. Instead of using (monetary) cost as an optimization criterion directly, they compute all nondominated journeys that traverse different combinations of fare zones, which can then be evaluated by cost in a quick postprocessing step.

Guidebook Routing. Bast and Storandt [26] introduce Guidebook Routing, where the user specifies only source and target stops, but neither a day nor a time of departure. The desired answer is then a set of routes, each of which is given by a sequence of train or bus numbers and transfer stations. For example, an answer may read like take bus number 11 towards the bus stop at X, then change to bus number 13 or 14 (whichever comes first) and continue to the bus stop at Y. Guidebook routes can be computed by first running a multicriteria range query, and then extracting from the union of all Pareto-optimal time-dependent paths a subset of routes composed by arcs which are most frequently used. The Transfer Patterns algorithm lends itself particularly well to the computation of such guidebook routes. For practical guidebook routes (excluding “exotic” connections at particular times), the preprocessing space and query times of Transfer Patterns can be reduced by a factor of 4 to 5.

4.5 Experiments and Comparison

This section compares the performance of some of the journey planning algorithms discussed in this section. As in road networks, all algorithms have been carefully implemented in C++ using mostly custom-built data structures.

Table 3 summarizes the results. Running times are obtained from a sequential execution on one core of a dual 8-core Intel Xeon E5-2670 machine clocked at 2.6 GHz with 64 GiB of DDR3-1600 RAM. The exceptions are Transfer Patterns and Contraction Hierarchies, for which we reproduce the values reported in the original publication (obtained on a comparable machine).

For each algorithm, we report the instance on which it has been evaluated, as well as its total number of elementary connections (a proxy for size) and the number of consecutive days covered by the connections. Unfortunately, realistic benchmark data of country scale (or larger) has not been widely available to the research community. Some metropolitan transit agencies have recently started making their timetable data publicly available, mostly using the General Transit Feed format1 . Still, research groups often interpret the data differently, making it hard to compare the performance of different algorithms. The largest metropolitan instance currently available is the full transit network of London2 . It contains approximately 21 thousand stops, 2.2 thousand routes, 133 thousand trips, 46 thousand footpaths, and 5.1 million elementary connections for one full day. We therefore use this instance for the evaluation of most algorithms. The instances representing Germany and long-distance trains in Europe are generated in a similar way, but from proprietary data.

The table also contains the preprocessing time (where applicable), the average number of label comparisons per stop, the average number of journeys computed by the algorithm, and its running time in milliseconds. Note that the number of journeys can be below 1 because some stops are unreachable for certain late departure times. References indicate the publications from which the figures are taken (which may differ from the first publication); TED was run by the authors for this survey. (Our TED implementation uses a single-level bucket queue [104] and stops as soon as a vertex of the target stop has been extracted.) The columns labeled “criteria” indicate whether the algorithm minimizes arrival time (arr), number of transfers (tran), fare zones (fare), reliability (rel), and whether it computes range queries (rng) over the full timetable period of 1, 2, or 7 days. Methods with multiple criteria compute Pareto sets.

Among algorithms without preprocessing, observe that those that do not use a graph (RAPTOR and CSA) are consistently faster than their graphbased counterparts. Moreover, running Dijkstra on the time-expanded graph model (TED) is significantly slower than on the time-dependent graph model (TDD), since time-expanded graphs are much larger. For earliest arrival queries on metropolitan areas, CSA is the fastest algorithm without preprocessing, but preprocessing-based methods (such as Transfer Patterns) can be even faster. For longer-range transit networks, preprocessingbased methods scale very well. CH takes 210 seconds to preprocess the long-distance train connections of Europe, while ACSA takes 8 hours to preprocess the full transit network of Germany. Transfer Patterns takes over 60 times longer to preprocess (a full week of) the full transit network of Germany, but has considerably lower query times.

For multicriteria queries, RAPTOR is about an order of magnitude faster than Dijkstra-based approaches like LD and MLS. RAPTOR is twice as fast as TDD, while computing twice as many journeys on average. Adding further criteria (such as fares and reliability) to MLS and RAPTOR increases the Pareto set, but performance is still reasonable for metropolitan-sized networks. Thanks to preprocessing, Transfer Patterns has the fastest queries overall, by more than an order of magnitude. Note that in public transit networks the optimization criteria are often positively correlated (such as arrival time and number of transfers), which keeps the Pareto sets at a manageable size. Still, as the number of criteria increases, exact real-time queries become harder to achieve.

The reported figures for Transfer Patterns are based on preprocessing leveraging the frequency-based model with traffic days compression, which makes quadratic (in the number of stops) preprocessing effort feasible. Consequently, hub stops and the three-leg heuristic are not required, and the algorithm is guaranteed to find the optimal solution. The data produced by the preprocessing is shown to be robust against large and area-wide delays, resulting in much less than 1 % of suboptimal journeys [25] (not shown in the table).

For range queries, preprocessing-based techniques (CH, ACSA, Transfer Patterns) scale better than CSA or SPCS. For full multicriteria range queries (considering transfers), Transfer Patterns is by far the fastest method, thanks to preprocessing. Among search-based methods, CSA is faster than rRAPTOR by a factor of two, although it does twice the amount of work in terms of label comparisons. Note, however, that while CSA cannot scale to smaller time ranges by design [105], the performance of rRAPTOR depends linearly on the number of journeys departing within the time range [92]. For example, for 2-hour range queries rRAPTOR computes 15.9 journeys taking only 61.3 ms on average [93] (not reported in the table). Guidebook routes covering about 80 % of the optimal results (for the full period) can be computed in a fraction of a millisecond [26].


  1. https://developers.google.com/transit/gtfs/ ↩

  2. http://data.london.gov.uk/ ↩