Price optimal routing in public transportation
Abstract
EconStor is a publication server for scholarly economic literature, provided as a non-commercial public service by the ZBW.
Full text
Euler, Ricardo; Lindner, Niels; Borndörfer, Ralf Article Price optimal routing in public transportation EURO Journal on Transportation and Logistics (EJTL) Provided in Cooperation with: Association of European Operational Research Societies (EURO), Fribourg Suggested Citation: Euler, Ricardo; Lindner, Niels; Borndörfer, Ralf (2024) : Price optimal routing in public transportation, EURO Journal on Transportation and Logistics (EJTL), ISSN 2192-4384, Elsevier, Amsterdam, Vol. 13, Iss. 1, pp. 1-15, https://doi.org/10.1016/j.ejtl.2024.100128 This Version is available at: https://hdl.handle.net/10419/325202 Standard-Nutzungsbedingungen: Die Dokumente auf EconStor dürfen zu eigenen wissenschaftlichen Zwecken und zum Privatgebrauch gespeichert und kopiert werden. Sie dürfen die Dokumente nicht für öffentliche oder kommerzielle Zwecke vervielfältigen, öffentlich ausstellen, öffentlich zugänglich machen, vertreiben oder anderweitig nutzen. Sofern die Verfasser die Dokumente unter Open-Content-Lizenzen (insbesondere CC-Lizenzen) zur Verfügung gestellt haben sollten, gelten abweichend von diesen Nutzungsbedingungen die in der dort genannten Lizenz gewährten Nutzungsrechte. Terms of use: Documents in EconStor may be saved and copied for your personal and scholarly purposes. You are not to copy documents for public or commercial purposes, to exhibit the documents publicly, to make them publicly available on the internet, or to distribute or otherwise use the documents in public. If the documents have been made available under an Open Content Licence (especially Creative Commons Licences), you may exercise further usage rights as specified in the indicated licence. https://creativecommons.org/licenses/by-nc-nd/4.0/
Contents lists available at ScienceDirect EURO Journal on Transportation and Logistics journal homepage: www.elsevier.com/locate/ejtl Price optimal routing in public transportation Ricardo Euler∗, Niels Lindner, Ralf Borndörfer Zuse Institute Berlin, Takustraße 7, Berlin, 14195, Berlin, Germany ARTICLE INFO Keywords: Multi-objective shortest path Fare structure Public transportation Monoid Conditional fare network Ticket graph RAPTOR ABSTRACT We consider the price-optimal earliest arrival problem in public transit (POEAP) in which we aim to calculate the Pareto-set of journeys with respect to ticket price and arrival time in a public transportation network. Public transit fare structures are often a combination of various fare strategies such as, e.g., distance-based fares, zonebased fares or flat fares. The rules that determine the actual ticket price are often very complex. Accordingly, fare structures are notoriously difficult to model, as it is in general not sufficient to simply assign costs to arcs in a routing graph. Research into POEAP is scarce and usually either relies on heuristics or only considers restrictive fare models that are too limited to cover the full scope of most real-world applications. We therefore introduce conditional fare networks (CFNs), the first framework for representing a large number of real-world fare structures. We show that by relaxing label domination criteria, CFNs can be used as a building block in label-setting multi-objective shortest path algorithms. By the nature of their extensive modeling capabilities, optimizing over CFNs is NP-hard. However, we demonstrate that adapting the multi-criteria RAPTOR (McRAP) algorithm for CFNs yields an algorithm capable of solving POEAP to optimality in less than 400 ms on average on a real-world dataset. By restricting the size of the Pareto-set, running times are further reduced to below 10 ms. 1. Introduction The desired shift to more sustainable means of transportation necessitates an increase in the modal share of public transportation systems. Recent studies show that discounted or even free fares significantly increase such a system’s adaptation (Brough et al.,2022;Bull et al.,2021; Chen et al.,2020), indicating that, from a traveler’s perspective, the design of fares and ticket prices are key parameters to foster its attractiveness. This effect, however, varies between socioeconomic groups: While many riders may value fast connections with few transfers, lowincome riders are more likely to choose a more affordable mode of public transportation or to even abstain from using transportation at all if they deem fares to be too expensive (Blumenberg and Agrawal,2014; Rosenblum,2020). This underlines the need for routing algorithms that enable passengers to select journeys optimal with respect to their individual needs. Since these needs are rarely known, we present an approach that calculates Pareto sets of optimal journeys with respect to the earliest arrival time, the number of transfers and cost. It is then on the user to choose from the options presented the one most suited for their personal needs. Ticket prices are determined by the public transit providers’ fare structure. Following Fleishman et al. (1996) a fare structure is ‘‘the combination of one or more fare strategies with specific tickets’’ while the term fare strategy refers to a ‘‘general fare collection and payment ∗Corresponding author. E-mail address: [email protected] (R. Euler). structure approach’’. This can be, e.g, a distance-based or zone-based fare, a short-distance discount, a flat fare or a surcharge. Until now, a unifying framework for the algorithmic treatment of public transit fare structures has been lacking. Some fare strategies, for example distancebased fares, can be addressed easily using label-setting shortest path algorithms. Finding a journey that crosses the least amount of fare zones, however, is NP-hard (Blanco et al.,2016) and cannot be modeled using real-valued arc weights. In general, the subpath optimality principle does not hold for fare structures and thus label-setting algorithms cannot be directly applied to POEAP. Consider the following example: A traveler takes a detour that passes through an additional fare zone to avoid paying the surcharge of a special connection (e.g., a ferry). It is not unlikely that, at a later point, the surcharge has to be paid regardless (e.g., because the target stop can only be reached via a ferry). In that case, taking the detour was a suboptimal decision and using the corresponding label to prune other partial journeys breaks the optimality guarantee of shortest path algorithms. 1.1. Our contribution We devise algorithms that solve the price-optimal earliest arrival problem (POEAP) efficiently in practice. To this end, we build upon https://doi.org/10.1016/j.ejtl.2024.100128 Received 21 March 2023; Received in revised form 20 December 2023; Accepted 8 February 2024 EURO Journal on Transportation and Logistics 13 (2024) 100128 Available online 13 February 2024 2192-4376/© 2024 The Authors. Published by Elsevier B.V. on behalf of Association of European Operational Research Societies (EURO). This is an open access article under the CC BY-NC-ND license ( http://creativecommons.org/licenses/by-nc-nd/4.0/ ).
R. Euler et al. the state-of-the-art public transport routing algorithms McRAP (Delling et al.,2015) and Tight-BMRAP (Delling et al.,2019), which combine an intelligent enumeration scheme with dominance checks. Our domination rules are based on conditional fare networks (CFN), a novel and flexible framework for modeling fare structures of public transportation providers capable of taking most underlying fare strategies into account. A CFN models fare structures as a ticket graph representing relations between tickets. Transitions between different tickets are modeled as directed arcs and usually depend on a number of additional parameters such as, e.g., fare zones or the traveled distance. These are modeled via partially ordered monoids and events. Fare strategies that can be expressed via CFNs include (but are not limited to): zone-based fares, distance-based fares, surcharges for special vehicles or night liners, discounted short-distance fares, transfer fares and all combinations thereof. We develop domination rules for CFNs based on path relations in the ticket graph instead of the price alone. This allows us to retain subpath optimality and prove that using these rules in labelsetting MOSP algorithm does in fact yield lowest-price journeys. By further restricting the size of the Pareto-set, we solve POEAP in less than ten milliseconds over the intricate fare structure of a mid-sized public transit provider from Germany. 1.2. Related literature There is ample research on routing problems in public transit networks. For an overview, see Bast et al. (2016). Delling et al. (2015) introduced the RAPTOR algorithm for very fast public transit routing. We refer occasionally to typical label-setting multi-objective shortest path algorithms, by which we mean, e.g., McRAP (Delling et al.,2015), Martins’ algorithm (Martins,1984), and recently Multi-Objective Dijkstra (Maristany de las Casas et al.,2021). Delling et al. (2019) introduce a version of McRAP, Tight-BMRAP, for computing restricted Pareto-sets. The concept of relaxed subpath optimality is discussed in Berger and Müller-Hannemann (2009). Lastly, we refer to Disser et al. (2008) on how to model public transit systems with transfers in time-dependent graphs. In contrast to the general activity of the field, literature on priceoptimal routing is generally rather scarce. This is certainly due to the usually intricate nature of public transit fare structures. Most approaches deal with fares on a heuristic basis or only consider a very narrow set of fare strategies. Most notably, Müller-Hannemann and Schnee (2005) study fare structures that entail distance- and relationbased prices, i.e., structures that are usually associated with longdistance public transportation. They approximate fares by assigning a fixed price to every arc. This approach, however, does not account for fare strategies such as, e.g., fare zones and short-distance discount tickets. Both are usually more prominent in local public transportation. Reinhardt and Pisinger (2011) consider optimizing the number of fare zones as a special case in their study of non-additive objective functions in (multi-criteria) shortest path problems. However, their approach relies on target pruning as the sole domination technique, so that partial paths cannot be pruned until a 𝑠,𝑡-path is known. In contrast, our approach applies to more general fare structures, includes target pruning, but also allows for pruning at earlier stages. Schöbel and Urban (2021) identified conditions under which priceoptimized routing is tractable for zone- and distance-based fare strategies. Additionally, they identify the no-elongation and no-stopover properties as desirable properties for fare structures. This follows a line of research concerned with the design of fare structures. For a review of recent work, see Schöbel and Urban (2021). Blanco et al. (2016) showed zone-based fares to result in NP-hard routing problems if reentering a zone does not entail additional costs. The proof relies on a reduction of the problem of finding a path with a minimum number of colored edges (Broersma et al.,2005). It was given in the context of flight trajectory optimization with overflight costs (Blanco et al.,2017). A version adapted for public transport is given by Schöbel and Urban (2021). Delling et al. (2015) used RAPTOR to compute journeys that touch the smallest number of fare zones. Recently, Gündling (2020) considered price-optimized routing in intermodal transportation. They, however, only considered mileage-based and flat fares. Our approach combines ideas from automata theory and optimization over monoids. For an overview of automata theory, see Hopcroft and Ullman (1979). The ticket graph concept is inspired by the application of finite automata to the language-constrained shortest path problem (Barrett et al.,2000). It is different, however, in that it serves to evaluate paths instead of restricting the set of feasible paths. Furthermore, our approach also covers fares based on numerical parameters that are not expressed as part of a formal language. Finally, it has been known for a while that shortest path algorithms can be generalized to ordered monoids (Zimmermann,1981) and semirings (Mohri,2002) in a straightforward fashion. Recently, monoids were also proposed as a general constraint model for (single-criteria) resource constrained shortest path problems (Parmentier,2019). This paper is an extended and improved version of work presented at the ATMOS’19 conference (Euler and Borndörfer,2019). Apart from streamlining the presentation and proofs, the following additions were made: We now better motivate the interplay between the monoid and the ticket graph. We propose a superior approach for dealing with overlap areas. We provide an adaption of the recent Tight-BMRAP algorithm to our use case. This leads to an improvement in algorithmic performance of up to two orders of magnitude compared to the previous results in Euler and Borndörfer (2019). Finally, we provide a complexity analysis and investigate the relation of our approach to automata theory in Appendix A. Ticket graphs of various German public transit providers can be found in Borndörfer et al. (2018,2021). 1.3. Overview In Section 2, we introduce the fare structure of MDV, an association that is responsible for the public transit fares for various operators in the Leipzig–Halle region of Germany. This fare structure will serve as a running example for the rest of the paper. We present conditional fare networks in detail in Section 3and show how they can be used to model various aspects of fare structures. The algorithmic treatment of fares and domination rules is laid out in Section 4. Section 5 discusses how the multi-criteria RAPTOR and Tight-BMRAP algorithms can be modified to use CFNs for price-optimal search. An evaluation of the framework’s performance is conducted in Section 6using the network and fare structure of MDV. Section 7concludes the paper with some closing remarks. In Appendix A, we provide a supplementary complexity analysis of POEAP and explore links to automata theory. 2. Running example: MDV We introduce the reader to some intricacies of fare structures in public transit using the example of Mitteldeutscher Verkehrsverbund (MDV) (Mitteldeutscher Verkehrsverbund GmbH,2019a). Throughout Sections 3and 4, the MDV fare structure will serve as a running example to illustrate our core concepts. A schematic depiction of MDV’s fare plan is given in Fig. 1. Example 2.1 (The fare system of MDV).MDV’s area of operations covers large rural areas in Eastern Germany, as well as the conurbation of Halle and Leipzig. As of 2019, this area is divided into a set of 56 pairwise disjoint fare zones. In most cases, the price depends on the number of visited fare zones: there are price levels for one to six fare zones. We denote the respective tickets by 𝑍𝑖with 𝑖∈ [6]. For example, traveling from station to station in Fig. 1 requires ticket 𝑍4. For all paths covering more than six fare zones, a ticket for MDV’s whole area of operations has to be purchased, which we denote by 𝑀. The two EURO Journal on Transportation and Logistics 13 (2024) 100128 2
R. Euler et al. Fig. 1. A section of MDVs fare plan with two lines and six fare zones. Two of the fare zones, colored in light gray, are the cities of Halle and Leipzig. Vertically hatched hexagons represent overlap areas that can be counted as either of the neighboring zones. The horizontally hatched circle represents the small city Merseburg in which a special discounted fare is applicable. Small black nodes represent public transit stops. Footpaths are indicated by dotted lines. larger cities, Halle and Leipzig, each form a single fare zone. Traveling in these zones requires special tickets more expensive than 𝑍1. These, we denote by 𝐻and 𝐿, respectively. For all paths that pass through multiple fare zones, they, however, count as normal zones, i.e., one of the tickets 𝑍2,…, 𝑍6, 𝑀 is applied. Hence, the paths −and −incur tickets 𝐻and 𝐿, respectively, while the path −incurs 𝑍2. Several smaller cities are part of larger fare zones, but allow for discounted fares (city fares) when traveling only in that city. For each city 𝑐in the set of such cities 𝐶, we denote the ticket by 𝐶𝑐. The path −in Merseburg (𝑚), hence, requires the ticket 𝐶𝑚. When extending the path to stop , the ticket 𝑍1becomes applicable. As of 2019, there are 17 cities with city fares and two price levels (which we denote by 𝐶1and 𝐶2). For paths starting in Halle and Leipzig, there are discounted tickets for short trips (𝐷𝐻and 𝐷𝐿), which can be used for a maximum number of four stops without transfers. Hence, paths −and −are admissible for discounted tickets 𝐷𝐻 and 𝐷𝐿, respectively, while paths −and −are not. Discounted tickets also exist for other zones (𝐷). These are a little cheaper and depend on the length of the journey (4 km maximum) instead of the number of visited stops. Sometimes it is possible to choose between city fares and length-based discounts. In this case, the city fare is applied because it is cheaper. To not unduly burden people living at the borders of fare zones, MDV uses overlap areas. These can be counted as part of either of their adjacent fare zones, whichever is most benevolent to the traveler. For example, when traveling from to , all stops are counted as part of fare zone 162 and thus ticket 𝑍1would be applicable. When traveling from to ,counts as part of the fare zone 233 but in the path −it counts as part of Halle. Hence, tickets 𝑍1and 𝐻 are applicable, respectively. While we cover the most important features of the fare structure, we do ignore some edge cases and explicit exceptions. These are among other things: Slightly different discount rules for specific trains, counting stations that are passed without a stop for discounted tickets and exceptions for a specific tunnel. This is done in part because they are not properly reflected in our dataset, and in part to simplify presentation. 3. A formal framework for fare structures Consider a (directed) routing graph 𝐺= (𝑉 , 𝐴), in which arcs represent either public transport connections, footpaths, or transfers between lines and/or modes of transportation. Public transit journeys can then be interpreted as paths in 𝐺. In the following, we will consider a time-dependent formulation as presented, for example, by Disser et al. (2008), i.e., we are given a time-dependent FIFO travel time function 𝑐(𝑎) ∶ 𝐼→𝐼on each arc 𝑎∈𝐴, where 𝐼is the set of time points. In 𝐺, every path 𝑝is associated with a ticket 𝜏∈𝑇from a ticket set 𝑇that has to be bought to use 𝑝. Each ticket has a corresponding price 𝜋(𝜏) ∈ Q+. In the following, we might also write 𝜋(𝑝)instead of 𝜋(𝜏)if 𝜏is the ticket associated with 𝑝. The ticket of a path is determined by the fare structure. We aim to solve the price-optimal earliest arrival problem (POEAP). We refer to Definition 3.6 for a precise definition, but the essence is that, for given 𝑠, 𝑡 ∈𝑉, we want to find a Pareto-set of 𝑠, 𝑡-paths 𝑃∗ 𝑠,𝑡 ⊆ 𝑃𝑠,𝑡 with respect to arrival time and ticket price in 𝐺. Here, 𝑃𝑠,𝑡 denotes the set of all 𝑠, 𝑡-paths in 𝐺. Ideally, we want to solve POEAP by taking advantage of the existing literature on label-setting MOSP algorithms. Ticket prices, however, usually cannot be modeled via real-valued FIFO functions on arcs. Hence, a framework for fare structures is needed that allows us to label paths in a way that (a) labels can be updated quickly when a new arc is relaxed, (b) dominance relationships between labels can be established that respect the subpath optimality property. 3.1. Modeling with monoids Note that in Example 2.1, the price of a path depends on several parameters: the number of visited stations, the total distance traveled, the set of visited fare zones and on indicators reporting whether transfers were made or whether the path crossed city borders. All these parameters share several key properties: First, there is a natural partial order on them, indicating which configuration requires a more expensive ticket. For example, for fare zones 𝐴, 𝐵, 𝐶 we have {𝐴, 𝐵}⊂{𝐴, 𝐵, 𝐶}; for distances and transfers it is the canonical order on N. The parameters can be summed up along a path using an appropriate notion of addition. For distances, this is the normal addition of natural numbers; for fare zones, it is the union of sets; we can use the logical OR (∨) on the set {0,1} for indicators. Finally, we can assume the existence of a neutral element for every parameter. The above properties suggest that the structure of a partially ordered positive monoid is an appropriate model for a large number of fare-relevant parameters. EURO Journal on Transportation and Logistics 13 (2024) 100128 3
R. Euler et al. Definition 3.1 (Partially ordered monoid).Amonoid (𝐻, +) is a set 𝐻 together with an associative operation +(called addition) and a neutral element 𝟎∈𝐻, i.e., ℎ+𝟎=ℎ∀ℎ∈𝐻. We call (𝐻, +,≤)apartially ordered monoid if ≤is a partial order on 𝐻that is translation-invariant with respect to the monoid operation +, i.e., ℎ1≤ℎ2⇒ℎ1+𝑥≤ℎ2+ 𝑥∀ℎ1, ℎ2, 𝑥 ∈𝐻. If additionally 𝟎≤ℎ∀ℎ∈𝐻, we call (𝐻, +,≤)a partially ordered positive monoid. Note that we can define the cross-product of two partially ordered monoids (𝐻1,+1,≤1)and (𝐻2,+2≤2)by (𝐻1×𝐻2,+12,≤1,2), where (ℎ1, ℎ2)+1,2(𝑖1, 𝑖2) ∶= (ℎ1+1𝑖1, ℎ2+2𝑖2)and (ℎ1, ℎ2)≤1,2(𝑖1, 𝑖2)if and only if ℎ1≤𝑖1and ℎ2≤𝑖2for ℎ1, 𝑖1∈𝐻1and ℎ2, 𝑖2∈𝐻2. The cross-product of two partially ordered positive monoids is again a partially ordered positive monoid. This construction allows us to represent all the farerelevant parameters in Example 2.1 above as a single partially ordered positive monoid (𝐻, +,≤). Price-optimal paths can then be found in the following way: We label each arc 𝑎∈𝐴with a weight in 𝐻representing the relevant parameters on this arc. The weight of a path 𝑝, denoted by w(𝑝), lives in 𝐻as well and can be obtained by summing up the weights of the arcs of 𝑝. The ticket 𝜏for 𝑝and its price can then be derived from 𝑤(𝑝)using the rules of the fare structure. Finding a price-optimal 𝑠, 𝑡-path with 𝑠, 𝑡 ∈𝑉 can now be achieved by finding the Pareto-set of 𝑠, 𝑡-paths with regard to the partial order of (𝐻, +,≤). Here, we can apply a label-setting MOSP algorithm such as, e.g., Martins’ algorithm, by using elements of 𝐻as labels and the partial order of (𝐻, +,≤)to establish dominance between labels (Parmentier,2019). Note, however, that this set will likely still contain many dominated paths with respect to price. This necessitates the filtering out of superfluous paths in a post-processing step. Example 3.1 (MDV).For MDV, we can construct a monoid in the following way: for each city 𝑐∈𝐶we define the monoid (𝐻𝑐∶= {0,1},∨,≤)as an indicator whether our path started in 𝑐and then left the city. Hence, all arcs representing a connection leaving the city carry the weight 1 ∈ 𝐻𝑐. Furthermore, we represent the distance traveled by the monoid (𝐻𝑑𝑖𝑠𝑡 ∶= N,+,≤), the number of visited stations by (𝐻𝑠𝑡𝑜𝑝 ∶= N,+,≤), the set of fare zones by (𝐻𝑧𝑜𝑛𝑒 ∶= 2𝑍,∪, ⊆)and finally the transfers by (𝐻𝑡𝑟𝑎𝑛 ∶= {0,1},∨,≤). Price-optimal paths can then be computed by finding the Pareto-set over the monoid (𝐻𝑑𝑖𝑠𝑡 ×𝐻𝑠𝑡𝑜𝑝 × 𝐻𝑡𝑟𝑎𝑛 ×𝐻𝑧𝑜𝑛𝑒 ×∏𝑐∈𝐶𝐻𝑐,+,≤)and filtering out dominated paths in a post-processing step. Here, +and ≤are induced from the component monoids. While the above modeling approach covers a reasonable set of realworld applications, it is not expressive enough to be of much use for complex fare structures. First, note that it requires an order-preserving relationship between the monoid and the ticket prices. This assumption does not hold in general: For example, some public transit associations (e.g., in the city of Bremen, Germany, before 2020 (Verkehrsverbund Bremen/Niedersachsen GmbH,2019)) apply night surcharges on selected lines. This means that, e.g., in the early morning, it can be beneficial to start a journey later because it becomes cheaper. In particular, it is necessary to capture time in the monoid, but the mapping between time and price does not preserve order. Second, monoids often cannot express logical pricing conditions: For example, a price depending on the order on which stops are visited cannot be modeled using the monoid-based approach. Third, shortest path search over the monoid is agnostic to the fare structure and therefore tends to consider unnecessarily large search trees. In the MDV case, if we already know an 𝑠, 𝑡-path for which, e.g., the ticket 𝐷𝐿is applicable, all partial paths starting in 𝑠that require a more expensive ticket can be pruned even though they might not be dominated w.r.t to ≤. To do this, however, we must find a way to quickly obtain the corresponding ticket to labels from 𝐻. Finally, note that the labels of a label-setting MOSP algorithm live in 𝐻and might be quite large. In most cases, however, it is not necessary Fig. 2. Ticket graph associated with the MDV public transit network. To simplify the presentation, all tickets for city fares are collapsed to 𝐶1and 𝐶2representing the two price levels of city fares. Possible starting tickets are highlighted in light gray. to carry the whole label along. Consider again the MDV case. If a path has left a city 𝑐, all city fares become unavailable and labels for all monoids 𝐻𝑐, 𝑐 ∈𝐶, need no longer be considered. This information remains unavailable to an algorithm using the monoid-based model. Computational results in Section 6reveal that purely monoid-based modeling quickly becomes intractable, even when only considering the fare zone monoid (𝐻𝑧𝑜𝑛𝑒,∪, ⊆). 3.2. Ticket graphs and fare events To overcome the challenges laid out in the previous section, we extend our modeling in two directions: First, we want to take the path’s ticket into account. To do so, we develop a model to represent tickets and their relationships. Second, we introduce events that model logical fare strategies. They also serve to reduce the size of the monoid. Addressing the first point, we notice that there is a natural progression of the applicable ticket along a path 𝑝. If 𝑝is short, a short-distance ticket might suffice. When 𝑝is extended by adding another stop 𝑣at its end, this ticket might no longer be applicable and now, e.g., a zone ticket might apply. When traveling even further, a ticket covering two zones might be needed. Hence, we can relate tickets to each other via their ability to transition into one another along paths in the routing graph. We formalize this observation by introducing a ticket graph = (𝑇 , 𝐸)that contains an arc 𝑒= (𝜏1, 𝜏2) ∈ 𝐸if ticket 𝜏1can transition into ticket 𝜏2. Transitions depend on the weight 𝑤(𝑝)and do not occur at every stop. Hence, we introduce a ticket transition function that checks 𝑤(𝑝)and selects the appropriate ticket from the neighborhood of the ticket of 𝑝in . The ticket graph provides crucial advantages over the purely monoid-based approach: First, when we want to use pricebased target-pruning (cf. Section 5.4), we must compute the current ticket price. The ticket graph allows doing this by updating tickets along a path, thereby only checking a few transition conditions on the outgoing edges. Without the ticket graph, all rules of the fare structure would need to be checked whenever a vertex is relaxed. Second, the ticket graph also carries information about the possible further ticket price development of a partial path: This knowledge is useful to design dominance rules. Example 3.2 (Running example: Ticket graph for MDV).Consider the ticket graph in Fig. 2. All possible tickets introduced in Example 2.1 are represented as nodes. Whenever, a ticket can transition into another one, we introduce an arc. Note that, e.g., a discounted ticket for Halle EURO Journal on Transportation and Logistics 13 (2024) 100128 4
R. Euler et al. 𝐷𝐻can never transition into a Leipzig ticket 𝐿. Now, consider again the path −in Fig. 1. This path requires a ticket covering one fare zone. Appending the station will require a ticket covering two fare zones. This is modeled by performing a ticket transition in the ticket graph along the edge (𝑍1, 𝑍2)induced by the ticket transition function for 𝑍1. When calculating the ticket price of a path that contains a subpath with ticket 𝑍3now only a condition on the number of fare zones needs to be checked to determine whether 𝑍3or 𝑍4is applicable. Without using the ticket graph, e.g., the applicability of all discounts would need to be recalculated. Furthermore, when comparing two paths having, say, tickets 𝑍2and 𝑍3, respectively, a dominance check can safely mark the path with ticket 𝑍3as dominated even if it is shorter in distance. In the purely monoid-based approach, both paths would be nondominated. To reduce the dimension of the monoid, note that the parameters determining the ticket of a path can be broadly categorized as (fare) states, e.g., number of stops, and (fare) events, e.g., a transfer or the boarding of a train that requires a surcharge. Up to now, events were included in the monoid via indicators. However, this is not strictly necessary: A transfer arc could cause a ticket transition in the ticket graph. Thereafter, transfers might be ineffectual and hence it is unnecessary to record them in the monoid. To do so, we need to annotate arcs in the routing graph not only with elements of a monoid but also with events. The distinction between states and events introduces some flexibility to the modeling, as sometimes aspects of a fare structure can be modeled as both. However, we naturally aim to keep the monoid as low-dimensional as possible. Using events, prices may now also depend on logical conditions, e.g., the order of events, which is not possible in the monoid-based approach. Example 3.3 (Running example: Fare events for MDV).The monoid in Example 3.1 was introduced as (𝐻𝑑𝑖𝑠𝑡 ×𝐻𝑠𝑡𝑜𝑝×𝐻𝑡𝑟𝑎𝑛×𝐻𝑧𝑜𝑛𝑒×∏𝑐∈𝐶𝐻𝑐,+,≤). We can see any transfer as an event 𝑡𝑟𝑎 occurring on a transfer arc of the routing graph. In the same way, leaving any city 𝑐∈𝐶can be seen as an event 𝑐𝑖𝑡𝑦 occurring on arcs crossing the city’s borders. Hence, we can shrink the monoid to (𝐻𝑑𝑖𝑠𝑡 ×𝐻𝑠𝑡𝑜𝑝 ×𝐻𝑧𝑜𝑛𝑒,+,≤), reducing the size of a label in a MOSP algorithm by 17 entries for cities and by one entry for transfers. Finally, we introduce events ℎ𝑎𝑙 and 𝑙𝑒𝑖 for public transit arcs ending in the special fare zones of Halle and Leipzig, respectively. This is purely a design decision, since the information could also be read from the state of 𝐻𝑧𝑜𝑛𝑒. We obtain a set of events 𝑆= {𝑐𝑖𝑡𝑦, 𝑡𝑟𝑎, ℎ𝑎𝑙, 𝑙𝑒𝑖, 𝑠0}where 𝑠0is a dummy event with no effect, see also Example 3.4. 3.3. Conditional fare networks We now combine the three core ideas of a ticket graph, fare events and modeling with monoids to a formal model of public transit fare structures. Again, let 𝐺= (𝑉 , 𝐴)be a routing graph. Additionally, let (𝐻, +,≤) be a positive, partially ordered monoid, = (𝑇 , 𝐸)a ticket graph and 𝑆a set of fare events. We label each arc 𝑎∈𝐴with a weight 𝑤(𝑎) ∈ 𝐻 and a fare event 𝑒(𝑎) ∈ 𝑆. By collecting these weights and events along a path 𝑝in 𝐺, we build its fare state 𝑓(𝑝). Definition 3.2 (Fare state).Afare state 𝑓∈𝑇×𝐻is a pair of a ticket 𝜏(𝑓)and a weight 𝑤(𝑓). We write 𝐹∶= 𝑇×𝐻for the space of all fare states. Every vertex 𝑣∈𝑉is labeled with an initial fare state 𝜇(𝑣) ∈ 𝐹. Fare states will serve as path labels for shortest-path algorithms. They contain all the information necessary to decide domination between paths. In contrast to common (multi-objective) shortest-path applications, the arc labels 𝐻×𝑆live not in the same space as the path labels 𝐹. We now want to enable the tracking of fare states along paths in 𝐺. To do so, we formalize the notion of the ticket transition function on tickets 𝜏∈𝑇in the ticket graph = (𝑇 , 𝐸). A ticket transition function Table 1 MDV fare monoid. Name Represents Ground set Operator Partial order Neutral element 𝐻𝑑𝑖𝑠𝑡 Distance N+≤0 𝐻𝑠𝑡𝑜𝑝 Stops N+≤0 𝐻𝑧𝑜𝑛𝑒 Fare zones 2𝑍∪⊆∅ returns the ticket 𝜏2∈𝑇a ticket 𝜏1∈𝑇transitions into given an accumulated weight ℎ∈𝐻and a fare event 𝑠∈𝑆. Possible candidates are the neighborhood of 𝜏1in as well as 𝜏1itself. Definition 3.3 (Ticket transition function).The ticket transition function 𝛤∶𝑇×𝐻×𝑆→𝑇of is a function that, given a weight ℎ∈𝐻and event 𝑠∈𝑆, maps each ticket 𝜏∈𝑇into its closed out-neighborhood 𝛿+(𝜏)∪{𝜏}. The definition is intentionally kept as general as possible to capture a large number of possible transition conditions. We use the notion of ticket transition functions to define the update of a fare state when relaxing an arc of the routing graph. Definition 3.4 (Fare update function).Let 𝑓∈𝐹and 𝑎∈𝐴. Then, the fare update function Up ∶ 𝐹×𝐴→𝐹is given by 𝑔∶= Up(𝑓 , 𝑎)with 𝑤(𝑔) ∶= 𝑤(𝑓) + 𝑤(𝑎) 𝜏(𝑔) ∶= 𝛤(𝜏(𝑓), 𝑤(𝑔), 𝑒(𝑎)). The fare state of a path 𝑝= (𝑣1,…, 𝑣𝑛)can now be tracked by letting 𝑓1∶= 𝜇(𝑣1)and 𝑓𝑖∶= Up(𝑓𝑖−1,(𝑣𝑖−1, 𝑣𝑖)) ∀ 𝑖= 2,…, 𝑛. In particular, when calculating 𝑓𝑖we need only consider the out-neighborhood of 𝜏(𝑓𝑛)instead of reevaluating all fare strategies. Combining all the above definitions, we arrive at the notion of conditional fare networks which can precisely describe a fare structure. Definition 3.5 (Conditional fare network).Let 𝐺= (𝑉 , 𝐴)be a routing graph and let the following be given: 1. a directed acyclic ticket graph = (𝑇 , 𝐸)with transition function 𝛤, 2. arc weights 𝑤∶𝐴→𝐻from a partially ordered, positive monoid (𝐻, +,≤), 3. arc events 𝑒∶𝐴→𝑆, 4. initial fare states 𝜇∶𝑉→𝐹and 5. a price function 𝜋∶𝑇→Q+that is monotonously nondecreasing along directed paths in 𝑇, i.e., if there is a directed 𝜏1−𝜏2-path in for 𝜏1, 𝜏2∈𝑇, then 𝜋(𝜏1)≤𝜋(𝜏2). We write 𝜋(𝑝) instead of 𝜋(𝜏(𝑓(𝑝))) for a path 𝑝∈𝑃. We call the six-tuple (, 𝛤 , 𝑤, 𝑒, 𝜇, 𝜋)aconditional fare network of 𝐺. Note that cycle-freeness in , the monotonicity condition on 𝜋and the positivity of 𝐻ensure that no price-decreasing cycles exist in 𝐺. We consider those assumptions natural enough that any reasonable fare structures should satisfy them. Example 3.4 (Running example: Conditional fare network for MDV).We can now give the complete conditional fare network for the fare structure of MDV. We have already introduced the ticket graph (Example 3.2). As in Example 3.3, we define the monoid (𝐻, +,≤)as (𝐻𝑑𝑖𝑠𝑡 × 𝐻𝑠𝑡𝑜𝑝 ×𝐻𝑧𝑜𝑛𝑒,+,≤). The components of (𝐻, +,≤)are summarized in Table 1. The set of fare events is 𝑆= {𝑐𝑖𝑡𝑦, 𝑡𝑟𝑎, ℎ𝑎𝑙, 𝑙𝑒𝑖, 𝑠0}. The meaning of these events is summarized in Table 2. Vertices 𝑣∈𝑉in the routing graph can now be annotated with an initial fare state from 𝐹=𝑇×𝐻. For example, for station in Fig. 1 we have 𝜇(𝑣)=(𝐷, (0,0,{156})), i.e., we start with the short-distance ticket, and the weight is composed of 0m of distance, 0visited stops and the fare zone 156. Arcs 𝑎∈𝐴are EURO Journal on Transportation and Logistics 13 (2024) 100128 5
R. Euler et al. 𝛤(𝑀, ℎ, 𝑠) = 𝑀 𝛤(𝑍𝑖, ℎ, 𝑠) = {𝑍𝑖+1 |ℎ𝑧𝑜𝑛𝑒|=𝑖+ 1 𝑍𝑖otherwise 𝛤(𝐷, ℎ, 𝑠) = ⎧ ⎪ ⎪ ⎨ ⎪ ⎪ ⎩ 𝑍1|ℎ𝑧𝑜𝑛𝑒|= 1 ∧ (ℎ𝑑𝑖𝑠𝑡 >4 ∨ 𝑠=𝑡𝑟𝑎) 𝑍2|ℎ𝑧𝑜𝑛𝑒|= 2 ∧ (ℎ𝑑𝑖𝑠𝑡 >4 ∨ 𝑠=𝑡𝑟𝑎) 𝑍3|ℎ𝑧𝑜𝑛𝑒|= 3 ∧ (ℎ𝑑𝑖𝑠𝑡 >4 ∨ 𝑠=𝑡𝑟𝑎) 𝐷otherwise 𝛤(𝐿, ℎ, 𝑠) = {𝐿 𝑠 =𝑙𝑒𝑖 ∨𝑠=𝑡𝑟𝑎 𝑍2otherwise 𝛤(𝐷𝐿, ℎ, 𝑠) = ⎧ ⎪ ⎨ ⎪ ⎩ 𝑍2𝑠≠𝑙𝑒𝑖 ∧ℎ𝑠𝑡𝑜𝑝 >4 𝐿 𝑠 =𝑡𝑟𝑎 ∨ (𝑠=𝑙𝑒𝑖 ∧ℎ𝑠𝑡𝑜𝑝 >4) 𝐷𝐿otherwise 𝛤(𝐻, ℎ, 𝑠) = {𝐻 𝑠 =ℎ𝑎𝑙 ∨𝑠=𝑡𝑟𝑎 𝑍2otherwise 𝛤(𝐷𝐻, ℎ, 𝑠) = ⎧ ⎪ ⎨ ⎪ ⎩ 𝑍2𝑠≠ℎ𝑎𝑙 ∧ℎ𝑠𝑡𝑜𝑝 >4 𝐻 𝑠 =𝑡𝑟𝑎 ∨ (𝑠=ℎ𝑎𝑙 ∧ℎ𝑠𝑡𝑜𝑝 >4) 𝐷𝐻otherwise 𝛤(𝐶1, ℎ, 𝑠) = ⎧ ⎪ ⎨ ⎪ ⎩ 𝑍1𝑠=𝑐𝑖𝑡𝑦 ∧ℎ𝑑𝑖𝑠𝑡 >4 𝐷 𝑠 =𝑐𝑖𝑡𝑦 ∧ℎ𝑑𝑖𝑠𝑡 ≤4 𝐶1otherwise 𝛤(𝐶2, ℎ, 𝑠) = ⎧ ⎪ ⎨ ⎪ ⎩ 𝑍1𝑠=𝑐𝑖𝑡𝑦 ∧ℎ𝑑𝑖𝑠𝑡 >4 𝐷 𝑠 =𝑐𝑖𝑡𝑦 ∧ℎ𝑑𝑖𝑠𝑡 ≤4 𝐶2otherwise Box I. Table 2 MDV fare events. Fare event Represents 𝑐𝑖𝑡𝑦 Leaving city with city ticket 𝐶1or 𝐶2 𝑡𝑟𝑎 Transfer ℎ𝑎𝑙 Head of Arc is in Halle 𝑙𝑒𝑖 Head of Arc is in Leipzig 𝑠0Nothing now annotated with weights from 𝐻and events from 𝑆. For example, if 𝑎1= (,)had a length of 231 m, it would be annotated with 𝑤(𝑎1) = (231,1,{233}) and 𝑒(𝑎1) = 𝑐𝑖𝑡𝑦. The arc 𝑎2= (,)represents a footpath and is annotated with 𝑤(𝑎2) = (0,0,∅) and 𝑒(𝑎2) = 𝑡𝑟𝑎. Hence, to construct a conditional fare network for MDV, we now only need to give the transition functions for . Let 𝑠∈𝑆and ℎ= (ℎ𝑑𝑖𝑠𝑡, ℎ𝑠𝑡𝑜𝑝, ℎ𝑧𝑜𝑛𝑒) ∈ 𝐻. Then, the ticket transition function 𝛤of is defined by the equations given in Box I. For example, the conditions for 𝛤(𝐷𝐿, ℎ, 𝑠)mean that we need to transition to the two zones ticket 𝑍2whenever we leave Leipzig and travel for more than four stops, and that we transition to the standard Leipzig ticket 𝐿whenever we transfer or surpass the four stops limit within Leipzig. In all other cases, we can stick with the discounted Leipzig ticket 𝐷𝐿. Note that we did not yet cover MDV’s overlap areas. We discuss in Section 3.4 why it is best to address these in a preprocessing step. We can now finally formalize the price-optimal earliest arrival problem. Definition 3.6 (Price-optimal earliest arrival problem (POEAP)).Let a public transportation network be given as a directed graph 𝐺= (𝑉 , 𝐴) together with a conditional fare network (, 𝛤 , 𝑤, 𝑒, 𝜇, 𝜋)and a timedependent FIFO travel time function 𝑐(𝑎) ∶ 𝐼→𝐼∀𝑎∈𝐴. Then, the price-optimal earliest arrival problem (POEAP) asks to find a Pareto-set (w.r.t. price and arrival time) of 𝑠, 𝑡-paths 𝑃∗ 𝑠,𝑡 ⊆ 𝑃𝑠,𝑡 in 𝐺, i.e., ∀𝑝∗∈𝑃∗ 𝑠,𝑡∄𝑝∈𝑃𝑠,𝑡 ∶𝜋(𝑝)≤𝜋(𝑝∗) ∧ 𝑐(𝑝)≤𝑐(𝑝∗)∧(𝜋(𝑝)< 𝜋(𝑝∗) ∨ 𝑐(𝑝)< 𝑐(𝑝∗)) (1) ∀𝑝∈𝑃𝑠,𝑡 ∃𝑝∗∈𝑃∗ 𝑠,𝑡 ∶𝜋(𝑝∗)≤𝜋(𝑝) ∧ 𝑐(𝑝∗)≤𝑐(𝑝).(2) 3.4. Some hints on modeling with CFNs In the following, we elaborate on some common features of fare structures and how they can be modeled using conditional fare networks. Transfer penalties, footpaths, and surcharges. When footpaths have no influence on the ticket, they can be modeled as arcs with a weight of 𝟎∈𝐻and an event 𝑠0that cannot activate a ticket transition. This way, a footpath does not change the current fare state. The transition from a footpath to a public transportation vehicle requires some care. Assume we walk from stop 𝑣0to 𝑣1along arc 𝑎0= (𝑣0, 𝑣1)to take a vehicle along 𝑎1= (𝑣1, 𝑣2)to reach 𝑣2. Some fare structures use the number of stops a path touches to calculate prices. Here, this number would be two. Counting a stop when relaxing 𝑎0is a mistake if the optimal path would be to continue on foot. Counting both 𝑣1and 𝑣2 when relaxing 𝑎1is also wrong, since this would overcount the number of stops for every journey that reaches 𝑣1via a vehicle. Hence, the graph model needs to be extended by splitting up stops into vertices for every route and a vertex that is connected to footpaths. These vertices are then connected via transfer arcs and boarding arcs. Placing weights and events different from 𝟎and 𝑠0on transfer arc allows us to make the applicable ticket dependent on the number of transfers, while events on arcs representing boarding can be used to model surcharges for the boarded route. For more details on how to build these expanded graphs, we refer to Disser et al. (2008). Overlap areas. Some fare structures that are based on fare zones contain overlap areas. Stations in an overlap area can be counted as part of either of its neighboring zones, whichever is cheapest for the customer. This is meant to mitigate sharp price increases for short journeys at fare zone borders. MDV uses them as well as several other German railway companies (e.g., Verkehrsverbund Bremen/Niedersachsen GmbH (Verkehrsverbund Bremen/Niedersachsen GmbH,2023)). At a first glance, one might be tempted to represent overlap areas as tickets in the ticket graph. A label propagated along a path starting in an overlap area then keeps this ticket until a regular fare zone is picked up along the path and transitions in the zone ticket for this fare zone. This approach, however, becomes cumbersome when several overlap areas border each other. In this case, a ticket for each combination of overlap areas needs to be introduced. Alternatively, overlap ares can be incorporated by label duplication: Assume an overlap area neighbors 𝑛fare zones. We associate each arc EURO Journal on Transportation and Logistics 13 (2024) 100128 6
R. Euler et al. Fig. 3. Example of a routing graph (a) with two possible conditional fare networks (b) and (c). For both networks, the underlying partially ordered monoid is (R,+,≤), the fare events are 𝑆= {𝑠0, 𝑠1, 𝑠2, 𝑠3}and the initial fare state for all vertices 𝑣𝑖with 𝑖= 1,…,5is 𝜇(𝑣𝑖) = (𝐴, 0). We set prices for the tickets as 𝜋(𝐴) = 0,𝜋(𝐵) = 2,𝜋(𝐶) = 3,𝜋(𝐷) = 1 and 𝜋(𝐸)=5. The value of the transition function 𝛤for a given weight ℎand event 𝑠is given via indicator functions on the fare arcs. Using the ticket graph (b), the upper 𝑣1, 𝑣5-path yields ticket 𝐶, while the lower path yields ticket 𝐸. Using ticket graph (c), the upper path yields ticket 𝐵, the lower path yields ticket 𝐶. 𝑎whose ℎ𝑒𝑎𝑑(𝑎)represents a stop in the overlap area with 𝑛different weights, one for each fare zone it could possibly be part of. When settling the vertex in a shortest path search, the current fare state is updated once for each weight, thereby creating 𝑛new labels. This, however, leads to an increased need for dynamic memory allocation, which should be avoided. Hence, we propose simply route duplication as the most convenient model for overlap areas. Whenever a route of the timetable contains a stop 𝑣in an overlap area neighboring 𝑛fare zones, we simply introduce 𝑛routes each with a single fare zone at 𝑣. In the routing graph, this corresponds to introducing parallel arcs with each storing a different fare zone in its weight. To avoid creating unnecessary duplicates, this is done block-wise, i.e., only for each consecutive sequence of stops along a route that are in the same overlap area. Hence, overlap areas are taken care of in a preprocessing step and are not represented in the conditional fare network. 4. CFNs in routing algorithms Label-setting MOSP algorithms rely on dynamic programming and the subpath optimality condition (Berger and Müller-Hannemann,2009). That is, every subpath of an optimal 𝑠, 𝑡-path is in itself an optimal path. For POEAP, when comparing paths in 𝐺naively by the price function 𝜋, the subpath optimality condition is usually violated. Consider taking a local detour to avoid a fare zone: Later on, travelers may be forced to cross the zone due to the infrastructure, turning the locally dominant detour into a suboptimal choice. On the other hand, a locally dominated subpath might still lead to an optimal 𝑠, 𝑡-path. This type of problem persists in CFNs: the transition between tickets depends on the weights and events already collected, but also on the structure of the reachable ticket graph. Example 4.1 highlights that problems can already arise even in simple cases. Example 4.1 (Label dominance in Fig. 3).Consider the routing graph (a) together with the conditional fare network (b). Examining the paths 𝑝1= (𝑣1, 𝑣2, 𝑣4)and 𝑝2= (𝑣1, 𝑣3, 𝑣4), we find their respective fare states are 𝑓(𝑝1) = (𝐵, 1) and 𝑓(𝑝2) = (𝐷, 2). Extending them by 𝑣5to 𝑝′ 1and 𝑝′ 2yields 𝑓(𝑝′ 1)=(𝐶, 3) and 𝑓(𝑝′ 2)=(𝐸, 4). Comparing fare states by price would indicate that 𝑝1could be pruned at 𝑣4since 𝜋(𝐵)> 𝜋(𝐷). This is a suboptimal choice as 𝑝′ 1dominates 𝑝′ 2since 𝜋(𝐶)< 𝜋(𝐸). Hence, price cannot be used as dominance criterion for fare states. A natural alternative would be to use the partial order defined by paths in the ticket graph, instead. A ticket 𝜏1then dominates a ticket 𝜏2if there is a 𝜏1, 𝜏2-path. This would render the tickets 𝐵and 𝐷and the tickets 𝐶and 𝐸mutually incomparable. The idea, however, comes with problems of its own. To see this, consider the conditional fare network (c). At 𝑣4, we have 𝑓(𝑝1)=(𝐴, 1) and 𝑓(𝑝2)=(𝐴, 2) and hence both paths are equivalent and it would be sensible to keep only one of them based on the relation between 𝑤(𝑓(𝑝1)) and 𝑤(𝑓(𝑝2)). By relaxing (𝑣4, 𝑣5), we obtain 𝑓(𝑝′ 1)=(𝐵, 3) and 𝑓(𝑝′ 2)=(𝐶, 4), which are incomparable, i.e., the fare states of 𝑝′ 1and 𝑝′ 2diverged from comparable to incomparable. Consequently, any dominance rule pruning either 𝑝1or 𝑝2would be defective. To mitigate these and similar problems, we might assume a general incomparability of fare states. This comes down to enumerating all 𝑠, 𝑡paths and simply sorting them by price. However, in a sensibly designed fare structure, it is usually clear which ticket is better, and taking a cheaper subpath should usually not turn out more expensive overall. In the remainder of this section, we propose a more tailored approach. It bases domination rules on path relationships but adds exceptions to cover cases in which it is not safe to do so. 4.1. Dominance for fare states We want to define a partial order for fare states that restores subpath optimality while not relaxing dominance too generously. To do so, we partition the ticket set 𝑇into three disjoint comparability groups:𝐶𝐹(full comparability), 𝐶𝑃(partial comparability), 𝐶𝑁(no comparability). Based on the partition 𝐶= (𝐶𝐹, 𝐶𝑃, 𝐶𝑁), we define the partial order. Definition 4.1 (Comparability of fare states).Let 𝑓1= (𝜏1, ℎ1),𝑓2= (𝜏2, ℎ2)be fare states. We say 𝑓1≤𝐶𝑓2if and only if 𝜏1∉𝐶𝑁,ℎ1≤ℎ2 and 𝜏1=𝜏2if 𝜏1∈𝐶𝑃(3) ∃𝜏1, 𝜏2-path in if 𝜏1∈𝐶𝐹.(4) If 𝑓1≤𝐶𝑓2and either ℎ1< ℎ2or 𝜏1≠𝜏2, we say that 𝑓1is strictly less than 𝑓2, i.e., 𝑓1<𝐶𝑓2. EURO Journal on Transportation and Logistics 13 (2024) 100128 7
R. Euler et al. We denote by 𝑃𝑓 𝑠,𝑡 the set of all Pareto-optimal paths with respect to ≤𝐶, i.e., 𝑝∗∈𝑃𝑓 𝑠,𝑡 ⇒∄𝑠, 𝑡-path 𝑝∶𝑓(𝑝)<𝐶𝑓(𝑝∗).(5) We call paths in 𝑃𝑓 𝑠,𝑡 state-optimal. They form a superset of the set of price-optimal paths. MOSP algorithms on graphs with weights from partially ordered monoids rely on the monoid operation being translation-invariant with respect to the partial order. Similarly, for CFN’s, we need the update function to be monotone along all arcs 𝑎∈𝐴, i.e., ∀𝑓1, 𝑓2∈𝐹∶𝑓1≤𝐶𝑓2⟹∀𝑎∈𝐴∶ Up(𝑓1, 𝑎)≤𝐶Up(𝑓2, 𝑎).(6) This condition is enough to ensure that a weaker form of subpath optimality holds. Proposition 4.1 (Weak subpath optimality).Let 𝐺= (𝑉 , 𝐴)be a routing network and = (, 𝛤 , 𝑤, 𝑒, 𝜇, 𝜋)be its conditional fare network. Let 𝑝∗∈ 𝑃𝑓 𝑠,𝑡 be a state-optimal 𝑠,𝑡-path in 𝐺for some 𝑠, 𝑡 ∈𝑉. Then, there is a path 𝑝′= (𝑠=𝑣0, 𝑣1,…, 𝑣𝑛−1, 𝑣𝑛=𝑡) ∈ 𝑃𝑓 𝑠,𝑡 with 𝑓(𝑝∗) = 𝑓(𝑝′), such that every subpath 𝑝′′ = (𝑣0,…, 𝑣𝑙),𝑙 < 𝑛, of 𝑝′is a state-optimal 𝑣0, 𝑣𝑙-path. Proof. Let 𝑝∗= (𝑠=𝑣0, 𝑣1,…, 𝑣𝑛−1, 𝑣𝑛=𝑡) ∈ 𝑃𝑓 𝑠,𝑡 be a stateoptimal 𝑠, 𝑡-path with fare states (𝑓0,…, 𝑓𝑛). Assume there is a 𝑠, 𝑡-path 𝑝 = (𝑠=𝑢0, 𝑢1,…, 𝑢𝑙−1 =𝑣𝑛−1, 𝑢𝑙=𝑡)with fare states (𝑔0, 𝑔1,…, 𝑔𝑙)and 𝑔0=𝑓0.By(6), we can choose 𝑝 to be a simple path. Let 𝑘be the largest integer such that 𝑣𝑛−𝑘=𝑢𝑙−𝑘, i.e., the paths (𝑣𝑛−𝑘,…, 𝑣𝑛)and (𝑢𝑙−𝑘,…𝑢𝑙)are equal. Now assume 𝑓𝑙−𝑘−1 <𝐶𝑓𝑛−𝑘−1. By definition, 𝑓𝑛−𝑘= Up(𝑓𝑛−𝑘−1,(𝑣𝑛−𝑘−1, 𝑣𝑛−𝑘)) and 𝑔𝑙−𝑘= Up(𝑔𝑙−𝑘−1,(𝑢𝑙−𝑘−1, 𝑢𝑙−𝑘)). We apply (6) to obtain 𝑓𝑙−𝑘≤𝐶𝑓𝑛−𝑘. By repeating the process for 𝑖∈ {𝑘−1,…,0}, we find 𝑔𝑙≤𝐶𝑓𝑛. Since 𝑝∗was state-optimal, it follows that 𝑔𝑙=𝑓𝑛, and consequently, 𝑝is also state-optimal. Since the number of paths in 𝐺is finite, we can repeat this procedure to find the path 𝑝′.□ Proposition 4.1 does not imply that every subpath of a state-optimal path is state-optimal. We can, however, discard all state-optimal paths without this property since a path with an equal fare state still remains in 𝑃𝑓 𝑠,𝑡. Hence, label-setting MOSP algorithms can still be applied. 4.2. The comparability partition In choosing 𝐶𝐹,𝐶𝑃and 𝐶𝑁, there is some degree of freedom. We want 𝐶𝐹to be as big and 𝐶𝑁as small as possible while still fulfilling (6). It is clear that the best choice does not only depend on the ticket graph and the transition function 𝛤, but also on 𝐺and the arc weights and events. Such an approach, however, mostly likely requires extensive computations on 𝐺. We propose a solution that depends only on and 𝛤and needs no recomputation when changes in the routing network occur. First, we introduce some notation. If there is a directed path in between 𝜏1, 𝜏2∈𝑇, we write 𝜏1→𝜏2. This includes the case 𝜏1=𝜏2. The reach R(𝜏)of a vertex 𝜏∈𝑇is the subgraph induced by all vertices reachable from 𝜏, i.e., R(𝜏) ∶= [{𝑘∈𝑇∶𝜏→𝑘}]. Definition 4.2 (No-overtaking property).Let 𝜏∈𝑇be a ticket. We say its reach R(𝜏)has the no-overtaking property if for all tickets 𝑘, 𝑙 ∈ R(𝜏) with 𝑘→𝑙and (ℎ, 𝑠) ∈ 𝑊it holds that ∀ ℎ∈𝐻∶ℎ≤ ℎ⟹𝛤(𝑘, ℎ, 𝑠)→𝛤(𝑙, ℎ, 𝑠).(7) The no-overtaking property bears some resemblance to the FIFO (first-in, first-out) property: A worse fare state, i.e., a worse weight or ticket, cannot give rise to a better fare state when relaxing the same arc in the routing graph. Note that the no-overtaking property has to be fulfilled not only for the neighborhood of a ticket 𝜏but for the reach R(𝜏). Subgraphs with the no-overtaking property allow for the strictest domination rules. We use them as comparability group 𝐶𝐹. Definition 4.3 (Comparability partition).Let 𝐺= (𝑉 , 𝐴)be a routing network with a CFN = (, 𝛤 , 𝑤, 𝑒, 𝜇, 𝜋). We define 𝐶𝐹∶= {𝜏∈𝑇∶ R(𝜏)traceable and has the no-overtaking property}(8) 𝐶𝑃∶= {𝜏∈𝑇∖𝐶𝐹∶ ∀ 𝑘∈ R(𝜏) ∀ 𝑠∈𝑆∀ℎ1, ℎ2∈𝐻∶𝛤(𝑘, ℎ1, 𝑠) = 𝛤(𝑘, ℎ2, 𝑠)} (9) 𝐶𝑁∶= {𝜏∈𝑇∖(𝐶𝐹∪𝐶𝑃)}.(10) It is not enough to fulfill (7) for 𝜏∈𝑇to be in the set 𝐶𝐹. Its reach R(𝜏)has also to be traceable, i.e., contain a Hamiltonian path. This condition is needed to avoid the divergence seen in Example 4.1. If a ticket has non-traceable reach or does not have the no-overtaking property, it is placed in 𝐶𝑃. For tickets 𝜏∈𝐶𝑃, the transition functions of tickets 𝑘∈ R(𝜏)must be independent of (𝐻, +,≤). This, again, is necessary to ensure that comparable fare states do not diverge in an incomparable state after an update, i.e., all tickets that can be reached from a ticket in 𝐶𝐹themselves need to be in 𝐶𝐹. All remaining tickets are added to 𝐶𝑁. Fare states containing tickets from 𝐶𝑁can never be dominated. Example 4.2 (Dominance for MDV Fares).In the graph in Fig. 2, all nodes have traceable reach, and it is easy to verify that the noovertaking property does indeed hold for all tickets. Hence, we can set the comparability partition to 𝐶𝐹=𝑇,𝐶𝑃=𝐶𝑁= ∅. Example 4.3 (Dominance for Example 4.1).For Ticket Graph (b), we have 𝐶𝐹= {𝐵, 𝐶, 𝐷, 𝐸},𝐶𝑃= {𝐴}and 𝐶𝑁= ∅. For Ticket Graph (c), we have that 𝐶𝐹= {𝐵, 𝐶},𝐶𝑃= ∅ and 𝐶𝑁= {𝐴}. Proposition 4.2 (Monotonicity of the cmparability partition).The partial order ≤𝐶defined by Definitions 4.1 and 4.3 fulfills the monotonicity condition (6). Proof. Let 𝑎∈𝐴and 𝑓1, 𝑓2∈𝐹such that 𝑓1≤𝐶𝑓2. For 𝑖∈ {1,2}, we write 𝑔𝑖∶= Up(𝑓𝑖, 𝑎), i.e, 𝑤(𝑔𝑖) = 𝑤(𝑓𝑖) + 𝑤(𝑎)and 𝜏(𝑔𝑖) = 𝛤(𝜏(𝑓𝑖), 𝑤(𝑔𝑖), 𝑒(𝑎)). By positivity of the monoid (𝐻, +,≤),𝑤(𝑓1)≤𝑤(𝑓2) directly implies 𝑤(𝑔1)≤𝑤(𝑔2). It remains to show that 𝜏(𝑔1)→𝜏(𝑔2). To do so, we need to distinguish the cases 𝜏(𝑓1) ∈ 𝐶𝑃and 𝜏(𝑓1) ∈ 𝐶𝐹. First, assume that 𝜏(𝑓1) ∈ 𝐶𝑃and hence 𝜏(𝑓1) = 𝜏(𝑓2). By the definition of 𝐶𝑃, we obtain 𝜏(𝑔1) = 𝛤(𝜏(𝑓1), 𝑤(𝑔1), 𝑒(𝑎)) = 𝛤(𝜏(𝑓2), 𝑤(𝑔2), 𝑒(𝑎)) = 𝜏(𝑔2). Thus, 𝜏(𝑔1) = 𝜏(𝑔2). Note that the definitions of 𝐶𝑃and 𝐶𝐹imply that 𝜏(𝑔1) ∈ 𝐶𝑃∪𝐶𝐹since 𝜏(𝑔1) ∈ R(𝜏(𝑓1)) and hence 𝑔1≤𝐶𝑔2. Now, assume 𝜏(𝑓1) ∈ 𝐶𝐹. Note that R(𝜏(𝑓1)) ⊂ 𝐶𝐹. This allows us to apply (7) to obtain 𝜏(𝑔1) = 𝛤(𝜏(𝑓1), 𝑤(𝑔1), 𝑒(𝑎)) →𝛤(𝜏(𝑓2), 𝑤(𝑔2), 𝑒(𝑎)) = 𝜏(𝑔2), which concludes the proof. □ Propositions 4.1 and 4.2 allow us to apply label-setting MOSP algorithms to POEAP using the comparability partition from Definition 4.3. However, we obtain only the set of state-optimal paths. It remains to show that this set contains the cheapest path. Proposition 4.3 (Correctness).Let 𝜋∗∶= min𝑃𝑠,𝑡 𝜋(𝑝). Then, there is at least one 𝑠, 𝑡-path 𝑝∗with 𝜋∗=𝜋(𝑝∗)and 𝑝∗∈𝑃𝑓 𝑠,𝑡. Proof. Consider a path 𝑝∈𝑃𝑠,𝑡 with 𝜋(𝑝) = 𝜋∗. If there is 𝑝′∈𝑃𝑓 𝑠,𝑡 with 𝜏(𝑓(𝑝′)) = 𝜏(𝑓(𝑝)), we are done. If not, all such paths must be dominated w.r.t. to <𝐶and hence there is a path 𝑝′∈𝑃𝑓 𝑠,𝑡 with 𝜏(𝑓(𝑝′)) →𝜏(𝑓(𝑝)). This implies 𝜋(𝜏(𝑓(𝑝′))) ≤𝜋(𝜏(𝑓(𝑝))) and hence a path of the same price as 𝑝is present in 𝑃𝑓 𝑠,𝑡.□ EURO Journal on Transportation and Logistics 13 (2024) 100128 8
R. Euler et al. &text=&autor=&tagungsband=1256&_titel=Ein+Graphen-basiertes+Modell+zur+ Beschreibung+von+Preissystemen+im+%C3%B6ffentlichen+Nahverkehr. Borndörfer, R., Euler, R., Karbstein, M., Mett, F., 2018. Ein mathematisches Modell zur Beschreibung von Preissystemen im öV. Technical Report 18–47, ZIB, Takustr. 7, 14195 Berlin, URL: urn:nbn:de:0297-zib-70564. Broersma, H., Li, X., Woeginger, G., Zhang, S., 2005. Paths and cycles in colored graphs.. Australas. J. Combin. 31, 299–311. http://dx.doi.org/10.1145/62.2737. Brough, R., Freedman, M., Phillips, D.C., 2022. Experimental evidence on the effects of means-tested public transportation subsidies on travel behavior. Reg. Sci. Urban Econ. 96, 103803. http://dx.doi.org/10.1016/j.regsciurbeco.2022.103803, URL: https://www.sciencedirect.com/science/article/pii/S0166046222000436. Bull, O., Muñoz, J.C., Silva, H.E., 2021. The impact of fare-free public transport on travel behavior: Evidence from a randomized controlled trial. Reg. Sci. Urban Econ. 86, 103616. http://dx.doi.org/10.1016/j.regsciurbeco.2020.103616, URL: https:// www.sciencedirect.com/science/article/pii/S016604622030301X. Chen, X., Ma, J., Bai, X., 2020. Mode choice behavior analysis under the impact of transfer fare discount: A case study from Beijing public transit system. In: Resilience and Sustainable Transportation Systems. pp. 290–299. http://dx.doi.org/10.1061/9780784482902.033, URL: https://ascelibrary.org/doi/ abs/10.1061/9780784482902.033.arXiv:https://ascelibrary.org/doi/pdf/10.1061/ 9780784482902.033. Delling, D., Dibbelt, J., Pajor, T., 2019. Fast and exact public transit routing with restricted Pareto sets. In: 2019 Proceedings of the Twenty-First Workshop on Algorithm Engineering and Experiments. ALENEX, pp. 54–65. http://dx.doi.org/10.1137/1.9781611975499.5, URL: https://epubs.siam.org/doi/ abs/10.1137/1.9781611975499.5.arXiv:https://epubs.siam.org/doi/pdf/10.1137/ 1.9781611975499.5. Delling, D., Pajor, T., Werneck, R.F., 2015. Round-based public transit routing. Transp. Sci. 49 (3), 591–604. http://dx.doi.org/10.1287/trsc.2014.0534. Disser, Y., Müller-Hannemann, M., Schnee, M., 2008. Multi-criteria shortest paths in time-dependent train networks. In: McGeoch, C.C. (Ed.), Proceedings of the 7th International Conference on Experimental Algorithms. WEA ’08, Springer-Verlag, Berlin, Heidelberg, pp. 347–361. http://dx.doi.org/10.1007/978-3-540-68552-4_ 26, URL: http://dl.acm.org/citation.cfm?id=1788888.1788914. Euler, R., Borndörfer, R., 2019. A Graph- and Monoid-Based Framework for Price- Sensitive Routing in Local Public Transportation Networks. In: Cacchiani, V., Marchetti-Spaccamela, A. (Eds.), 19th Symposium on Algorithmic Approaches for Transportation Modelling, Optimization, and Systems (ATMOS 2019). In: OpenAccess Series in Informatics (OASIcs), vol. 75, Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, pp. 12:1–12:15. http://dx.doi.org/10.4230/OASIcs. ATMOS.2019.12, URL: http://drops.dagstuhl.de/opus/volltexte/2019/11424. Fleishman, D., Shaw, N., Joshi, A., Freeze, R., Oram, R., 1996. Fare Policies, Structures and Technologies. TCRP Report 10, Transport Cooperative Research Program, Transportation Research Board, Washington DC, URL: https://www.trb. org/Publications/Blurbs/153836.aspx. Gabow, H.N., Maheshwari, S.N., Osterweil, L.J., 1976. On two problems in the generation of program test paths. IEEE Trans. Softw. Eng. SE-2 (3), 227–231. http://dx.doi.org/10.1109/TSE.1976.233819. Gündling, F., 2020. Efficient Algorithms for Intermodal Routing and Monitoring in Travel Information Systems (Ph.D. thesis). Technische Universität, Darmstadt, http: //dx.doi.org/10.25534/tuprints-00014212, URL: http://tuprints.ulb.tu-darmstadt. de/14212/. Hansen, P., 1980. Bicriterion path problems. In: Lecture Notes in Economics and Mathematical Systems, vol. 177, http://dx.doi.org/10.1007/978-3-642-48782-8_9. Hopcroft, J.E., Ullman, J.D., 1979. Introduction to Automata Theory, Languages, and Computation. Addison-Wesley Publishing Company. Kung, H.T., Luccio, F., Preparata, F.P., 1975. On finding the maxima of a set of vectors. J. ACM 22 (4), 469–476. http://dx.doi.org/10.1145/321906.321910, URL: http://doi.acm.org/10.1145/321906.321910. Maristany de las Casas, P., Sedeno-Noda, A., Borndörfer, R., 2021. An improved multiobjective shortest path algorithm. Comput. Oper. Res. 135, http://dx.doi.org/ 10.1016/j.cor.2021.105424. Martins, E.Q.V., 1984. On a multicriteria shortest path problem. European J. Oper. Res. 16 (2), 236–245. http://dx.doi.org/10.1016/0377-2217(84)90077-8. Mitteldeutscher Verkehrsverbund GmbH, 2019a. MDV fares. https://www.mdv.de/ tickets/befoerderungsbedingungen-tarifbestimmungen/, Accessed: 2019-08-11. Mitteldeutscher Verkehrsverbund GmbH, 2019b. MDV GTFS data. https://www.mdv. de/informationen/downloads/, Accessed: 2019-08-11. Mohri, M., 2002. Semiring frameworks and algorithms for shortest-distance problems. In: J. Autom. Lang. Comb.. J. Autom. Lang. Comb. 7 (3), 321–350, URL: http: //dl.acm.org/citation.cfm?id=639508.639512. Müller-Hannemann, M., Schnee, M., 2005. Paying less for train connections with MOTIS. In: Proceedings of the 5th Workshop on Algorithmic Methods and Models for Optimization of Railways. In: OpenAccess Series in Informatics, vol. 2, p. 657. http://dx.doi.org/10.4230/OASIcs.ATMOS.2005.657. Orda, A., Rom, R., 1990. Shortest-path and minimum-delay algorithms in networks with time-dependent edge-length. J. ACM 37 (3), 607–625. http://dx.doi.org/10. 1145/79147.214078. Parmentier, A., 2019. Algorithms for non-linear and stochastic resource constrained shortest path. Math. Methods Oper. Res. 89 (2), 281–317. http://dx.doi.org/10. 1007/s00186-018-0649-x. Reinhardt, L.B., Pisinger, D., 2011. Multi-objective and multi-constrained non-additive shortest path problems. Comput. Oper. Res. 38 (3), 605–616. http://dx.doi.org/10. 1016/j.cor.2010.08.003, URL: https://www.sciencedirect.com/science/article/pii/ S0305054810001656. Rosenblum, J., 2020. Expanding Access to the City: How Public Transit Fare Policy Shapes Travel Decision Making and Behavior of Low-Income riders (Ph.D. thesis). Massachusetts Institute of Technology. Department of Urban Studies and Planning, URL: https://hdl.handle.net/1721.1/127617. Schöbel, A., Urban, R., 2021. The cheapest ticket problem in public transport. http: //dx.doi.org/10.48550/arXiv.2106.10521, pre-print. arXiv:2106.10521 [math.OC]. Verkehrsverbund Bremen/Niedersachsen GmbH, 2019. VBN nightliner fares. https://web.archive.org/web/20200930070236///https://www.vbn.de/tickets/ ticketangebot/nachtlinienzuschlag/, Accessed: 2023-11-10. Verkehrsverbund Bremen/Niedersachsen GmbH, 2023. VBN fares. https://www.vbn.de/ tickets/tarifbestimmungen, Accessed: 2023-11-10. Zimmermann, U., 1981. Linear and Combinatorial Optimization in Ordered Algebraic Structures. In: Annaly of discrete mathematics, vol. 10, North-Holland. EURO Journal on Transportation and Logistics 13 (2024) 100128 15