Introducing TimPassLib – A Library for Integrated Periodic Timetabling and Passenger Routing

Classic models to derive a timetable for public transport often face a chicken-and-egg situation: A good timetable should offer passengers routes with small travel times, but the route choice of passengers depends on the timetable. While models that fix passenger routes were frequently considered in the literature, integrated models that simultaneously optimize timetables and passenger routes have seen increasing attention lately. This creates a growing need for a set of instances that allows to test and compare new algorithmic developments for the integrated problem. Our paper addresses this requirement by presenting TimPassLib, a new benchmark library of instances for integrated periodic timetabling and passenger routing.


Introduction
Improvements in public transport systems have the potential to better the life of millions.In the sustainable development goals of the United Nations Development Programme, goal 11 ("Sustainable Cities and Communities") states the need to "provide access to safe, affordable, accessible and sustainable transport systems for all, improving road safety, notably by expanding public transport" [1].

Problem Definition
We first introduce the classic periodic timetabling problem where passenger routes are fixed, which is based on the periodic event scheduling problem [2].We consider a set of events E .For each event i ∈ E we would like to schedule a time i in the discrete interval {0, … , T − 1} , where T denotes the period length.The schedule is supposed to be repeated every T time units.In timetabling, typical events are the arrival or the departure of a train at a station.Additionally, there is a set of activities A ⊆ E × E that connect events with each other.Such an activity may model a train driving from one station to the next, a train waiting at a station for passengers to embark or disembark, or a group of passengers changing from one train arrival to the departure of another train.Another class of activities, which is not related to passengers, could model headway between trains or synchronization of lines running more frequently than once every T time units.Events and activities together result in the event-activity network N = (E, A) .Each activity a ∈ A has a lower bound a ∈ ℕ and upper bound u a ∈ ℕ that reflect requirements on minimum and maxi- mum durations of activities.We denote by y a the slack of an activity, i.e., difference of an activity duration to its lower bound.Finally, we assume that some weight w a is known for each activity, which represents the number of passengers who wish to use this activity.
The periodic timetabling problem can then be formulated as the following optimization problem: Solution approaches based on mixed-integer programming typically focus on one set of variables; either the timetable variables i (node-based formulations) or the slack variables y a (cycle-based formulations) [26].The symbol [⋅] T denotes the modulo bracket [x] T = min{x + zT ∶ x + zT ≥ 0, z ∈ ℤ} and is usually modeled by introducing additional integer variables.
In the integrated periodic timetabling and passenger routing problem, we choose to model the activity weights w a in more detail.We assume that an origin-destination (OD) matrix is given, where every entry d st denotes the number of passengers who wish to travel from origin station s ∈ V to destination station t ∈ V , where V denotes the set of all stations.Note that multiple events in the event-activity network can be assigned to the same station.Let P st denote all simple paths in N that connect an event corresponding to station s with an event corresponding to station t, and use exclusively drive, wait or change activities as described above.For each path p ∈ P st , let f p denote the fraction of passengers that travel from s to t along p.This means that for each OD pair (s, t) with d st > 0 , we require The passenger weights w a for each activity a ∈ A are then determined as From a passenger's perspective, there are more criteria which connection to choose, apart from just the travel time.Another frequently considered criterion is the number of transfers along a journey [27].This can be included in this model by using an additional penalty if passengers need to use a change activity, which represents the discomfort in comparison to a direct connection.Let c denote this penalty min ∑ a∈A w a (y a + a ) value and let A change ⊆ A denote the set of change activities in the event-activity network.The objective function is extended by the term to include change penalties.The integrated periodic timetabling and passenger routing problem is now to find both the timetable ( , y) as well as passenger routes and weights (f, w) simultane- ously.The resulting model is thus non-linear because of the bilinear term in the objective.Observe that we can assume that variables f p are binary, as there is always an optimal solution where passengers are routed along a single shortest path, since the model does not contain capacity constraints.Hence, the overall model for our problem can be summarized as follows [16,18,21,28]:

Data Sets
All benchmark data sets presented in this paper are available at https:// timpa sslib.net [25].The file format is described in Appendix A. The website collects the best known solutions and bounds for each data set.A potential new solution can be checked by means of a verification script written in Python, which also computes an optimal routing for a given timetable.
In the remainder of this section, we briefly describe the TimPassLib data sets.All instances are based on a set of lines, where we interpret a line as a sequence of stations without repetitions.Table 1 presents an overview of some key features of the instances.The columns contain the following information: instance The name of the instance.More information can be found in the following subsections.

stations
The number of stations. lines The number of operated lines.Note that a line can have a frequency higher than one.

OD pairs
The number of OD pairs with d st > 0.

OD total
The total number of passengers. events The number of events in the event-activity network.

activities total
The total number of activities in the event-activity network.

activities fixed
The number of activities in the event-activity network with a = u a .

activities free
The number of activities in the event-activity network with u a − a = T − 1.
activities restricted (restr.) The number of activities in the event-activity network with a < u a < a + T − 1. reference

Hamburg
The instance Hamburg models the suburban commuter rail network of S-Bahn Hamburg.The infrastructure is mostly independent from other railways and has only few single-track sections.The network is operated with six lines, where one of the lines has two branches.The period length is 10, as all lines run every 10 min in the rush hour.Bounds for travel and dwell times are derived from the annual timetable for 2023.The passenger demand is based on data from trains with sensors for automatic passenger counts, which is publicly available on the open data portal of Deutsche Bahn AG [30].We solve a linear program that fits this passenger flow to a gravity model derived from the total number of passengers boarding and alighting at each station.

Schweiz_Fernverkehr
The instance Schweiz_Fernverkehr is an excerpt of the ICE, TGV, InterCity and InterRegio trains within Switzerland and contains 80 lines.The period length is 120 min.The data is based on GTFS timetable data for 2023 and on station passenger counts, which are both publicly available on the open data platform of the Swiss federal office of transport [31].We use a gravity model based on geographical distances to sample an OD matrix.

toy and toy_2
The instances toy and toy_2 are based on a small artificial data set in the software library LinTim [32].The line concepts are generated algorithmically and consist of two and six lines, respectively.The period length is 60.Note that the same instances are used in [17].

regional
The instance regional is based on the regional train network in Lower Saxony, Germany, and is available as part of the software library LinTim [32].The line concept is generated algorithmically and consists of 8 lines.The period length is 60.Note that the same instance is used in [17].

grid
The instance grid is a benchmark data set, originally introduced in [33] and available as part of the open source data set [34] as well as the software library LinTim [32].The line concept is generated algorithmically and consists of 8 lines.The period length is 60.Note that the same instance is used in [17].

long-distance
The instance long-distance is inspired by the long-distance train network in Germany and part of the developer version of software library LinTim [32].The line concept is generated algorithmically and consists of 42 lines.The period length is 60.Note that the same instance is used in [17].

metro
The instance metro is based on the metro system in Athens, Greece, and is available as part of the software library LinTim [32].The line concept consists of 4 lines.The period length is 150 and the timetable is planned in increments of 6 s.Note that the same instance is used in [17].

Erding_NDP_S020 and Erding_NDP_S021
The instances Erding_NDP_S020 and Erding_NDP_S021 are based on the transport supply in Erding, Germany, and are available as part of an open source data set [34].
The corresponding line concepts consist of 21 lines and the period length is 60.

Stuttgart
The instance Stuttgart is based on the transport supply in Stuttgart, Germany, and is available as part of an open source data set [34].The corresponding line concept consists of 156 lines and the period length is 3600, i.e., the timetable is planned in seconds.

RxLy
This group consists of 16 instances, numbered from R1L1 to R4L4.They are an extension of the 16 core instances of the PESPlib [12], which in turn was based on long-distance train network data in Germany from the software library LinTim [32].
The numbers of lines are in the range from 54 up to 133, with a period length of 60.

Outlook
Integrating passenger routing into periodic timetabling is a natural step to resolve the mutual interdependence of both problems.For more than ten years, the PESPlib library [12] has stimulated a variety of research on periodic timetabling with fixed routing.As of now, recent improvements are only marginal, disregard passenger flow, and therefore do not necessarily improve passenger comfort.With the initiation of TimPassLib, we hope to foster the investigation of periodic timetabling with passenger routing, to extend the scope of the PESPlib library to a solid base of benchmark instances for the integrated problem, and to contribute to the attractiveness of public transport with mathematical optimization methods.We are therefore 64 Page 10 of 14 very much looking forward to submissions of new solutions or lower bounds as well as new benchmark instances.Furthermore, we think of extending TimPassLib with more optional features in the future, including vehicle capacities and different routing models.

A. Data Format
In-and output data for the benchmark instances is given in csv files that are designed to be easily readable.Each file starts with a header that describes the content of the columns.

A.1 Input File Config.csv
The file Config.csvcontains additional information needed for the data set.
The file a value for each following config_key: ptn_name name of the data set (string) period_length period length T (integer) ean_change_penalty change penalty c (integer)

A.2 Input File OD.csv
The file OD.csv contains information about the OD pairs.
Here, origin gives the id of the start station s of the OD pair, destination the corresponding destination t and customers the number of passengers d st who wish to travel from s to t.Note that all values are integers.• "sync" used for synchronizing trips of the same line (cannot be used for routing passengers) • "headway" represents headway constraint between vehicles using the same infrastructure (cannot be used for routing passengers) from_event: id of event i for activity (i, j) (integer) to_event: id of event j for activity (i, j) (integer) lower_bound: lower bound a of activity a (integer) upper_bound: upper bound u a of activity a (integer)

A.5 Solution File Timetable.csv
The solution file Timetable.csvshould be given in the following format.
event_id id of the event (integer) time time of the event ( {0, … , T − 1}) Since an optimal routing for a given timetable can be computed efficiently by solving a series of shortest path problems, passenger routing data is not required when submitting a solution.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made.The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material.If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.To view a copy of this licence, visit http:// creat iveco mmons.org/ licen ses/ by/4.0/.

Table 1
Overview of key features for the data sets [29]ctive (ref.obj.)Theobjectivevaluew.r.t. ( ⋆ ) of the best timetable computed by the concurrent PESP solver by[7]within a wall time limit of one hour.The computations have been executed on an Intel Xeon CPU E3-1270 v6 running at 3.80 GHz with 32 GB RAM using Gurobi 9.5.2[29]asMIP solver.The weights for the periodic timetabling problem have been obtained from a passenger routing according to lower bounds a and change penalty c.The aim of this reference objective is to provide initial solutions obtained with uniform computational power.