Integrated Optimization in Public Transport Planning [1st ed.] 9783030462697, 9783030462703

This book is one of the first to include an extensive discussion of integrated public transport planning. In times of gr

520 65 4MB

English Pages X, 191 [195] Year 2020

Report DMCA / Copyright

DOWNLOAD FILE

Polecaj historie

Integrated Optimization in Public Transport Planning [1st ed.]
 9783030462697, 9783030462703

Table of contents :
Front Matter ....Pages i-x
Introduction (Philine Schiewe)....Pages 1-31
Integrating Timetabling and Passenger Routing (Philine Schiewe)....Pages 33-64
Integrating Line Planning, Timetabling, and Passenger Routing (Philine Schiewe)....Pages 65-89
Integrating Timetabling and Vehicle Scheduling (Philine Schiewe)....Pages 91-98
Integrating Line Planning, Timetabling, Passenger Routing and Vehicle Scheduling (Philine Schiewe)....Pages 99-116
Two Heuristic Approaches for Integrating Public Transport Problems (Philine Schiewe)....Pages 117-153
General Multi-Stage Problems (Philine Schiewe)....Pages 155-170
Discussion and Conclusion (Philine Schiewe)....Pages 171-173
Outlook (Philine Schiewe)....Pages 175-176
Back Matter ....Pages 177-191

Citation preview

Springer Optimization and Its Applications 160

Philine Schiewe

Integrated Optimization in Public Transport Planning

Springer Optimization and Its Applications Volume 160 Series Editors Panos M. Pardalos , University of Florida My T. Thai , University of Florida Honorary Editor Ding-Zhu Du, University of Texas at Dallas Advisory Editors Roman V. Belavkin, Middlesex University John R. Birge, University of Chicago Sergiy Butenko, Texas A&M University Franco Giannessi, University of Pisa Vipin Kumar, University of Minnesota Anna Nagurney, University of Massachusetts Amherst Jun Pei, Hefei University of Technology Oleg Prokopyev, University of Pittsburgh Steffen Rebennack, Karlsruhe Institute of Technology Mauricio Resende, Amazon Tamás Terlaky, Lehigh University Van Vu, Yale University Guoliang Xue, Arizona State University Yinyu Ye, Stanford University

Aims and Scope Optimization has continued to expand in all directions at an astonishing rate. New algorithmic and theoretical techniques are continually developing and the diffusion into other disciplines is proceeding at a rapid pace, with a spot light on machine learning, artificial intelligence, and quantum computing. Our knowledge of all aspects of the field has grown even more profound. At the same time, one of the most striking trends in optimization is the constantly increasing emphasis on the interdisciplinary nature of the field. Optimization has been a basic tool in areas not limited to applied mathematics, engineering, medicine, economics, computer science, operations research, and other sciences. The series Springer Optimization and Its Applications (SOIA) aims to publish state-of-the-art expository works (monographs, contributed volumes, textbooks, handbooks) that focus on theory, methods, and applications of optimization. Topics covered include, but are not limited to, nonlinear optimization, combinatorial optimization, continuous optimization, stochastic optimization, Bayesian optimization, optimal control, discrete optimization, multi-objective optimization, and more. New to the series portfolio include Works at the intersection of optimization and machine learning, artificial intelligence, and quantum computing. Volumes from this series are indexed by Web of Science, zbMATH, Mathematical Reviews, and SCOPUS.

More information about this series at http://www.springer.com/series/7393

Philine Schiewe

Integrated Optimization in Public Transport Planning

Philine Schiewe Fachbereich Mathematik Technische Universit¨at Kaiserslautern Kaiserslautern, Germany

ISSN 1931-6828 ISSN 1931-6836 (electronic) Springer Optimization and Its Applications ISBN 978-3-030-46269-7 ISBN 978-3-030-46270-3 (eBook) https://doi.org/10.1007/978-3-030-46270-3 Mathematics Subject Classification: 49-XX, 49Q22 © Springer Nature Switzerland AG 2020 This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publisher, the authors, and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. This Springer imprint is published by the registered company Springer Nature Switzerland AG The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland

Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Literature Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.1 Line Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.2 Timetabling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.3 Vehicle Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.4 Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Problem Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.1 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.2 Preliminaries Public Transport Planning . . . . . . . . . . . . . . . . . . . . . . 1.3.3 Line Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.4 Timetabling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.5 Vehicle Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.6 Public Transport Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.7 Multi-Criteria Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4 Data Sets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.1 Data Set small . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.2 Data Set toy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.3 Data Set grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.4 Data Set regional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.5 Data Set long-distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1 2 3 4 5 7 8 10 11 12 12 15 21 26 27 28 29 29 29 30 30

2

33 33 38

Integrating Timetabling and Passenger Routing . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Modeling the Integrated Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Two Approaches for Reducing the Problem Size. . . . . . . . . . . . . . . . . . . . . . 2.2.1 Combining Shortest Path Routing with Routing Along Fixed Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.2 A Preprocessing Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Computational Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.1 Which OD Pairs Should Be Routed? . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.2 Influence of Preprocessing and Chosen IP Formulation . . . . . .

38 43 45 47 48 v

vi

Contents

2.3.3 Comparing Heuristic LB and Heuristic UB . . . . . . . . . . . . . . . . . . . 2.3.4 Best Configuration with Bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.5 Bounds for Data Set toy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.6 Data Set long-distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4 Adding Time Slices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5 A SAT Formulation with Time Slices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.1 Modeling Feasibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.2 Objective Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

48 50 51 51 52 56 58 60 64

3

Integrating Line Planning, Timetabling, and Passenger Routing . . . . . . 3.1 Modeling the Integrated Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Extensions of the Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Reducing the Problem Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.1 Determining which Stations Suffice for Transferring . . . . . . . . . 3.3.2 A Preprocessing Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.3 Routing on Fixed Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4 Computational Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.1 Influence of Preprocessing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.2 Influence of Adding Fixed Passenger Routes . . . . . . . . . . . . . . . . . 3.4.3 Influence of the Number of Routed OD Pairs . . . . . . . . . . . . . . . . . 3.4.4 Finding Solutions for Different Preferences . . . . . . . . . . . . . . . . . . . 3.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

65 65 69 69 71 75 80 83 84 85 86 88 89

4

Integrating Timetabling and Vehicle Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Modeling the Integrated Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Computational Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

91 91 96 97

5

Integrating Line Planning, Timetabling, Passenger Routing and Vehicle Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 Modeling the Integrated Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.1 Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.2 An IP Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.3 Computational Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Analysis of the Structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.1 Decompositions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.2 Computational Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99 99 100 101 105 107 108 109 116

Two Heuristic Approaches for Integrating Public Transport Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1 A Look-Ahead Heuristic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.1 Look-Ahead Enhancements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.2 Computational Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

117 117 118 124

6

Contents

vii

6.2 An Iterative Re-Optimization Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.1 Modelling the Re-Optimization Problems . . . . . . . . . . . . . . . . . . . . . 6.2.2 Iteration Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.3 Computational Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

128 128 142 147 153

7

General Multi-Stage Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1 Sequential and Multi-Stage Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2 Price of Sequentiality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3 Relation to Integrated Public Transport Problems . . . . . . . . . . . . . . . . . . . . .

155 155 160 168

8

Discussion and Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171

9

Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175

A Supplementary Material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 B Frequently Used Notations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

Acknowledgements

As this book is an outgrowth of my thesis, I want to start by thanking my supervisor Anita Schöbel for her support through all stages of writing. Thank you for your patience, enthusiasm, and always asking the right questions! No matter how much was on your plate, you always made time for giving advice—from stubborn implementation problems to developing new ideas for research topics. I also want to thank my co-supervisor Anja Fischer for her helpful advice and many interesting lectures as well as Ralf Borndörfer for agreeing to co-referee my thesis. Many thanks also go to the DFG research unit FOR 2083 for the financial support but much more importantly for the inspirational environment. The regular meetings and fruitful discussions were a great help for better understanding how my research fits into the wider context of public transport planning, not only considered from a mathematical point of view but also from a computer science and engineering perspective. Many of the results presented here would not have been developed without my co-authors Peter Großmann, Jonas Harbering, Marco Lübbecke, Karl Nachtigall, Julius Pätzold, Christian Puchert, Stefan Ruzika, Alexander Schiewe, Marie Schmidt, and Anita Schöbel. Thank you for the great collaborations! Many thanks also go to Michael Bastubbe and Florentin Hildebrand for helping with the implementations. I also want to thank the LinTim-Team consisting of Sebastian Albert, Jonas Harbering, Julius Pätzold, Alexander Schiewe, and Anita Schöbel for their constant development and maintenance of LinTim! The AG Optimierung both in Göttingen and Kaiserslautern always provided a great working environment. Thank you all for adding joint lunch breaks, choir practice, cake and ice-cream sessions, hiking tours, and triathlons to the mathematical day-to-day life. Special thanks go to Alex, Corinna, Lisa, and Julius for proofreading parts of this book as well as to the anonymous referees. Your input was extremely helpful! I cannot imagine the last years without the support of my family and friends. Especially my parents and parents-in-law made sure that writing was as enjoyable as possible by providing a sheer endless supply of advice, support, love, and cake, no matter what time of day. Thank you very much! ix

x

Acknowledgements

Last but not least, my thanks go to Alex, Emelie, and Leana! Thank you Emelie and Leana, for improving every single day and making sure I was not working too much. Thank you Alex, for your support in all matters of life and for always having my back! Kaiserslautern, Germany

Philine Schiewe

Chapter 1

Introduction

In times of growing urban populations and increasing environmental awareness, the importance of public transport systems is increasing as well. Public transport provides an efficient way for commuting by bundling traffic flows with the same general direction, thus reducing the individual traffic and the resulting congestions in peak hours. A lot of research is concerned with providing good public transport systems, both from the passengers’ and the operators’ point of view. For an already existing infrastructure network, the problems line planning, timetabling, and vehicle scheduling are especially interesting. The lines determined in the line planning stage are equally important for passengers and operators. As lines have to be covered by one vehicle end-to-end, they form an integral part of both the passenger routes and the vehicle schedule. A timetable appoints times to the departures and arrivals of lines at stations thus determining the journey times and the duration of potential transfers between different lines. The operational costs mainly depend on the vehicle schedule which determines the routes of the vehicles including the operation of lines and potential relocation trips. Although these three problems are generally solved sequentially, they are highly dependent on one another. The line plan determines the passenger routes and the structure of the timetable as well as a large portion of the vehicle schedules because lines have to be covered by one vehicle end-to-end. The timetable also influences the vehicle schedule by determining the start and end times of trips. Here, trips model the operation of lines by vehicles and two trips can only be operated by the same vehicle if the time between the end of the first trip and the start of the second trip is long enough to facilitate the minimal turnover time as well as a potential relocation. Finding a line plan with corresponding timetable and vehicle schedule can therefore be interpreted as a multi-stage problem. The first stage, line planning, can be solved individually but its solution is not indicative of the solution quality of the overall system. The later stages, timetabling and vehicle scheduling, depend on

© Springer Nature Switzerland AG 2020 P. Schiewe, Integrated Optimization in Public Transport Planning, Springer Optimization and Its Applications 160, https://doi.org/10.1007/978-3-030-46270-3_1

1

2

1 Introduction

the solutions of the former stages and the quality of the overall system can only be evaluated after all stages have been solved. We therefore consider the following questions: • Can several – or even all – of the stages line planning, timetabling and vehicle scheduling be considered as an integrated problem? How does this influence the solution quality and the computation times compared to the classical sequential solution approach? • If the integrated problems cannot be solved to optimality, how can we adapt the sequential solution approach by incorporating the idea of integration? • What is the general structure of abstract multi-stage problems? How much solution quality is lost when solving general multi-stage problems by a sequential approach instead of solving the overall problem?

1.1 Outline The remainder of this book is structured as follows. A literature overview on line planning, timetabling, and vehicle scheduling as well as integrated approaches to public transport planning is given in Section 1.2. The basic concepts used in this book as well as the single stage problems line planning, timetabling, and vehicle scheduling are introduced in Section 1.3 while in Section 1.4 the data sets for the computational experiments in the subsequent chapters are presented. In Chapters 2 to 5 we systematically build an integrated model for line planning, timetabling, and vehicle scheduling as depicted in Figure 1.1. We start in Chapter 2 by considering the importance of passenger routes and by stating an integrated model for timetabling and passenger routing. In order to reduce the computation

Chapter 1

Line Planning

Passenger Routing

Timetabling

Vehicle Scheduling

Chapter 2

Line Planning

Passenger Routing

Timetabling

Vehicle Scheduling

Chapter 3

Line Planning

Passenger Routing

Timetabling

Vehicle Scheduling

Chapter 4

Line Planning

Passenger Routing

Timetabling

Vehicle Scheduling

Chapter 5

Line Planning

Passenger Routing

Timetabling

Vehicle Scheduling

Fig. 1.1 Overview of the problems in public transport planning considered in this book.

1.2 Literature Overview

3

times and to make the model applicable to larger instances, we derive an exact preprocessing algorithm and two heuristics which yield lower and upper bounds on the objective value. This allows us to solve medium to large sized instances in reasonable time. Additionally, we derive a model for distributing the start times of the passenger routes. The model for timetabling and passenger routing is extended to the integrated line planning, timetabling, and passenger routing problem in Chapter 3. The heuristics and the preprocessing method can be adapted to the new challenges arising by integrating the selection of lines into the optimization process. Thus, even for the larger problem, good solutions can be found for medium sized instances. In Chapter 4 we consider the integration of (periodic) timetabling and (aperiodic) vehicle scheduling and discuss the resulting challenges. Again, we can find good solutions for medium to large sized instances. The results of Chapter 2 to 4 are used to define the integrated line planning, timetabling, passenger routing, and vehicle scheduling problem in Chapter 5. In addition to the benefits of integrated solutions, we also consider the influence of different matrix decompositions on the computational performance of the problem. Due to increasing problem size, the integrated line planning, timetabling, passenger routing, and vehicle scheduling problem can only be solved for very small artificial instances. We therefore consider two heuristic approaches in Chapter 6, both incorporating ideas from integration. The look-ahead heuristic presented in Section 6.1 solves the planning problems sequentially—incorporating the solution quality of the next stages into each stage. In Section 6.2 an iterative re-optimization scheme is introduced where for a given line plan, timetable, and vehicle schedule iteratively one of the stages is re-optimized such that the solutions of the other two stages stay the same. The concept of integrating several planning stages in public transport is generalized in Chapter 7 where abstract multi-stage problems are considered. To measure the difference between optimal solutions for the multi-stage problem and solutions that are found by solving the stages sequentially, the price of sequentiality is defined. In addition to a theoretical investigation, the price of sequentiality is calculated for a small example instance for the integrated public transport problems introduced in Chapter 2 to 5. We show that even for this very small example, solving two or more problems integratedly instead of sequentially leads to large benefits, emphasizing the importance of integration in public transport planning. This book closes with a discussion of the results in Chapter 8 and an outlook to future work in Chapter 9.

1.2 Literature Overview Public transport planning is a well researched topic in the operations research community. A general overview can be found in [BWZ97, HKLV05, DH07, GH08] while [BGJ10] focuses on recent success stories of applying operations research methods to public transport planning problems. Here, the planning process is

4

1 Introduction

network design passenger assignment line planning passenger routing timetabling vehicle scheduling crew scheduling

Fig. 1.2 Classical sequential approach to public transport planning.

divided hierarchically into subproblems, most commonly network design, line planning, timetabling, vehicle scheduling, and crew scheduling, which are solved sequentially, see Figure 1.2. Passenger assignment and passenger routing are important intermediate steps, providing input data for line planning and timetabling, respectively. Although this sequential approach is commonly applied, the potential benefits and difficulties of integrating several of these planning stages are already mentioned in [BWZ97]. While network design is an important problem, infrastructure is already present and fixed in most realistic settings. Although crew scheduling contributes an important component to the operational costs, it highly depends both on the legal circumstances and the institutional environment. In this book, we hence focus on integrating three of the aforementioned problems, namely line planning, timetabling, and vehicle scheduling as well as the intermediate step of passenger routing. We therefore provide a short literature review on these single stage problems in the next sections, Sections 1.2.1 to 1.2.3, and we introduce literature on integrated public transport problems in Section 1.2.4.

1.2.1 Line Planning In the line planning stage, the set of operated lines is determined as well as their frequencies, i.e., how often the lines are operated in a planning period. Note that lines are paths in the infrastructure network that are covered by one vehicle end-to-end. For an overview of line planning problems we refer to [Sch12]. In the special case of transit route design, see survey [KK09], the generation of lines is part of the optimization problem. In [SBP74], a two-stage model is developed where first lines are created from skeleton lines and afterwards a fixed number of lines is chosen for operation. Iterative approaches to re-optimize lines

1.2 Literature Overview

5

are presented in [LS67, Son79, Man80] while in [CW86] a set of passengerpleasing lines is created heuristically from which lines are chosen such that the travel time and the operational costs are minimized. A similar two-stage approach can be found in [GH08] where a bi-criterial objective is handled by a genetic algorithm which alternately optimizes travel time and operational costs. Another meta-heuristic approach, namely simulated annealing, is presented in [FM10]. In [Vig17] passenger-friendly bus lines are added to an existing multi-modal network by clustering the origin-destination data to identify corridors for lines. However, in most line planning problems, a fixed line pool is given from which lines are chosen. It can either be provided by the operator or constructed in a separate optimization step, see [GHS17]. A special case is [BGP07] where column generation is used to create the lines during the optimization process instead of using an explicit line pool to choose lines from. The most commonly used objectives in line planning are the minimization of operational costs and the maximization of passenger convenience. The minimization of operational costs is introduced in [CvDZ98] for which a fast variable fixing heuristic is given in [BLL04] and a branch-and-cut approach in [GvHK04]. An extension of the cost-minimization model where additionally the stopping patterns of the lines are determined is discussed in [Goo04, GvHK06]. In [BAE+ 18] a costminimal line planning model for multiple periods is considered where line plans for peak and off-peak hours are optimized simultaneously. In contrast to cost-oriented line planning, which considers the operator’s point of view, there are several models for optimizing lines for the passengers. Using the concept of direct travelers, i.e., passengers that have a transfer-free journey of acceptable length, as measurement of passenger convenience is introduced in [BKZ97, Bus98]. Another approach to define passenger convenience is to use the approximated generalized travel time of passengers, i.e., the travel time in the infrastructure network where transfers are penalized by a fixed amount. This concept is introduced in [Sch05b, SS06] and contains the routing of passengers on shortest paths. In order to model the transfers correctly, the infrastructure network is replaced with the change-and-go graph that additionally contains information on the lines. As the routing of the passengers is part of the optimization process for finding a line plan, we consider the travel time minimization in line planning as an integrated problem and we discuss further related literature in Section 1.2.4.

1.2.2 Timetabling In the timetabling stage, the arrivals and departures of lines at stations are assigned to time points. We distinguish periodic and aperiodic timetabling, i.e., whether the timetable is computed for a fixed period of time and then repeated multiple times or whether the timetable is planned for the complete planning horizon such that departures and arrivals do not have to be spaced out evenly. Recently, even the combination of periodic and aperiodic timetables has been investigated, see [RSAMB17], to harvest advantages of both systems, i.e., the regularity and mem-

6

1 Introduction

orability of the periodic case and the flexibility of the aperiodic one. Nevertheless, we here consider only periodic timetabling and refer to [LLER11] for an overview of both aperiodic and periodic timetabling. Periodic timetabling is usually modeled by the periodic event scheduling problem (PESP) which is introduced and shown to be NP-complete in [SU89]. The objective is to minimize passengers’ travel time on routes that are fixed a priori. We discuss the case with variable passenger routes in Section 1.2.4 as it represents an integrated problem. The modeling power of the periodic event scheduling problem corresponding to periodic timetabling is described in various publications. In [Odi96, Nac98], the driving of trains and their waiting at stations as well as transfers of passengers and headways between trains for security intervals are modeled by PESP constraints. In [KP03], variable drive times are added while in [Pee03], synchronization of departures, capacities at stations, and an approximation of the number of vehicles are added. This work also proposes alternative objectives to the minimization of the travel time, namely maximizing robustness, minimizing the number of vehicles needed, or minimizing the number of unsatisfied constraints in case of infeasibility. In [Lie06, LM07], further constraints are added such as fixed times for certain events, coupling and decoupling of train units as well as bundling of lines with similar speed. Due to the inherent difficulty of PESP and the importance of periodic timetabling in public transport, there have been many different solution approaches. In [NV96, NV97] genetic algorithms are proposed while in [Odi96] a constraint generation algorithm and cuts for the integer programming formulation of PESP are introduced. In [Nac98, PK01], a cycle base IP formulation is introduced which is subject to a lot of further research. Different methods to derive good cycle bases are studied in [Lie03, LR05, Lie06, LP09] while in [BHK16] a pseudo-polynomial algorithm for deriving cutting planes is presented. A modulo simplex heuristic for solving the periodic timetabling problem is introduced in [NO08], which is based on the fact that periodic timetables can be easily computed on trees. This heuristic is further investigated and improved in [GS13] and it leads to even better solutions when it is iteratively combined with mixed integer programs, see [GL17]. Another fast heuristic that is based on clustering lines is introduced in [PS16]. Additionally to IP based methods and heuristics, a satisfiability (SAT) based approach has been successfully pursued. In [GHM+ 12] the periodic event scheduling problem is modeled as a satisfiability problem and it is solved by specialized SAT solvers. The same approach is applied to large infeasible PESP instances to find a minimal set of constraints that have to be relaxed in order to get a feasible problem, see [KGN+ 15]. In [MASM18] a SAT formulation for periodic timetabling is combined with machine learning techniques to speed up the computations. Periodic timetabling has even been successfully applied in practice. See [Lie06, Lie08a] for an application to the Berlin subway system and [KHA+ 09] for Netherlands Railways.

1.2 Literature Overview

7

1.2.3 Vehicle Scheduling During the vehicle scheduling stage the routes of the vehicles are determined, including the allocation of vehicles to line operations as well as potential relocations of vehicles between the operation of two lines. For a survey on vehicle scheduling, we refer to [DP95, BK09]. In [BKLL18], periodic and aperiodic vehicle scheduling models are compared. While periodic vehicle schedules are determined for one planning period and then repeated multiple times, aperiodic vehicle schedules are determined for the whole planning horizon. When the number of vehicles is minimized, the underlying timetable is periodic and the planning horizon is long enough, the aperiodic vehicle scheduling problem always has an optimal solution that is periodic, as shown in [BKLL18]. Thus, in this special case, considering period vehicle schedules is sufficient. But as we want to incorporate the relocation of vehicles to and from depots and a more sophisticated cost evaluation, we focus on the aperiodic case here. Two properties are important when classifying vehicle scheduling problems: whether there are one or multiple vehicle types and whether one (or none) or multiple depots are considered. In [BCG87] it is shown that the single-type singledepot case can be solved in polynomial time and it remains polynomially solvable even for a restricted number of vehicles for “reasonable” definitions of operational costs although it is NP-hard for general cost functions. Additionally, NP-hardness is proven for the single-type, multi-depot case in [BCG87]. As we focus on the easier single-type single-depot case in this book, we refer to [DP95, BK09] for multiple vehicle types or multiple depots. In [Sah70], a minimum decomposition formulation is given for the single-depot single-type vehicle scheduling problem where the number of vehicles is minimized but the relocation of vehicles between trips is not allowed. In [Orl76] both the relocation and the corresponding costs are added to the formulation. A formulation as a transportation model is given in [GS79] where in addition to the number of vehicles and the relocation costs also the costs for getting to and from the depot are considered and where a maximum number of vehicles is enforced. Additionally, a branch-and-bound procedure for solving the problem is provided. A similar model is given in [PB87] while network flow formulations are proposed in [BCG87, DP95]. For a more application-based approach we refer to [Mar06] where tactical, maintenance, and operational routing are distinguished. Also, in [RS18], a realistic vehicle scheduling problem is described and solved by coarse-to-fine column generation.

8

1 Introduction

1.2.4 Integration In this section we review literature where two or more planning stages are handled in an integrated way instead of sequentially. We start by considering the integration of passenger routing into one of the planning stages. As mentioned in Section 1.2.1, the travel time model of line planning presented in [Sch05b, SS06] constitutes an integrated problem as line frequencies and passenger routes are determined simultaneously instead of fixing passenger routes a priori. A similar model is presented in [NJ08] and handled by a column generation approach, while the complexity of the problem is discussed in depth in [Sch14, SS15a]. The model introduced in [BRLL16] uses frequency based transfer penalties instead of a fixed penalty in order to better approximate the realistic travel time. Different routing models are discussed in [PB06], especially the difference between letting all passengers with the same origin and destination use the same route, splitting them to different routes of different lengths to better utilize the capacity of the lines or fixing the route in the infrastructure network and thus restricting the choice to the lines that are used. For artificial examples it is shown that compared to routing all passengers with the same origin and destination on the same shortest path, the other two models can be arbitrarily bad. A similar comparison is made in [GS17] where routing all passengers on shortest routes is compared to routing passengers such that a system optimal solution concerning the capacities is found and a genetic algorithm is presented. In [SSS19], a game theoretical approach to line planning is presented where line plans are constructed according to equilibrium solutions found by determining passenger routes. Note though that even integrating passenger routes into line planning can only result in approximated travel times and that the optimal passenger routes may shift when a timetable is introduced. Although in timetabling often the travel time of passengers is minimized, it is usually assumed that passengers travel on routes that have been fixed a priori. However, in [BHK17] it is shown that this fixed routing can be arbitrarily bad compared to an integrated routing where passenger travel on shortest routes according to the timetable. This motivates studying the integration of passenger routing into timetabling. In [Sie11, SG13], routing is added to the periodic timetabling problem in form of passenger flow constraints and a re-timetabling heuristic is introduced where timetable optimization and passenger routing are iterated alternately leading to shorter travel times for the passengers. A similar iteration scheme is discussed in [Kin08], while the aperiodic case and its complexity are considered in [Sch14, SS15a, SS15b]. In [RSAMB17] passenger routing is integrated into a hybrid model of periodic and aperiodic timetabling and the resulting problem is solved by a simulated annealing heuristic. In Chapter 2 of this book, we consider a model for integrating passenger routing into periodic timetabling and we propose an exact preprocessing method as well as two heuristics for reducing the problem size in Section 2.2. In Section 2.4, we propose a way to distribute the passenger demand within the planning period

1.2 Literature Overview

9

and we present a satisfiability model for the integrated problem in Section 2.5. The corresponding results are additionally published in [SS20] and [GGNS16], respectively. The integration of line planning and timetabling is often approached heuristically. In [Sch05a] line segments are connected to lines during the timetabling stage. A similar heuristic is described in [Lie08b]. In [BBVL17], an iterative heuristic is proposed where line plans and timetables are re-optimized alternately. However, in [RN09] an integer programming model for integrating line planning, periodic timetabling, and passenger routing is proposed and a corresponding column generation method is discussed where a weighted sum of travel time and operational costs is minimized. A similar model is considered in [Kas10, KR13] and solved by a cross entropy heuristic. In Chapter 3 of this book, we consider the integrated line planning, timetabling, and passenger routing problem. Similar to the integrated timetabling and passenger routing problem, we present an exact preprocessing method as well as heuristics for reducing the problem size in Section 3.3. Models for integrated timetabling and vehicle scheduling often use an aperiodic timetable as input which is modified during the vehicle scheduling stage to allow for better schedules. Examples are [vdHvdAvKN08] where a simulated annealing heuristic is used to modify the timetable, [GH10] where local search is applied iteratively and [PLM+ 13] where a large neighborhood search heuristic is used. In [SE15] a similar re-optimization approach is used and the integrated problem is solved by a hybrid metaheuristic that iteratively optimizes the operational costs and the balance of departure times which measures the deviation from ideal service intervals for the passengers. Another iterative matheuristic is presented in [FvdHRL18], where excess transfer times and operational costs are minimized. In [IRRS11], a model is presented where an aperiodic timetable and a vehicle schedule are computed simultaneously such that the number of vehicles is minimized while the number of the so-called synchronizations is maximized, i.e., the number of vehicles at the same stations such that transfers are possible. A similar model is considered in [CM12] with the objective of avoiding shunting operations which are prone to delays. A bi-level model is presented in [YHWL17] and solved by a simulated annealing heuristic. Here, the upper level corresponds to finding an aperiodic timetable and the lower level corresponds to finding a matching vehicle schedule. A periodic version for integrating timetabling and vehicle scheduling can be found in [DRB+ 17] where some vehicle scheduling constraints are added to a periodic event scheduling problem. In [Lin00] the periodic case is considered as well and vehicle scheduling is integrated indirectly by using an approximation of the operational costs as objective. The model for integrating timetabling and vehicle scheduling presented in Chapter 4 of this book combines periodic timetabling and aperiodic vehicle scheduling with one depot and one vehicle type allowing us to determine the operational costs exactly. In [Lie08b], a model for integrating timetabling and a simplified version of vehicle and crew scheduling is introduced as a modified periodic event scheduling

10

1 Introduction

problem. Additionally, some aspects of line panning can be integrated by rematching line segments at stations. The publication [LHS18] can also be interpreted as an integrated approach as aspects of line planning and vehicle scheduling are added to an aperiodic timetabling formulation. This problem is considered for a single-track metro line and it is solved by a branch-and-bound method together with a rolling horizon heuristic. Another heuristic approach to the integration of line planning, timetabling, and vehicle scheduling is given in [MS09] where the order of solving the planning stages is changed. Here, the vehicle schedule is considered first and lines and timetables are fixed later. This concept of solving the planning stages in different orders is generalized in [Sch17], providing an iterative algorithmic scheme for integrated public transport problems. In Chapter 5, we present a model for integrating line planning, timetabling, passenger routing, and vehicle scheduling for one vehicle type and one depot. The model as well as some analysis on its structure is additionally published in [LPSS18]. Two heuristics for solving the problem are presented in Chapter 6 of which one is additionally published in [PSSS17]. Both heuristics specify parts of the general algorithmic scheme introduced in [Sch17]. The integration of other planning stages is also a subject of current research, e.g., the integration of vehicle and crew scheduling in [MPR09]. Generating robust timetables, see, e.g., [Goe12, GS18], can also be considered as an integration of timetabling and aspects of delay management. In [LHZ18], the integration of realtime data on passenger behavior and vehicle position is suggested to improve the planning process in public transport planning. Integration is not only considered in public transport planning but it has also gained in importance in other fields as the ability to solve larger problems expanded. Especially in process planning and scheduling, the benefits of integration are considered, see, e.g., [LK93, TK00, GVDHH02] and more recently [DC18]. The integration of several planning stages becomes more complicated and less promising when several parties with opposing interests are involved as demonstrated in [LPW97, BO01] for the example of integrated supply chain management.

1.3 Problem Definitions In the following section we introduce the notations and basic concepts used in this book. Some problem-specific notation is introduced in the later chapters as well as problem-specific assumptions. We often use linear integer programs (abbreviated as IPs) to model the arising optimization problems. As an introduction to integer programming, we refer to [NW88] while for an introduction to complexity and especially NP-completeness and NP-hardness, we refer to [GJ79].

1.3 Problem Definitions

11

1.3.1 Preliminaries In this book, we use the following notation for numbers. Notation 1.1. We write the set of the natural numbers containing zero as N = {0, 1, 2, . . .}. If zero is explicitly excluded, we write N+ = {1, 2, 3, . . .}. The set of the integers is denoted by Z = {. . . , −2, −1, 0, 1, 2, . . .} while R represents the set of real numbers. Many of the following concepts are related to graphs. The following definitions clarify the use of the terminology and are based on [NW88] and [AMO88]. Definition 1.2. A graph or undirected graph G = (V , E) consists of a node or vertex set V and an edge set E with E ⊂ {{i, j } : i, j ∈ V }. Edge e = {i, j } connects nodes i and j . In some cases the direction of the edges is important. Definition 1.3. A directed graph G = (V , A) consists of nodes V and directed edges or arcs A ⊂ V × V . Here, arc a = (i, j ) connects node i to node j . If two nodes u, v ∈ V have multiple, say n, connections, we write (e, labeli ), i ∈ {1, . . . , n}, with e = {u, v} or e = (u, v) and labeli = labelj for all i = j ∈ {1, . . . , n}, i.e., we label the connections uniquely. Another important concept is that of paths. Definition 1.4. A path P in an undirected graph consists of a list of nodes and edges P = (v1 , e1 , v2 , e2 , . . . , en−1 , vn ) such that the edges satisfy ei = {vi , vi+1 } for all i ∈ {1, . . . , n − 1}. As the path is uniquely defined by its edges, we also write P = (e1 , e2 , . . . , en−1 ). Similarly, we write v ∈ P , e ∈ P for nodes or edges that are part of path P . For edge lengths lengthe we get the length of path P , lengthP , as lengthP =



lengthe .

e∈P

A (directed) path in a directed graph is defined as P = (v1 , a1 , v2 , a2 , . . . , an−1 , vn ) with arcs satisfying ai = (vi , vi+1 ) for all i ∈ {1, . . . , n − 1}. Again we abbreviate path P by writing P = (a1 , a2 , . . . , an−1 ) and v ∈ P , a ∈ P . The length is computed in the same way as for an undirected graph. A path is called simple if no node is contained twice. We often use the concept of shortest paths. Definition 1.5. Let G = (V , E) be a directed or undirected graph. A s − t path is a path P = (s, e1 , v2 , . . . , en−1 , t) starting in node s and ending in node t. A shortest s − t path is a s − t path P as above with minimal length lengthP = e∈P lengthe .

12

1 Introduction

For an undirected graph and path P with (u, e, v) ⊂ P the direction of edge e = {u, v} is implicitly given. We therefore often use the notation e = (u, v) instead of e = {u, v}.

1.3.2 Preliminaries Public Transport Planning The methods considered in this book are of a general nature and can be applied to various modes of public transport, especially bus and railway networks. However, not all details needed for modeling operational and tactical railway planning are explicitly considered here such that the presented models can be more easily applied to bus networks or strategical planning for railway networks. As we do not consider network design, we assume that the infrastructure network, i.e., the public transportation network, is given. Definition 1.6. A public transportation network (PTN) (V , E) is a graph whose nodes V correspond to stations or stops and whose edges E correspond to direct connections between stops, e.g., tracks. The edges E can either be directed or undirected. For each edge e ∈ E the minimal and maximal drive times are given as Ldrive and Uedrive . For each stop v ∈ V the minimal and maximal wait times of e vehicles are given as Lwait and Uvwait and the minimal and maximal transfer times v of passengers are given as Ltrans and Uvtrans . Note that we assume these bounds to be v drive drive ≤ Ue , e ∈ E, and Lwait ≤ Uvwait , Ltrans ≤ Uvtrans , v ∈ V . positive with Le v v Figure 1.3 shows an example PTN. The demand is considered to be given in form of an origin-destination matrix. Definition 1.7. An origin-destination (OD) matrix C = (Cu,v )u,v∈V contains the number of passengers Cu,v in OD pair (u, v), i.e., the number of passengers traveling from origin u to destination v. We use the notation (u, v) ∈ C for all OD pairs with a positive number of passengers, i.e., with Cu,v > 0. We often write OD instead of C.

1.3.3 Line Planning In order to formally define the line planning problem (Figure 1.4), we start by defining lines. Fig. 1.3 Example PTN.

v1

v4 v2

v5

v3 v6

1.3 Problem Definitions

Line Planning

13

Passenger Routing

Timetabling

Vehicle Scheduling

Fig. 1.4 The line planning stage in public transport planning.

Definition 1.8. A line is a simple path in the PTN which has to be operated by one vehicle end-to-end.Let costl be the costs of operating line l once per planning period and lengthl = e∈l lengthe the length of line l. A line pool L0 is a set of lines while a line concept L = (L0 , f ) assigns a frequency fl to each line l ∈ L0 . The frequency fl determines how often line l is operated during the planning period. The set L = {l ∈ L0 : fl > 0} is called line plan. For easier notation we often write l ∈ L if l ∈ L0 and fl > 0. The most fundamental problem of line planning is the feasibility problem as defined in [Bus98]. Lower frequency bounds on edges guarantee a minimal service level while upper frequency bounds model security constraints and bound the operational costs. A feasible line concept is defined as follows. Definition 1.9. Let (V , E) be a PTN and let for each edge e ∈ E lower and upper frequency bounds femin and femax be given. Let L0 be the line pool. A line concept L = (L0 , f ) is called feasible if all edges are covered according to the frequency bounds, i.e., for all edges e ∈ E 

femin ≤

fl ≤ femax

l∈L0 : e∈l

is satisfied. In order to guarantee a minimal service level for the customers, the minimal frequency bounds have to allow for a routing of the passengers in the PTN. Definition 1.10. Let a PTN (V , E), an OD matrix C, and a vehicle capacity Cap be given. Lower frequency bounds femin , e ∈ E, correspond to a passenger assignment if there exists a u − v path Pu,v for each OD pair (u, v) ∈ C such that the capacity on the edges e ∈ E is sufficient, i.e., if 

Cu,v ≤ Cap · femin

(u,v)∈C:e∈Pu,v

is satisfied. In the following, we always assume that the lower frequency bounds correspond to a passenger assignment. We formally define the feasibility problem of line planning in Problem 1.11. It is already NP-complete as shown in [Bus98].

14

1 Introduction v1

Fig. 1.5 Example line plan. Line l1 is depicted by dotted edges, line l2 is depicted by dashed edges.

v4 v2

v3

v5

v6

Problem 1.11 (Feasibility problem of line planning [Bus98]). Let (V , E) be a PTN and let for each edge e ∈ E lower and upper frequency bounds femin and femax be given. Let L0 be a line pool. Find a feasible line concept L = (L0 , f ) according to Definition 1.9. Figure 1.5 shows an example line plan for the PTN from Figure 1.3. In order to incorporate operational costs, the feasibility model can be extended as described in [CvDZ98]. We restrict ourselves to the basics by using only line costs depending on the frequencies as in [Sch12]. Problem 1.12 (Cost model of line planning [CvDZ98, Sch12]). Let a PTN (V , E) with frequency bounds femin , femax , e ∈ E, be given and let L0 be a line pool with line costs costl , l ∈ L0 . Find a feasible line concept L = (L0 , f ) according to Definition 1.9 that minimizes the line costs, i.e.,  cost(L) = fl · costl . l∈L0

To better incorporate the perspective of the passengers without integrating passenger routing into the optimization process, the concept of direct travelers is introduced in [BKZ97, Bus98]. Direct travelers are passengers that can travel on pleasant paths from their origin to their destination without transferring between lines. While pleasant paths can be defined in various ways, we use shortest paths corresponding to the minimal travel time on the edges of the PTN. Problem 1.13 (Direct travelers model of line planning [BKZ97, Bus98]). Let a PTN (V , E) with frequency bounds femin , femax , e ∈ E, be given. Let L0 be a line pool and C an OD matrix. Find a feasible line concept L = (L0 , f ) according to Definition 1.9 that maximizes the number of direct travelers on shortest paths.

1.3 Problem Definitions

Line Planning

15

Passenger Routing

Timetabling

Vehicle Scheduling

Fig. 1.6 The timetabling stage in public transport planning.

As described in the literature review in Sections 1.2.1 and 1.2.4, there are many other line planning models, e.g., [SS06, BGP07, GS17], often focusing on passenger convenience. But as we consider line planning only as part of an integrated problem which also contains timetabling and passenger routing, we do not present more detailed models here. Remark 1.14. Although the line planning problems are introduced here with integer frequencies, we present the notation for the following sections for binary frequencies, i.e., we assume that lines are operated once during the planning period if they are operated at all. This is a common assumption in timetabling as the underlying networks are defined for a common planning period, see, e.g., [SU89]. As remarked later, multiple frequencies can be handled in the same setup by using virtual copies of the lines and adding extra constraints. For vehicle scheduling, binary line frequencies only simplify the notation. Multiple frequencies can easily be handled by referring to lines and their frequency repetition instead of only referring to lines. Note that for the case of binary frequencies line concepts and line plans convey the same information such that the terms can be used interchangeably.

1.3.4 Timetabling We consider periodic timetabling (Figure 1.6), i.e., the timetable is planned for a fixed planning period, e.g., an hour, and then repeated. The network used for modeling timetables is called event-activity network and is derived from the PTN and the line concept. It is first described in [SU89] and explicitly applied to train timetabling in [Odi96]. Note that we use three different event-activity networks throughout this book: the (standard) event-activity network N 0 = (E 0 , A0 ), see Definition 1.15, the extended event-activity network N = (E, A), see Definition 1.18, and the extended ˜ A), ˜ see Definition 2.19. The event-activity network with time slices N˜ = (E, standard event-activity network N 0 = (E 0 , A0 ) contains the information needed for timetabling and is contained in both of the other networks. The extended event-activity network N = (E, A) additionally contains information needed for passenger routing while the extended event-activity network with time slices ˜ A) ˜ contains information needed for routing passengers with distributed N˜ = (E, start times.

16

1 Introduction

Definition 1.15. The event-activity network (EAN) N 0 = (E 0 , A0 ) is a directed graph consisting of nodes E 0 , called events, and arcs A0 , called activities. Nodes represent arrivals and departures of vehicles at stops while activities represent the driving of vehicles, vehicles waiting at stops and transferring of passengers. For a PTN (V , E) and a set of lines L the EAN is constructed as follows: E 0 = Earr ∪ Edep

with

Earr = {(v, arr, l) : v ∈ l ∩ V , l ∈ L}, Edep = {(v, dep, l) : v ∈ l ∩ V , l ∈ L}, A0 = Adrive ∪ Await ∪ Atrans

with

Adrive = {((v1 , dep, l), (v2 , arr, l)) : e = (v1 , v2 ) ∈ l ∩ E, l ∈ L}, Await = {((v, arr, l), (v, dep, l)) : v ∈ l ∩ V , l ∈ L}, Atrans = {((v, arr, l1 ), (v, dep, l2 )) : v ∈ l1 ∩ l2 ∩ V , l1 , l2 ∈ L, l1 = l2 }. For each activity a ∈ A0 , upper and lower bounds on the duration of the activity are given as La , Ua ∈ N with 0 ≤ La ≤ Ua . Note that a variety of other constraints can be modeled by activities, e.g., the synchronization of different repetitions of lines with a frequency greater than one or security headways between trains on the same track. For an overview, see [Pee03, LM07]. An example for an EAN for the PTN depicted in Figure 1.3 and the line plan depicted in Figure 1.5 is given in Figure 1.7. With the notion of an event-activity network we define feasible periodic timetables. Definition 1.16. Let N 0 = (E 0 , A0 ) be an EAN with bounds La , Ua for activities a ∈ A0 and let the length of the planning period be T ∈ N. A feasible periodic

l1

v1

v4 v2

l2

v5

v3

v6

Fig. 1.7 Example event-activity network. Arrival events are colored gray while departure events are colored white. The solid arcs represent drive activities, the dotted arcs wait activities and the dashed arcs transfer activities.

1.3 Problem Definitions

17

timetable π = (πi )i∈E 0 ∈ {0, . . . , T − 1}|E | assigns periodic times πi to events i ∈ E 0 such that the duration of activity a, a ∈ A0 , lies within the bounds [La , Ua ], i.e., π satisfies 0

La ≤ (πj − πi − La )mod T + La ≤ Ua for all activities a = (i, j ) ∈ A0 . We now formally define the periodic timetabling problem or periodic event scheduling problem (PESP) for a given planning period length T . This problem has been studied extensively, see Section 1.2.2, and was first formally described in [SU89] where it is also shown to be NP-hard. In PESP, passengers are expected to travel on routes in the EAN which are fixed a priori and given as weights w = (wa )a∈A0 . For these weights, the duration of the activities is minimized. Problem 1.17 (Periodic event scheduling problem (PESP) [SU89]). Let N 0 = (E 0 , A0 ) be an EAN with bounds La , Ua , a ∈ A0 , and passenger weights w = (wa )a∈A0 , and let the length of the planning period be T . 0 Find a feasible periodic timetable π = (πi )i∈E 0 ∈ {0, . . . , T − 1}|E | according to Definition 1.16 such that the weighted duration 

  wa · (πj − πi − La )mod T + La

a=(i,j )∈A0

is minimized. A standard IP formulation for PESP, as proposed in [SU89], is the following. Here, πi ∈ {0, . . . , T − 1}, i ∈ E 0 , are variables representing the (periodic) time of the events while za ∈ Z, a ∈ A0 , are the so-called modulo parameters for the activities modeling the periodicity of the timetable.

(PESP)

min



Cu,v · (πj − πi + za · T )

(1.1)

a=(i,j )∈A0

s.t. πj − πi + za · T ≥ La

a = (i, j ) ∈ A0

(1.2)

πj − πi + za · T ≤ Ua

a = (i, j ) ∈ A0

(1.3)

πi ∈ {0, . . . , T − 1}

i∈E

za ∈ Z

a ∈ A0

0

Constraints (1.2) and (1.3) model the feasibility of the timetable such that the duration of the activities is modeled correctly in the objective (1.1).

18

1 Introduction

Line Planning

Passenger Routing

Timetabling

Vehicle Scheduling

Fig. 1.8 The passenger routing stage in public transport planning.

To route passengers in the EAN (Figure 1.8), either a priori for the classical timetabling problem or during the optimization process in the integrated problems, the EAN has to be extended as, e.g., in [Sch14]. Definition 1.18. The extended EAN N = (E, A) is derived from an EAN N 0 = (E 0 , A0 ) for PTN (V , E) by adding source and target events for all stops and the corresponding activities, connecting source and target events to the departures and arrivals at the respective stops. E = E 0 ∪ Esource ∪ Etarget

with

Esource = {(v, source) : v ∈ V }, Etarget = {(v, target) : v ∈ V }, A = A0 ∪ Ato ∪ Afrom

with

Ato = {((v, source), (v, dep, l)) : v ∈ l ∩ V , l ∈ L}, Afrom = {((v, arr, l), (v, target)) : v ∈ l ∩ V , l ∈ L}. We call these auxiliary events Eaux = Esource ∪ Etarget and auxiliary activities Aaux = Ato ∪ Afrom , respectively. In order to get meaningful weights for the objective function of the classical periodic timetabling problem, see Problem 1.17, passengers have to be assigned to paths in the EAN a priori. Definition 1.19. For a given PTN (V , E), EAN N 0 = (E 0 , A0 ) and OD matrix C, a passenger routing R is a set of paths containing for each passenger traveling from u ∈ V to v ∈ V a path in the extended EAN from (u, source) to (v, target). These paths are called passenger routes. A lower bound routing is a passenger routing where all passengers are routed on shortest paths according to the lower bounds La of the activities. If there are multiple shortest paths for a passenger, one of them is chosen by a fixed rule, e.g., lexicographically, in order to guarantee for a unique lower bound routing. Passenger weights w = (wa )a∈A0 with wa ≥ 0, a ∈ A0 , give the number of passengers wa using activity a ∈ A0 . They correspond to a routing R, i.e., they are feasible, if the weights on all activities corresponds to the number of passengers using the activity in routing R, i.e., if |{P ∈ R : a ∈ P }| = wa is satisfied for all activities a ∈ A0 .

1.3 Problem Definitions

19

Note that even if more activity types are defined, passenger routes can only use activities in Adrive , Await , Atrans , Ato , and Afrom . There are at least two different ways to evaluate a timetable as either the travel time for fixed weights or the rerouted travel time can be considered. Definition 1.20. Let π be a timetable for EAN N 0 = (E 0 , A0 ) and passenger weights w = (wa )a∈A0 corresponding to some routing of OD matrix C. The travel time for fixed weights w is defined as Rfix (π, w) =



  wa · (πj − πi − La )mod T + La .

a∈A0

If w corresponds to a lower bound routing, Rfix (π, w) is called lower bound routing travel time and we write RLB (π ) = Rfix (π, w). The rerouted travel time or shortest path routing travel time RSP (π ) is the total travel time of all passengers in C using shortest paths for the duration of activities in timetable π , i.e.,   RSP (π ) = Cu,v · lengtha , (u,v)∈C

a∈Pu,v

where Pu,v is a shortest (u, source) − (v, target) path in the extended EAN with edge length lengtha = (πj − πi − La )mod T + La for activities a = (i, j ) ∈ A0 and lengtha = 0 for activities a ∈ A \ A0 . Remark 1.21. Instead of considering only the travel time of the passengers, it is also common to consider the perceived travel time, see, e.g., [FHSS17a, PSS18], where for each transfer in a passenger route a penalty term is added to the objective. This can easily be done for all timetabling models presented in this book as well as for the preprocessing methods and the corresponding heuristics by adding the correct terms. However, we restrict ourselves to standard travel time evaluations for easier notation. For the integrated models presented in this book, we assume that the bounds on the activities in the event-activity network are derived from the bounds in the PTN.

20

1 Introduction

Definition 1.22. For EAN N 0 = (E 0 , A0 ) with corresponding PTN (V , E) and line set L, activity bounds derived from the corresponding PTN bounds are defined as follows: ⎧ drive 0 ⎪ ⎪ ⎨L(v1 ,v2 ) , if a = ((v1 , l, dep), (v2 , l, arr)) ∈ Adrive La = Lwait if a = ((v, l, arr), (v, l, dep)) ∈ A0wait v , ⎪ ⎪ ⎩Ltrans , if a = ((v, l , arr), (v, l , dep)) ∈ A0 v

Ua =

1

2

trans

⎧ drive , ⎪ ⎪U(v ⎨ 1 ,v2 )

if a = ((v1 , l, dep), (v2 , l, arr)) ∈ A0drive

Uvwait , ⎪ ⎪ ⎩U trans , v

if a = ((v, l1 , arr), (v, l2 , dep)) ∈ A0trans .

if a = ((v, l, arr), (v, l, dep)) ∈ A0wait

For easier notation, we use the following definition. Definition 1.23. Let N 0 = (E 0 , A0 ) be an event-activity network for PTN (V , E) and set of lines L. For each line l ∈ L we define the events E 0 (l) belonging to line l as the arrival and departure events of line l, i.e., E 0 (l) = {(v, arr, l) : v ∈ l} ∪ {(v, dep, l) : v ∈ l}. Similarly, we define the activities A0 (l) belonging to line l as the set of activities a = (i, j ) ∈ A0 such that at least one of the events i, j belongs to line l, i.e., A0 (l) = {(i, j ) ∈ A0 : i ∈ E 0 (l) or j ∈ E 0 (l)}. Analogously, we define activities A0 (l1 , l2 ) belonging to lines l1 , l2 as the set of activities a = (i, j ) such that event i belongs to line l1 and event j belongs to line l2 , i.e., A0 (l1 , l2 ) = {(i, j ) ∈ A0 : i ∈ E 0 (l1 ), j ∈ E 0 (l2 )}. Note that activities a = (i, j ) ∈ A0 (l, l) require that both events i, j belong to line l while for activities a  = (i  , j  ) ∈ A0 (l) one of the events i  , j  may belong to a different line l  = l. For the extended EAN, we use an analogue definition. Definition 1.24. Let N = (E, A) be an extended EAN for EAN N 0 = (E 0 , A0 ) and line set L. The events belonging to line l, E(l), are defined as before, i.e., E(l) = E 0 (l) while the activities belonging to line l, A(l), additionally contain to and from activities, i.e., A(l) = {(i, j ) ∈ A : i ∈ E(l) or j ∈ E(l)}.

1.3 Problem Definitions

Line Planning

21

Passenger Routing

Timetabling

Vehicle Scheduling

Fig. 1.9 The vehicle scheduling stage in public transport planning.

1.3.5 Vehicle Scheduling We consider aperiodic vehicle scheduling (Figure 1.9) with one vehicle type and one depot where vehicles start and end their routes. The periodic timetable is repeated for a fixed number of planning periods followed by some time where no service is offered and vehicles are supposed to be in the depot. For defining the classical vehicle scheduling problem we use the following notation which is similar to [BK09]. Definition 1.25. Let PTN (V , E) be given. Let T be a set of trips with trip t ∈ T starting at station vt ∈ V at start time st and ending at station vt at end time et . Let

be the compatibility relation of two trips t1 , t2 ∈ T , i.e., t1 t2 if trips t1 , t2 are compatible meaning that trip t2 can be operated directly after trip t1 by the same vehicle. A vehicle route r = (t1 , . . . , tn ) is a list of n distinct trips which are operated by one vehicle such that two consecutive trips ti , ti+1 , i ∈ {1, . . . , n − 1}, are compatible. A vehicle schedule V is a set of vehicle routes. It is feasible if all trips t ∈ T are covered exactly once, i.e., each trip t ∈ T is part of exactly one vehicle route r ∈ V. Let costt1 ,t2 , t1 , t2 ∈ T , be the operational costs of operating trip t2 directly after trip t1 by the same vehicle. Let costdep,t , costt,dep , t ∈ T , be the operational costs of getting from the depot to vt and from vt to the depot, respectively. Let costV be the costs of operating a vehicle for the planning horizon. The operational costs of a vehicle schedule V are then given as cost (V) =

 r=(t1 ,...,tnr )∈V

n r −1   costV + costdep,t1 + costtnr ,dep + costti ,ti+1 .

(1.4)

i=1

We now define the vehicle scheduling problem with one vehicle type and one depot as, e.g., in [GS79, PB87, BCG87, DP95, BK09]. Problem 1.26 (Vehicle scheduling [BK09]). Let a set of trips T with compatibility relation , operational costs costV , costt1 ,t2 , t1 , t2 ∈ T , and costdep,t , costt,dep , t ∈ T , be given. Find a feasible vehicle schedule V according to Definition 1.25 that minimizes the operational costs cost (V) as defined in (1.4).

22

1 Introduction

Remark 1.27. In contrast to the line planning problem described in Problem 1.11 as well as the timetabling problem described in Problem 1.17, the vehicle scheduling problem presented here is known to be polynomially solvable, see [BCG87], e.g., by a flow formulation. Remark 1.28. The vehicle scheduling problem defined here can easily be adapted to the case without depot by setting the costs for getting from any station to the depot and vice versa to zero. The vehicle scheduling problem defined in Problem 1.26 depends on a given set of trips and the corresponding compatibility relation. However, for integrating vehicle scheduling with timetabling and eventually also with line planning, we cannot expect to use a given set of trips. We therefore need to specify the concept of trips, compatibility, and operational costs for the case when only a line plan L with corresponding periodic timetable π and a set P of period repetitions is given. Here, a set P of period repetitions means that the periodic timetable is repeated |P| times and the vehicle schedule is computed for the resulting planning horizon. At first, we specify the concept of trips. As we assume that the periodic timetable is repeated for a fixed number of periods and that each line is operated by one vehicle end-to-end in each period repetition, we use lines and period repetitions to form trips. Definition 1.29. Let a periodic timetable π with period length T for line plan L be given as well as the set P of period repetitions for consideration. A trip t = (p, l) is the p-th operation of line l. It is determined by the line l it covers and the period repetition p it starts in, its start time sp,l and its end time ep,l . Let first(l) be the first event and last(l) the last event in line l. Then sp,l mod T = πfirst(l) , ep,l mod T = πlast(l) and especially sp,l = p · T + πfirst(l) are satisfied, i.e., trip (p, l) starts in the p-th period repetition. For defining the compatibility of trips and the operational costs, we need the following notation. Notation 1.30. Let distv1 ,v2 be the length of a shortest path Pv1 ,v2 from station v1 to station v2 in PTN (V , E) and timev1 ,v2 the minimal time needed to drive a vehicle on Pv1 ,v2 from station v1 to station v2 . Let v1 be the last station in line l1 ∈ L, v2 the first station in l2 ∈ L and let Lturn be the minimal time needed for preparing a vehicle to operate a new trip. As a shorthand, we write Ll1 ,l2 = timev1 ,v2 + LLturn for the minimal time between

1.3 Problem Definitions

23

operating trips on lines l1 and l2 , l1 , l2 ∈ L, and Dl1 ,l2 = distv1 ,v2 for the distance that has to be driven between trips on lines l1 and l2 , l1 , l2 ∈ L. Analogously, we write Ldep,l and Ll,dep for the time needed to drive a vehicle from the depot to the first station of line l or from the last station of line l to the depot, respectively, as well as Ddep,l , Dl,dep for the corresponding distance. Remark 1.31. As distv1 ,v2 is defined as the length of a shortest path from station v1 to station v2 it satisfies the triangle inequality. We additionally assume that timev1 ,v2 satisfies the triangle inequality, i.e., for all stations v1 , v2 , v3 ∈ V timev1 ,v2 ≤ timev1 ,v3 + timev3 ,v2 , distv1 ,v2 ≤ distv1 ,v3 + distv3 ,v2 is satisfied. With this notation we define the compatibility of trips, vehicle routes, and finally vehicle schedules. Definition 1.32. Let a periodic timetable for line plan L be given as well as the set P of period repetitions for consideration. Two trips (p1 , l1 ), (p2 , l2 ), p1 , p2 ∈ P, l1 , l2 ∈ L, are compatible if there is sufficient time to get from the last station v1 of line l1 to the first station v2 of line l2 , i.e., if sp2 ,l2 − ep1 ,l1 ≥ Ll1 ,l2 is satisfied. A vehicle route r = (t1 , . . . , tn ) is a list of trips which are operated by one vehicle such that two consecutive trips ti , ti+1 , i ∈ {1, . . . , n − 1}, are compatible. We say vehicle route r covers or operates trips t ∈ r. A vehicle schedule V is a set of vehicle routes. It is feasible if all trips t ∈ T = {(p, l) : p ∈ P, l ∈ L} are covered exactly once. For defining the operational costs of a vehicle schedule, we first define empty trips that represent the driving of vehicles between trips and to and from the depot. Definition 1.33. The required ride of a vehicle for connecting two consecutive trips t1 , t2 of a vehicle route is called connecting trip c = (t1 , t2 ). Its duration dc is defined as the time between the end of trip t1 and the beginning of trip t2 , i.e., dc = st2 − et1 . The length of the connecting trip lengthc is the length of a shortest path between the last station of line l1 and the first station of line l2 , i.e., lengthc = Dl1 ,l2 . Analogously, depot trips are needed to get a vehicle from the depot to the first station of a vehicle route and from the last station of a vehicle route back to the depot. For vehicle route r = ((p1 , l1 ), . . . , (pn , ln )) we get as length of the depot trips lengthdep,l1 = Ddep,l1 and lengthln ,dep = Dln ,dep , respectively, and as duration for the depot trips ddep,l1 = Ldep,l1 and dln ,dep = Lln ,dep , respectively.

24

1 Introduction

Connecting trips and depot trips are called empty trips as they cannot be used by passengers. Although the operational costs defined in (1.4) only include costs for vehicles and empty trips, we extend the definition of operational costs to also include costs for the trips themselves. For a fixed timetable, the costs of the trips are also fixed such that for the classical vehicle scheduling problems both definitions are equivalent. We use the following notation for costs associated with the trips. Notation 1.34. Let (p, l) be a trip with p ∈ P, l ∈ L. The duration dp,l of trip (p, l) is the time between sp,l and ep,l . As the underlying timetable is periodic, the duration depends only on line l and we get dp,l = dl = ep,l − sp,l . The length lengthp,l of trip (p, l) is the length of the corresponding line, i.e., lengthp,l = lengthl . The concepts needed for defining the operational costs are summarized in Table 1.1. The operational costs of a vehicle schedule defined here depend on the distance covered by the vehicles and the duration of their operation as well as on the number of vehicles in operation. Both time and distance based costs are weighted differently for trips and empty trips.

Table 1.1 Summary of concepts for measuring distance and time that are needed for defining the operational costs.

stations v1 , v2 ∈ V

distance distv1 ,v2 length of shortest v1 − v2 path Pv1 ,v2 in PTN

time timev1 ,v2 minimal time needed for Pv1 ,v2

lines l1 , l2 ∈ L v1 last station in line l1 v2 first station in line l2 depot to line l ∈ L line l ∈ L to depot

Dl1 ,l2 = distv1 ,v2

Ll1 ,l1 = timev1 ,v2 + LLturn

Ddep,l Dl,dep

Ldep,l Ll,dep

trip (p, l) ∈ T

lengthp,l = lengthl

dp,l = dl = ep,l − sp,l

connecting trip c = ((p1 , l1 ), (p2 , l2 )), (pi , li ) ∈ T , i ∈ {1, 2} depot trip from the depot to trip (p, l) depot trips from trip (p, l) to the depot

lengthc = Dl1 ,l2

dc = sp2 ,l2 − ep1 ,l1

lengthdep,l = Ddep,l

ddep,l = Ldep,l

lengthl,dep = Dl,dep

dl,dep = Ll,dep

1.3 Problem Definitions

25

Definition 1.35. Let a cost parameter set γ = (γ1 , . . . , γ5 )t be given where γ1 are the duration based costs of the trips, γ2 the distance based costs of the trips, γ3 the duration based costs of the empty trips, γ4 the distance based costs of the empty trips, and γ5 the vehicle costs for the planning horizon, i.e., for all period repetitions. Let V be a vehicle schedule with vehicle routes r ∈ V and let lr , lr be the line of the first and last trip in r, respectively. Then the operational costs are defined as follows: cost(V) =

   γ1 · dt + γ2 · lengtht r∈V

trip t∈r



+

  γ3 · dc + γ4 · lengthc

connecting trip c∈r

+ γ3 · (ddep,lr + dlr ,dep ) + γ4 · (lengthdep,lr + lengthlr ,dep )

=

+ γ5 · |V|   r∈V

  γ1 · (ep,l − sp,l ) + γ2 · lengthl

trip t=(p,l)∈r

+





  γ3 · (sp2 ,l2 − ep1 ,l1 ) + γ4 · Dl1 ,l2

connecting trip c=((p1 ,l1 ),(p2 ,l2 ))∈r

+ γ3 · (Ldep,lr + Llr ,dep ) + γ4 · (Ddep,lr + Dlr ,dep )



+ γ5 · |V| Now we define the vehicle scheduling problem for a given line plan, timetable, and set of period repetitions. Problem 1.36 (Vehicle scheduling). Let a PTN (V , E), a line plan L with corresponding periodic timetable π , and a set P of period repetitions be given. Let Ll1 ,l2 , Ldep,l , Ll,dep , l, l1 , l2 ∈ L, be the minimal durations of the potential empty trips and Dl1 ,l2 , Ddep,l , Dl,dep , l, l1 , l2 ∈ L, the lengths of the potential empty trips. Let γ = (γ1 , . . . , γ5 )t be a cost parameter set. Find a feasible vehicle schedule V, according to Definition 1.32 such that the operational costs cost(V) as in Definition 1.35 are minimized. Figure 1.10 shows an example of a vehicle schedule for the line plan depicted in Figure 1.5.

26

1 Introduction v1

v4

v5

v6

1:00 period repetition 1 2:00 start trip period repetition 2

end trip trip 3:00

period repetition 3 4:00

potential connecting trip connecting trip

period repetition 4 5:00

Fig. 1.10 Example vehicle scheduling for the line plan depicted in Figure 1.5. Here, we use a timetable π with period length T = 60 and πfirst(l1 ) = 20, πlast(l1 ) = 0, πfirst(l2 ) = 0, and πlast(l2 ) = 20. The duration of line l1 is dl1 = 40 and the duration of line l2 is dl2 = 80. The minimum time needed between trips corresponding to the line l1 , l2 are Ll1 ,l1 = 20, Ll1 ,l2 = 60, Ll2 ,l1 = 60, and Ll2 ,l2 = 40. Depot trips are not depicted.

1.3.6 Public Transport Plan Having defined line plans, timetables, and vehicle schedules, we can formally define a public transport plan. Definition 1.37. Let a PTN (V , E) with line pool L0 , frequency bounds femin , femax , e ∈ E, bounds on the duration of driving, Ldrive , Uedrive , e ∈ E, waiting, e wait wait trans trans Lv , Uv , v ∈ V , and transferring, Lv , Uv , v ∈ V , and an OD matrix C be given. Let T be the planning period for line planning and timetabling and P the set of period repetitions for vehicle scheduling. Let Ll1 ,l2 , Ldep,l , Ll,dep , l, l1 , l2 ∈ L0 , be the minimal durations of the potential empty trips and Dl1 ,l2 , Ddep,l , Dl,dep , l, l1 , l2 ∈ L0 , the lengths of the potential empty trips. Let γ = (γ1 , . . . , γ5 )t be a cost parameter set. A public transport plan consists of a feasible line plan L according to the frequency bounds, using lines l ∈ L with frequency fl = 1, a feasible timetable π according to line plan L and the bounds on the durations of activities constructed as in

1.3 Problem Definitions

27

Definition 1.22 as well as a feasible vehicle schedule V according to the trips T = {(p, l) : p ∈ P, l ∈ L}. The travel time of the passengers for a public transport plan is measured as the shortest travel time according to timetable π , i.e., RSP (π ), and its operational costs are the operational costs of vehicle schedule V, i.e., cost(V), for cost parameter set γ . The goal of this book is to find an optimal public transport plan, i.e., to solve the following integrated problem. Problem 1.38 (Integrated line planning, timetabling, passenger routing, and vehicle scheduling problem). Let a PTN (V , E) with travel time wait trans , U trans , v ∈ V , bounds Ldrive , Uedrive , e ∈ E, Lwait e v , Uv , v ∈ V , and Lv v min max as well as frequency bounds fe , fe , e ∈ E, line pool L0 and OD matrix C be given. Let N 0 = (E 0 , A0 ) be the corresponding EAN for line pool L0 with duration bounds as in Definition 1.22. Let T be the length of the planning period for line planning and timetabling and P = {1, . . . , pmax } the set of period repetitions to be covered by vehicle routes. Let Ll1 ,l2 , Ldep,l , Ll,dep , l, l1 , l2 ∈ L0 , be the minimal durations of the potential empty trips, Dl1 ,l2 , Ddep,l , Dl,dep , l, l1 , l2 ∈ L0 , the lengths of the potential empty trips and γ = (γ1 , . . . , γ5 )t the considered cost parameter set. Find a feasible public transport plan, such that the travel time of the passengers and the operational costs are minimized.

1.3.7 Multi-Criteria Optimization In this section we shortly introduce multi-criteria optimization problems as most of the integrated public transport problems we consider aim to minimize costs and travel time. The following definition and proposition are adapted from [Ehr05]. At first, we consider the concept of Pareto optimality. Definition 1.39 (Def. 2.1, 2.24, [Ehr05]). Let (P ) be a multi-criteria optimization problem with objective f : X → Rd and feasible set X ⊂ X , i.e., (P )

min f (x) s.t. x ∈ X.

We write f (x) = (fi (x))i∈{1,...,d} . A solution x ∗ ∈ X is called Pareto optimal if there is no x ∈ X with fi (x) ≤ fi (x ∗ ), i ∈ {1, . . . , d}, and fk (x) < fk (x ∗ ) for some k ∈ {1, . . . , d}. For solutions x1 , x2 ∈ X we say x1 dominates x2 if fi (x1 ) ≤ fi (x2 ), i ∈ {1, . . . , d}, and fk (x1 ) < fk (x2 ) for some k ∈ {1, . . . , d}. Solution x1 ∈ X strictly dominates solution x2 ∈ X if fi (x1 ) < fi (x2 ) for all i ∈ {1, . . . , d}.

28

1 Introduction

A solution x ∗ is called weakly Pareto optimal if there is no solution x ∈ X with fi (x) < fi (x ∗ ), i ∈ {1, . . . , d}, i.e., if x ∗ is not strictly dominated. An easy way to find weakly Pareto optimal solutions is using a weighted sum scalarization. Theorem 1.40 (Thm. 3.4, [Ehr05]). Let λ = (λ1 , . . . , λd ) ∈ Rd with λi ≥ 0, i ∈ {1, . . . , d}, and λk > 0 for some k ∈ {1, . . . , d}. Then the optimal solutions of the weighted sum scalarization for λ, i.e., of min

d 

λi · fi (x)

i=1

s.t. x ∈ X are weakly Pareto optimal for the multi-criteria problem (P ).

1.4 Data Sets In this section we introduce the data sets which are used for computational experiments throughout this book. All data sets are taken from the open source software framework LinTim, see [SAP+ 18, SAP+ 20]. Additionally to providing data sets, LinTim is in this book also used to compute reference solutions using the sequential approach to public transport planning and to evaluate the solutions of the integrated problems. This is possible as LinTim provides a variety of algorithms for various stages of public transport, from network design over line planning and timetabling to vehicle scheduling and delay management. More importantly, also the corresponding intermediate steps are implemented such that, e.g., the effect of different line plans on the timetables and vehicle schedules can be analyzed for the given data sets. The source code as well as most data sets are available as open source since 2018, see [SAP+ 20] and since version 2020.02 most of the algorithms and models presented in this book are also part of the publicly available release. For each data set considered in this book there is a fixed public transportation network and a fixed OD matrix which are introduced in the following sections and summarized in Table 1.2. Line pools and frequency constraints can be adapted for the problem at hand, either manually or by using the corresponding LinTim routines. This has a considerable influence on the size of the resulting EAN, especially if the EAN is constructed for the whole line pool instead of a given line plan to allow for the integration of line planning.

1.4 Data Sets

29

Table 1.2 Overview of the size of the different data sets. stations edges OD pairs

small 4 3 6

toy 8 8 46

grid 25 40 567

v1

v2

regional 35 36 338 v3

long-distance 250 326 6106

v4

Fig. 1.11 Data set small. The solid edges represent the PTN while the dashed edges represent the lines of the line pool.

v1

v2

v7

v3

v6

v4

v5

v8

Fig. 1.12 PTN of data set toy.

1.4.1 Data Set small The smallest artificial data set which is used for testing the most time-consuming algorithms is called small. Its PTN is a linear graph consisting of four stations and three edges. The OD matrix consists of six OD pairs. We use a line pool of three lines which is depicted in Figure 1.11.

1.4.2 Data Set toy Data set toy is another small artificial data set. Its PTN, see Figure 1.12, consists of eight stations and eight edges of varying length with an OD matrix of 46 OD pairs. The line pool used here has eight lines.

1.4.3 Data Set grid Data set grid was first introduced in [FHSS17a] and is available as open source data set together with a variety of solutions, see [FOR18]. The PTN of data set grid, depicted in Figure 1.13, represents a 5 × 5 grid network consisting of 25 stations and 40 edges with unit lengths as well as an OD matrix of 567 OD pairs and realistic demand structure. It is constructed as a mid-scale data set that is well suited for comparing algorithmic public transport

30

1 Introduction v1

v2

v3

v4

v5

v6

v7

v8

v9

v10

v11

v12

v13

v14

v15

v16

v17

v18

v19

v20

v21

v22

v23

v24

v25

Fig. 1.13 PTN of data set grid.

Fig. 1.14 PTN of data set regional.

planning with traditional manual public transport planning. Due to its symmetric structure, it is possible for an experienced planner to find good solutions by hand. Nevertheless, it is large enough to show the benefits of algorithmic solution approaches and has been used as benchmark data set in several publications, see, e.g., [FHSS17b, FMR+ 17, FMR+ 18, PSS18, Lie18].

1.4.4 Data Set regional Data set regional is a close-to real-world data set which is derived from the regional train network in Lower Saxony, Germany. Its PTN is depicted in Figure 1.14 and consists of 35 stations and 36 edges with 338 OD pairs. This data set is used, e.g., in [CHS13, Har16].

1.4.5 Data Set long-distance The last data set, long-distance, is a close-to real-world data set representing the long distance train network of Germany. Its PTN contains 250 stations and

1.4 Data Sets

31

Fig. 1.15 PTN of data set long-distance.

326 edges and its OD matrix consists of 6106 OD pairs. The PTN is depicted in Figure 1.15. Data set long-distance is used, e.g., in [SG13, Har16, GHS17]. Note that due to legal restrictions, this data set is only part of the development version of LinTim and not accessible in the open source version.

Chapter 2

Integrating Timetabling and Passenger Routing

In this chapter, we consider the integration of passenger routing into periodic timetabling problems (Figure 2.1). This allows to optimize the timetable for the routes the passengers actually want to take, namely shortest ones for the realized timetable. The content of Sections 2.1 to 2.3 forms part of the publication [SS20]. In addition to the integrated model we present an exact preprocessing technique as well as two heuristics to reduce the problem size and computational experiments. The results of Sections 2.4 and 2.5 are published in [GGNS16]. Here, we present an extended model for timetabling and passenger routing with distributed start times as well as a satisfiability model for the integrated problem.

2.1 Modeling the Integrated Problem For formally stating the definition of the integrated timetabling and passenger routing problem, we need further notation. To this end, let N = (E, A) be the extended event-activity network from Definition 1.18 and La , Ua , a ∈ A, the lower and upper bounds on its activities. Definition 2.1. For an activity a = (i, j ) ∈ A0 we denote its duration w.r.t a timetable π as da (π ). It can be computed as da (π ) = (πj − πi − La )mod T + La . The duration of auxiliary activities a ∈ Aaux is defined as da (π ) = 0 for all timetables π with corresponding bounds La = Ua = 0. We abbreviate the vector of durations as d(π ) = (da (π ))a∈A and the vector of lower/upper bounds as L = (La )a∈A and U = (Ua )a∈A , respectively.

© Springer Nature Switzerland AG 2020 P. Schiewe, Integrated Optimization in Public Transport Planning, Springer Optimization and Its Applications 160, https://doi.org/10.1007/978-3-030-46270-3_2

33

34

2 Integrating Timetabling and Passenger Routing

Line Planning

Passenger Routing

Timetabling

Vehicle Scheduling

Fig. 2.1 Integrated timetabling and passenger routing.

Due to Definition 1.16, for every feasible timetable π , the duration of an activity is not smaller than its lower and not larger than its upper bound, i.e., La ≤ da (π ) ≤ Ua .

(2.1)

We use the following notation for shortest paths. Definition 2.2. Let κ = (κa )a∈A be a vector of activity lengths, then a shortest path for OD pair (u, v) from (u, source) to (v, target) according to these activity lengths is defined as SPu,v (κ). The length of a path P according to the activity lengths κ is defined as  κa , len(P , κ) = a∈P

i.e., len(SPu,v (κ), κ) is the length of a shortest path with respect to the activity lengths κ while len(SPu,v (κ), κ) ˜ describes the length of SPu,v (κ) with respect to other activity lengths κ. ˜ For shortest paths between arbitrary events we use the same notation, i.e., SPi,j (κ) is a shortest path from event i to event j according to activity lengths κ. We get the following approximation of the length on a shortest path for a given timetable. Lemma 2.3. The length of a shortest path w.r.t the lower bounds La , a ∈ A, on the activities is a lower bound on the duration of a shortest path for every feasible timetable π , i.e., len(SPu,v (L), L) ≤ len(SPu,v (d(π )), d(π )). Proof. By definition, SPu,v (L) is a shortest (u, source)−(v, target) path for activity lengths L. As SPu,v (d(π )) is also a (u, source) − (v, target) path, we get len(SPu,v (L), L) ≤ len(SPu,v (d(π )), L). With equation (2.1) we get len(SPu,v (d(π )), L)=



La ≤

a∈SPu,v (d(π ))



a∈SPu,v (d(π ))

da (π )=len(SPu,v (d(π )), d(π ))

2.1 Modeling the Integrated Problem

35

and thus len(SPu,v (L), L) ≤ len(SPu,v (d(π )), L) ≤ len(SPu,v (d(π )), d(π )). 

In this book, we assume that the passenger weights w used in the classical periodic timetabling problem correspond to a lower bound routing, see Definition 1.19. With the notation introduced here, we can reformulate PESP, see Definition 1.17, in the following way. Problem 2.4 (Periodic event scheduling problem (PESP)). Let N 0 = (E 0 , A0 ) be an event-activity network with duration bounds La , Ua , a ∈ A0 , let T be the period length and OD an OD matrix. Find a feasible periodic timetable π with period length T minimizing the total travel time on fixed shortest paths w.r.t the lower bounds L for all passengers, i.e., min

RLB (π ) =



Cu,v · len(SPu,v (L), d(π ))

(u,v)∈OD

such that π is a feasible periodic timetable with period length T , see Definition 1.16. RLB (π ) evaluates a timetable π w.r.t lower bound routing, see also Definition 1.20. However, it is more realistic to evaluate the travel time according to a shortest path routing, i.e., to evaluate RSP (π ) from Definition 1.20. As a shortest path routing depends on the timetable, optimizing RSP (π ) leads to the following integrated problem where a timetable and passenger routes are computed simultaneously. Problem 2.5 (Integrated timetabling and passenger routing problem (TimPass)). Let N 0 = (E 0 , A0 ) be an event-activity network with duration bounds La , Ua , a ∈ A0 , let T be the period length and OD an OD matrix. Find a feasible periodic timetable π with period length T minimizing the total travel time on shortest paths w.r.t d(π ) for all passengers, i.e., min

RSP (π ) =



Cu,v · len(SPu,v (d(π )), d(π ))

(u,v)∈OD

such that π is a feasible periodic timetable with period length T , see Definition 1.16.

36

2 Integrating Timetabling and Passenger Routing

It is clear that for any feasible timetable, the travel time on shortest paths is at most as long as the one on fixed paths w.r.t the lower bounds. Lemma 2.6. Let π be a feasible timetable and OD an OD matrix. Then RSP (π ) ≤ RLB (π ) is satisfied. Proof. As SPu,v (L) is a (u, source) − (v, target) path and SPu,v (d(π )) is a shortest one for activity lengths d(π ), we get RSP (π ) =



Cu,v · len(SPu,v (d(π )), d(π ))

(u,v)∈OD





Cu,v · len(SPu,v (L), d(π ))

(u,v)∈OD

= RLB (π ). 

With Lemma 2.6, we get that the optimal objective value of PESP is an upper bound on the optimal objective value of (TimPass). Corollary 2.7. Let π be an optimal solution of PESP and π ∗ an optimal solution of (TimPass). Then RLB (π ) ≥ RSP (π ) ≥ RSP (π ∗ ) is satisfied. Proof. As π is a feasible timetable, we get RLB (π ) ≥ RSP (π ) from Lemma 2.6. As π ∗ is an optimal solution for (TimPass), we get RSP (π ) ≥ RSP (π ∗ ). 

In order to model (TimPass) as an integer program, the passenger routes have to be incorporated into the IP model for PESP that is introduced in Section 1.3.4. Instead of using a path-based formulation, as, e.g., in [BHK17], where for each OD pair a route is chosen out of the set of all feasible routes, we use a flow-based model on the extended EAN N = (E, A) along the lines of [SG13, Sch14, GGNS16]. Again, the periodic time of the events is modeled by variables πi ∈ {0, . . . , T − 1}, i ∈ E 0 , and auxiliary variables za ∈ Z, a ∈ A0 , are used as modulo parameters. The passenger flow is represented by the flow variables pau,v ∈ {0, 1}, (u, v) ∈ OD, a ∈ A.

2.1 Modeling the Integrated Problem

(TimPass)

min



37



Cu,v ·

(u,v)∈OD

pau,v · (πj − πi + za · T )

(2.2)

a=(i,j )∈A0

s.t. πj − πi + za · T ≥ La

a = (i, j ) ∈ A0

(2.3)

πj − πi + za · T ≤ Ua

a = (i, j ) ∈ A0

(2.4)

(u, v) ∈ OD

(2.5)

A · (pau,v )a∈A = bu,v πi ∈ {0, . . . , T − 1}

i ∈ E0

za ∈ Z

a ∈ A0

pau,v ∈ {0, 1}

(u, v) ∈ OD, a ∈ A.

Note that the objective function (2.2) can be linearized by substituting pau,v · (πj − πi + za · T ) = dau,v with auxiliary integer variables dau,v , a = (i, j ) ∈ A0 , (u, v) ∈ OD, and dau,v ≥ 0,

a = (i, j ) ∈ A0 , (u, v) ∈ OD

dau,v ≥ πj − πi + za · T − (1 − pau,v ) · M,

a = (i, j ) ∈ A0 , (u, v) ∈ OD,

where M is sufficiently large, e.g., M ≥ maxa∈A0 Ua . While constraints (2.3) and (2.4) are the standard PESP constraints modeling the timetable as in Section 1.3.4, the passenger flow is handled in constraint (2.5) accounting for the majority of the constraints. The passenger flow is modeled separately for each OD pair (u, v) ∈ OD using flow variables pau,v where A is the node-arc-incidence matrix of the extended EAN N and the demand vector bu,v ensures that the flow starts at the source node belonging to the OD pair and ends at the corresponding target node. A ∈ {0, 1, −1}|E |×|A| ⎧ ⎪ if a  = (i, j ) ∈ A ⎪ ⎨1, ai,a  = −1, if a  = (j, i) ∈ A ⎪ ⎪ ⎩0, otherwise bu,v ∈ {0, 1, −1}|E | ⎧ ⎪ if i = (u, source) ⎪1, ⎨ u,v bi = −1, if i = (v, target) ⎪ ⎪ ⎩0, otherwise

38

2 Integrating Timetabling and Passenger Routing

As we use variables per OD pair, we assume that all passengers belonging to the same OD pair are using the same shortest path. This is a reasonable assumption, as we are not imposing capacity constraints. The standard PESP constraints (2.3) and (2.4) can be substituted by cycle base PESP constraints, see, e.g., [Nac98, PK01, SG13] leading to a significant decrease in runtime for the classical PESP. In Section 2.3 we experimentally see that this also holds for the integrated formulation (TimPass).

2.2 Two Approaches for Reducing the Problem Size In this section we describe the two main ideas that make the integrated timetabling and passenger routing problem (TimPass) tractable.

2.2.1 Combining Shortest Path Routing with Routing Along Fixed Paths The major factor for the size of the problem is the number of OD pairs as a variable pau,v is introduced for each combination of OD pair (u, v) ∈ OD and activity a ∈ A. The first idea for reducing the problem size therefore is to only route a subset ODroute ⊂ OD of the passengers as described in Problem 2.8. To this end, we split OD into two disjoint sets OD = ODroute  ODfix . Problem 2.8. Let N 0 = (E 0 , A0 ) be an event-activity network with duration bounds La , Ua , a ∈ A0 , let T be the period length and OD an OD matrix with ODroute ⊂ OD. Find a feasible periodic timetable π with period length T minimizing the total travel time on shortest paths w.r.t d(π ) for all passengers in ODroute , i.e.,  Cu,v · len(SPu,v (d(π )), d(π )) min RSP (ODroute , π ) = (u,v)∈ODroute

such that π is a feasible periodic timetable with period length T , see Definition 1.16. In the objective function RSP (ODroute , π ) of Problem 2.8, the evaluation based on shortest path routing is restricted to OD pairs in ODroute . In order to better compare the solutions of Problem 2.8 with solutions of (TimPass), we add lower bounds for every OD pair from ODfix to the value of RSP (ODroute , π ) using the following notation.

2.2 Two Approaches for Reducing the Problem Size

39

Definition 2.9. For OD ⊆ OD we define  ˜ = Cu,v · len(SPu,v (L), L) L(OD) (u,v)∈OD

summing for all OD pairs in OD the length of a shortest path w.r.t the lower bounds of the activities measured by these lower bounds. For OD = ODroute  ODfix and feasible timetable π we define an evaluation function ˜ h(ODroute , π ) = RSP (ODroute , π ) + L(OD fix ). ˜ We can use L(OD) to approximate the travel time of passengers in OD on shortest paths for any feasible timetable π . Lemma 2.10. Let π be a feasible timetable and OD ⊂ OD. Then ˜ ≤ RSP (OD, π ) L(OD) is satisfied. Proof. With Lemma 2.3 we get ˜ L(OD)

=



Cu,v · len(SPu,v (L), L)

(u,v)∈OD

Lemma 2.3 ≤



Cu,v · len(SPu,v (d(π )), d(π ))

(u,v)∈OD

=

RSP (OD, π ). 

From Lemma 2.10 we get that h(ODroute , π ) is a better approximation of RSP (π ) than the objective function RSP (ODroute , π ) of Problem 2.8, i.e., RSP (ODroute , π ) ≤ h(ODroute , π ) ≤ RSP (π ) is satisfied. We use Problem 2.8 to formulate Heuristic LB which uses the fact that solving Problem 2.8 for small sets ODroute is easier than solving (TimPass) for the complete OD matrix OD. However, completely disregarding the passengers not in ODroute in the optimization can lead to objective values that are even worse than the values of the original PESP as can be seen in the experiments in Section 2.3.3. Heuristic LB is hence useless for generating a good solution, but can nevertheless be used as a good lower bound on (TimPass) as shown later in Theorem 2.14.

40

2 Integrating Timetabling and Passenger Routing

Algorithm 2.1 Heuristic LB 1: Input: EAN N 0 = (E 0 , A0 ), bounds La , Ua on the duration of activities a ∈ A0 , ODroute ⊂ OD. 2: Output: feasible timetable π˜ , evaluation h(ODroute , π˜ ). 3: Compute optimal solution π˜ of Problem 2.8 for ODroute and ˜ h(ODroute , π˜ ) = RSP (ODroute , π) ˜ + L(OD \ ODroute ).

A better idea is to also include the OD pairs in ODfix in the optimization by routing them beforehand on shortest paths w.r.t the lower bounds of the activities and add their travel times as weights to the objective function. This is described in Problem 2.11. Problem 2.11. Let N 0 = (E 0 , A0 ) be an event-activity network with duration bounds La , Ua , a ∈ A0 , let T be the period length and OD an OD matrix with ODroute  ODfix = OD. Find a feasible periodic timetable π with period length T minimizing the sum of the total travel time on shortest paths w.r.t d(π ) for all passengers in ODroute and the total travel time on fixed shortest paths w.r.t the lower bounds L for all passengers in ODfix , i.e., min



f (ODroute , π ) =

Cu,v · len(SPu,v (d(π )), d(π ))

(u,v)∈ODroute

+



Cu,v · len(SPu,v (L), d(π ))

(u,v)∈ODfix

such that π is a feasible periodic timetable with period length T , see Definition 1.16. Similar to Definition 1.20, we use the following notation. Definition 2.12. For OD ⊆ OD we define  Cu,v · len(SPu,v (L), d(π )), RLB (OD, π ) = (u,v)∈OD

i.e., we evaluate the timetable π w.r.t lower bound routing restricted to OD pairs in OD. We then receive f (ODroute , π ) = RSP (ODroute , π ) + RLB (ODfix , π ),

(2.6)

2.2 Two Approaches for Reducing the Problem Size

41

i.e., Problem 2.11 combines shortest path routing for the OD pairs in ODroute with fixed routing w.r.t the lower bounds for the OD pairs in ODfix . Analogously to Heuristic LB, we define Heuristic UB using Problem 2.11 to find solutions for (TimPass). Again, we use the fact that routing only a subset of the OD pairs during the optimization process yields an easier problem than solving (TimPass) directly. Algorithm 2.2 Heuristic UB 1: Input: EAN N 0 = (E 0 , A0 ), bounds La , Ua on the duration of activities a ∈ A0 , ODroute ⊂ OD. 2: Output: feasible timetable π , evaluation f (ODroute , π ). 3: Compute optimal solution π of Problem 2.11 for ODroute , ODfix = OD \ ODroute and f (ODroute , π ) = RSP (ODroute , π ) + RLB (OD \ ODroute , π ).

Although Heuristic LB may provide better solutions than Heuristic UB, our experiments show that the latter performs significantly better. For ODroute = OD we get problem (TimPass) in which all passengers are routed during the optimization and for ODfix = OD we get the classical PESP. In Section 2.3.1 we have a look at different strategies for choosing ODroute . We can easily see that both Heuristic LB and Heuristic UB behave monotonically when the set ODroute is extended. Lemma 2.13. Let OD1 , OD2 with OD1 ⊂ OD2 ⊂ OD be two subsets of the OD pairs OD. 1. Let π˜ 1 , π˜ 2 be optimal solutions for Heuristic LB w.r.t OD1 and OD2 . Then h(OD1 , π˜ 1 ) ≤ h(OD2 , π˜ 2 ). 2. Let π 1 , π 2 be optimal solutions for Heuristic UB w.r.t OD1 and OD2 . Then f (OD1 , π 1 ) ≥ f (OD2 , π 2 ). Proof. 1. Since π˜ 1 is optimal for OD1 we compute h(OD1 , π˜ 1 )



h(OD1 , π˜ 2 )

=

2 ˜ ˜ \ OD1 ) + L(OD \ OD2 ) RSP (OD1 , π˜ 2 ) + L(OD

Lemma 2.10 ˜ ≤ RSP (OD1 , π˜ 2 )+RSP (OD2 \ OD1 , π˜ 2 )+L(OD \ OD2 ) =

h(OD2 , π˜ 2 ).

2. Here, π 2 is optimal for OD2 and we obtain

42

2 Integrating Timetabling and Passenger Routing

f (OD2 , π 2 ) ≤ f (OD2 , π 1 ) = RSP (OD1 , π 1 )+RSP (OD2 \ OD1 , π 1 )+RSP (OD \ OD2 , π 1 ) (∗)

≤ RSP (OD1 , π 1 )+RSP (OD2 \ OD1 , π 1 )+RSP (OD \ OD2 , π 1 ) = f (OD1 , π 1 ),

where (∗) holds since RSP (OD, π ) ≤ RSP (OD, π ) for all OD ⊆ OD and all feasible π , see also Lemma 2.6. 

Lemma 2.13 is the main ingredient for the following theorem which shows that h and f are lower and upper bounds on the optimal objective value of (TimPass) and improve when ODroute is extended. Theorem 2.14. Let OD1 , OD2 with OD1 ⊂ OD2 ⊂ OD be two sets of routed OD pairs, π˜ 1 , π˜ 2 the respective optimal solutions for Heuristic LB and π 1 , π 2 the respective optimal solutions for Heuristic UB. Let π ∗ be an optimal solution for the integrated timetabling and passenger routing problem (TimPass). 1. h(ODi , π˜ i ) is a lower bound on RSP (π ∗ ) for i ∈ {1, 2}. 2. f (ODi , π i ) is an upper bound on RSP (π ∗ ) for i ∈ {1, 2}. 3. h(OD1 , π˜ 1 ) ≤ h(OD2 , π˜ 2 ) ≤ RSP (π ∗ ) ≤ f (OD2 , π 2 ) ≤ f (OD1 , π 1 ). Proof. Part 1 and 2 are clear from Lemma 2.13 as for ODroute = OD both Heuristic LB and UB compute the optimal solution of (TimPass). Part 3 is a direct implication of parts 1 and 2 and Lemma 2.13. 

We can also approximate the resulting gap as the following corollary shows. Corollary 2.15. Let π˜ be an optimal solution for Heuristic LB and π an optimal solution for Heuristic UB for ODroute ⊂ OD and ODroute  ODfix = OD. Let π ∗ be an optimal solution for the integrated timetabling and passenger routing problem (TimPass). Then the optimality gap can be bounded by RSP (π ) − RSP (π ∗ ) ≤



Cu,v · len(SPu,v (L), U − L).

(u,v)∈ODfix

Proof. RSP (π ) − RSP (π ∗ ) ≤ f (ODroute , π ) − h(ODroute , π˜ ) ≤ f (ODroute , π˜ ) − h(ODroute , π˜ ) = RSP (ODroute , π˜ ) + RSP (ODfix , π˜ ) ˜ − RSP (ODroute , π˜ ) − L(OD fix )

2.2 Two Approaches for Reducing the Problem Size

=



43

Cu,v · len(SPu,v (L), d(π˜ ) − L)

(u,v)∈ODfix (2.1)





Cu,v · len(SPu,v (L), U − L).

(u,v)∈ODfix



For example, if Ua and La , a ∈ A, differ only by a fixed percentage p, i.e., if p Ua = La · (1 + 100 ), the optimality gap for the solution computed by Heuristic UB is at most  p Cu,v · len(SPu,v (L), L). 100 · (u,v)∈ODfix

2.2.2 A Preprocessing Algorithm When integrating passenger routing into timetabling, we create flow variables for all passengers and all activities. However, if OD pairs travel on shortest paths, usually some activities can be sorted out beforehand. For example, an OD pair traveling from Göttingen to Berlin is unlikely to pass through Munich on a shortest path no matter which timetable is chosen. We try to find for each OD pair a small subset of activities such that no matter what timetable is chosen in the end, this subset contains a shortest path for the OD pair. This means that it suffices to generate flow variables for this OD pair only for this subset of activities instead of all activities. For each activity a ∈ A we know that it is not part of a shortest path from s to t for any timetable if the best case shortest path from s to t via a is longer than the worst case shortest path from s directly to t. Here, the best and worst case depend on the timetable, i.e., the best case shortest path is a shortest s − a − t path for the timetable which is best for this OD pair while the worst case shortest path is a shortest s − t paths in the worst possible timetable. However, as finding a feasible timetable is NP-complete, see [SU89], the construction of a best or worst case timetable is difficult as well. Instead, we use the lower and upper bounds on the activities as bounds on the length of the best and worst case shortest paths, respectively. Theorem 2.16. Let (u, v) ∈ OD be an OD pair and let a = (i, j ) ∈ A be an activity, such that len(SPu,v (U ), U ) < len(SPu,i (L), L) + La + len(SPj,v (L), L). Then, for any timetable π no shortest path SPu,v (d(π )) w.r.t π contains activity a.

44

2 Integrating Timetabling and Passenger Routing

Proof. Let π be any timetable and SPu,v (d(π )) be a shortest path w.r.t π . Then its length satisfies len(SPu,v (d(π )), d(π )) ≤ len(SPu,v (U ), d(π )) ≤ len(SPu,v (U ), U ) < len(SPu,i (L), L)+La +len(SPj,v (L), L) ≤ len(P , L)

for a=(i, j )

for any (u, source) − (v, target) path P containing activity a

≤ len(P , d(π ))

for any (u, source) − (v, target) path P containing activity a. 

Based on Theorem 2.16 we propose the following algorithm. Algorithm 2.3 Preprocessing for integrated timetabling and passenger routing 1: Input: extended EAN N = (E , A) based on PTN (V , E), bounds La , Ua on the duration of activities a ∈ A, start station u ∈ V , end station v ∈ V . 2: Output: list of activities A¯ that are not needed, i.e., that are not contained in a shortest path from (u, source) to (v, target) for any feasible timetable. 3: Initialize A¯ = ∅. 4:  Compute worst case shortest path. 5: Compute β := len(SPu,v (U ), U ). 6:  Compute best case shortest paths. 7: for event i ∈ E do 8: Compute γi := len(SPu,i (L), L). 9: Compute δi := len(SPi,v (L), L). 10: end for 11: for activity a = (i, j ) ∈ A do 12: if γi + La + δj > β then 13: A¯ = A¯ ∪ {a} 14: end if 15: end for

The following Example 2.17 illustrates the functionality of Algorithm 2.3. Example 2.17. Consider the extended EAN depicted in Figure 2.2 where the bounds on the activity durations are given as intervals on the arcs. The worst case shortest path from (u, source) to (v, target), SPu,v (U ), uses line l2 with length len(SPu,v (U ), U ) = 45. As the best case shortest path using line l1 and especially activity ((u, dep, l1 ), (w, arr, l1 )) has length 50, activity ((u, dep, l1 ), (w, arr, l1 )) is not part of a shortest (u, source) − (v, target) path SPu,v (π ) for any feasible timetable π .

2.3 Computational Experiments

l1

u

45 w

[20,25]

[20,25] (u, source)

(v, target) [20,25]

l2

[20,25]

v [5,5]

[10,15]

Fig. 2.2 Example event-activity network. Arrival events are colored gray while departure events are colored white. The solid arcs represent drive activities, the dotted arcs wait activities and the dashed arcs transfer activities. The bounds La , Ua , a ∈ A0 , on the activity durations are given as intervals on the arcs. The dash-dotted arcs represent auxiliary activities with bounds La = Ua = 0, a ∈ Aaux .

Note that for each OD pair also most activities of Aaux = A \ A0 can be discarded, especially ones that belong to different source and target stations. As shown in Figure 2.3 the number of activities which are not needed highly depends on the length of the worst case shortest path. Especially if origin and destination are close, almost all other activities can be discarded when looking for a shortest path. Another important factor is the variability of the path length. In many publications on periodic timetabling, it is assumed that the durations of the drive and wait activities are fixed, e.g., in [KGN+ 15, PS16, BHK17]. We analyzed the effect of this assumption on the preprocessing step: Figures 2.3b and 2.3c show the same event-activity network differing in the bounds on the duration of the activities. In this case we used a close-to real-world data set long-distance, see Section 1.4.5. While in Figure 2.3b all activity durations are allowed to be in a given interval, in Figure 2.3c most activity durations are fixed and only the durations of transfer activities are variable, i.e., restricted to intervals. This decreases the problem size a lot and additionally increases the effect of the preprocessing algorithm as the difference between best and worst case paths decreases. We conclude that preprocessing is significantly more effective for fixed durations of the drive and wait activities.

2.3 Computational Experiments We show the influence of passenger routing as well as the benefits of preprocessing on three data sets presented in Section 1.4. The evaluations in Sections 2.3.1 to 2.3.4 are done on the benchmark data set grid, see Section 1.4.3. Here, the event-activity network consists of 392 events and 2382 activities. Additionally, in Section 2.3.6 the algorithms are tested on a close-to real-world data set long-distance, see Section 1.4.5, with an event-activity network of 2800 events and 14958 activities. Note that contrasting to many other publications on periodic timetabling, for data set grid we do not assume that the duration of drive and wait activities is fixed,

46

2 Integrating Timetabling and Passenger Routing 100

% unused activities

% unused activities

100 80 60 40 20

80 60 40 20 0

0 50

100

0

150

200

400

600

800

1000

len(SPu,v (U ), U )

len(SPu,v (U ), U ) (a) All OD pairs of data set grid.

(b) 10 % of OD long-distance.

pairs

of

data

set

% unused activities

100 80 60 40 20 0 0 100 200 300 400 500 600 700 800 900

len(SPu,v (U ), U ) (c) 10 % of OD pairs of data set long-distance with fixed durations of drive and wait activities.

Fig. 2.3 Percentage of unused activities depending on the length of the worst case shortest path for data set grid, see Section 1.4.3 and data set long-distance, see Section 1.4.5.

yielding a larger but more realistic problem. For data set long-distance we assume fixed durations of drive and wait activities in order to keep the problem size manageable. To demonstrate some technical aspects of the bounds, we use a small artificial data set toy, see Section 1.4.2, with two different line concepts resulting in a an event-activity network with 32 events and 44 activities for toy-1 and 156 events and 1088 activities for toy-2. We use Gurobi 8, see [Gur18], to solve the IP model presented in Section 2.1 and an IP formulation of the cycle base variant on a computer with 6 CPUs at 3.06 GHz and 132 GB RAM. For the data sets grid and toy we use a 4 hour limit on the solver time while for data set long-distance the time limit is set to 12 hours. For data sets toy-1 and toy-2 the time limit is never reached.

2.3 Computational Experiments

47

Our experiments investigate what happens if the number of OD pairs to be routed is increased. To this end we determine sets ODk which contain k OD pairs to be routed. This is done as follows: We sort the OD pairs according to some given rule as described in Section 2.3.1. ODk is then defined as the set of the first k OD pairs according to the sorting. We run the two heuristics with the sets ODroute = ODk , k ∈ {0, . . . , |OD|}. The timetables resulting from Heuristic UB are called π k and the timetables resulting from Heuristic LB are denoted by π˜ k . The optimal timetable for (TimPass) minimizing RSP (π ), i.e., the actual travel time for all passengers, is denoted by π ∗ .

2.3.1 Which OD Pairs Should Be Routed? In order to determine which OD pairs should be routed during the optimization, we compare different methods to choose the OD pairs in ODk for data set grid, namely routing the k largest or the k smallest OD pairs, k random OD pairs, the k OD pairs with the largest Euclidean distance between origin and destination or choose k OD pairs according to Corollary 2.15. Therefore, we take the k OD pairs for which the differences Ua − La between the upper and lower bounds on their shortest paths (w.r.t lower bound routing) weighted by the number of passengers Cu,v are largest. Figure 2.4 shows that, especially when few OD pairs are routed, the choice of the routed OD pairs strongly impacts the solution quality. Routing the “wrong” set of

average travel time [min]

20.0

19.9

19.8

19.7

19.6

19.5

19.4

0

5

10

25

50

75

150

k

k = |OD | largest OD pairs smallest OD pairs random OD pairs

OD pairs with largest Euclidean distance OD pairs selected by Corollary 2.15

Fig. 2.4 Comparison of different methods to choose ODk for data set grid.

48

2 Integrating Timetabling and Passenger Routing

OD pairs can even lead to solutions which are worse than not routing any OD pairs. When many OD pairs are routed the influence of the method to choose routed OD pairs diminishes. Choosing OD pairs for ODroute according to Corollary 2.15 yields by far the best results leading to an improvement in the objective by only routing five OD pairs which is not matched by most of the other methods when 150 OD pairs are routed.

2.3.2 Influence of Preprocessing and Chosen IP Formulation We now have a look at the influence of the preprocessing method presented in Section 2.2.2 and of the different IP formulations on the runtime of our algorithm. Figure 2.5a shows that, as in the classical PESP, the IP model for PESP with integrated routing has a shorter runtime if the cycle base formulation is used instead of the standard IP formulation. The positive effect of the preprocessing method can be better observed in Figure 2.5b as in Figure 2.5a the solver time limits are hit earlier. As the preprocessing method does not change the optimal solution of (TimPass) and both IP formulations are equivalent, we only consider the version of the algorithm which uses the cycle base IP model and the preprocessing method in the following sections. Note that the runtime of Heuristic LB is considerably shorter than the runtime of Heuristic UB. Section 2.3.3 shows the large differences in solution quality between them.

2.3.3 Comparing Heuristic LB and Heuristic UB Figure 2.6 shows the solution quality of the Heuristics LB and UB when both are evaluated w.r.t shortest path routing for all passengers, i.e., when evaluating the objective function RSP (π k ) and RSP (π˜ k ) of the original problem. Here, the OD pairs in ODk are chosen according to Corollary 2.15. We see that the solution quality for Heuristic UB is better with a maximal difference of 9.3%. Additionally, the quality of solutions found by Heuristic UB improves monotonically while the quality of solutions found by Heuristic LB fluctuates a lot. As we have seen in Section 2.3.1 this can also be the case for solutions found by Heuristic UB depending on the routing method. The more OD pairs are routed the better Heuristic LB becomes as the influence of the neglected OD pairs in ODfix diminishes. For 150 routed OD pairs the difference between both heuristics is only 1%.

2.3 Computational Experiments

49

16000 14000

solver time [s]

12000 10000 8000 6000 4000 2000 0 0

5

10

25

50

k = |ODk | Heuristic UB with no preproc., no cycle base preproc., no cycle base not solved optimally

Heuristic LB with no preproc., cycle base preproc., cycle base

(a) Routing k OD pairs according to Corollary 2.15. 16000 14000

solver time [s]

12000 10000 8000 6000 4000 2000 0 0

25

50

150

250

k = |ODk | Heuristic UB with no preproc., no cycle base preproc., no cycle base not solved optimally

Heuristic LB with no preproc., cycle base preproc., cycle base

(b) Routing the k largest OD pairs.

Fig. 2.5 Influence of preprocessing and of the choice of the IP formulation on the runtime for data set grid for Heuristic LB and Heuristic UB.

50

2 Integrating Timetabling and Passenger Routing

average travel time [min]

22.0

21.5

21.0

20.5

20.0

19.5

19.0

0

5

10

25

50

75

150

k = |ODk | RSP (π k )

RSP (˜ πk )

not solved optimally

Fig. 2.6 Comparing Heuristic LB and Heuristic UB for data set grid. Here, π k , π˜ k are the optimal timetables for Heuristic UB and Heuristic LB routing the OD pairs in ODk .

2.3.4 Best Configuration with Bounds Sections 2.3.1 to 2.3.3 show that using Heuristic UB with cycle bases and preprocessing as well as choosing the OD pairs in ODk according to Corollary 2.15 is the fastest way to get good solutions for the integrated timetabling and passenger routing problem. We test this approach for data set grid to find solutions when more (and even all) OD pairs are routed. This is shown in Figure 2.7 together with the behavior of the resulting bounds f (ODk , π k ) and h(ODk , π˜ k ) where both heuristics are run for increasing sizes of ODroute = ODk . When at least 50 OD pairs are routed, the time limit of 4 hours does not suffice to solve the problem optimally such that the bounds also are only approximations. The lower bound h(ODk , π˜ k ) is adjusted according to the gap such that it is still a lower bound on RSP (π ∗ ) where π ∗ is an optimal timetable for (TimPass) while the upper bound f (ODk , π k ) does not need to be adjusted. When routing all OD pairs the gap of the IP solver is with 3% large enough that the solution is slightly worse than the solution for routing 400 OD pairs. Compared to the solution of the classical PESP the excess  travel time, i.e., the travel time that is needed additionally to the lower bound (u,v)∈OD Cu,v · len(SPu,v (L), L) when all passengers travel on shortest paths and these paths are all realized with the lower bounds, is reduced by 51.8% when 400 OD pairs are routed. Note that the lower bound does not change from the trivial lower bound no matter how many OD pairs are routed. This is due to the fact that for routing many OD pairs the problem is not solved optimally and the solver does not find a better lower

2.3 Computational Experiments

51

average travel time [min]

20.5

20.0

19.5

19.0

18.5

0

5

10

25

50

75

150

250

400

567

k = |ODk | RSP (π k )

not solved optimally

f (ODk , π k )

h(ODk , π ˜k )

Fig. 2.7 Evaluation of Heuristic UB and Heuristic LB with cycle base IP formulation and preprocessing for routing k OD pairs according to Corollary 2.15. We depict the lower and upper bound on the optimal objective value RSP (π ∗ ) for data set grid together with the objective values RSP (π k ) for the solutions π k obtained by Heuristic UB.

bound during the optimization process. In Section 2.3.5 we show that the lower bound does change depending on the number of OD pairs routed and can be used to prove optimality even when only a subset of the OD pairs is routed.

2.3.5 Bounds for Data Set toy Although for the presented data set grid the lower bound cannot be improved from the trivial lower bound, this is not always the case. Figure 2.8 shows the value of the lower bound h(ODk , π˜ k ) as in Figure 2.8a the actual gap can be bounded early on and in Figure 2.8b it helps to show that the solution found by routing five OD pairs is already optimal.

2.3.6 Data Set long-distance Finally, we test our best configuration (using Heuristic UB, cycle base IP formulation, preprocessing and routing k OD pairs according to Corollary 2.15) on the close-to real-world data set long-distance which is derived from the German long-distance railway network. Here, we compare routing no passengers, i.e., the

52

2 Integrating Timetabling and Passenger Routing 9.4

7.42

average travel time [min]

average travel time [min]

9.2 9.0 8.8 8.6 8.4 8.2 8.0

7.38 7.36 7.34 7.32 7.30

7.8 7.6

7.40

0

5

10

15

20

30

40

k = |ODk | RSP (π k )

46

7.28

0

5

10

15

20

30

40

46

k = |ODk | h(ODk , π ˜k )

f (ODk , π k )

(a) Data set toy-1.

RSP (π k )

h(ODk , π ˜k )

f (ODk , π k )

(b) Data set toy-2.

Fig. 2.8 Evaluation of Heuristic UB and Heuristic LB with cycle base IP formulation and preprocessing for routing k OD pairs according to Corollary 2.15. We depict the lower and upper bound on the optimal objective value RSP (π ∗ ) together with the objective values RSP (π k ) for the solutions π k obtained by Heuristic UB.

standard PESP, to routing 20 OD pairs according to Corollary 2.15. Due to the known intractability of PESP, the time limit of 12 hours does not suffice to find an optimal solution. For PESP we get a gap of 2.1% and for routing 20 OD pairs we get a gap of 2.7%. Nevertheless, even routing only 20 OD pairs we can improve the excess travel time by 10.3%. The example shows that integrating passenger routing into timetabling is possible even for realistically sized instances.

2.4 Adding Time Slices Above, we assumed that passengers choose a shortest route, no matter when in the planning period this route starts. To account for a more realistic distribution of passengers, an OD pair can be distributed to different time slices. The time slice a passenger is allotted to specifies in which part of the planning period his or her journey is supposed to start. Changing to a different time slice is allowed but penalized in order to account for much shorter travel times when starting earlier or later than planned. For technical reasons we do not use the travel time to evaluate passengers’ journeys but a slightly different measure, namely the speedup compared to a maximal travel time that a passenger is going to accept. Every passenger whose travel time exceeds the maximal one for the OD pair is supposed to use another mode of transportation and is not counted towards the objective function. This later allows us to model the problem as a partial weighted MaxSAT formulation, see Section 2.5. Note that for sufficiently large maximal travel times, maximizing the speedup is equivalent to minimizing the travel time.

2.4 Adding Time Slices

53

To model the distribution of OD pairs to multiple routes, we need origint destination data Cu,v for each time slice t ∈ {1, . . . , Tu,v }, where Tu,v is the 

t,t , u, v ∈ V , number of time slices for OD pair (u, v), u, v ∈ V , and a penalty Pu,v t, t  ∈ {1, . . . , Tu,v }, for changing the start of a journey from time slice t to t  as well as a maximal travel time Du,v , u, v ∈ V , for passengers traveling from u to t ) v. Here, we write (u, v) ∈ OD = (Cu,v u,v∈V ,t∈{1,...,Tu,v } if there exists a time slice t t ∈ {1, . . . , Tu,v } with a positive number of passengers, i.e., with Cu,v > 0. The integrated timetabling and passenger routing problem using time slices hence is:

Problem 2.18 (Integrated timetabling and passenger routing problem using time slices). Let N 0 = (E 0 , A0 ) be an event-activity network with duration bounds La , Ua , a ∈ A0 , for PTN (V , E). Let T be the period t ) length and OD = (Cu,v u,v∈V ,t∈{1,...,Tu,v } an OD matrix distributed to time 

t,t , u, v ∈ V , t, t  ∈ {1, . . . , Tu,v }, be the penalty for changing slices. Let Pu,v the start of a journey from time slice t to t  and let Du,v , u, v ∈ V , be the maximal travel time for passengers traveling from u to v. Find a feasible periodic timetable with period length T according to Definition 1.16 such that the speedup of the passengers routed along their shortest paths for the timetable according to travel time and respecting the time slice changing penalty is maximized.

In the following we model this problem more formally as an integer program. To this end, we introduce the extended EAN with time slices. ˜ A) ˜ is derived from Definition 2.19. The extended EAN with time slices N˜ = (E, an EAN N 0 = (E 0 , A0 ) with PTN (V , E) and OD matrix OD by adding source events, target events, and the corresponding activities. We define a source event for each combination of origin and destination, intended time slice for starting and actual starting time slice. Target events are defined for all combinations of OD pairs and time slices. The corresponding activities connect source and target events to the departures and arrivals at the respective stops or allow for switching to another time slice. ˜ 0 ∪ E˜OD E=E

with

E˜OD ={(u, v, t, t  , source), (u, v, t, target) : (u, v) ∈ OD, t, t  ∈ {1, . . . , Tu,v }}. 0 ˜ A=A ∪ A˜ time ∪ A˜ to ∪ A˜ from

with

A˜ time ={((u, v, t, t, source), (u, v, t, t  , source)) : (u, v)∈OD, t=t  ∈{1, . . . , Tu,v }}, A˜ to ={((u, v, t, t  , source), (u, dep, l)) : u∈l∩V , (u, v)∈OD, t, t  ∈{1, . . . , Tu,v }}, A˜ from ={((v, arr, l), (u, v, t, target)) : v∈l∩V , (u, v)∈OD, t∈{1, . . . , Tu,v }}.

54

2 Integrating Timetabling and Passenger Routing

Here, using activity (i, j ) with j = (u, v, t, t  , source) ∈ E˜OD corresponds to the OD pair traveling from u to v which is appointed to start in time slice t and actually starts in t  . ˜ belonging to line l are defined as before, see Definition 1.23, i.e., Events E(l) ˜ = E 0 (l) while the activities A(l) ˜ belonging to line l additionally contain to and E(l) from activities, i.e., ˜ = {(i, j ) ∈ A˜ : i ∈ E(l) ˜ or j ∈ E(l)}. ˜ A(l) For the IP formulation of the integrated problem, we extend the formulation given in Section 2.1 to include time slices and a maximal travel time. We especially have to make sure that for activities a = (i, j ) ∈ A˜ to events j = (u, v, t, t  , source) ∈ E˜OD lie in the correct time slices t  . Analogously to Section 2.1, integer variables πi ∈ {0, . . . , T − 1}, i ∈ E 0 , are used to model the periodic time appointed to event i with corresponding modulo t , parameters za ∈ Z, a ∈ A0 . For the passengers we use binary variables xu,v (u, v) ∈ OD, t ∈ {1, . . . , Tu,v }, to determine if there is a path from u to v starting in time slice t which is used and binary variables pau,v,t , (u, v) ∈ OD, ˜ to decide if activity a is used by the passengers going t ∈ {1, . . . , Tu,v }, a ∈ A, from u to v starting in time slice t. 

max

Tu,v 



 t t Du,v · xu,v Cu,v −

pau,v,t · (πj − πi + za · T )

a=(i,j )∈A0

(u,v)∈OD t=1







t,t Pu,v · pau,v,t



(2.7)

source),•)∈A˜ time

a=((u,v,t,t  ,

s.t.

πj − πi + za · T ≥ La

a = (i, j ) ∈ A0

(2.8)

πj − πi + za · T ≤ Ua

a = (i, j ) ∈ A0

(2.9)

t xu,v



pau,v,t

(u, v) ∈ OD, t ∈ {1, . . . , Tu,v }, a ∈ A˜ (l), l ∈ L

A · (pau,v,t )a∈A˜ pau,v,t

 · Ltu,v

=b

u,v,t

≤ πi

(2.10)

u, v ∈ V , t ∈ {1, . . . , Tu,v } (u, v) ∈ OD, t, t ∈ {1, . . . , Tu,v }, a = ((u, v, t, t  , source), i) ∈ A˜ to

t

Uu,v + M · (1 − pau,v,t ) ≥ πi

(2.12)

(u, v) ∈ OD, t, t  ∈ {1, . . . , Tu,v }, a = ((u, v, t, t  , source), i) ∈ A˜ to

πi ∈ {0, . . . , T − 1} i ∈ E za ∈ Z

(2.11)



0

a ∈ A0

(2.13)

2.4 Adding Time Slices

55 (u, v)∈OD, t∈{1, . . . , Tu,v }, a∈A˜

pau,v,t ∈ {0, 1} t xu,v

∈ {0, 1}

(u, v)∈OD, t ∈ {1, . . . , Tu,v }.

The model is non-linear, but the objective function (2.7) can be linearized by substituting pau,v,t · (πj − πi + za · T ) = dau,v,t with auxiliary integer variables dau,v,t , a ∈ A0 , (u, v) ∈ OD, t ∈ {1 . . . , Tu,v }, and dau,v,t ≥ 0,

a ∈ A0 , (u, v)∈OD, t∈{1 . . . , Tu,v }

dau,v,t ≥ πj − πi +za · T − (1−pau,v,t ) · M  , a ∈ A0 , (u, v) ∈ OD, t ∈ {1 . . . , Tu,v },

where M  is sufficiently large, e.g., M  ≥ maxa∈A0 Ua . Constraints (2.8) and (2.9) are the standard timetabling constraints while constraint (2.10) makes sure that an activity can only be used by a passenger if a path for this passenger is chosen at all. The routing of passengers is modeled by constraint (2.11). Here, A is a node-arc-incidence matrix and bu,v,t the corresponding demand vector. ˜

˜

A ∈ {0, 1, −1}|E |×|A| ⎧ ⎪ if a  = (i, j ) ∈ A˜ ⎪ ⎨1, ai,a  = −1, if a  = (j, i) ∈ A˜ ⎪ ⎪ ⎩0, otherwise ˜

bu,v,t ∈ {0, 1, −1}|E | ⎧ t ⎪ if i = (u, v, t, t, source) ⎪ ⎨xu,v , u,v,t t , if i = (u, v, t, target) bi = −xu,v ⎪ ⎪ ⎩0, otherwise Constraints (2.12) and (2.13) make sure that the first event of a path starting in time slice t  lies in the correct time slice. Remember that due to the construction of the extended EAN with time slices, see Definition 2.19, each path of a passenger contains exactly one activity a = ((u, v, t, t  , source), i) ∈ A˜ to . Using this activity means that the path of OD pair (u, v) that was supposed to start in time slice t  t  mark the beginning and the end actually starts in time slice t  . Here, Ltu,v and Uu,v  t  = t  · T − 1, i.e., of time slice t  . We propose to set Ltu,v = (t  − 1) · TTu,v and Uu,v Tu,v if the number of time slices Tu,v divides the period length T , the time slices are all

56

2 Integrating Timetabling and Passenger Routing

equally long. For a correct linearization, M has to be sufficiently large, e.g., M = T is large enough. t variables are set to one, the objective function minimizes the In case that all xu,v sum of the travel time 

Tu,v 



t Cu,v · pau,v,t · (πj − πi + za · T )

(u,v)∈OD t=1 a=(i,j )∈A0

and the penalty for changing a time slice 

Tu,v 





t t,t Cu,v · Pu,v · pau,v,t .

(u,v)∈OD t=1 a=((u,v,t,t  ,source),•)∈A˜ time

To allow for a partial weighted MaxSAT formulation in Section 2.5 we, however, need an upper bound Du,v on the length of a passenger route, and hence allow that a passenger is not routed at all if his or her shortest path exceeds this length. If Du,v exceeds the worst case shortest path, i.e., if Du,v ≥ len(SPu,v (U ), U ) +

max

t=t  ,t,t  ∈{1,...,Tu,v }



t,t Pu,v

is satisfied, there are no non-routed passengers as there always is a passenger route no longer than Du,v .

2.5 A SAT Formulation with Time Slices In this section, we derive a satisfiability formulation for the integrated timetabling and passenger routing problem with time slices. This is motivated by the fact that specialized solvers for satisfiability problems can yield good results for periodic timetabling problems as noted in Section 1.2.2. Note that the following section is not referred to later on in this book and therefore is not essential for understanding the further chapters. We assume that the general principles of propositional logic are known and refer to [BHvM+ 09] for an overview on satisfiability problems. We use the following notation, similar to [GHM+ 12]. Definition 2.20. Let x be a Boolean variable with values true or false. Then ¬x is the negation of x, i.e., ¬x = true if and only if x = false and vice versa. A literal is a variable or its negation. A disjunction of a set of literals {x1 , . . . , xn }, i.e., i∈{1,...,n}

xi , is called clause and the conjunction of a set of clauses {C1 , . . . , Ck }, i.e., i∈{1,...,k} Ci , is a conjunctive normal form.

2.5 A SAT Formulation with Time Slices

57

Note that any propositional formula, i.e., any formula consisting of literals and logical operations such as conjunctions, disjunctions, negations, implications, etc., can be expressed by a conjunctive normal form, see, e.g., [BHvM+ 09]. With this notation, we state the satisfiability problem as follows. Problem 2.21 (Satisfiability problem (SAT) [BHvM+ 09]). Let a propositional formula F be given. Find an assignment of the variables to {true, false} such that F is satisfied, i.e., such that F evaluates to true. In order to find an optimal solution instead of only a feasible one, we consider the following variant of the satisfiability problem. Problem 2.22 (Partial weighted maximum satisfiability problem (partial weighted MaxSAT) [BHvM+ 09]). Let a propositional formula F be given in conjunctive normal form, i.e., as a set of clauses C = {C1 , . . . , Cn } with weights wC ≥ 0 for all clauses C in a subset C  ⊂ C of all clauses. Find a variable assignment such that all clauses in C \ C  are satisfied and the weight of the satisfied clauses in C  is maximized. We now model the integrated timetabling and passenger routing problem with time slices as a partial weighted MaxSAT problem. As modern SAT solvers require the input to be in conjunctive normal form, we translate the constraints into sets of clauses which have to be satisfied and convert the objective into a set of clauses with positive weight. Remark 2.23. In the following, we use binary and Boolean variables interchangeably by identifying true with one and false with zero. ¬x can then be expressed as 1 − x. For modeling the integrated problem as SAT problem, we use the extended EAN with time slices as defined in Definition 2.19. To emphasize the similarities of the SAT formulation and the IP formulation introduced in Section 2.4, the variables we use are mostly the same as in the IP formulation. We can directly use the binary t variables xu,v for the usage of paths and pau,v,t for the usage of activities. Due to the definition of the satisfiability problem we cannot use the integer variables πi but have to substitute them for binary variables πik which determine if πi ≤ k is satisfied.

58

2 Integrating Timetabling and Passenger Routing

2.5.1 Modeling Feasibility At first we show how to model the feasibility of the integrated timetabling and passenger routing problem with time slices as a satisfiability problem by extending the timetabling SAT model proposed in [GHM+ 12]. We will discuss all sets of constraints in detail in the following paragraphs. Timetabling As shown in [GHM+ 12], the timetabling constraints can be modeled as conjunction of two sets of clauses. One set, which we call N 0 , is used for modeling the variable encoding and another set, called N 0 , for modeling the constraints. The variable encoding N 0 ensures that variable πik , i ∈ E 0 , k ∈ {0 . . . , T }, is true if and only if πi ≤ k is satisfied and N 0 ensures that the duration of activities a ∈ A0 lies within the bounds La , Ua . Modeling Passenger Routes For the passenger routes we model whether a path t . If this is the case, we also from u to v is used for time slice t by the variables xu,v have to model the corresponding passenger route. Therefore, we first have to make sure that for each OD pair (u, v) ∈ OD and each time slice t ∈ {1, . . . , Tu,v } a path starts, if one is chosen at all. This can be realized either by moving to a different time slice or by starting at a specified event in the allotted time slice.  t ⇒ pau,v,t xu,v a=((u,v,t,t,source),•)∈A˜ time ∪A˜ to  t ⇐⇒ ¬xu,v ∨ pau,v,t a=((u,v,t,t,source),•)∈A˜ time ∪A˜ to    enc_start (u,v,t)

(u, v) ∈ OD, t ∈ {1, . . . , Tu,v }. Additionally, we have to make sure that if activity a = ((u, v, t, t  , source), i) ∈ A˜ to is used, the target event i ∈ E 0 lies in the correct time slice, i.e., in the interval  t  ]. [Ltu,v , Uu,v 



t pau,v,t ⇒ Ltu,v ≤ πi ≤ Uu,v 

Ltu,v −1

⇐⇒ ¬pau,v,t ∨ (¬πi 

Ltu,v

⇐⇒ (¬pau,v,t ∨ ¬πi  

enc_slice_1(a,u,v,t)



t Uu,v

∧ πi

) 

t Uu,v

) ∧ (¬pu,v,t ∨ π   a  i

) 

enc_slice_2(a,u,v,t)

(u, v) ∈ OD, t ∈ {1, . . . , Tu,v }, a = ((u, v, t, t  , source), i) ∈ A˜ to .

2.5 A SAT Formulation with Time Slices

59

Next we have to ensure that if a path is started, this path continues throughout the network. Let a = (i, j ) ∈ A˜ ∪ A˜ to ∪ A˜ time . 

pau,v,t ⇒

pau,v,t 

a  =(j,k)∈A0 ∪A˜ to ∪A˜ from



⇐⇒ ¬pau,v,t ∨

pau,v,t 

a  =(j,k)∈A0 ∪A˜ to ∪A˜ from







enc_continue(a,u,v,t)

(u, v) ∈ OD, t ∈ {1, . . . , Tu,v }, a = (i, j ) ∈ A0 ∪ A˜ to ∪ A˜ time . We also have to make sure that the path ends at a node (u, v, t, target). 

t ⇒ xu,v

pau,v,t

a=(k,(u,v,t,target))∈A˜ from



t ⇐⇒ ¬xu,v ∨

pau,v,t

a=(k,(u,v,t,target))∈A˜ from







enc_stop(u,v,t)

(u, v) ∈ OD, t ∈ {1, . . . , Tu,v }. In the end we have to ensure that there are no nodes where multiple arcs are used. First we make sure that each node i ∈ E˜ has only one successor. 

¬(

pau,v,t ∧ pau,v,t ) 

a,a  ∈A˜ : a=(i,j ),a  =(i,j  )



⇐⇒

(¬pau,v,t ∨ ¬pau,v,t )    

a,a  ∈A˜ : enc_only_one_successor(a,a  ) a=(i,j ),a  =(i,j  )

˜ (u, v) ∈ OD, t ∈ {1, . . . , Tu,v }, i ∈ E. Next we make sure that each node j ∈ E˜ has only one predecessor. 

¬(

pau,v,t ∧ pau,v,t ) 

a,a  ∈A˜ : a=(i,j ),a  =(i  ,j )

⇐⇒



(¬pau,v,t ∨ ¬pau,v,t )    

a,a  ∈A˜ : enc_only_one_predecessor(a,a  ) a=(i,j ),a  =(i  ,j )

60

2 Integrating Timetabling and Passenger Routing

˜ (u, v) ∈ OD, t ∈ {1, . . . , Tu,v }, j ∈ E. To model the whole passenger behavior we get the following:

N˜ =





(u,v)∈OD t∈{1,...,Tu,v }

enc_start (u, v, t)  a∈A˜ to

enc_slice_1(a, u, v, t) ∧ enc_slice_2(a, u, v, t) 

a∈A0 ∪A˜

enc_continue(a, u, v, t)

˜ to ∪Atime

∧ enc_stop(u, v, t)   enc_only_one_successor(a, a  ) i∈E˜



a,a  ∈A˜ : a=(i,j ),a  =(i,j  )



enc_only_one_predecessor(a, a  ) .

j ∈E˜ a,a  ∈A˜ : a=(i,j ),a  =(i  ,j )

Together, the feasibility can be modeled as N 0 ∧ N 0 ∧ N˜ , i.e., by a conjunction of clauses. Thus, the feasibility of the integrated timetabling and passenger routing problem with time slices can be modeled as a SAT problem. Note that the number of clauses needed for passenger routing can be reduced in a preprocessing step. Remark 2.24. The same procedure can be used to model the integrated timetabling and passenger routing problem without time slices as SAT problem. Therefore, the extended EAN from Definition 1.18 can be used and the clauses enc_slice_1 and enc_slice_2 can be omitted.

2.5.2 Objective Function It remains to show that the objective function can be written as a set of weighted clauses, such that the integrated timetabling and passenger routing problem with time slices can be formulated as a partial weighted MaxSAT problem. We refer to the following theorem and its proof.

2.5 A SAT Formulation with Time Slices

61

Theorem 2.25. The integrated timetabling and passenger routing problem with time slices can be formulated as a partial weighted MaxSAT problem. Proof. We already showed that the feasibility of the integrated timetabling and passenger routing problem with time slices can be modeled by SAT constraints. Thus it only remains to show that the objective can be expressed as set of clauses with positive weight. At first we need auxiliary variables τak ∈ {0, 1} for all activities a = (i, j ) ∈ A0 , k ∈ {0, . . . , Ua + 1} which determine if (πj − πi − La )mod T + La ≥ k is satisfied. We need to make sure that τak is consistent for all k ∈ {1, . . . , Ua }, i.e., that it really models a ≥-constraint. We encode this analogously to the encoding enc of the variables πi in [GHM+ 12]: 

enc : a → (τa0 ∧ ¬τaUa +1

(¬τak ∨ τak−1 )).

k∈{1,...,Ua +1}

It remains to ensure that τak is true if (πj − πi − La )mod T + La ≥ k. For k ≤ La we already know this due to the timetabling constraints and set τak = 1 for a ∈ A0 , k ∈ {1, . . . , La }. Therefore, we consider the following:   (πj − πi − La )mod T + La ≥ k ⇒ τak   ⇐⇒ ¬ (πj − πi − La )mod T + La ≥ k ∨ τak   ⇐⇒ (πj − πi − La )mod T + La ∈ [La , k − 1] ∨ τak    F

a ∈ A , k ∈ {La + 1, . . . , Ua }. 0

As F can be encoded in the same way as any other timetabling constraint, we again get a conjunction of clauses here. Now we can express the length of an activity as the sum of τak variables. (πj − πi − La )mod T + La =

Ua 

τak .

k=1

Therefore, we can formulate the objective function using only binary variables.

max



Tu,v 

(u,v)∈OD t=1



t t Cu,v · (Du,v · xu,v −



a=((u,v,t,t  ,source),•)∈A˜ time



pau,v,t · (

a∈A0 t,t 

Pu,v · pau,v,t )

Ua  k=1

τak )

62

2 Integrating Timetabling and Passenger Routing

⇐⇒ max

Tu,v 



t t Cu,v · (Du,v · xu,v +

(u,v)∈OD t=1



Ua 

¬τak )

k=1

t,t 

Pu,v

source),•)∈A˜ time

a=((u,v,t,t  ,

(−Ua · pau,v,t + pau,v,t ·

a∈A0











fixed



+



t,t Pu,v · ¬pau,v,t )

a=((u,v,t,t  ,source),•)∈A˜ time

⇐⇒ max



Tu,v 

t t Cu,v · Du,v · xu,v

(u,v)∈OD t=1



+

Tu,v  

t −Cu,v · Ua · pau,v,t

(u,v)∈OD t=1 a∈A0



+

Tu,v Ua   

t Cu,v · pau,v,t · ¬τak

(u,v)∈OD t=1 a∈A0 k=1



+

Tu,v 





t t,t Cu,v · Pu,v · ¬pau,v,t

(u,v)∈OD t=1 a=((u,v,t,t  ,source),•)∈A˜ time

⇐⇒ max



Tu,v 

t t Cu,v · Du,v · xu,v

(u,v)∈OD t=1



+

Tu,v  

(u,v)∈OD t=1



t −Cu,v · Ua

a∈A0





fixed

+



Tu,v  

t Cu,v · Ua · ¬pau,v,t

(u,v)∈OD t=1 a∈A0

+



Tu,v Ua   

t Cu,v · pau,v,t · ¬τak

(u,v)∈OD t=1 a∈A0 k=1

+



Tu,v 



(u,v)∈OD t=1 a=((u,v,t,t  ,source),•)∈A˜ time



t t,t Cu,v · Pu,v · ¬pau,v,t

2.5 A SAT Formulation with Time Slices

63

As we want to maximize, we can substitute pau,v,t ·¬τak by a binary variable yau,v,t,k, (u, v) ∈ OD, t ∈ {1, . . . , Tu,v }, a ∈ A0 , k ∈ {0, . . . , Ua + 1}, which is set to zero if either ¬τak = 0 or pau,v,t = 0. ⇐⇒ max



Tu,v 

t t Cu,v · Du,v · xu,v

(u,v)∈OD t=1

+



Tu,v  

t Cu,v · Ua · ¬pau,v,t

(u,v)∈OD t=1 a∈A0

+



Tu,v Ua   

(u,v)∈OD t=1

+



Tu,v 

a∈A0

t Cu,v · yau,v,t,k

k=1





t t,t Cu,v · Pu,v · ¬pau,v,t

(u,v)∈OD t=1 a=((u,v,t,t  ,source),•)∈A˜ time

. From the substitution we get the following clauses: ¬¬τak ⇒ ¬yau,v,t,k ⇐⇒ ¬τak ∨ ¬yau,v,t,k (u, v) ∈ OD, t ∈ {1, . . . , Tu,v }, a ∈ A0 , k ∈ {0, . . . , Ua + 1} ¬pau,v,t ⇒ ¬yau,v,t,k ⇐⇒ pau,v,t ∨ ¬yau,v,t,k (u, v) ∈ OD, t ∈ {1, . . . , Tu,v }, a ∈ A0 , k ∈ {0, . . . , Ua + 1}. We see that the objective is to maximize a sum of weighted Booleans. This can be modeled in a partial weighted MaxSAT problem, where all the clauses appearing in the objective get their respective weight from the objective function and all other clauses which are needed to model the constraints have to be satisfied. 

The SAT formulation presented here has been experimentally evaluated in [GGNS16]. We refer to [GGNS16] for the details.

64

2 Integrating Timetabling and Passenger Routing

2.6 Summary In this chapter, we consider the integrated timetabling and passenger routing problem and present two heuristic approaches as well as an exact preprocessing technique for reducing the problem size. This allows us to experimentally evaluate the benefits of the integration of passenger routes on medium sized instances and even apply the approach to an instance derived from the German long-distance railway network. Furthermore, we introduce the concept of time slices to distribute the passenger demand within the considered period and present an IP formulation as well as a satisfiability formulation for this extended problem.

Chapter 3

Integrating Line Planning, Timetabling, and Passenger Routing

In this chapter, we extend the integrated timetabling and passenger routing problem by additionally considering line planning (Figure 3.1). This allows for a passenger focused approach to line planning where travel times can be evaluated exactly instead of approximately as in many passenger focused line planning models. In addition to the integrated problem, we present an exact preprocessing algorithm as well as two heuristics to reduce the problem size. In the computational evaluation the integrated problem as well as the methods for reducing the problem size are discussed.

3.1 Modeling the Integrated Problem As line planning is one of the first steps in the traditional sequential approach to public transport planning, it has a large impact on the quality of the overall solution. Especially the impact on passenger travel times is hard to predict as long as no timetable is known. We therefore consider the integrated line planning, timetabling, and passenger routing problem. As mentioned in Remark 1.14 we restrict ourselves to binary frequencies. For an extension to multiple frequencies, see Section 3.2. To formally describe the problem, we need the following definition. Definition 3.1. A line l ∈ L0 is called active for a given line plan L if l ∈ L, i.e., if its frequency is greater than zero. Let N = (E, A) be the extended eventactivity network belonging to line pool L0 . An activity a ∈ A is called active if all lines l ∈ L0 to which a belongs, i.e., a ∈ A(l) as in Definition 1.23, are active. The active extended event-activity network is the extended event-activity network N  = (E  , A ) for line plan L, i.e., it is the subset of N = (E, A) consisting of

© Springer Nature Switzerland AG 2020 P. Schiewe, Integrated Optimization in Public Transport Planning, Springer Optimization and Its Applications 160, https://doi.org/10.1007/978-3-030-46270-3_3

65

66

3 Integrating Line Planning, Timetabling, and Passenger Routing

Line Planning

Passenger Routing

Timetabling

Vehicle Scheduling

Fig. 3.1 Integrated line planning, timetabling, and passenger routing.

active activities and the corresponding events. The rerouted travel time using only active activities for a given line plan L ⊂ L0 with corresponding timetable π and OD matrix OD is the rerouted travel time in the active event-activity network N  = (E  , A ). Problem 3.2 (Integrated line planning, timetabling, and passenger routing problem (LinTimPass)). Let (V , E) be a PTN with lower and upper frequency bounds femin , femax , e ∈ E, and bounds on the duration of wait driving, Ldrive , Uedrive , e ∈ E, waiting, Lwait e v , Uv , v ∈ V , and transferring, trans , v ∈ V . Let L0 be the line pool with line costs cost , l ∈ L0 , Ltrans , U l v v and let N 0 = (E 0 , A0 ) be the event-activity network belonging to L0 with bounds constructed as in Definition 1.22. Let T be the length of the planning period and OD an OD matrix. Find a feasible line plan L and a feasible timetable π with respect to line plan L such that the line costs and the rerouted travel time using only active activities are minimized. We handle the bi-criteria problem (LinTimPass) by minimizing a weighted sum of α times the line costs and β times the travel time. Thus, for varying positive weights (α, β) we can find solutions which either favor low line cost by increasing α or low travel times by increasing β. Especially, we find a lower bound on the line costs by setting β to zero and only optimizing the costs and vice versa find a lower bound on the travel time by setting α to zero and only optimizing the travel time. Note that we also get a lower bound on the line costs by solving the cost model of line planning, described in Problem 1.12, which is a relaxation of (LinTimPass). If the lower frequency bounds allow for a route for all OD pairs and a feasible timetable can be found, these lower bounds coincide. We model (LinTimPass) similar to the model presented in [RN09] by using binary variables fl , l ∈ L0 , for the frequencies, integer variables πi , i ∈ E 0 , for the event times, and binary flow variables pau,v , a ∈ A, (u, v) ∈ OD, for the passengers, where N = (E, A) is the extended EAN for line pool L0 . Additionally, we need auxiliary variables ya , a ∈ A0 , to determine if activity a is active and modulo parameters za , a ∈ A0 .

3.1 Modeling the Integrated Problem

(LinTimPass)

min α ·

 l∈L0

+β ·

67

costl · fl 

Cu,v ·

(u,v)∈OD



pau,v · (πj − πi + za · T )

a=(i,j )∈A0

(3.1) 

fl ≥ femin

e∈E

(3.2)

fl ≤ femax

e∈E

(3.3)

πj − πi + za · T ≥ ya · La

a = (i, j ) ∈ A0

(3.4)

πj − πi + za · T ≤ Ua + M · (1 − ya )

a = (i, j ) ∈ A0

(3.5)

ya = fl1 · fl2

a ∈ A0 (l1 , l2 )

(3.6)

fl ≥

(u, v) ∈ OD, a ∈ A(l)

(3.7)

(u, v) ∈ OD

(3.8)

s.t.

l∈L0 : e∈l



l∈L0 : e∈l

pau,v u,v

A · (pau,v )a∈A = b

fl ∈ {0, 1}

l ∈ L0

ya ∈ {0, 1}

a ∈ A0

za ∈ Z

a ∈ A0

πi ∈ {0, . . . , T − 1}

i ∈ E0

pau,v ∈ {0, 1}

(u, v) ∈ OD, a ∈ A

Similar to Section 2.1, the objective function (3.1) can be linearized by substituting pau,v · (πj − πi + za · T ) = dau,v with auxiliary integer variables dau,v , a = (i, j ) ∈ A0 , (u, v) ∈ OD, and dau,v ≥ 0,

a = (i, j ) ∈ A0 , (u, v) ∈ OD

dau,v ≥ πj − πi + za · T − (1 − pau,v ) · M  , a = (i, j ) ∈ A0 , (u, v) ∈ OD where M  is sufficiently large, e.g., M  ≥ maxa∈A0 Ua . Constraints (3.2) and (3.3) are the standard feasibility constraints for line planning, guaranteeing a minimal coverage of the network while ensuring that no edges are overused.

68

3 Integrating Line Planning, Timetabling, and Passenger Routing

The timetabling constraints (3.4) and (3.5) only have to be satisfied for the line plan which is computed, i.e., for active activities which are modeled by (3.6). Here, M ≥ T is sufficiently large. To linearize (3.6), we can use ya ≤ fl1 ya ≤ fl2 ya + 1 ≥ fl1 + fl2 . As is Section 2.1, the passenger flow is modeled for each OD pair using the node-arc-incidence matrix A and demand vector bu,v . A ∈ {0, 1, −1}|E |×|A| ⎧ ⎪ if a  = (i, j ) ∈ A ⎪ ⎨1, ai,a  = −1, if a  = (j, i) ∈ A ⎪ ⎪ ⎩0, otherwise bu,v ∈ {0, 1, −1}|E | ⎧ ⎪ if i = (u, source) ⎪ ⎨1, u,v bi = −1, if i = (v, target) ⎪ ⎪ ⎩0, otherwise Additionally, constraints (3.7) ensure that passengers use only active activities. We can show that all passengers travel on shortest paths if the travel time of passengers is considered in the objective, i.e., if β > 0. Lemma 3.3. Let (L, π ) be an optimal solution of the integrated line planning, timetabling, and passenger routing problem with active extended event-activity network N  = (E  , A ). Then all passengers travel on shortest paths in N  according to timetable π if the travel time is considered in the objective function, i.e., if β > 0. Proof. Suppose a passenger of OD pair (u, v) ∈ OD is traveling on a path P in N  which is not a shortest one w.r.t timetable π , i.e., len(P , d(π )) > len(SPu,v (d(π )), d(π )). As SPu,v (d(π )) is a path in the active extended EAN N  , we get that fl = 1 is satisfied for all lines l with a ∈ A(l) and a ∈ SPu,v (d(π )). Thus, constraint (3.7) allows for setting pau,v to one for all activities a ∈ SPu,v (d(π )), i.e., SPu,v (d(π )) can be used instead of P . Thus, the total travel time can be decreased which is a contradiction to P being used in an optimal solution with β > 0. 

3.3 Reducing the Problem Size

69

3.2 Extensions of the Model Here, we shortly discuss three extensions of (LinTimPass). Handling Multiple Frequencies Although binary frequency variables are widely used, see Remark 1.14, they do not always suffice to represent realistic line concepts. One possibility to model multiple frequencies is to choose a system frequency F ∈ N and introduce F copies of each line to the event-activity network with corresponding synchronization activities that ensure that line repetitions are spaced correctly in the planning period. Let l1 , . . . , lF be repetitions one to F of line l. Then we can use the following constraints to ensure that line l is operated with frequency zero, one, or F . fl1 ≥ fl2 fli = fli+1 ,

i = 2, . . . , F − 1

Time Slices Note that (LinTimPass) can be extended to contain the time slices introduced in Section 2.4. But as the following methods to reduce the problem size cannot be applied for multiple time slices, we here omit modeling the diversification of start times. SAT Formulation Similar to Section 2.5, (LinTimPass) can be modeled as satisfiability problem. Here, the modeling difficulties shift as implications can be modeled easily while sums pose larger difficulties. For example, modeling that a timetabling constraint only has to be satisfied if the corresponding lines are active can be achieved by adding two literals to the corresponding clauses while the standard feasibility constraints of line planning lead to exponentially many constraints in the number of lines in the line pool.

3.3 Reducing the Problem Size As the integrated line planning, timetabling, and passenger routing problem is even larger than the integrated timetabling and passenger routing problem, reducing the problem size becomes even more important. Due to the increased intricacy, the ideas from Section 2.2 cannot be applied directly. As long as it is unclear which lines will be operated it is in general impossible to determine worst case paths which can be traveled on for all line concepts. A similar problem occurs when assigning a subset of OD pairs to fixed paths as it is not yet determined which activities can be used for routing. However, if we impose the following restrictions of Assumption 3.5, we can adapt the ideas of Section 2.2 to reduce the problem size. To formally state these assumptions, we need the following definition which is given for directed edges in

70

3 Integrating Line Planning, Timetabling, and Passenger Routing

the PTN to simplify the notation. This is no restriction as we are using edges from a given path such that they are implicitly directed. Definition 3.4. Let N 0 = (A0 , E 0 ) be an event-activity network for PTN (V , E) and line pool L0 . Drive activity a ∈ Adrive belongs to edge e = (u, v) ∈ E if a = ((u, dep, l), (v, arr, l)) for some line l ∈ L0 . Wait activity a ∈ Await belongs to station v if a = ((v, arr, l), (v, dep, l)) for some line l ∈ L0 . Transfer activity a ∈ Atrans belongs to station v if a = ((v, arr, l), (v, dep, l  )) for some lines l, l  ∈ L0 . Similarly, wait or transfer activity a ∈ Await ∪ Atrans belongs to (e∈ , eeout ) ∈ E 2 with eein = (u, v), eeout = (v, w) if a = ((v, arr, l), (v, dep, l  )) with eein ∈ l, eeout ∈ l  , l, l  ∈ L0 . A path P in the extended EAN belongs to path P  in the PTN, if each drive activity of P belongs to an edge of P  and each wait and transfer activity of P belongs to a station of P  , i.e., P = (a0 , a1 , a2 , . . . , a2n+1 , a2n+2 ) with activities a0 , a2n+2 ∈ Aaux , a2i+1 ∈ Adrive , i ∈ {0, . . . , n}, a2i ∈ Await ∪ Atrans , i ∈ {1, . . . , n}, and P  = (v0 , e0 , v1 , . . . , en , vn ), where drive activities a2i+1 belong to edges ei , i ∈ {0, . . . , n}, and wait and transfer activities a2i belong to stations vi , i ∈ {1, . . . , n}. We now state the assumptions that are used for the remainder of this chapter. Assumption 3.5. Suppose that the following assumptions hold for the remainder of Chapter 3. 1. All PTN edges are covered by each feasible line concept at least once. 2. The EAN is constructed as proposed in Definition 1.15 with bounds as proposed in Definition 1.22, i.e., the bounds of activities belonging to the same PTN edge or node are the same. 3. There is a global maximal transfer time, i.e., the maximal transfer time is the same for all stops. 4. The maximal wait time at any stop is no larger than the maximal transfer time. Assumption 1 can easily be achieved by adjusting the lower frequency bounds. We show in Lemma 3.14 that together with Assumption 2 it allows for the existence of worst case paths that can actually be realized. This is important to construct an algorithm similar to the preprocessing algorithm presented in Section 2.2 which determines a reduced set of activities for routing. Assumption 3 allows to shift transfers for worst case shortest paths while Assumption 4 ensures that for worst case shortest paths transferring is never preferred to staying in a vehicle if the geographical paths coincide. When routing on PTN edges to approximate the travel time, special attention has to be paid to transfers. The number of transfers on any given path can easily be underestimated by zero and overestimated by transferring at all stations. As often the minimal transfer time is rather small, underestimating the number of transfers by zero is acceptable. However, overestimating the number of transfers by transferring at every station can lead to huge deviations from a reasonable travel time, as the

3.3 Reducing the Problem Size

71

maximal transfer time is often large. Therefore, the next section focuses on finding a minimal set of stations that suffice for transferring.

3.3.1 Determining which Stations Suffice for Transferring When the duration of drive and wait activities is fixed and only depends on the underlying PTN edges or stops—as is the case for determining worst and best cases—there are cases when transfers between two lines can be restricted to a subset of the stations. To determine a minimal subset of stations which suffice for transferring, we need the following definition. Definition 3.6. A parallel stretch is a list of consecutive nodes occurring in two different lines consecutively in the same order. An anti-parallel stretch is a list of nodes that occur in two lines consecutively in reverse order. Line l1 is contained in line l2 if the list of nodes of l1 forms a parallel stretch of lines l1 and l2 . Remark 3.7. Note that it is not sufficient to be able to transfer once between any two lines as a line might be a shortcut between two stations of another line, see Figure 3.2c. Theorem 3.8. Let the activity lengths used for routing be fixed such that drive activities belonging to the same PTN edge have the same length as well as wait activities at the same stop have the same length. Let the length of transfer activities be fixed and at least as large as the longest wait activity. Then there exists a shortest path for each OD pair, such that the following conditions are satisfied. 1. There is at most one transfer between lines l1 and l2 in a parallel stretch. 2. There is no transfer between lines l1 and l2 in a parallel stretch if both lines start or end together with that parallel stretch. 3. There is no transfer between lines l1 and l2 if line l1 is contained in line l2 . 4. If there is a transfer between lines l1 and l2 in an anti-parallel stretch, it is at the first station of the anti-parallel stretch. 5. There is no transfer between lines l1 and l2 in an anti-parallel stretch if one of the lines starts or ends at the first station of the anti-parallel stretch.

(a) Parallel stretch.

(b) Anti-parallel stretch.

Fig. 3.2 Examples for intersecting lines.

(c) Two transfers needed.

72

3 Integrating Line Planning, Timetabling, and Passenger Routing

Proof. As the length of a wait activity is no larger than the length of a transfer activity at the same station, we can neglect the waiting time by adding it to the length of the drive activities arriving at the station and subtracting it from the length of the transfer activities at the station. 1. Suppose there is a shortest path W with at least two transfers between lines l1 and l2 in a parallel stretch P = (v1 , v2 , . . . , vn ) and all paths with at most one transfer in P are strictly longer. We here consider the case with exactly two transfers in P between lines l1 and l2 as more transfers can be handled inductively. At first, we consider the case with one transfer at vi ∈ P from line l1 to l2 and one at vk ∈ P , i < k, from l2 to l1 . We can construct a path W  which differs from W only by using line l1 between vi and vk for all edges that are used with line l2 in W such that there is no transfer in P between lines l1 and l2 . If there is no transfer in W between vi and vk this means that line l1 is used for all edges between vi and vk . Otherwise, there is a transfer from line l2 to some line l3 at vj1 ∈ P and there is a transfer from some line l4 to line l2 at vj2 ∈ P with i < j1 < j2 < k. Here, W  is constructed by using line l1 between vi and vj1 , transferring there from line l1 to l3 and transferring at vj2 from line l4 to l1 and using line l1 from vj2 to vk . As all activities belonging to the same PTN edge have the same length, W and W  have the same drive time. But as the transfer time is non-negative W  is not longer than W which is a contradiction to the assumption. Now we consider the case with two transfers from line l1 to l2 at vi ∈ P and vk ∈ P , i < k. Then there is a transfer from line l2 to some line l3 at vj1 ∈ P and there is a transfer from some line l4 to line l1 at vj2 ∈ P with i < j1 < j2 < k. Then we can construct a path W  which differs from W in P by using line l1 between vi and vj1 , transferring there from line l1 to l3 and transferring at vj2 from line l4 to l2 and using line l2 from vj2 to vk . Then W  uses activities belonging to the same PTN edges as W but has no transfers at vi and vk , i.e., W  has two transfers less. Due to the non-negative transfer time W  is not longer than W which is a contradiction to the assumption. 2. Consider again P , l1 , l2 from 1 and let l1 and l2 start at v1 . Suppose there is a shortest path W with a transfer from line l1 to l2 at vj ∈ P and all paths without a transfer are strictly longer. Note that there has to be a transfer at vi ∈ P , i < j , from some line l3 to line l1 in W or W starts at vk ∈ P , k < j , as l1 starts in v1 . So we can transfer at vi to line l2 instead of line l1 or use l2 from the start and get a path W  which differs from W only by using line l2 from vi or vk to vj such that there is a transfer less. But as the transfer time is non-negative W  is not longer than W which is a contradiction to the assumption. For l1 and l2 ending at vn the proof can be done analogously. 3. If line l1 is contained in line l2 , there is a parallel stretch P = (v1 , v2 , . . . , vn ) of lines l1 , l2 containing all stops of line l1 . From 1 we know that there is at most one transfer in P between lines l1 and l2 . Suppose there is a shortest path W with a transfer at vj ∈ P from line l1 to line l2 and all paths without a transfer between lines l1 and l2 are strictly longer. As P contains all stations v ∈ l1 , there either is a transfer from some line l3 to l1 at station vi1 ∈ P , i1 < j , or W starts

3.3 Reducing the Problem Size

73

in vi2 ∈ P , i2 < j . By either transferring to line l2 directly at vi1 or using line l2 from the start at vi2 , we can construct W  which differs from W only in using line l2 from vi1 or vi2 to vj and contains one transfer less. Again with the nonnegative transfer time, W  is not longer than W which is a contradiction to the assumption. The proof can be done analogously with a transfer from l2 to l1 in P. 4. Consider the anti-parallel stretch P = (v1 , v2 , . . . , vn ) of lines l1 and l2 , i.e., (vi , vi+1 ) ∈ l1 and (vi+1 , vi ) ∈ l2 , i ∈ {1, . . . , n − 1}. Suppose there is a shortest path W with a transfer at vj = v1 , vj ∈ P , between lines l1 and l2 and all paths transferring at v1 between lines l1 and l2 are strictly longer. Then we get a drive activity in W for each edge (vi , vi+1 ) and (vi+1 , vi ) for all i ∈ {1, . . . , j − 1}. But with non-negative activity lengths, we can construct W  which differs from W only in P by transferring from line l1 to line l2 at v1 and not using any of the activities mentioned above which is not longer than W in contradiction to the assumption. 5. Consider again P , l1 , l2 from 4. Then only line l1 can start in v1 and only line l2 can end in v1 . If line l1 starts in v1 , we do not need to transfer from line l1 to l2 but can take line l2 directly. If line l2 ends in v1 , we do not need to transfer to line l2 but can use only line l1 . 

Remark 3.9. The assumptions of Theorem 3.8 are satisfied for routing according to upper bounds due to Assumption 3.5. As Theorem 3.8 holds for all parallel and anti-parallel stretches, it especially also holds for the maximal ones. We use this to determine a set of stations which suffice for transferring with the following integer program. (TS) min



xv

v∈V

xv = 1

s.t.

v first station in P with |P | > 1, P max. anti-parallel stretch of l1 ∩l2 =∅, l1 , l2 ∈ L0,



v not start or end station of l1 or l2 xv ≥ 1

P max. parallel stretch of l1 ∩ l2 = ∅,

v∈P

l 1 , l2 ∈ L 0 , l1  l2 , l2  l1 , l1 and l2 do not both start or end with P xv ∈ {0, 1}

v∈V

Here, the variables xv ∈ {0, 1}, v ∈ V , determine whether station v belongs to the set of stations which suffice for transferring.

74

3 Integrating Line Planning, Timetabling, and Passenger Routing

Remark 3.10. Note that the method to reduce transfer stations can also be applied to timetabling problems. When drive and wait times are fixed according to the underlying PTN, the reduced problems still yield optimal results due to Theorem 3.8. The following Figure 3.3 shows which stations suffice for transferring for data set toy. Note that for a given timetable, transfers can also take place at stations that are not selected as a transfer station. This is illustrated in the following Example 3.11. Example 3.11. Consider the following PTN with five stations and four edges as well as a line pool of three lines, depicted in Figure 3.4. Station v2 is the transfer station chosen by (TS) as it is the first station of the antiparallel stretch of lines l1 and l3 . Also, it is possible to transfer at station v2 from line l1 to l2 . But depending on the timetable, it might be shorter to transfer at station v3 . For simplicity, we consider fixed drive times for all edges except (v2 , v3 ) with bounds L, U = L+d and fix the waiting times as well as the minimal transfer times to zero. Let the duration of activity ((v2 , dep, l1 ), (v3 , arr, l1 )) be L and the duration of activity ((v2 , dep, l2 ), (v3 , arr, l2 )) be U . Let the arrival of line l1 at station v3 be scheduled to the same time as the departure of line l2 at the same station. Then the shortest path from v1 to v4 is using a transfer at station v3 instead of station v2 because line l2 departs from v2 d minutes before line l1 arrives, resulting in a waiting time of T − d minutes and a path that is T minutes longer. Fig. 3.3 Line pool of data set toy. Stations which suffice for transferring are colored gray. v1

Fig. 3.4 PTN with lines. Station v2 (colored gray) suffices for transferring.

v1

v7

v3

v6

v4

v5

v8

l1

v2

v5

v2

l3

v3

l2

v4

3.3 Reducing the Problem Size

75

3.3.2 A Preprocessing Algorithm As we try to apply the preprocessing idea of Section 2.2 to (LinTimPass), we are faced with the problem that we do not know a priori which activities will be active. This makes it more difficult to determine an overestimation of the travel time of the passengers as the concept of a worst case shortest path used in Section 2.2 relies on the fact that this path can be realized in any timetable. But due to Assumption 3.5, we know that all PTN edges will be covered by at least one line. We therefore find best and worst case shortest paths in the PTN and show that we can always construct a corresponding path in the extended EAN for under- and overestimating the travel time, respectively. To find paths in the PTN which under- and overestimate the travel time, we define modified lower and upper duration bounds on PTN edges. We again give the definition for directed edges, relying on the implicit direction of the edges implied by a path. Definition 3.12. Let (V , E) be a PTN with bounds Ldrive , Uedrive on drive times of e wait wait trans edges e ∈ E as well as Lv , Uv on wait times and Lv , Uvtrans on transfer times at stations v ∈ V . Let V¯ be a set of stations that suffice for transferring. Define modified lower bounds L˜ e for edges e = (u, v) ∈ E by trans + min{Lwait }. L˜ e = Ldrive e v , Lv

Define modified upper bounds U˜ e for edges e = (u, v) ∈ E by U˜ e =

 Uedrive + Uvwait , Uedrive

+ Uvtrans ,

v ∈ V \ V¯ . v ∈ V¯

Let P(u,v) be a path in the PTN from u to v. We then define the lower bound path length 

lenLB (P(u,v) ) =

trans } L˜ e − min{Lwait v , Lv

e∈P(u,v)

and the upper bound path length  lenUB (P(u,v) ) = e∈P(u,v) e∈P(u,v)

U˜ e − Uvwait , U˜ e − Uvtrans ,

v ∈ V \ V¯ . v ∈ V¯

Note that we do not need to consider the maximum of transfer time and wait time at stops v ∈ V¯ due to Assumption 3.5. According to the following Lemma 3.13, we can use the modified lower bounds to underestimate the travel time of the passengers on any path.

76

3 Integrating Line Planning, Timetabling, and Passenger Routing

Lemma 3.13. Let P(u,v) be a shortest path in PTN (V , E) according to edge lengths L˜ e , e ∈ E. Then the lower bound path length lenLB (P(u,v) ) underestimated the travel time of OD pair (u, v) for every feasible solution of (LinTimPass). Proof. Let (L, π ) be a feasible solution of (LinTimPass) and N  = (E  , A ) the corresponding active extended EAN. Let P be a path from (u, source) to (v, target) in N  . Then we get with the notation of Section 2.1, especially Definition 2.1 and Definition 2.2, len(P , d(π )) ≥ len(SPu,v (d(π )), d(π )) ≥ len(SPu,v (d(π )), L)  Ldrive = e e belongs to a: a∈Adrive ∩SPu,v (d(π ))



+

v  belongs to a: a∈Await ∩SPu,v (d(π ))







Lwait v +

Ltrans v

v  belongs to a: a∈Atrans ∩SPu,v (d(π ))

Ldrive e

e belongs to a: a∈Adrive ∩SPu,v (d(π ))



+

trans min{Lwait v  , Lv  }

v  belongs to a: a∈(Await ∪Atrans )∩SPu,v (d(π ))

trans Ldrive + min{Lwait e v  , Lv  }



( )

=

e belongs to a: a∈Adrive ∩SPu,v (d(π )) trans } − min{Lwait v , Lv (†)





L˜ e

trans − min{Lwait } v , Lv

e∈P(u,v)

= lenLB (P(u,v) ). Here, equality ( ) holds as drive activities alternate with wait or transfer activities in any path in the EAN and inequality (†) holds as P(u,v) is a shortest path according trans }. to the weights L˜ e which is set off by the fixed value min{Lwait 

v , Lv Note that we can replace (u, source) by any departure event at station u and (v, target) by any arrival event at station v as the activities from source nodes and to target nodes have duration zero. Additionally, we can use the modified upper bounds to determine an upper bound on the length of a shortest path for any feasible solution of (LinTimPass).

3.3 Reducing the Problem Size

77

Lemma 3.14. Let P(u,v) be a shortest path in PTN (V , E) according to edge lengths U˜ e , e ∈ E. Then the upper bound path length lenUB (P(u,v) ) overestimates the shortest travel time len(SPu,v (d(π )), d(π )) of OD pair (u, v) for every feasible solution of (LinTimPass). Proof. Let (L, π ) be a feasible solution of (LinTimPass) and N  = (E  , A ) the corresponding active extended EAN. We perform the proof only for v ∈ / V¯ as the ¯ case v ∈ V can be handled analogously. Due to Assumption 3.5, we know that each PTN edge is covered by at least one active activity. Therefore, we can construct a  path P(u,v) from (u, source) to (v, target) in N  using only activities belonging to edges and nodes in P(u,v) and transferring only at stations in V¯ . With the notation of Section 2.1, especially Definition 2.1 and Definition 2.2, we get the following.  , d(π )) len(SPu,v (d(π )), d(π )) ≤ len(P(u,v)  , U) ≤ len(P(u,v)  = Uedrive +

Uvwait 

v  belongs to a:  a∈Await ∩P(u,v)

e belongs to a:  a∈Adrive ∩P(u,v)



+



Uvtrans 

v

belongs to a:  a∈Atrans ∩P(u,v)



( )



v  ∈V \V¯ belongs to  a∈Await ∩P(u,v)

e belongs to a:  a∈Adrive ∩P(u,v)



+



=

e=(u ,v  ) belongs to a:  a∈Adrive ∩P(u,v)  ¯ v ∈V \V



+



Uvtrans + 

v  ∈V¯ belongs to a:  a∈Await ∩P(u,v) (†)



Uedrive +

=



e=(u ,v  )∈P(u,v) : v  ∈V \V¯



a:

Uvtrans 

v  ∈V¯ belongs to a:  a∈Atrans ∩P(u,v)

Uedrive + Uvwait 

Uedrive +Uvtrans 

e=(u ,v  ) belongs to a:  a∈Adrive ∩P(u,v) v  ∈V¯ (‡)

Uvwait 

Uedrive + Uvwait 



−Uvwait

78

3 Integrating Line Planning, Timetabling, and Passenger Routing

+



Uedrive + Uvtrans 

− Uvwait

e=(u ,v  )∈P(u,v) : v  ∈V¯

= lenUB (P(u,v) ) Here, inequality ( ) holds as maximal transfer times are assumed to be at least as long as maximal wait times, equality (†) holds as drive activities alternate with wait or transfer activities in any path in the EAN, and equality (‡) holds as the drive  activities of P(u,v) belong to the edges of P(u,v) . 

We can now use Lemma 3.13 and Lemma 3.14 to find activities that will not be part of a shortest path for a given OD pair and thus reduce the flow formulation in (LinTimPass). Theorem 3.15. Let N = (E, A) be an extended EAN for PTN (V , E) and line pool L0 . Let (u, v) ∈ OD be an OD pair and e = (u , v  ) ∈ E an edge such that lenUB (P(u,v) ) < lenLB (P(u,u ) ) + L˜ e + lenLB (P(v  ,v) ), where P(u,u ) and P(v  ,v) are shortest path from u to u and v  to v, respectively, w.r.t edge lengths L˜ and P(u,v) is a shortest path from u to v w.r.t edge lengths U˜ . Then for any feasible solution of (LinTimPass) no shortest path for OD pair (u, v) will use an activity belonging to e. Proof. Let (L, π ) be a feasible solution of (LinTimPass) with active extended EAN N  = (E  , A ) and let SPu,v (d(π )) be a shortest path from (u, source) to (v, target)   in N  . Let P(u,u  ) be a shortest path from (u, source) to any (u , arr, l) with l ∈ L      in N and P(v  ,v) a shortest path from any (v , dep, l ) with l ∈ L to (v, target) in  a shortest path from (u, source) to (v, target) in N  using an N  as well as P(u,v) activity belonging to e. ( )

len(SPu,v (d(π )), d(π )) ≤ lenUB (P(u,v) ) < lenLB (P(u,u ) ) + L˜ e + lenLB (P(v  ,v) ) (†)

 wait trans ≤ len(P(u,u }  ) , d(π )) + Le + min{Lv  , Lv   + len(P(v  ,v) , d(π ))

(‡)

 ≤ len(P(u,v) , d(π ))

Here, inequality ( ) holds due to Lemma 3.14, inequality (†) holds due to Lemma 3.13, and inequality (‡) holds as a drive activity as well as a wait or a transfer activity are needed for using an activity belonging to e. 

3.3 Reducing the Problem Size

79

With the idea of Theorem 3.15, we formulate the following Algorithm 3.1 to reduce the number of activities in the flow formulation of (LinTimPass). Algorithm 3.1 Preprocessing for integrated line planning, timetabling, and passenger routing 1: Input: PTN (V , E), extended EAN N = (E , A) containing all lines in the line pool L0 , V¯ set of stations which suffice for transferring, modified lower and upper bounds L˜ e , U˜ e for all PTN edges e ∈ E, source station u ∈ V , target station v ∈ V . 2: Output: list of activities A¯ that are not needed. 3: Initialize A¯ = ∅, E¯ = ∅. 4: Initialize E¯ = ∅. 5: Compute shortest path P(u,v) from u to v with edge length U˜ e . 6: for station i ∈ V do  7: Compute shortest path P(u,i) from u to i with edge length L˜ e .  from i to v with edge length L˜ e . 8: Compute shortest path P(i,v) 9: end for 10: for edge e = (i, j ) ∈ E do   11: if lenLB (P(u,i) ) + L˜ e + lenLB (P(j,v) ) > lenUB (P(u,v) ) then ¯ ¯ 12: E = E ∪ {e} 13: end if 14: end for 15: for activity a = ((v1 , dep, l), (v2 , arr, l)) ∈ Adrive do 16: if (v1 , v2 ) ∈ E¯ then 17: A¯ = A¯ ∪ {a} 18: E¯ = E¯ ∪ {(v1 , dep, l), (v2 , arr, l)} 19: end if 20: end for 21: for activity a = (i, j ) ∈ A \ Adrive do 22: if i ∈ E¯ ∨ j ∈ E¯ then 23: A¯ = A¯ ∪ {a} 24: end if 25: end for

Figure 3.5 shows how many activities can actually be disregarded depending on the length of the worst case shortest path in the PTN. Compared to the preprocessing method for integrated timetabling and passenger routing presented in Section 2.2.2, only relatively few OD pairs benefit from preprocessing when line planning is considered as well. This is due to the inferior worst case shortest path where the number of transfers is often overestimated leading to unrealistically long upper bounds. Nevertheless, for data set toy 18 of 46 OD pairs benefit from the preprocessing method and for data set grid-1 96 of 567 OD pairs. The influence of the preprocessing method on the runtime is discussed in Section 3.4.1.

80

3 Integrating Line Planning, Timetabling, and Passenger Routing 100

% unused activities

% unused activities

100 80 60 40 20 0

80 60 40 20 0

0

50

100

150

length worst case shortest path (a) All OD pairs of data set toy.

0

100

200

300

400

length worst case shortest path (b) All OD pairs of data set grid-1.

Fig. 3.5 Percentage of unused activities depending on the length of the worst case shortest path for data set toy and data set grid, see Section 1.4.2 and 1.4.3, respectively.

3.3.3 Routing on Fixed Paths To an even larger extent than for (TimPass), passenger routing makes up the majority of the constraints of (LinTimPass). For practical instances it therefore takes too long to route all passengers, hence we restrict ourselves to only routing a subset ODroute ⊂ OD of the OD pairs. We call the restricted problem (LinTimPass(OD,ODroute , ∅)). Here, we evaluate the travel time for all passengers in OD but include only the OD pairs in ODroute into the optimization. In contrast to (TimPass), the remaining passengers cannot easily be assigned to routes in the extended EAN, as routing is only feasible on active activities which are determined during the optimization process. To not omit these passengers completely, they are routed on fixed PTN paths and added to the objective function according to Algorithm 3.2, leading to an overestimation of their travel time. As in Section 2.2, the set of OD pairs that are assigned to fixed paths is called ODfix = OD \ ODroute . The modified problem of routing OD pairs in ODroute on shortest paths according to the timetable and OD pairs in ODfix on fixed paths is called (LinTimPass(OD,ODroute , ODfix )). Note that in the evaluation, a shortest route is computed for all passengers in OD. Theorem 3.16. Constructing the objective function of (LinTimPass(OD,ODroute , ODfix )) by adding terms pe · te , pv · tv and p(ein ,eout ) · t(ein ,eout ) according to Algorithm 3.2 to the objective function of (LinTimPass(OD,ODroute , ∅)) leads to an overestimation of the travel time for passengers in ODfix for any feasible solution (L, π ) of (LinTimPass(OD,ODroute , ODfix )), i.e., the travel time computed by (LinTimPass(OD,ODroute , ODfix )) is not lower than the rerouted travel time using only active activities. Proof. Let N  = (E  , A ) be the active extended EAN. Consider (u, v) ∈ ODfix and let P(u,v) be a shortest path in the PTN according to edge length L˜ e computed in Algorithm 3.2. Let P be a path from (u, source) to (v, target) in N  belonging

3.3 Reducing the Problem Size

81

Algorithm 3.2 Routing passengers on fixed routes 1: Input: PTN (V , E), EAN N 0 = (E 0 , A0 ) containing all lines in the pool L0 , V¯ set of stations which suffice for transferring, modified lower bound L˜ e for all PTN edges e ∈ E, (LinTimPass(OD,ODroute , ∅)) IP formulation for integrated line planning, timetabling and passenger routing problem for ODroute , set of passengers to be assigned to fixed paths ODfix = OD \ ODroute , M ≥ maxa∈A0 Ua . 2: Output: IP formulation (LinTimPass(OD,ODroute , ODfix )) including fixed passengers. 3: Initialize (LinTimPass(OD,ODroute , ODfix )) = (LinTimPass(OD,ODroute , ∅)). 4: for OD pair (u, v) ∈ ODfix do 5: Compute shortest path P(u,v) from u to v with edge length L˜ e . 6: end for 7: for PTN edge  e ∈ E do 8: pe = Cu,v (u,v)∈ODfix : e∈P(u,v)

9:

Add constraints πj − πi + za · T ≤ te + M · (1 − ya ),

a = (i, j ) ∈ Adrive : a belongs to e

te ∈ Z 10:

to (LinTimPass(OD,ODroute , ODfix )) and pe · te

11: to the objective function of (LinTimPass(OD,ODroute , ODfix )). 12: end for ¯ 13: for non-transfer station v¯ ∈ V \ V do 14: pv¯ = Cu,v (u,v)∈ODfix : v∈P ¯ (u,v)

15:

Add constraints πj − πi + za · T ≤ tv¯ + M · (1 − ya ),

a = (i, j ) ∈ Await : a belongs to v¯

tv¯ ∈ Z 16:

to (LinTimPass(OD,ODroute , ODfix )) and pv¯ · tv¯

17: to the objective function of (LinTimPass(OD,ODroute , ODfix )). 18: end for 19: for transfer station v¯ ∈ V¯ do 2 of incoming and outgoing edges at v¯ do 20: for pair (eein , eeout ) ∈ E 21: p(eein ,eeout ) = Cu,v (u,v)∈ODfix : (eein ,eeout )⊂P(u,v)

82 22:

3 Integrating Line Planning, Timetabling, and Passenger Routing Add constraints πj − πi + za · T ≤ t(eein ,eeout ) + M · (1 − ya ), a = (i, j ) ∈ Await ∪ Atrans : a belongs to (eein , eeout ) t(eein ,eeout ) ∈ Z

23:

to (LinTimPass(OD,ODroute , ODfix )) and p(eein ,eeout ) · t(eein ,eeout )

24: to the objective function of (LinTimPass(OD,ODroute , ODfix )). 25: end for 26: end for

to P(u,v) transferring only at stations in V¯ . Then for the rerouted travel time len(SPu,v (d(π )), d(π )) according to timetable π and using only active activities the following is satisfied. len(SPu,v (d(π )), d(π )) ≤ len(P , d(π ))  ≤

max

a  ∈Adrive : a∈P ∩Adrive : a  belongs to e a belongs to e∈E



+ a

+

a∈P ∩Await : belongs to v  ∈V \V¯



da  (π )

max

a  ∈Await : a  belongs to v 

da  (π )

max

da  (π )

max

da  (π )

a  ∈Await ∪Atrans : a  belongs to a belongs to  (e e in ,eeout ) at v (eein ,eeout ) at v  ∈V¯ a∈P ∩Await :

+

=



a  ∈Await ∪Atrans : a∈P ∩Atrans : a  belongs to a belongs to (e ,e ) at v  (eein ,eeout ) at v  ∈V¯ ein eout



max

e∈P(u,v)

a

a  ∈Adrive : belongs to e



+ v  ∈P

da  (π )

max

a  ∈Await : (u,v) ∩(V \V¯ ) a  belongs to v 

da  (π )

3.4 Computational Experiments

83



+

(eein ,eeout )⊂P(u,v) at v  ∈V¯

max

a  ∈Await ∪Atrans : a  belongs to (eein ,eeout ) at v 

da  (π )

As this is the contribution of every passenger of OD pair (u, v) to the objective of (LinTimPass(OD,ODroute , ODfix )), the travel time of all passengers in ODfix is overestimated. 

Corollary 3.17. Consider an instance of (LinTimPass) with fixed wait times. Let (u, v) ∈ ODfix be an OD pair such that for a solution (L, π ) of (LinTimPass(OD,ODroute , ODfix )) only one path in the active extended EAN exists. Then the travel time estimation of Algorithm 3.2 is correct for this OD pair. Proof. Due to Assumption 3.5, there always exists a path P in the active extended EAN and belonging to P(u,v) as computed in Algorithm 3.2. If this is the only path, it is especially the shortest. Additionally, the duration of the drive activities and wait or transfer activities at stations v  ∈ V¯ is estimated correctly as the maximum is determined over a set of one element as otherwise there would be more than one path for OD pair (u, v). As the duration of wait activities is fixed and thus estimated correctly for v  ∈ V \ V¯ , the total travel time estimation for OD pair (u, v) is correct. 

3.4 Computational Experiments To evaluate (LinTimPass) and the methods to reduce the problem size presented in Section 3.3, we consider data set toy as described in Section 1.4.2 and two variants of data set grid, described in Section 1.4.3. For toy we use the line pool presented in Figure 3.3 which consists of eight lines. For grid-1 we use a line pool consisting of 34 lines and frequency constraints which require frequencies larger than one. We therefore use a system frequency of three, as described in Section 3.2. For grid-2 we use a larger line pool consisting of 86 lines such that we can restrict ourselves to binary frequencies. Note that neither for data set toy nor for data set grid the duration of drive and wait activities is fixed. For a solution (L, π ) of (LinTimPass), we evaluate the line costs cost(L) and the average rerouted travel time for timetable π using only active activities. We compare the solutions found by (LinTimPass) to two different sequential solutions. Initialization direct is a passenger-oriented solution computed by using the direct travelers model of line planning, see Problem 1.13, and an IP formulation of PESP, see Problem 1.17, while initialization cost is a cost-oriented approach using the cost model of line planning, see Problem 1.12 and the same IP formulation of PESP as for initialization direct. Both the computation of the initial solutions and

84

3 Integrating Line Planning, Timetabling, and Passenger Routing

the evaluations of the integrated solutions are done within the software framework LinTim, see [SAP+ 18]. We use a computer with an Intel(R) Core(TM) i5-7300U CPU @ 2.6 GHz and 16 GB of RAM for the computations on data set toy and a compute server with an Intel(R) Xeon(R) X5675 CPU @ 3.07 GHz and 132 GB of RAM for the computations on data set grid. We use Gurobi 8, see [Gur18], with a time limit of eight hours for data set grid-2 and with a time limit of four hours for data set grid-1 and toy. For data set toy the time limit is never reached.

3.4.1 Influence of Preprocessing At first we consider the influence of the preprocessing by Algorithm 3.1 on the runtime. Figure 3.6 shows the runtime for instance toy when all 46 OD pairs are routed for a variety of weights (α, β) used in the weighted sum scalarization, where α represents the weight of the line costs and β represents the weight of the travel time. Note that according to Theorem 3.15, the travel time is not influenced by the preprocessing algorithm. As using the preprocessing algorithms improves the runtime for all but one of the weights and the runtime often decreases significantly, we use the preprocessing algorithm for the remaining experiments presented in this section.

500

no preprocessing preprocessing

solver time [s]

400

300

200

100

(1500,1)

(1000,1)

(800,1)

(600,1)

(400,1)

(200,1)

(100,1)

(1,1)

(0,1)

0

instances

Fig. 3.6 Comparison of solver times for data set toy when all 46 OD pairs are routed during the optimization process.

3.4 Computational Experiments

85

3.4.2 Influence of Adding Fixed Passenger Routes Next, we consider the influence of adding fixed passenger routes according to Algorithm 3.2 when only a subset of OD pairs is routed. Here, we always route the largest k OD pairs according to the number of passengers and call this set ODk . This means, we compare the rerouted travel time using only active activities of all passengers in OD for solutions of (LinTimPass(OD,ODk , ∅)) (no fixed pass. routes) and (LinTimPass(OD,ODk , OD \ ODk )) (fixed pass. routes). For data set toy, we get mixed results when routing 15 OD pairs for a variety of weights. Figure 3.7 shows that though in many cases adding fixed passenger routes leads to an improvement of the travel time, there also are cases where the travel time increases. The maximal improvement gained by adding fixed passenger routes is 18%, while the average improvement is only 1.2%, due to impairments of up to 15%. But for the larger instance grid-1 we see a larger benefit from adding fixed passenger routes when relatively few OD pairs are routed during the optimization. Figure 3.8 shows the improvements in travel time by adding fixed passenger routes for routing 0, 5, or 10 of 567 OD pairs which vary between 8.3% and 20% with an average improvement of 14.7%. We therefore conclude that adding fixed passenger routes is especially helpful for larger instances, when only few OD pairs can be routed during the optimization process.

14

12

11

10

9

(1500,1)

(600,1)

(400,1)

(200,1)

(100,1)

(1,1)

(0,1)

8

(1000,1)

no fixed pass. routes fixed pass. routes (800,1)

average travel time [min]

13

instances

Fig. 3.7 Influence of adding fixed passenger routes on travel times for data set toy when 15 OD pairs are routed during the optimization process. The instances are labeled by (α, β).

86

3 Integrating Line Planning, Timetabling, and Passenger Routing

average travel time [min]

24

23

22

21

20

19

10, (75,1)

5, (75,1)

0, (75,1)

10, (50,1)

5, (50,1)

0, (50,1)

10, (25,1)

5, (25,1)

0, (25,1)

10, (0,1)

5, (0,1)

0, (0,1)

18

instances no fixed pass. routes

fixed pass. routes

Fig. 3.8 Influence of adding fixed passenger routes on travel times for data set grid-1 when 0, 5, or 10 OD pairs are routed during the optimization process. The instances are labeled by |ODk |, (α, β).

3.4.3 Influence of the Number of Routed OD Pairs We also investigate the influence of the number of OD pairs routed during the optimization on the solution quality. Again, we route the largest k OD pairs during the optimization and evaluate the travel time for all OD pairs in OD, distinguishing between (LinTimPass(OD,ODk , ∅)) (no fixed passenger routes) and (LinTimPass(OD,ODk , OD \ ODk )) (fixed passenger routes). At first, we consider data set toy in Figure 3.9, as we here can compute the optimal solution for routing all OD pairs. We look at the two distinctly different cases with weights (0,1), i.e., only considering the travel time, and (400,1), i.e., (almost) only considering the costs. Note that we do not use weights (1,0) in order to still be able to use the preprocessing method. When considering only travel time, i.e., for weights (0,1), we see in Figure 3.9a that the travel time generally decreases when more OD pairs are routed. Additionally, the solution quality is better when fixed passenger routes are considered. However, for routing 10 OD pairs, the travel time increases drastically, even compared to not routing any passengers. This shows that a more sophisticated method to choose the OD pairs of ODroute might be helpful. Figure 3.9c shows that the line costs which are not part of the objective increase when routing more OD pairs. Note that for routing all 46 OD pairs, two solutions with the same objective value are shown and the influence of adding fixed passenger routes on the line costs is only coincidental.

87 average travel time [min]

average travel time [min]

3.4 Computational Experiments

22 20 18 16 14 12 10 8 6

0

5

10

15

20

30

40

46

22 20 18 16 14 12 10 8 6

0

5

10

k = |ODk | no fixed pass. routes fixed pass. routes

40

46

30

line concept costs

line concept costs

30

(b) Travel time for weights (400,1).

30 25 20 15 10 0

5

10

15

20

30

40

25 20 15 10

46

0

5

10

k = |ODk |

15

20

30

40

46

k = |ODk |

no fixed pass. routes fixed pass. routes

no fixed pass. routes fixed pass. routes

(c) Line costs for weights (0,1).

(d) Line costs for weights (400,1).

600

600

500

500

solver time [s]

solver time [s]

20

no fixed pass. routes fixed pass. routes

(a) Travel time for weights (0,1).

400 300 200 100 0

15

k = |ODk |

400 300 200 100

0

5

10

15

20

30

40

k

k = |OD | no fixed pass. routes fixed pass. routes (e) Solver time for weights (0,1).

46

0

0

5

10

15

20

30

40

46

k = |ODk | no fixed pass. routes fixed pass. routes (f) Solver time for weights (400,1).

Fig. 3.9 Influence of routing different sets of OD pairs for data set toy for two different weights for the scalarization.

88

3 Integrating Line Planning, Timetabling, and Passenger Routing

When considering mostly line costs, i.e., for weights (400,1), Figure 3.9d shows that the optimal cost value is attained no matter how many OD pairs are routed. This behavior is to be expected as the routing of passengers has no influence on the costs of the line concept. Nevertheless, Figure 3.9b shows that the small contribution of the travel time to the objective can be used to find a solution with the same low costs that is better for the passengers by integrating passenger routing. Figures 3.9e and 3.9f illustrate the influence of routing more passengers on the runtime of the solver which distinctly increases with an increasing number of routed OD pairs. For larger problems we therefore can only route relatively few OD pairs during the optimization process in order to retain reasonable runtimes. We also investigated the influence of the size of ODroute for the larger data set grid-2 as shown in Figure 3.10. In order to handle the much larger problem size, we combine both ideas for reducing the problem size. We use the preprocessing method of Algorithm 3.1 as suggested in Section 3.4.1 and solve the restricted problem (LinTimPass(OD,ODk , OD \ ODk )), i.e., we add non-routed OD pairs on fixed paths, as this improves travel times for larger instances in Section 3.4.2. For weights (25,1), the travel time decreases when routing more OD pairs while the line costs increase, similar to data set toy with weights (0,1). Especially, the solution found for routing 150 of 567 OD pairs slightly improves the travel time compared to initialization direct and it distinctly improves the line costs, i.e., it strictly dominates initialization direct and is hence clearly preferable.

3.4.4 Finding Solutions for Different Preferences

26

3000

line concept costs

average travel time [min]

In this section, we investigate the influence of the weights (α, β) on the solution quality of (LinTimPass). In Figure 3.11, we see optimal solutions for routing all 46 OD pairs for various weights. According to Theorem 1.40 these solutions are

24 22 20 18 16 14 12

0

25

75

150

k = |ODk | initialization cost initialization direct fixed pass. routes

(a) Travel time.

2500 2000 1500 1000 500 0

0

25

75

150

k = |ODk | initialization cost initialization direct fixed pass. routes

(b) Line costs.

Fig. 3.10 Influence of routing different sets of OD pairs for data set grid-2 for weights (25,1).

3.5 Summary

89

26 24

line concept costs

22 20 18 16 14 12 10 8

6.6

6.8

7.0

7.2

7.4

7.6

7.8

8.0

8.2

average travel time [min] lower bound line costs lower bound travel time initialization cost initialization direct

(1, 1) (100, 1) (200, 1) (400, 1)

Fig. 3.11 Comparison of different weights (α, β) for the scalarization of the objective for data set toy.

weakly Pareto optimal as the weights are positive. Increasing α, i.e., the weight of the costs in the objective leads to cheaper solutions with longer travel times. Focusing more on travel time, see weights (1,1), leads to a solution with minimal travel time according to the lower bound. This solution dominates the initialization direct solution as it has the same low travel time but significantly lower line costs. While we find a solution with the same costs and travel time as initialization costs, see weights (400,1), we do not find an equally cheap solution that dominates it. As the line concept costs for initialization cost are a lower bound on the costs, we cannot expect to find a cheaper solution.

3.5 Summary In this chapter, we consider the integrated line planning, timetabling, and passenger routing problem. While the integration of the three problems leads to finding a larger variety of solutions forming a Pareto front for minimizing line costs and travel time, the problem size increases significantly. We hence adapt and expand the reduction approaches from Chapter 2, resulting in two heuristics and an exact preprocessing method for reducing the problem size. This allows us to consider the integrated problem for medium-sized instances and to find a solution that strictly dominates a sequential solution.

Chapter 4

Integrating Timetabling and Vehicle Scheduling

In this chapter, we consider the integration of timetabling and vehicle scheduling (Figure 4.1). In contrast to the previous chapters, passenger routes are regarded as fixed to reduce the computational challenge. We present an integrated model as well as the corresponding computational evaluation. Parts of this chapter are also discussed in [SSR20].

4.1 Modeling the Integrated Problem When integrating timetabling and vehicle scheduling, we are facing a new problem compared to integrating line planning and timetabling, namely different planning periods. While the timetable is periodic and scheduled for a planning period with length T , the planning period for vehicle scheduling is comparatively longer and two repetitions of vehicle schedules are usually separated by some time during which no operations are conducted. We therefore consider vehicle scheduling to be an aperiodic problem. In order to better understand the integration of a periodic and an aperiodic problem, we are neglecting the routing of passengers for this chapter and make the following assumptions. Assumption 4.1. When considering integrated timetabling and vehicle scheduling, we suppose that the following assumptions are satisfied. 1. The number of vehicles is not limited. 2. We consider a fixed set of period repetitions P = {1, . . . , pmax }. Note that for easier notation, we assume that all lines are operated with frequency one. Higher frequencies can easily be handled by treating two repetitions of the same line as two different lines and adding the appropriate synchronization activities to the event-activity network. © Springer Nature Switzerland AG 2020 P. Schiewe, Integrated Optimization in Public Transport Planning, Springer Optimization and Its Applications 160, https://doi.org/10.1007/978-3-030-46270-3_4

91

92

4 Integrating Timetabling and Vehicle Scheduling

Line Planning

Passenger Routing

Timetabling

Vehicle Scheduling

Fig. 4.1 Integrated timetabling and vehicle scheduling.

Problem 4.2 (Integrated timetabling and vehicle scheduling problem (TimVeh)). Let N 0 = (E 0 , A0 ) be an event-activity network for a line concept L with bounds La , Ua , a ∈ A0 , and passenger weights w = (wa )a∈A0 . Let T be the length of the planning period for timetabling and P = {1, . . . , pmax } the set of period repetitions for vehicle scheduling. Let Ll1 ,l2 , Ldep,l , Ll,dep , l, l1 , l2 ∈ L, be the minimal durations of the potential empty trips and Dl1 ,l2 , Ddep,l , Dl,dep , l, l1 , l2 ∈ L, the lengths of the potential empty trips. Find a periodic timetable and a vehicle schedule such that the travel time for passenger weights w and the operational costs are minimized. We handle the bi-criteria problem (TimVeh) by minimizing a weighted sum of β times the travel time and γ times the operational costs, where γ = (γ1 , . . . , γ5 )t represents the cost parameter set as in Definition 1.35. By varying the weights (β, γ ) we can compute different solutions for (TimVeh), favoring either low travel times by increasing β or low operational costs by increasing γ . For β = 0 we get a lower bound on the operational costs while for γ = 0 we get a lower bound on the travel time on fixed paths. The same lower bound on the travel time can be computed by solving only the timetabling problem as for an unlimited number of vehicles there always exists a feasible vehicle schedule by simply covering each trip with a new vehicle. Remark 4.3. Note that the distance based costs of the trips, i.e., γ2 · lengtht

t ∈ r, r ∈ V,

that are part of the operational costs are fixed for a fixed line plan and can therefore be omitted from the objective. In order to determine feasible vehicle routes, we need to find compatible trips. But as the timetable is still to be determined, we are facing two problems. First, the (periodic) times of the first and the last event of line l, i.e., of first(l) and last(l), are not known. Additionally, the duration of line l and therefore the duration of its corresponding trips is not fixed. The following example shows that it does not suffice to define compatibility based on the periodic times of the events but that we need to consider the actual duration of the trips instead. Example 4.4. Consider two lines l1 , l2 with Ll1 ,l2 = Ll2 ,l1 = 5. Let the trip length of l1 which is determined by the bound of the activities belonging to l1 be in

4.1 Modeling the Integrated Problem Fig. 4.2 A possible timetable for Example 4.4.

93

l1

πfirst(l1 ) = 0

πlast(l1 ) = 0

[60,120]

Ll2 ,l1 = 5 l2

Ll1 ,l2 = 5 πlast(l2 ) = 55

[50,50]

πfirst(l2 ) = 5

[60, 120] and the trip length of l2 be fixed to 50 with a planning period of length 60. A possible timetable is given in Figure 4.2. Depending on the actual duration of line l1 which might be 60 or 120, we need to implement two different vehicle schedules. If the duration is 60, we can find a vehicle schedule with two vehicles. Vehicle V1 operates trips (1, l1 ), (2, l2 ), (3, l1 ) etc., and Vehicle V2 operates trips (1, l2 ), (2, l1 ), (2, l2 ) etc. But if the duration is 120, the vehicle operating (1, l1 ) cannot operate (2, l2 ) and we need a third vehicle to cover all trips although the periodic difference between last(l1 ) and first(l2 ) is large enough to accommodate a connecting trip. To find an IP formulation for (TimVeh), we use variables πi ∈ {0, . . . , T − 1} for the periodic time of event i ∈ E 0 and modulo parameters za ∈ Z for activities a ∈ A0 . To model the vehicle flow we use binary variables x(p1 ,l1 ),(p2 ,l2 ) for all period repetitions p1 , p2 ∈ P and lines l1 , l2 ∈ L which determine whether trip (p2 , l2 ) is operated directly after trip (p1 , l1 ) in one vehicle route. Similarly, we use binary variables xdep,(p,l) for p ∈ P, l ∈ L, to determine if trip (p, l) is the first trip in a vehicle route and x(p,l),dep , p ∈ P, l ∈ L, to determine if (p, l) is the last trip in a vehicle route. The duration of line l, i.e., the time it takes in the timetable to get from first(l) to last(l), is modeled by dl ∈ N, l ∈ L. sp,l ∈ N, p ∈ P, l ∈ L, models the start time of trip (p, l) and ep,l ∈ N, p ∈ P, l ∈ L, the corresponding end time. To linearize the duration of vehicle routes, we use integer variables y(p1 ,l1 ),(p2 ,l2 ) , p1 , p2 ∈ P, l1 , l2 ∈ L, which represent the time between ep1 ,l1 and sp2 ,l2 if both are operated by the same vehicle consecutively and zero otherwise. With these variables, we get the following IP formulation for (TimVeh). (TimVeh) min

β·



wa · (πj − πi + za · T )

(4.1)

a=(i,j )∈A0

+ γ1 ·



(4.2)

dl

l∈L

+ γ3 ·

   

y(p1 ,l1 ),(p2 ,l2 )

p1 ∈P l1 ∈L p2 ∈P l2 ∈L

+ xdep,(p1 ,l1 ) · Ldep,l1 + x(p1 ,l1 ),dep · Ll1 ,dep



(4.3)

94

4 Integrating Timetabling and Vehicle Scheduling

+ γ4 ·

     x(p1 ,l1 ),(p2 ,l2 ) · Dl1 ,l2 p1 ∈P l1 ∈L p2 ∈P l2 ∈L

+ xdep,(p1 ,l1 ) · Ddep,l1 + x(p1 ,l1 ),dep · Dl1 ,dep  xdep,(p,l) + γ5 ·



(4.4) (4.5)

p∈P l∈L

s.t. πj − πi + za · T ≤ Ua πj − πi + za · T ≥ La dl =



a = (i, j ) ∈ A0

(4.6)

a = (i, j ) ∈ A

(4.7)

0

(πj − πi + za · T ) l ∈ L

(4.8)

a=(i,j )∈A0 (l,l)

sp,l = p · T + πfirst(l)

p ∈ P, l ∈ L

(4.9)

ep,l = p · T + πfirst(l) + dl

p ∈ P, l ∈ L

(4.10)

p1 , p2 ∈ P , l1 , l2 ∈ L

(4.11)

p2 ∈ P , l2 ∈ L

(4.12)

p1 ∈ P , l1 ∈ L

(4.13)

p1 , p2 ∈ P , l1 , l2 ∈ L

(4.14)

p1 , p2 ∈ P , l1 , l2 ∈ L

(4.15)

sp2 ,l2 − ep1 ,l1 ≥ x(p1 ,l1 ),(p2 ,l2 ) · Ll1 ,l2 − M · (1 − x(p1 ,l1 ),(p2 ,l2 ) )   x(p1 ,l1 ),(p2 ,l2 ) 1= p1 ∈P l1 ∈L

+ xdep,(p2 ,l2 )   1= x(p1 ,l1 ),(p2 ,l2 ) p2 ∈P l2 ∈L

+ x(p1 ,l1 ),dep y(p1 ,l1 )(p2 ,l2 ) ≥ 0 y(p1 ,l1 )(p2 ,l2 ) ≥ sp2 ,l2 − ep1 ,l1 − M  · (1 − x(p1 ,l1 ),(p2 ,l2 ) )

πi ∈ {0, . . . , T − 1}

i ∈ E0

za ∈ Z

a ∈ A0

dl ∈ N

l∈L

sp,l , ep,l ∈ N x(p1 ,l1 ),(p2 ,l2 ) ∈ {0, 1} xdep,(p,l) , x(p,l),dep ∈ {0, 1} y(p1 ,l1 ),(p2 ,l2 ) ∈ Z

p ∈ P, l ∈ L p1 , p2 ∈ P, l1 , l2 ∈ L p ∈ P, l ∈ L p1 , p2 ∈ P, l1 , l2 ∈ L

4.1 Modeling the Integrated Problem

95

The objective consists of the travel time on fixed path (4.1), the duration of the trips (4.2), the duration of the empty trips (4.3), the length of the empty trips (4.4), and the number of vehicles (4.5). Constraints (4.6) and (4.7) are the standard timetabling constraints while equation (4.8) determines the time it takes to operate line l. Equations (4.9) and (4.10) determine the actual start and end times of trip (p, l), respectively. Note that to determine ep,l it is not sufficient to use the time of last(l) in period repetition p as the duration of operating line l can be longer than the planning period T as demonstrated in Example 4.4. Constraint (4.11) makes sure that if trip (p2 , l2 ) is done directly after trip (p1 , l1 ) by the same vehicle the time between the respective end and start of these trips is long enough to let the vehicle get from the station of last(l1 ) to the station of first(l2 ). Here, M has to be sufficiently large, e.g., M ≥ pmax · T + max Ua · max |{e ∈ l}| a∈A0

l∈L

is large enough. Equations (4.12) and (4.13) are flow constraints modeling the vehicle routes. Constraints (4.14) and (4.15) are a linearization of the duration of the connecting trips. Again, M  has to be sufficiently large, e.g., M  ≥ pmax · T + max Ua · max |{e ∈ l}|. a∈A0

l∈L

Remark 4.5. Note that we can restrict the number of vehicles to N by adding the constraint  xdep,(p,l) ≤ N p∈P l∈L

to (TimVeh). Note that the integrated model for timetabling and vehicle scheduling presented here differs from the models in the literature, see Section 1.2.4. Either aperiodic timetabling and aperiodic vehicle scheduling is integrated as in [IRRS11, CM12, YHWL17], or periodic timetabling is combined with periodic vehicle scheduling where connecting trips may not contain relocations between different stations as in [Lie08b, DRB+ 17]. (TimVeh), on the other hand, handles periodic timetables combined with the more general case of aperiodic vehicle schedules. Additionally, relocation trips between trips and to and from the depot are modeled and addressed in the objective function, leading to a more accurate representation of the operational costs.

96

4 Integrating Timetabling and Vehicle Scheduling

4.2 Computational Experiments In this section, we apply (TimVeh) to three data sets, toy, grid, and long-distance. To this end, we compare the operational costs and the travel time of solutions of (TimVeh) for different weights (β, γ ) to an initial solution. The initial solution is computed sequentially using the cost model of line planning, see Problem 1.12, a PESP version of the periodic timetabling problem, see Problem 1.17, and an IP formulation for cost-minimal vehicle scheduling, see Problem 1.36, from the software framework LinTim, see [SAP+ 18]. We use the line concept and the resulting EAN as input for (TimVeh) and compute a timetable with corresponding vehicle schedule. As routing is not part of (TimVeh), we evaluate the resulting timetables using the lower bound routing RLB to which the passenger weights correspond. Additionally, we compute the shortest path routing RSP for the timetable determined by (TimVeh), as this evaluation is more realistic from a passengers’ point of view. See Definition 1.19 for more details on lower bound and shortest path routing. For both the sequential and the integrated solution approach, the length of the planning period is 60 minutes and the vehicle schedule is considered for eight periods with fixed cost parameters γ . In the evaluations, both travel time and operational costs are given as averages, per passenger and planning period, respectively. The experiments are conducted on a computer with an Intel(R) Core(TM) i57300U CPU @ 2.6 GHz and 16 GB of RAM for data sets toy and grid and on a compute server with an Intel(R) Xeon(R) E7330 CPU @ 2.4 GHz and 132 GB of RAM for data set long-distance using Gurobi 8, see [Gur18], with a time limit of eight hours. For data set toy, the optimal solution of (TimVeh) can be computed in under one minute and thus a lower bound on the operational costs as well as on the travel time for fixed lower bound routing can be computed. In Figure 4.3, we see that we find solutions with minimal operational costs and solutions with minimal travel time. For β = 0.7 we get a solution with medium costs and medium travel time, representing a different trade-off. For β = 100 we get a solution which dominates the initial solution as it improves the operational costs without impairing the travel time. Comparing the travel time on fixed path according to lower bound routing and the travel time on shortest paths according to the timetable shows the large influence of the route choice on the solution quality. This again motivates the integration of passenger routing as done in Chapters 2, 3, and 5. For data set grid, the computation time of eight hours is not long enough to find optimal solutions to (TimVeh). Here, the optimality gaps range from 7.9% to 45.8%. Nevertheless, Figure 4.4 shows that we still find solutions for a variety of preferences, although the travel time on fixed path of the initial solution cannot be reached. Especially, the solution for β = 100 yields a 2.6% better rerouted travel time than the initial solution which is the more important metric for the passengers. The solution for β = 1 is very interesting as compared to the initial solution the rerouted travel time is increased by only 1% while the operational costs

4.3 Summary

97

average operational costs

700

650

600

550

500

450 8.0

8.5

9.0

9.5

10.0

average travel time [min] initialization β =0.001

β =0.7 β =100

LB op. costs LB RLB (π)

RLB (π) RSP (π)

Fig. 4.3 Operational costs and travel time for various weights for data set toy.

are decreased by 6.8%. A very cost-efficient solution can be found for β = 0, decreasing the operational costs by 34% while increasing the rerouted travel time by 27.2% compared to the initial solution. Also for the close-to real-world data set long-distance, the computation time of eight hours is not long enough to find optimal solutions to (TimVeh) with optimality gaps ranging from 6.7% to 30.2%. By varying β we get three distinct solutions, representing three different trade-offs between travel time and operational costs as depicted in Figure 4.5. For β = 0 we get a cost-efficient solution while for β = 100 we get a solution with low travel times. The solution for β = 0.001 represents a compromise between cost-efficiency and passenger satisfaction.

4.3 Summary In this chapter, we present an integrated formulation for periodic timetabling and aperiodic vehicle scheduling. We emphasize the importance of computing the actual travel time of vehicles instead of simply adding constraints to the eventactivity network. The experimental evaluation shows that due to the integration of timetabling and vehicle scheduling, new trade-offs between passenger travel time and operational costs can be found.

98

4 Integrating Timetabling and Vehicle Scheduling 1300

average operational costs

1200

1100

1000

900

800

700

18

20

22

24

26

28

30

32

average travel time [min] initialization β =0

β =1 β =100

RLB (π) RSP (π)

Fig. 4.4 Operational costs and travel time for various weights for data set grid.

average operational costs

14600

14400

14200

14000

13800

13600 175

180

185

190

195

average travel time [min] β =0 β =0.001 β =100

RLB (π) RSP (π)

Fig. 4.5 Operational costs and travel time for various weights for data set long-distance.

Chapter 5

Integrating Line Planning, Timetabling, Passenger Routing and Vehicle Scheduling

In this chapter, we integrate line planning, timetabling, passenger routing and vehicle scheduling (Figure 5.1), using the results of Chapters 2, 3 and 4. We present an optimization model as well as some computational results and analyze its structure in regard to computational performance.

5.1 Modeling the Integrated Problem In this section we present an optimization model for the integrated line planning, timetabling, passenger routing, and vehicle scheduling problem. As in Chapter 4, we suppose that Assumption 4.1 is satisfied and present the integrated model with binary line frequencies as in Section 3.1. Problem 5.1 (Integrated line planning, timetabling, passenger routing, and vehicle scheduling problem (LinTimPassVeh)). Let a PTN (V , E) with wait travel time bounds Ldrive , Uedrive , e ∈ E, Lwait e v , Uv , v ∈ V , and trans trans Lv , Uv , v ∈ V , as well as frequency bounds femin , femax , e ∈ E, and OD matrix OD be given. Let N 0 = (E 0 , A0 ) be the corresponding EAN for line pool L0 with duration bounds as in Definition 1.22. Let T be the length of the planning period for line planning and timetabling and P = {1, . . . , pmax } the set of period repetitions to be covered by vehicle routes. Let Ll1 ,l2 , Ldep,l , Ll,dep , l, l1 , l2 ∈ L0 , be the minimal durations of the potential empty trips and Dl1 ,l2 , Ddep,l , Dl,dep , l, l1 , l2 ∈ L0 , the lengths of the potential empty trips. (continued)

© Springer Nature Switzerland AG 2020 P. Schiewe, Integrated Optimization in Public Transport Planning, Springer Optimization and Its Applications 160, https://doi.org/10.1007/978-3-030-46270-3_5

99

100

5 Integrating Line Planning, Timetabling, Passenger Routing and Vehicle. . .

Line Planning

Passenger Routing

Timetabling

Vehicle Scheduling

Fig. 5.1 Integrated line planning, timetabling, passenger routing, and vehicle scheduling.

Problem 5.1 (continued). Find a public transport plan, i.e., a feasible line plan L according to the frequency bounds, a feasible timetable π according to L, and a feasible vehicle schedule V covering trips for all active lines and period repetitions in P such that the rerouted travel time using only active activities and the operational costs are minimized. We handle the bi-criteria problem (LinTimPassVeh) by minimizing a weighted sum of β times the travel times and γ times the operational costs, where γ = (γ1 , . . . , γ5 )t according to Definition 1.35. Analogously to Section 4.1, we get different solutions by varying the weights (β, γ ), favoring either low travel times by increasing β or low operational costs by increasing γ . By setting β = 0 we find a lower bound on the operational costs and by setting γ = 0 we find a lower bound on the travel time. The extensions discussed in Section 3.2 can also be applied to (LinTimPassVeh) to extend the model to multiple frequencies and add time slices to diversify the start times of passengers.

5.1.1 Structure Before presenting an IP formulation for (LinTimPassVeh) which is a combination of the IP formulations of (LinTimPass) and (TimVeh), we consider its structure as depicted in Figure 5.2. From (LinTimPass), we get the feasibility problem of line planning, a flow formulation for the passenger routes, and the PESP constraints for timetabling as well as the corresponding coupling constraints already discussed in Section 3.1. From (TimVeh), we get an additional flow formulation for the vehicle routes as well as constraints coupling timetabling and vehicle scheduling. For (LinTimPassVeh), we get additional coupling constraints, linking line planning and vehicle scheduling, as vehicle routes are only needed for active lines. We have a closer look at this structure in Section 5.2 where we compare it to other decompositions of the same matrix.

5.1 Modeling the Integrated Problem

101

objective: minimize β· rerouted travel time + γ· operational costs line planning L feasibility prob. coupling constraints

LP

pass. routing P flow problem coupling constraints

PT

timetabling PESP

T

coupling constraints veh. sched. flow problem coupling constraints

TV V

LT, LV, LTV

Fig. 5.2 Structure of the integrated line planning, timetabling, passenger routing, and vehicle scheduling problem.

5.1.2 An IP Formulation For the IP model of (LinTimPassVeh) we use the same variables as in Chapters 2, 3, and 4 for the extended EAN N = (E, A) derived from the line pool L0 and PTN (V , E). Line frequencies are modeled by binary variables fl , l ∈ L0 . Auxiliary variables ya ∈ {0, 1}, a ∈ A0 , determine whether activities a are active. The periodic times of events i ∈ E 0 are modeled by πi ∈ {0, . . . , T − 1} with modulo parameters za ∈ Z for activities a ∈ A0 . The passenger flow is modeled by binary variables pau,v , a ∈ A, (u, v) ∈ OD, while the vehicle flow is modeled by binary variables x(p1 ,l1 ),(p2 ,l2 ) , p1 , p2 ∈ P, l1 , l2 ∈ L0 which determine whether trip (p2 , l2 ) is operated directly after trip (p1 , l1 ) by the same vehicle. Binary variables xdepot,(p,l) and x(p,l),depot , p ∈ P, l ∈ L0 , determine whether trip (p, l) is the first or last trip in a vehicle route, respectively. We use auxiliary variables dl ∈ N, l ∈ L0 , to determine the duration of line l and sp,l , ep,l , p ∈ P, l ∈ L0 , to determine the aperiodic start and end time of trip (p, l). (LinTimPassVeh) min

β·



Cu,v ·



pau,v · (πj − πi + za · T )

(5.1)

a=(i,j )∈A0

(u,v)∈OD

+ γ1 ·



fl · dl

(5.2)

fl · lengthl

(5.3)

l∈L0

+ γ2 ·



l∈L0

102

5 Integrating Line Planning, Timetabling, Passenger Routing and Vehicle. . .

+ γ3 ·

     p1 ∈P l1 ∈L0

 s(p2 ,l2 ) − e(p1 ,l1 ) · x(p1 ,l2 ),(p2 ,l2 )

p2 ∈P l2 ∈L0

+ xdepot,(p1 ,l1 ) · Ldepot,l1 + x(p1 ,l1 ),depot · Ll1 ,depot       + γ4 · x(p1 ,l1 ),(p2 ,l2 ) · Dl1 ,l2 p1 ∈P l1 ∈L0

p2 ∈P l2 ∈L0

+ xdep,(p1 ,l1 ) · Ddep,l1 + x(p1 ,l1 ),dep · Dl1 ,dep  xdepot,(p,l) + γ5 ·

(5.4)

(5.5) (5.6)

p∈P l∈L0

s.t.



fl ≥ femin

e∈E

(L1)

fl ≤ femax

e∈E

(L2)

πj − πi + za · T ≥ ya · La

a = (i, j ) ∈ A0

(T1)

πj − πi + za · T ≤ Ua + M · (1 − ya )

a = (i, j ) ∈ A0

(T2)

l∈L0 : e∈l

 l∈L0 : e∈l

a ∈ A0 (l1 , l2 )

ya = fl1 · fl2 A · (pau,v )a∈A = bu,v

(u, v) ∈ OD

fl ≥ pau,v

(LT1) (P1)

(u, v)∈OD, a∈A(l) (LP1)

dl =



(πj − πi + za · T ) l ∈ L0

(TV1)

a=(i,j )∈A0 (l,l)

sp,l = p · T + πfirst(l)

p ∈ P, l ∈ L0

(TV2)

ep,l = p · T + πfirst(l) + dl

p ∈ P, l ∈ L0

(TV3)

sp2 ,l2 − ep1 ,l1 ≥ x(p1 ,l1 ),(p2 ,l2 ) · Ll1 ,l2 − M  · (1 − x(p1 ,l1 ),(p2 ,l2 ) )

p1 , p2 ∈P, l1 , l2 ∈L0 (V1)

fl 2 =

  p1 ∈P l1 ∈L0

x(p1 ,l1 ),(p2 ,l2 )

+ xdepot,(p2 ,l2 )

p2 ∈P, l2 ∈L0

(LV1)

5.1 Modeling the Integrated Problem

fl 1 =

103

  p2 ∈P l2 ∈L0

x(p1 ,l1 ),(p2 ,l2 ) p1 ∈ P, l1 ∈ L0

(LV2)

x(p,l),• ≤ fl

p ∈ P, l ∈ L0

(LV3)

x•,(p,l) ≤ fl

p ∈ P, l ∈ L0

(LV4)

+ x(p1 ,l1 ),depot

πi ∈ {0, . . . , T − 1}

i ∈ E0

za ∈ Z

a ∈ A0

ya ∈ {0, 1}

a ∈ A0

fl ∈ {0, 1}

l ∈ L0

pau,v ∈ {0, 1}

(u, v) ∈ OD, a ∈ A l ∈ L0

dl ∈ N

p ∈ P, l ∈ L0

sp,l , ep,l ∈ N

p1 , p2 ∈P, l1 , l2 ∈L0

x(p1 ,l1 ),(p2 ,l2 ) ∈ {0, 1}

p ∈ P, l ∈ L0

xdepot,(p,l) , x(p,l),depot ∈ {0, 1}

The objective function consists of the travel time on shortest paths with respect to the timetable (5.1) and the operational costs (5.2) to (5.6), see also Section 4.1 and Definition 1.35. We can linearize the travel time (5.1) by substituting pau,v · (πj − πi + za · T ) = dau,v with auxiliary integer variables dau,v , a = (i, j ) ∈ A0 , (u, v) ∈ OD, and dau,v ≥ 0,

a = (i, j ) ∈ A0 , (u, v) ∈ OD (PT1)

dau,v ≥ πj − πi + za · T − (1 − pau,v ) · M  , a = (i, j ) ∈ A0 , (u, v) ∈ OD (PT2) where M  is sufficiently large, e.g., M  ≥ maxa∈A0 Ua . Additionally, the duration of lines and the duration of the connecting trips can be linearized by substituting fl · dl = tl with auxiliary integer variables tl , l ∈ L0 , and tl ≥ 0,

l ∈ L0

(LTV1)

104

5 Integrating Line Planning, Timetabling, Passenger Routing and Vehicle. . .

tl ≥ dl − (1 − fl ) · M  ,

l ∈ L0

(LTV2)

and   sp2 ,l2 − ep1 ,l1 · x(p1 ,l2 ),(p2 ,l2 ) = y(p1 ,l1 )(p2 ,l2 ) with auxiliary integer variables y(p1 ,l1 )(p2 ,l2 ) , p1 , p2 ∈ P, l1 , l2 ∈ L0 , and y(p1 ,l1 )(p2 ,l2 ) ≥ 0,

p1 , p2 ∈ P, l1 , l2 ∈ L0 (TV4)

y(p1 ,l1 )(p2 ,l2 ) ≥ sp2 ,l2 − ep1 ,l1 − M  · (1 − x(p1 ,l1 ),(p2 ,l2 ) ),

p1 , p2 ∈ P, l1 , l2 ∈ L0 (TV5)

where M  in constraints (LTV2) and (TV5) is the same constant as in constraint (V1). The constraints are labeled according to their function: L are line planning constraints, P passenger routing constraints, T timetabling constraints, and V vehicle scheduling constraints and combinations represent coupling constraints. Thus LP are coupling constraints between line planning and passenger routing, TV between timetabling and vehicle scheduling, LTV between line planning, timetabling and vehicle scheduling and so on. Constraints (L1) and (L2) are the lower and upper frequency constraints from line planning, see Definition 1.9. While the upper bounds are often needed, e.g., due to safety concern, the lower bounds might be dropped when all passengers are routed during the optimization. Constraints (T1) and (T2) are the timetabling constraints for the extended eventactivity network. Here, M ≥ T is sufficiently large to ensure together with constraint (LT1) that the time spans are in the prescribed interval for all active activities and otherwise impose no restrictions on π . Constraint (LT1) can be linearized by ya ≤ fl1 ,

a ∈ A0 (l1 , l2 )

ya ≤ fl2 ,

a ∈ A0 (l1 , l2 )

ya + 1 ≥ fl1 + fl2 , a ∈ A0 (l1 , l2 ). The passenger flow is modeled by constraint (P1) with node-arc-incidence matrix A and demand vector bu,v for OD pair (u, v) ∈ OD. A ∈ {0, 1, −1}|E |×|A|

5.1 Modeling the Integrated Problem

ai,a 

⎧ ⎪ ⎪ ⎨1, = −1, ⎪ ⎪ ⎩0,

105

if a  = (i, j ) ∈ A if a  = (j, i) ∈ A otherwise

bu,v ∈ {0, 1, −1}|E | ⎧ ⎪ if i = (u, source) ⎪ ⎨1, u,v bi = −1, if i = (v, target) ⎪ ⎪ ⎩0, otherwise Equation (TV1) determines the time it takes to operate line l ∈ L0 while equations (TV2) and (TV3) determine the aperiodic start and end times of trip (p, l), p ∈ P, l ∈ L0 , respectively. As noted in Section 4.1, it is not sufficient to determine e(p,l) by adding p · T to the time of last(l). Constraint (V1) makes sure that if trip (p2 , l2 ) is operated by the same vehicle as and directly after trip (p1 , l1 ), the time between the respective end and start of these trips is long enough to let the vehicle get from the station of last(l1 ) to the station of first(l2 ). Here, M  ≥ pmax · T + max Ua · max |{e ∈ l}| a∈A0

l∈L0

is sufficiently large for the linearization. Equations (LV1) and (LV2) are flow constraints modeling the vehicle routes for all active lines while constraints (LV3) and (LV4) make sure that only active lines are covered by vehicles. Note that adding vehicle scheduling does not change the fact that passengers travel on shortest paths for the corresponding timetable if travel time is considered in the objective function, i.e., if β > 0. Thus, both the preprocessing algorithms and the algorithms for routing only some OD pairs and adding the rest on fixed routes, see Section 3.3, can be applied to (LinTimPassVeh).

5.1.3 Computational Experiments As a proof of concept, we applied (LinTimPassVeh) to data set small which is described in Section 1.4.1 and data set toy which is described in Section 1.4.3. We use Gurobi 8, [Gur18], on a compute server with an Intel(R) Xeon(R) X5675 CPU @ 3.07 GHz and 132 GB of RAM with a time limit of 8 hours to solve (LinTimPassVeh). While the problem can be solved to optimality for data set small in under a minute, the time limit does not suffice for data set toy. Here, the optimality gap ranges from 0.06% to 53.4%. For both data sets, we route all OD pairs during the optimization and use the preprocessing method described in Section 3.3 to reduce the runtime. The period length is 60 minutes and we consider

106

5 Integrating Line Planning, Timetabling, Passenger Routing and Vehicle. . . 550

operational costs

500

450

400

350

300

250

200

22

24

26

28

30

32

34

36

average travel time [min] initialization cost initialization direct lower bound operational costs lower bound travel time

β =0.01 β =0.1 β =1

Fig. 5.3 Solutions of (LinTimPassVeh) for different weights β for data set small.

8 period repetitions for vehicle scheduling. For both data sets the duration of drive and wait activities is not fixed but variable in intervals. We compare the resulting public transport plans in regard to the travel time on shortest paths for the corresponding timetable as well as in regard to the operational costs for fixed cost parameters. We compute a variety of public transport plans by varying the weight β of the travel time and compare them to two sequential solutions, initialization cost and initialization direct. These are constructed by using the software framework LinTim, [SAP+ 18], to compute a line plan, a corresponding timetable and a corresponding vehicle schedule sequentially. For initialization cost the cost model of line planning is used, see Problem 1.12, while for initialization direct the direct travelers model is used, see Problem 1.13. The timetable is computed by a standard IP formulation of PESP, see Problem 1.17, with fixed passenger weights according to the lower bound routing, see Definition 1.19. The vehicle schedule described in Problem 1.36 is computed using an IP formulation. As we can solve (LinTimPassVeh) to optimality for data set small, we can compute lower bounds on the travel time and the operational costs. They are shown together with various solutions in Figure 5.3. For β = 0.01 we find a public transport plan that is optimal with respect to the operational costs while for β = 0.1 and β = 1 we find a public transport plan that is optimal with respect to the travel time. Additionally, the public transport plan found for β = 0.1 and β = 1 strictly dominates the initialization cost solution and dominates the initialization direct

5.2 Analysis of the Structure

107

1600

operational costs

1400

1200

1000

800

600

400 6.5

7.0

7.5

8.0

8.5

9.0

average travel time [min] initialization cost initialization direct

β =0.01 β =0.05

β =0.5 β =0.7

Fig. 5.4 Solutions of (LinTimPassVeh) for different weights β for data set toy.

solution with significantly lower operational costs and with the same travel time. The operational costs are only 6.8% higher than the optimal operational costs for any feasible public transport plan making this a very attractive solution. We revisit (LinTimPassVeh) for data set small again in the next section, Section 5.2.2, where we analyze the structure of the matrix of the corresponding IP formulation and its effect on the computational performance of the problem. For data set toy, the time limit of 8 hours does not suffice to solve (LinTimPassVeh) to optimality when routing all 46 OD pairs and the optimality gaps are as high as 53.4%. This shows how much the difficulty increases compared to (LinTimPass) or (TimVeh), where the same data set could be solved to optimality within minutes. Nevertheless, Figure 5.4 shows that we find a variety of solutions for different sets of preferences concerning the trade-off between operational costs and travel time. Especially, we find a solution that is cheaper than initialization costs for β = 0.01 and one that dominates initialization direct with the same low travel time and significantly lower operational costs for β = 0.7.

5.2 Analysis of the Structure In this section we apply a generic column generation approach to the integrated line planning, timetabling, passenger routing, and vehicle scheduling problem. We present various decompositions for an instance of (LinTimPassVeh) on data set

108

5 Integrating Line Planning, Timetabling, Passenger Routing and Vehicle. . .

small and discuss preliminary computational results concerning the quality of the decompositions. The content of this section is a slight adaptation of [LPSS18]. Note that the decompositions are not part of the later chapters of this book. Therefore, the understanding of this section is not essential for understanding the remaining chapters.

5.2.1 Decompositions The structure of (LinTimPassVeh) presented in Figure 5.2 can be exploited using the so-called Dantzig–Wolfe decomposition (DWD), see [DW60]: The problem is reformulated according to the given structure where each block is represented by a subproblem. Furthermore, a master problem has the task to select feasible solutions for each subproblem such that the coupling constraints are satisfied. Due to the exponentially high number of variables, this master problem is solved by column generation: variables are generated dynamically when solving the linear relaxation. Embedding this in a branch-and-bound algorithm yields branch-and-price. For an overview on column generation and branch-and-price, see, e.g., [DDS05, VW10]. The above problem structure, consisting of the subproblems line planning, passenger routing, timetabling, and vehicle scheduling, seems to be the “canonical” one for applying a DWD. However, any structure that subdivides the coefficient matrix into blocks and coupling constraints is theoretically suitable for DWD. Here, two different blocks are independent from one another as they neither share variables nor constraints. (If linking variables are present, i.e., variables that are shared by two or more blocks, we can reformulate the problem by adding for each such variable a copy for each block that it appears in, and then introducing coupling constraints that state that the variable copies must attain the same values.) Thus, a broad variety of structures exist that might be used to decompose the problem. The questions that arise are: • What other decomposition structures do exist? • Is the canonical structure provided by the planning stages suited best for applying a DWD and performing branch-and-price? Or do there exist other structures, unknown to the modeler, for which this decomposition-based solution approach performs better? • Are there any properties that can serve as indicators of a good performance? To find more decompositions than the canonical one according to the planning stages, we use several structure detection algorithms, some of them described in [BCC+ 15]. Formally, a structure detection algorithm tries to find a mapping C → N0 , where C is the set of constraints. A constraint that is mapped to zero is a coupling constraint, i.e., a constraint that belongs to no block but is part of the master problem. Depending on the detection algorithm, the mapping either already guarantees that constraints mapped to the same integer form a block or blocks have to be formed by moving variables to the set of linking variables.

5.2 Analysis of the Structure

109

A key feature of the detection that we use is that the algorithms are allowed to determine partial structures C → N0 ∪ {open}; i.e., a constraint can be left undecided (mapping it to open), and a partial structure that contains undecided constraints can then be completed by another algorithm. This increases the number of found structures and the chance to find suitable decompositions, but leaves the challenge to choose a “meaningful” one such that branch-and-price is supposed to perform best. Structure detection thus proceeds in the following steps: 1. Constraint classifiers determine partitions of C, e.g., according to the number of variables and their coefficients. With these partitions, potential candidates for the number of blocks are determined. 2. Then, partial decompositions are built that only assign certain constraints to be coupling constraints, but leave the remainder open. This is done in the following ways: • by the above mentioned constraint classifiers; • by analyzing the densities of the constraints: Constraints with a high number of variables are assigned as coupling constraints. • by graph partitioning: The coefficient matrix A ∈ Rm×n is modeled as a hypergraph in two different ways: – hyper row graph: Each node represents a column j , and a hyperedge {j : aij = 0} for each row i is introduced; – hyper row-column graph: Each node represents a matrix entry (i, j ) with aij = 0, and each row i is represented by a hyperedge {(i, j ) : aij = 0} containing its nonzero entries; analogously, there is a hyperedge for each column j containing its nonzero entries. Then, graph partitioning algorithms are applied on these graphs. These graph partitioners yield complete decompositions as well as partial decompositions which again only assign coupling constraints. 3. The partial decompositions are completed by looking for connected components on the remaining constraints. 4. Last, a postprocessing routine checks if coupling constraints can be assigned to blocks: If a coupling constraint only contains variables of one block, it will be moved to this block. An overview on the detection algorithms is given in Table 5.1.

5.2.2 Computational Experiments The structure detection is implemented in the generic branch-and-price solver GCG [GL10] which we use in a development version based on version 2.1.4. GCG is an

110

5 Integrating Line Planning, Timetabling, Passenger Routing and Vehicle. . .

Table 5.1 Overview of the detection algorithms used. The algorithms c, a, and r derive a partial decomposition according to Step 2. They can be followed by the algorithms C and d, see Step 3. The postprocessing algorithm p can be performed after each of the other algorithms. Step 1/2 2 2 3 3 4

Letter c a r C d p

Algorithm constraint classification graph partitioning on the hyper row-column graph graph partitioning on the hyper row graph searching connected components detection by constraint densities postprocessing

extension to SCIP, used in version 5.0, see [GEG+ 17], a solver for mixed integer programs that also serves as a framework for branch-cut-and-price. We apply the above structure detection scheme to a matrix representation of (LinTimPassVeh) for data set small, see Section 1.4.1. Since SCIP comes with various presolving routines which may change the problem formulation and in particular add new constraints, the detection scheme is applied twice: first on the original IP formulation, then, after presolving, again on potentially newly added constraints. In total, this yields 75 decompositions. We provide a first evaluation of each decomposition w.r.t. its computational performance within branch-and-price: Therefore, we try to solve the root LP relaxation within a time limit of one hour. Note that this is the LP relaxation of the master problem, i.e., the subproblems are solved with integrality constraints but the combination of columns found by the subproblems to a solution of the master problem can be rational instead of integral. The computations are performed on a Intel(R) Core(TM) i7-2600 CPU @ 3.6 GHz, with 16 GB RAM. The results are shown in Table A.1 in Appendix A; for each decomposition, it shows the involved algorithms; moreover, it shows the relative block and border area as later defined in equations (5.7) and (5.8), respectively, the time and number of LP iterations needed to solve the root LP relaxation and the gap between the dual bound and the optimal solution value of the integrated IP. Here, the optimal value of the IP can be used to compute the gap as the integrated problem is small enough such that it can be solved to optimality by commercial solvers as seen in Section 5.1.3.

5.2.2.1

Canonical Decomposition According to the Planning Stages

At first, we consider the “canonical” decomposition structure which uses the subproblems line planning, timetabling, passenger routing, and vehicle scheduling from the sequential process as blocks. It is depicted in Figure 5.5. Figure 5.5a is a reordering of the schematic representation of the matrix structure given in Figure 5.2 while Figure 5.5b represents the actual matrix structure for data set small. The large area at the top represents the coupling constraints which clearly make up most of the coefficient matrix, thus making it hard to find

5.2 Analysis of the Structure

111

coupling constraints LT, TV, LV, LP, TP line planning L feas. problem timetabling T PESP veh. sched. V flow problem pass. rout. flow problem

P

(a) Schematic representation of the matrix structure, reordering of Figure 5.2. 0

2000

4000

6000

8000

10000 0

1000

2000

3000

4000

5000

(b) Actual matrix structure. The variables are numbered on the x-axis and the constraints on the y-axis. The small blocks (dark green area) represent the subproblems timetabling, vehicle scheduling and passenger routing, with an additional block for line planning which consists of 12 constraints and cannot be seen. The dark blue area represents the large number of coupling constraints.

Fig. 5.5 Canonical decomposition of the integrated line planning, timetabling, passenger routing, and vehicle scheduling problem according to the planning stages.

subproblems that can be solved independently. Also note the large number of variables that do not occur in any of the blocks. These are the auxiliary variables used for the linearizations, see Section 5.1.2. When solving the problem in this canonical form by SCIP, the LP at the root node of the branch-and-price tree cannot even be solved within the time limit. Due to the then poor lower bound, the gap is still at 5182.32% which is far from optimal.

112

5 Integrating Line Planning, Timetabling, Passenger Routing and Vehicle. . . 5000

gap in %

4000

3000

2000

r

cCpdCp

cCpCp

apdCp

apdC

apCp

apC

ap

adCp

adC

aCp

aC

0

a

1000

Fig. 5.6 Box-and-whiskers plot of the performance of the different decomposition algorithms. The algorithms listed on the x-axis are combinations of the detection algorithms given in Table 5.1. The boxes mark the 25th to 75th percentile while the whiskers mark the minimal and maximal values. The median is depicted by a red line. Here, the performance is measured as the gap after solving the root node of the branch-and-price tree which is given on the y-axis.

5.2.2.2

Influence of the Detection Algorithms

Therefore, we now consider other decompositions found by GCG. Figure 5.6 shows the performance of the matrix structures found by the different algorithms indicated by the gap after solving the root node of the branch-and-price tree. Figure 5.6 suggests that graph partitioning algorithms on hyper row-column graphs combined with connected components are better suited for the integrated line planning, timetabling, passenger routing, and vehicle scheduling problem than algorithms using constraint classification or graph partitioning on hyper row graphs. Especially the algorithms apC, apCp, apdC, and apdCp lead to good structures. A typical example of a decomposition found by these algorithms is depicted in Figure 5.7. Such decompositions are called arrowhead matrices due to their shape. Intuitively, these decomposition seem to be easier to solve due to the low number of coupling constraints and variables combined with independent blocks of reasonable sizes.

5.2.2.3

Influence of the Number of Blocks

Figure 5.8 shows the influence of the number of blocks on the performance of the decomposition. While good decompositions could be found for a large span of the number of blocks, high and low numbers of blocks can also lead to bad

5.2 Analysis of the Structure

113

Fig. 5.7 Example for an arrowhead matrix found by the algorithm apC with 26 blocks. The variables are numbered on the x-axis and the constraints on the y-axis. The dark blue area represents the coupling constraints, the purple area represents the linking variables, and the dark green area represents the blocks.

decompositions while a medium number of around 20 to 30 blocks is more promising. Note that the scale of Figure 5.8a and 5.8b varies as Figure 5.8b only contains “good” algorithms which lead to a gap of less than 200%. Figure 5.8a also shows an effect which occurred for all decompositions considered here: The gap is either acceptably small (less than 200%) or the root node LP could not be solved, leading to a gap of several thousand percent. Examples for decompositions with a large gap are given in Figure 5.9. They either feature many very small blocks (Figure 5.9a and 5.9b) or few large blocks (Figure 5.9d) or a combination of both (Figure 5.9c). Medium-sized blocks seem to be more promising. As the number of blocks alone does not suffice to characterize the quality of the decomposition, see Figure 5.9c, we additionally consider the size of the blocks in the next section.

114

5 Integrating Line Planning, Timetabling, Passenger Routing and Vehicle. . . 5000

gap in %

4000

3000

2000

1000

0

0

20

40

60

80

100

120

number of blocks a aC

aCp adC

adCp ap

(a) Algorithms a, aC, aCp, adC, adCp and ap, see Table 5.1. 200 180

gap in %

160 140 120 100 80 60 40

5

10

15

20

25

30

35

40

number of blocks apC

apCp

apdC

apdCp

(b) Algorithms apC, apCp, apdC, apdCp, see Table 5.1.

Fig. 5.8 Influence of the number of blocks on the performance of the different decomposition algorithms, see Table 5.1. Here, the performance is measured as the gap after solving the root node of the branch-and-price tree which is given on the y-axis.

5.2 Analysis of the Structure

115

0

0

500

500

1000

1000

1500

1500

2000

2000

2500

2500

3000

3000

3500

3500

4000 4500

4000 0

500

1000

1500

2000

2500

4500

0

(a) Algorithm aCp, 106 blocks.

1000

1500

2000

2500

(b) Algorithm cCpdCp, 77 blocks.

0

0

500

500

1000

1000

1500

1500

2000

2000

2500

2500

3000

3000

3500

3500

4000 4500

500

4000 0

500

1000

1500

2000

(c) Algorithm cCpCp, 24 blocks.

2500

4500

0

500

1000

1500

2000

2500

(d) Algorithm r, 3 blocks.

Fig. 5.9 Decompositions with a large gap. The variables are numbered on the x-axis and the constraints on the y-axis. The dark blue areas represent the coupling constraints, the purple areas represent the linking variables, and the dark green areas represent the blocks.

5.2.2.4

Block and Border Scores

To further characterize the decompositions we consider the block score K mk · nk (5.7) block = k=1 m·n and the border score  m0 · n + ( K k=1 mk ) · n0 border = , (5.8) m·n where K is the number of blocks, m and n are the total number of constraints and variables, respectively, mk and nk the number of constraints and variables in block k, respectively, m0 is the number of coupling constraints, and n0 the number of linking variables. In an IP model structure, these two scores indicate the relative block and border area, respectively. Our expectation is that decompositions with smaller scores lead to a better computational performance. Figure 5.10 shows the block and border scores for each decomposition. The canonical decomposition according to the planning stages, which is depicted by a star, distinguishes itself by a very high border score compared to all other decompositions considered here and it also has one of the lowest block scores. This could already be seen in Figure 5.5 in the large number of coupling constraints.

116

5 Integrating Line Planning, Timetabling, Passenger Routing and Vehicle. . . 0.9

0.8

0.7

border score

0.6

0.5

0.4

0.3

0.2

0.1

0.0 0.0

0.1

0.2

0.3

0.4

0.5

block score gap < 100 % gap < 200 %

gap ≥ 900 % canonical decomposition

Fig. 5.10 Comparing different decompositions regarding the block score and the border score, see equations (5.7) and (5.8), respectively.

Decompositions for which the root LP can be solved such that the gap is less than 200% all feature both low block and border scores. Nevertheless, low block and border scores are only an indicator and no guarantee for good performance of the decomposition, see [BCC+ 15] for a general discussion of such measures.

5.3 Summary In this chapter, we use the results of Chapters 2, 3, and 4 to derive an integrated model for line planning, timetabling, passenger routing, and vehicle scheduling. The preprocessing method as well as the heuristics presented in Chapter 3 can be applied here as well such that the model can be evaluated on small data sets as a proof of concept. We additionally present an approach to derive non-canonical decompositions of the corresponding coefficient matrix which can be exploited in a branch-and-price setting.

Chapter 6

Two Heuristic Approaches for Integrating Public Transport Problems

In the last chapters we have seen the benefits of integrating public transport problems. Nevertheless, due to the increasing problem size, the integrated models are not suited to be solved directly for realistically sized instances. But as the classical heuristic approach of solving the stages line planning, timetabling, and vehicle scheduling sequentially does not lead to satisfactory results, we have to turn to other heuristic approaches. Thus, we consider heuristic solutions that incorporate the integrated aspect. In Section 6.1, we consider a sequential approach where in each stage the influence on the further stages is taken into account. The results of this section are also published in [PSSS17]. In Section 6.2, we consider an iterative approach, re-optimizing one stage while the solution of the other stages is fixed. The content of this section is part of a working paper, see [SS18]. In contrast to the earlier chapters, we here additionally manipulate or even construct the line pool used for line planning. This can either be seen as adding a further planning stage or as a heuristic approach to solving the line planning problem on a complete line pool, i.e., a line pool consisting of all possible paths in the PTN as lines.

6.1 A Look-Ahead Heuristic The content of this section is published as [PSSS17] but the version presented here is adapted to the notation of this book. We compare the traditional sequential approach to public transport planning to another sequential approach where later stages are taken into account when finding a solution for a certain stage. As traditional approach we consider line planning with line concept cost, see Problem 1.12, for a fixed line pool, timetabling for fixed passenger weights as in Problem 1.17 and vehicle scheduling as in Problem 1.36. The approach presented here is mainly

© Springer Nature Switzerland AG 2020 P. Schiewe, Integrated Optimization in Public Transport Planning, Springer Optimization and Its Applications 160, https://doi.org/10.1007/978-3-030-46270-3_6

117

118

6 Two Heuristic Approaches for Integrating Public Transport Problems

focused on finding a public transport plan with low costs, although the impact on the passengers is evaluated as well.

6.1.1 Look-Ahead Enhancements In this section, we present look-ahead enhancements which are based on the following assumptions. Assumption 6.1. Let the following assumptions be satisfied. 1. We consider an undirected public transportation network and especially assume that the lines are undirected as well. Therefore, if a line is operated, its backwards direction is operated as well. 2. The duration of drive and wait activities is fixed to the lower bound which is derived from the underlying PTN, see Definition 1.22. 3. The period length T is a multiple of two. 4. There is no depot for vehicle scheduling, i.e., vehicles start and end their journey at the start of the first and end of the last trip, respectively. 5. The vehicle schedule is computed for pmax period repetitions.

6.1.1.1

New Line Costs

When evaluating the costs of a public transport plan, Definition 1.35 shows that in addition to distance and time based costs the operational costs are determined to a large amount by the number of vehicles needed. Even if as few lines as possible are established it is not clear how many vehicles are needed in the end and how much distance is covered by empty trips. In the traditional approach the costs of a line are usually assumed to be proportional to its length with some fixed costs to be added, i.e., costl = costfix + c · lengthl ,

(6.1)

where costfix ∈ R, costfix ≥ 0, and c ∈ R, c ≥ 0, is a scaling factor. Here, we now try to compute the costs of a line such that they are as close as possible to the operational costs it may have later in the evaluation of the public transport plan. The idea is to approximate the costs per line by distributing the operational costs of the corresponding vehicle schedule V specified in Definition 1.35 to the lines and computing the costs per period, i.e., for line plan L we want to get cost(V) ≈

 l∈L

costl · pmax .

6.1 A Look-Ahead Heuristic

119

For the duration and distance of the trips this can be done straightforwardly, as we only need to know the number of planning periods which are considered in total as the length and duration of a line do not change between periods. As the duration of drive and wait activities is fixed to the lower bound, we can compute the duration of a line before the timetable is fixed by 

dl =

La .

(6.2)

a∈A0 (l,l)

The number of vehicles needed as well as the distance and duration of connecting trips are in general more difficult to approximate as they can differ between the planning periods due to an aperiodic vehicle schedule. We hence approximate the costs for a very simple vehicle schedule where each vehicle alternately covers only one line and its backwards direction. We call this kind of vehicle schedule line-pure vehicle schedule. As the distance of the connecting trips is always zero in a line-pure vehicle schedule, it can be neglected in the approximation of the costs. Let Lturn be the minimal time needed to prepare a vehicle for operating a new trip, then the number of vehicles needed to cover a line and its backwards direction in a line-pure vehicle schedule can be approximated by #vehicles needed for line l and its backwards direction ≤ 2 · (dl + Lturn )/T  . To approximate the duration of connecting trips we use the following lemma. Lemma 6.2. Let l ∈ L be a line with backward direction l  and let V be a line-pure vehicle schedule where each vehicle alternately covers a line and its backwards direction with the shortest possible durations of the connecting trips. Let c = ((p, l), (p , l  )) ∈ V be a connecting trip between lines l and l  and c = ((p˜  , l  ), (p, ˜ l)) ∈ V a connecting trip between lines l  and l. If 2 · Lturn ≤ T − (2 · dl mod T ) is satisfied, we get for the durations dc , dc of connecting trips c, c dc + dc = T − (2 · dl mod T ). Proof. From Definition 1.33 and Notation 1.34 we get dc = sp ,l  − ep,l = sp ,l  − (sp,l + dl ) = p · T + πfirst(l  ) − p · T − πfirst(l) − dl = (p − p) · T + πfirst(l  ) − πfirst(l) − dl .

120

6 Two Heuristic Approaches for Integrating Public Transport Problems

Analogously, we get dc = (p˜ − p˜  ) · T + πfirst(l) − πfirst(l  ) − dl  . As the duration of drive and wait activities is fixed to the lower bounds by Assumption 6.1 we get with equation (6.2) dl = dl  and hence dc + dc = (p − p) · T + πfirst(l  ) − πfirst(l) − dl + (p˜ − p˜  ) · T + πfirst(l) − πfirst(l  ) − dl  = (p + p˜ − p − p˜  ) · T − 2 · dl = k · T − (2 · dl mod T )

for some k ∈ N.

From the assumptions we get 2 · Lturn ≤ T − (2 · dl mod T ) such that k = 1 yields a feasible duration of the connecting trips. As the duration of the connecting trips is as short as possible, dc + dc = T − (2 · dl mod T ) 

is satisfied.

We hence approximate the duration of the connecting trips for a line l ∈ L and its backwards direction l  by distributing the minimal duration of the connecting trips evenly to the connecting trips between lines l and l  and vice versa, i.e., for a connecting trip c = ((p, l), (p , l  )) we use   1 T T d˜c = · (T − (2 · dl mod T )) = − dl mod 2 2 2

(6.3)

and show later on that this approximation is correct for lines of a specific form. Summarizing, we can approximate the operational costs by using the following line costs.     γ5 T T dl + Lturn costl = 2·γ1 ·dl +2·γ2 ·lengthl +2·γ4 · − dl mod + · 2· 2 2 pmax T (6.4)

6.1.1.2

Line Pool Generation with Look-Ahead

The next idea is to take account of good vehicle schedules already in the very first step: We construct the lines of the line pool in such a way that connecting trips between lines and their backward directions are facilitated with short durations, making connecting trips with long distances and long durations less attractive. Thus, the resulting line concept is likely to be operated with a small number of vehicles.

6.1 A Look-Ahead Heuristic

121

To create a line pool that already considers the vehicle routing aspect, we modify the line pool generation algorithm described in [GHS17]. For a given minimal time Lturn needed to prepare a vehicle for operating a new trip and a maximal allowed buffer time δ we ensure that the duration dl of a line l as given in (6.2) satisfies T T T − Lturn − δ ≤ dl mod ≤ − Lturn . 2 2 2

(6.5)

Remember that here the duration of drive and wait activities is fixed to the lower bounds such that the duration of a line can already be determined. Equation (6.5) ensures that at the end of a trip, i.e., the operation of a line, the vehicle has enough time to start the trip belonging to the backwards direction of the same line and has to wait no more than δ minutes to do so. Thus, we get that the duration of the roundtrip of forward and backward direction together differs from an integer multiple of the period length by at most 2 · δ. In particular, the approximation of the duration of connecting trips in (6.3) is correct. Corollary 6.3. Let V be a cost-optimal line-pure vehicle schedule for γ4 > 0 and for a line plan L which contains only lines satisfying (6.5). Let l ∈ L be a line with backward direction l  and let c = ((p, l), (p , l  )) ∈ V be a connecting trip between ˜ l)) ∈ V a connecting trip between lines l  and l. lines l and l  and c = ((p˜  , l  ), (p, Then dc + dc = d˜c + d˜c is satisfied. Proof. From (6.5) we get dl mod T ≤

T − Lturn 2

⇐⇒ 2 · Lturn ≤ T − 2 · (dl mod T ). With 2 · (dl mod T ) ≥ 2 · dl mod T we get 2 · Lturn ≤ T − (2 · dl mod T ), i.e., the assumptions of Lemma 6.2 are satisfied as for γ4 > 0 a cost-optimal vehicle schedule only contains connections with minimal durations. We hence get dc + dc = T − (2 · dl mod T )    T T − dl mod =2· 2 2 = d˜c + d˜c . 

122

6.1.1.3

6 Two Heuristic Approaches for Integrating Public Transport Problems

Vehicle Scheduling First

In our last suggestion we propose to switch the timetabling and the vehicle scheduling stage in the sequential approach, i.e., to find (preliminary) vehicle schedules directly after the line planning phase. This is particularly interesting if the line plan contains lines which can be operated efficiently by one vehicle in both directions, i.e., lines with small δ, since it ensures that the timetable will not destroy this property. Therefore, we pursue the following stages in the order given below. Stage Lin: This stage is done as in the traditional approach. Stage Veh-first: For each line we introduce turnaround activities in the periodic event-activity network between the last event of the line in forward direction and the first event of the line in backward direction, and vice versa. The lower bound for these activities is set to Lturn and the upper bound to Lturn + 2 · δ. These activities ensure that the timetable to be constructed in the next stage allows for the vehicle schedule we want, namely that the same vehicle operates a line and its backwards direction. Stage Tim: We then proceed with timetabling as in the traditional approach but respecting the turnaround activities such that the resulting timetable does not destroy the desired vehicle schedule. Stage Veh: After timetabling we perform an additional vehicle scheduling step as in the traditional approach: We delete the turnaround activities and proceed with vehicle scheduling as usual. Nevertheless, we expect that many of the vehicle routes determined in Stage Veh-first are found again. Note that Stage Veh-first can be performed very efficiently in the number of lines in the line concept. We furthermore remark that for a line plan in which all lines have a buffer time δ = 0, Stage Veh can be omitted since having line-pure vehicle schedules is an optimal solution in such a case. Even if not all lines have zero buffer times, fixing a timetable in Stage Tim respecting the turnaround activities often already determines the optimal vehicle schedule. This means that vehicle scheduling in Stage Veh is often redundant, which is not only observable in most cases of our experiments, but is also illustrated more precisely in the following Example 6.4. Example 6.4. Consider two lines l1 and l2 such that line l1 ends at the station that l2 starts at as shown in Figure 6.1. For simplicity, we only minimize the number of vehicles needed. Let the duration of the lines be dl1 = T2 +  and dl2 = T2 −  such that dl1 + dl2 = T . Then for applying Stage Veh-first with Lturn = 0 we need two vehicles to operate Fig. 6.1 Lines overlapping at station u.

v

l1

u u

l2

w

6.1 A Look-Ahead Heuristic

123

Fig. 6.2 Vehicle schedule derived by Stage Veh-first.

l1

v

u u

Fig. 6.3 Optimal vehicle schedule.

l1

v

l2

w

u u

l2

w

line l1 and an additional vehicle to operate line l2 , as the following computation shows. The corresponding vehicle schedule can be seen in Figure 6.2.  

2 · ( T2 + ) T 2 · ( T2 − ) T



 =



 =

T +2· T T −2· T

 =2  = 1.

However, both lines could also be served consecutively by the same vehicle, leading to a total of two instead of three vehicles as depicted in Figure 6.3. 

2 · ( T2 +  + T

T 2

− )



 =

2·T T

 = 2.

Nevertheless, it is very unlikely that this vehicle schedule would be feasible after having fixed a timetable in Stage Tim. Consider an OD pair (v, w). These passengers have to transfer at station u with a minimal transfer time of   > 0. Then, during the timetabling stage (Stage Tim), the lines are synchronized such that the passengers can transfer at station u. Therefore, the vehicle schedule shown in Figure 6.3 also needs three vehicles:     2 · ( T2 +  + T2 −  +   ) 2 · T + 2 ·  = 3. = T T

This shows that the vehicle schedule computed in Stage Veh-first is already optimal as the vehicle schedule shown in Figure 6.2 is still feasible.

124

6 Two Heuristic Approaches for Integrating Public Transport Problems

6.1.2 Computational Experiments We compare the traditional sequential approach for finding a public transport plan against the enhancements proposed here by using LinTim, a software framework for public transport optimization, see [SAP+ 18]. We use an IP formulation for the cost model of line planning and a flow formulation for the vehicle scheduling problem. In order to achieve reasonable runtimes for the timetabling step, we use the fast heuristic described in [PS16]. The following parameters describe the different combinations of our look-ahead enhancements. 1. Using the new costs defined in equation (6.4) for line planning (Stage Lin) as proposed in Section 6.1.1.1 is denoted by new cost. Using traditional costs is denoted as normal cost. 2. The second option described in Section 6.1.1.2 is to construct a new pool (new pool), whereas normal pool uses some given (standard) pool for line planning (Stage Lin). A third option is given by combining both pools (combined pool). 3. The decision of computing the timetable or the vehicle schedules first, i.e., perform Stage Veh-first from Section 6.1.1.3, is denoted by TT first and VS first, respectively. As test instances we used two significantly different data sets, namely data set grid which is described in Section 1.4.3 and data set long-distance as described in Section 1.4.5. For data set grid we use a period length of T = 20 and pmax = 24 period repetitions. The normal pool for this instance has been calculated with the tree based heuristic from [GHS17]. For the close-to real-world data set long-distance we use a period length of T = 60. The number of period repetitions is set to pmax = 32 in order to achieve a reasonable time horizon for vehicle scheduling. Note that pmax is even larger in practical railway applications. As normal pool we use a pool provided in the LinTim framework that was created manually by experts. For the computations we use a standard notebook with Intel(R) Core(R) i32350M CPU @ 2.3 GHz and 4 GB of RAM. The computation time per data point of data set grid does not exceed 3 minutes while computing a solution for data set long-distance takes up to 30 minutes.

6.1.2.1

Data Set grid

Figure 6.4 shows 12 solutions, one for each combination of using the look-ahead enhancements described in Section 6.1.1. For each combination, the travel time and the operational costs of the resulting public transport plan are plotted on the x- and y-axis, respectively. We observe the following:

6.1 A Look-Ahead Heuristic

125

23000

operational costs

22000 21000 20000 19000 18000 17000 16000

50000

52000

54000

56000

58000

60000

62000

64000

total travel time normal pool new pool combined pool

normal cost new cost

TT first VS first

Fig. 6.4 Different combinations of look-ahead enhancements.

• The solution of the traditional sequential approach (circle with gray marker, left side filled) is strictly dominated by the solution obtained when replacing normal pool by combined pool. • Using new cost (black markers) instead of normal cost (gray markers) always decreases the costs. The travel times sometimes decrease and sometimes increase. • Using combined pool always has better costs than using new pool or normal pool. The travel times sometimes decrease and sometimes increase. • The option TT first yields better travel times compared to VS first while VS first always has lower operational costs than TT first. • There are five non-dominated solutions, four of them computed by using new cost. Whenever new pool or combined pool is used together with new cost the resulting solution is non-dominated. The new pool to be generated depends on the parameter δ. In Figure 6.4, δ = 3 is used. We also test the parameters δ = 2, 3, . . . , 10 for all combinations of lookahead enhancements. The result is depicted in Figure 6.5. Note that δ ≥ 10 implies no restrictions on the line lengths. For data set grid, the restrictions on the line length implied by equation (6.5) when setting δ = 0 or δ = 1 are so strict that no feasible solution can be found. The basic findings described for δ = 3 also remain valid for other line pools generated: Solutions generated with new cost have lower operational costs while solutions generated with normal cost have lower travel times. The left-most solutions, i.e., the ones with the lowest travel time, correspond to TT first and

126

6 Two Heuristic Approaches for Integrating Public Transport Problems

23000

operational costs

22000 21000 20000 19000 18000 17000 16000

50000

52000

54000

56000

58000

60000

62000

64000

total travel time normal pool new pool combined pool

normal cost new cost

TT first VS first

Fig. 6.5 Different combinations of look-ahead enhancements and different choices for δ.

bottom-most solutions, i.e., the ones with the lowest operational costs, correspond to VS first. In fact, for every single public transport plan that is computed, VS first yields a cheaper solution than TT first while the latter results in a solution with lower travel time than VS first. Finally, none of the solutions computed by using normal pool is non-dominated; the non-dominated solutions consist mostly of solutions generated with combined pool. Nevertheless, we see that the quality of the solution obtained depends significantly on the choice of the parameter δ. This is investigated in Figure 6.6. First of all, we again see that for every fixed δ new cost yields better solutions than normal cost and that the combined pool always yields lower costs than new pool. If all three look-ahead enhancements new cost, combined pool, and VS first are applied, there is a trend of increasing costs once δ increases, corresponding to the conjecture that cheap public transport plans can be found by choosing a small value for δ.

6.1.2.2

Data Set long-distance

Applying the implemented enhancements to data set long-distance with the parameter choice δ = 10 yields the results depicted in Figure 6.7. Note that δ = 3 for T = 20 for data set grid is similar to δ = 10 for T = 60 for data set long-distance. The remarkable thing to observe in this scenario is that new pool and combined pool lead to significant reductions of the operational costs of more

6.1 A Look-Ahead Heuristic

127

23000

operational costs

22000 21000 20000 19000 18000 17000 16000

2

4

6

8

10

δ normal pool new pool combined pool

normal cost new cost

TT first VS first

Fig. 6.6 Impact of choice for δ on the operational costs. 4.5

×10

9

operational costs

4.0

3.5

3.0

2.5

2.0 0.75

0.80

0.85

0.90

total travel time normal pool new pool combined pool

normal cost new cost

0.95

1.00 ×10

8

TT first VS first

Fig. 6.7 Different combinations of look-ahead enhancements.

than 40%, whereas the travel time increases by up to 20%. Additional to the fact that combined pool leads to better costs also the behavior of TT first compared to VS first remains similar to instance grid. VS first reduces the

128

6 Two Heuristic Approaches for Integrating Public Transport Problems

operational costs by 1% to 5% and TT first decreases the travel times by 1% to 3%. As the size of the generated line pool has to be relatively small in comparison to the instance size due to runtime and memory limitations, also the number of feasible line concepts is comparatively small. Therefore, this example does not show any impact of using new costs instead of normal cost on the operational costs.

6.2 An Iterative Re-Optimization Approach In this section, we present a novel iterative heuristic for the integrated line planning, timetabling, and vehicle scheduling problem. Therefore, we develop an iterative approach to re-optimize a given public transport plan where in each step one of the stages is re-optimized and the other ones are regarded as fixed such that a feasible solution is guaranteed. Here, we introduce two new models for line planning and timetabling, respectively. An overview can be found in Figure 6.8. This iterative approach specifies the three steps in the inner circle of the algorithmic scheme called eigenmodel which is introduced in [Sch17]. Of the three algorithms shown in Figure 6.8, only ReVehicleScheduling has been studied before, while ReLinePlanning and ReTimetabling are newly defined and discussed in Section 6.2.1.

6.2.1 Modelling the Re-Optimization Problems In this section, we define the re-optimization problems ReVehicleScheduling, ReTimetabling, and ReLinePlanning that we need for the iterative approach. For a given public transport plan, our goal is to always fix the solutions of two of the three stages line planning, timetabling, and vehicle scheduling while reoptimizing the third stage. We suppose that the following assumptions are satisfied.

Algorithm ReVehicleScheduling Input: line plan, timetable Output: vehicle schedule

Algorithm ReTimetabling Input: line plan, vehicle schedule Output: timetable

Fig. 6.8 Overview of the algorithms.

Algorithm ReLinePlanning Input: timetable, vehicle schedule Output: line plan

6.2 An Iterative Re-Optimization Approach

129

Assumption 6.5. Suppose that the following conditions are satisfied. 1. The upper frequency bounds femax , e ∈ E, for line planning are set to infinity, i.e., only lower frequency bounds are considered. 2. The EAN is constructed as in Definition 1.15 with bounds as proposed in Definition 1.22, i.e., the lower and upper bounds are derived from bounds of the corresponding edges and nodes of the underlying PTN. 3. Transfers are always possible by waiting long enough, i.e., for all v ∈ V +T −1 Uvtrans = Ltrans v is satisfied. 4. There is no depot for vehicle scheduling, i.e., vehicles start and end their journey at the start of the first and end of the last trip, respectively. 5. For all cost parameter sets γ , the duration based costs of trips and connecting trips are the same as well as the distance based costs for trips and connecting trips, i.e., γ1 = γ3 and γ2 = γ4 . 6. The connecting trips are operated on fixed shortest paths in the PTN, i.e., Dl1 ,l2 = length(Pv1 ,v2 ) where v1 is the last station of l1 , v2 the first station of l2 , and Pv1 ,v2 a shortest path from v1 to v2 . 7. The minimal time Lturn needed to prepare a vehicle for serving a new line is set to Lturn = 0, i.e., Ll1 ,l2 = timev1 ,v2 where v1 is the last station of l1 , v2 the first station of l2 . Additionally, the minimal time it takes to drive a vehicle from v1 to v2 is determined by the lower bounds on the drive time on the corresponding PTN edges, i.e.,  Ldrive . Ll1 ,l2 = timev1 ,v2 = e e∈Pv1 ,v2

6.2.1.1

Re-Optimizing the Vehicle Schedule

As mentioned in Section 1.2.3, vehicle scheduling for a fixed line plan and a fixed timetable is part of the classical sequential planning process and a well researched problem. Therefore, we can use a standard vehicle scheduling model for ReVehicleScheduling. Here, we use a vehicle scheduling model without depot and we minimize the operational costs as defined in Definition 1.35. The algorithm used for the experimental evaluation is implemented in the open source software tool LinTim, see [SAP+ 18].

130

6 Two Heuristic Approaches for Integrating Public Transport Problems

Problem 6.6 (ReVehicleScheduling). Given a public transport plan (L, π, V) with line plan L, periodic timetable π , and vehicle schedule V covering pmax period repetitions. Let Ll1 ,l2 , l1 , l2 ∈ L, be the minimal durations of the potential empty trips and Dl1 ,l2 , l1 , l2 ∈ L, the lengths of the potential empty trips. Let γ = (γ1 , . . . , γ5 )t be a cost parameter set. Find a new feasible vehicle schedule V  for timetable π , minimal durations of empty trips Ll1 ,l2 , l1 , l2 ∈ L, and trips T = {(p, l) : p ∈ {1, . . . , pmax }, l ∈ L} such that the operational costs are minimized.

6.2.1.2

Re-Optimizing the Timetable

In Problem 1.17, we described the standard timetabling problem. From the definition of an event-activity network, see Definition 1.15, it is clear that a timetable which is feasible already adheres to the line plan, as it is part of the input and the structure of the EAN. To achieve that also a given vehicle schedule V stays feasible after a new timetable is found, we need to add further constraints. Therefore, we consider the set C of all connecting trips of vehicle routes in V. Remember that connecting trip c = ((p1 , l1 ), (p2 , l2 )) ∈ C means that trip (p2 , l2 ) is operated directly after trip (p1 , l1 ) by the same vehicle. In order to check that the vehicle schedule remains feasible, we need to ensure that the minimal time Ll1 ,l2 between trips on lines l1 and l2 is complied with for all connecting trips c = ((p1 , l1 ), (p2 , l2 )) ∈ C. An important factor is the distribution of passengers to activities of the eventactivity network, especially when the event-activity network is modified during the iteration scheme. Thus the passenger weights w = (wa )a∈A0 have to be determined before applying Algorithm ReTimetabling by a passenger routing as described in Definition 1.19. We choose to route the OD pairs on shortest paths in the EAN according to the previous timetable which allows for a convergence result later on.

Problem 6.7 (ReTimetabling). Given a public transport plan (L, π, V) with line plan L, periodic timetable π for period length T and bounds La , Ua on the activities a ∈ A0 of the corresponding EAN N 0 = (E 0 , A0 ) and vehicle schedule V. Let Ll1 ,l2 , ((p1 , l1 ), (p2 , l2 )) ∈ r, r ∈ V be the minimal durations of the connecting trips. Let w = (wa )a∈A0 be passenger weights corresponding to a passenger routing on shortest paths according to timetable π . Find a new periodic timetable π  that is feasible corresponding to the minimal and maximal bounds on the activities as well as the minimal times for the empty trips and minimizes the travel time of the passengers for fixed weights w = (wa )a∈A0 .

6.2 An Iterative Re-Optimization Approach

131

IP Formulation To give an integer program for the problem ReTimetabling we adapt the IP formulation of (TimVeh), see Section 4.1, by fixing the variables which determine the vehicle route. Therefore, we use the following variables. Let πi ∈ {0, . . . , T − 1} be the scheduled periodic time of event i ∈ E 0 , za ∈ Z the modulo parameter of activity a ∈ A0 , and dl ∈ N the time it takes in the timetable to get from first(l) to last(l). Here, first(l) is the first event in line l while last(l) is the last event in line l, see Definition 1.29. Analogously to Sections 4.1 and 5.1, we define variables sp,l ∈ N for the start time of trip (p, l) and ep,l ∈ N for its end time. Recall that a = (i, j ) ∈ A0 (l, l) are the activities such that both events i, j belong to line l, see Definition 1.23. Then we get the following IP formulation. 

(ReTimetabling) min

wa · (πj − πi + za · T )

a=(i,j )∈A0

s.t. πj − πi + za · T ≤ Ua

a = (i, j ) ∈ A0

(6.6)

a = (i, j ) ∈ A0

(6.7)

l∈L

(6.8)

sp,l = p · T + πfirst(l)

(p, l) : (•, (p, l)) ∈ C

(6.9)

ep,l = p · T + πfirst(l) + dl

(p, l) : ((p, l), •) ∈ C

(6.10)

((p1 , l1 ), (p2 , l2 )) ∈ C

(6.11)

πj − πi + za · T ≥ La dl =



(πj − πi + za · T )

a=(i,j )∈A0 (l,l)

Ll1 ,l2 ≤ sp2 ,l2 − ep1 ,l1 πi ∈ {0, . . . , T − 1}

i∈E

za ∈ Z

a ∈ A0

dl ∈ N

l∈L

0

sp,l ∈ N

(p, l) : (•, (p, l)) ∈ C

ep,l ∈ N

(p, l) : ((p, l), •) ∈ C

Constraints (6.6) and (6.7) are the standard timetabling constraints while equation (6.8) determines the time it takes to operate line l ∈ L. Equations (6.9) and (6.10) determine the actual start and end times of trip (p, l) ∈ r, r ∈ V, respectively. Note that analogously to Sections 4.1 and 5.1 it is not sufficient to use the time of last(l) in period repetition p to determine ep,l as the duration of the traversal of l can be longer than the period length T . Constraint (6.11) makes sure that the minimal time for connecting trips is complied with.

132

6.2.1.3

6 Two Heuristic Approaches for Integrating Public Transport Problems

Re-Optimizing the Line Plan

The idea for finding a new line plan that adheres to a given timetable and vehicle schedule is the following: For a given vehicle schedule, there might on the one hand be passengers that would like to travel using a connecting trip and on the other hand there might be parts of lines that are not used by (many) passengers. Therefore it can be beneficial to extend existing lines or split lines into multiple parts disjoint by connecting trips. For defining the problem ReLinePlanning, we hence need to understand how to generate new lines that are consistent with the timetable and the vehicle schedule which are already in place. As lines define a physical path that has to be covered by one vehicle end-to-end, they are an integral part of both the vehicle schedule and the timetable. As lines have to appear periodically, we have to make sure that a path can only be a line if it is covered by one vehicle end-to-end in each planning period at the same periodic time. This is especially difficult as we consider the general case of aperiodic vehicle schedules instead of periodic ones as it is done, e.g., in [DRB+ 17, BKLL18]. Lines in the new public transport plan have to be part of the original vehicle schedule, either as part of the trips or the empty trips and adhere to the original timetable. For connecting trips, however, we allow deviating paths as long as the time between trips is sufficiently large. This allows for removing detours in a line plan. In order to compute these new line plans and to check whether they are consistent with a given timetable and vehicle schedule, we need to determine when a vehicle starts to traverse a given edge. With sp,l and ep,l we already know this for the first edges in trips and connecting trips. For all other edges, we need the following notation. Notation 6.8. For a fixed timetable π , we denote the duration da (π ) of an activity a = (i, j ) ∈ A0 , see Definition 2.1, as d(a) = da (π ) = (πj − πi − La )mod T + La . Let r = ((p1 , l1 ), . . . , (pn , ln )) be a vehicle route. As every connecting trip between two trips (pi , li ), (pi+1 , li+1 ) is operated on a fixed shortest path, we can determine the physical path of the vehicle, i.e., the path the vehicle takes in the PTN, which we call P (r). For an edge e ∈ (p, l) with l = (l  , e, l  ) we determine the aperiodic departure time as τ(e,p,l) = p · T + πfirst(l)  + d((v, arr, l), (v, dep, l)) + v∈l  ∩V

= sp,l +



v∈l  ∩V



d((u, dep, l), (v, arr, l))

(u,v)∈l  ∩E

d((v, arr, l), (v, dep, l)) +



(u,v)∈l  ∩E

d((u, dep, l), (v, arr, l)).

6.2 An Iterative Re-Optimization Approach

133

Note that due to Example 4.4 we cannot simply compute the aperiodic departure time of e by adding p · T to the periodic departure time of e. Let c = ((p1 , l1 ), (p2 , l2 )) be a connecting trip with path (e1 , . . . , ek ). Note that due to Assumption 6.5 this path is a fixed shortest path from the last station of line l1 to the first station of line l2 . For an edge ej ∈ (e1 , . . . , ek ), we define the departure time as τ(ej ,c) = p · T + πfirst(l1 ) + dl1 +

j −1 

d(ei , c)

i=1

= ep,l1 +

j −1 

d(ei , c).

i=1

Here, d(ei , c) is the duration of the edge in the connecting trip, i.e., the time the vehicle takes to cover ei . These durations have to satisfy d(ei , c) ≥ Ldrive ei , k 

i ∈ {1, . . . , k}

(6.12)

d(ei , c) = dc .

(6.13)

i=1

Recall that dc is the duration of connecting trip c, see Definition 1.33. The following example shows how these times can be computed. Example 6.9. Consider the public transport network depicted in Figure 6.9. For computing the aperiodic start time of edge e2 ∈ (p1 , l1 ), we have to add the duration of the wait activities at v1 and v2 as well as the duration of the drive activity belonging to e1 to the start time of (p1 , l1 ), i.e., we get τ(e2 ,p1 ,l1 ) = sp1 ,l1 +



d((vi , arr, l1 ), (vi , dep, l1 ))+d((v1 , dep, l1 ), (v2 , arr, l1 )).

i∈{1,2}

For computing the aperiodic start time of edge e4 ∈ c, we have to add the duration of edge e3 in connecting trip c to the end time of (p1 , l1 ), i.e., we get

v1

e1

v2

e2

v3

e3 v4

e4 v5

Fig. 6.9 Public transport network with lines.

e5

v6

line l1 line l2 connecting trip c = ((p1 , l1 ), (p2 , l2 ))

134

6 Two Heuristic Approaches for Integrating Public Transport Problems

τ(e4 ,c) = ep1 ,l1 + d(e3 , c). Changing lines influences the basic level of the corresponding timetable and vehicle schedule as events and activities are defined for each line and vehicle routes are designed in order to cover all lines. Therefore, we slightly adapt the timetable and the vehicle schedule for a new line plan without changing the physical routes of vehicles during the operation of trips and without changing the times of events that are covered by the new line plan. We thus define consistency of transport plans which are derived from one another by changing the line plan. Definition 6.10. Let (L, π, V) be a public transport plan that is feasible according to upper and lower activity bounds derived from the corresponding PTN bounds wait trans , U trans , v ∈ V . Let time Ldrive , Uedrive , e ∈ E, Lwait v1 ,v2 , v1 , v2 ∈ e v , Uv , L v v V , be the minimal durations of the potential empty trips. A public transport plan (L , π  , V  ) is consistent with (L, π, V), if the following conditions are satisfied. • L is a set of lines with corresponding timetable π  and vehicle schedule V  which are feasible according to upper and lower activity bounds derived from the corresponding PTN bounds and the minimal times for empty trips. • There exists a bijection b : V → V  . • For all vehicle routes r ∈ V the paths of all trips in b(r) are contained in the path P (r), i.e., the new vehicle routes cover the same paths as the old vehicle routes when operating trips but might deviate from them for connecting trips. Note that this definition allows for empty vehicle routes r  ∈ V  , i.e., vehicle routes that do not cover any trips. For an edge e contained in trip (p, l) ∈ r and in a trip (p , l  ) ∈ b(r) at the same part of the vehicle route, we denote (p , l  ) as b (e, p, l). Analogously, for an edge e contained in connecting trip c ∈ r and in a trip (p , l  ) ∈ b(r) at the same part of the vehicle route, we denote (e, c) as ¯ p , l  ). b(e, • For all edges e contained in a trip (p, l) in vehicle route r and in a trip b (e, p, l) = (p , l  ) in vehicle route b(r) the aperiodic departure times coincide, i.e., τ(e,l,p) = τ(e,l  ,p ) . • There have to be durations d(e, c), e ∈ c, c ∈ r, r ∈ V, according to (6.12) and (6.13) such that the following condition is satisfied: Let (e1 , . . . , ek ) ⊂ l  be the largest subpath of (p , l  ) in vehicle route b(r) that is completely contained in c. Then the aperiodic departure times τ(ei ,p ,l  ) satisfy τ(ek

,p ,l  )

− τ(e1

,p ,l  )

=

k 

¯ i , p , l  )), d(b(e

i=1

i.e., the duration of connecting trip c allows for the operation of line l  . This definition is illustrated in the following example. Example 6.11. Consider again the public transport network from Example 6.9 as depicted in Figure 6.10.

6.2 An Iterative Re-Optimization Approach

135

For V = {r} with r = ((p1 , l1 ), c, (p2 , l2 )) and V  = {r  } with r  = ((p1 , l3 )) we get an bijection b : V → V  with b(r) = r  . For edge e1 in trip (p1 , l1 ) ∈ r we get b (e1 , p1 , l1 ) = (p1 , l3 ). For edge e3 in connecting trip c ∈ r and in trip (p1 , l3 ) ∈ r  ¯ 3 , p1 , l3 ) = (e3 , c). As r  only contains a trip and no connecting trips, the we get b(e path P (b(r)) has to be contained in P (r). The new vehicle routes do not necessarily have not be contained in the old ones, especially when a line is split into multiple parts as in Example 6.12. Example 6.12. Consider the public transit network depicted in Figure 6.11. Here, the original vehicle schedule V = {r} contains only one route r = ((p, l1 )). As the new vehicle route r  = ((p, l2 ), c, (p , l3 )) in vehicle schedule V  = {r  } consists of two trips and a connecting trip, the path of connecting trip c does not need to be contained in P (r). With this definition, we also get the requirements that have to be satisfied by a line to be consistent. Definition 6.13. A line l is consistent with a public transport plan (L, π, V) if there exists a public transport plan ({l}, π  , V  ) that is consistent with (L, π, V). Remark 6.14. If a line l is consistent with (L, π, V), the following requirements have to be satisfied as direct implications of Definition 6.10. • Line l is operated periodically and all corresponding activity durations are feasible as π  is a feasible periodic timetable. • Line l is covered by one vehicle end-to-end in each planning period as V  is a feasible vehicle schedule.

v1

e1

v2

e2

v3

line l1

e3

line l2

v4 e4 v5

e5

v6

connecting trip c = ((p1 , l1 ), (p2 , l2 )) line l3

Fig. 6.10 Public transport network with lines. v3

v4

line l1 line l2 line l3

v1

v2

Fig. 6.11 Public transport network with lines.

v5

v6

connecting trip c = ((p, l2 ), (p , l3 ))

136

6 Two Heuristic Approaches for Integrating Public Transport Problems

• For each trip (p, l), p ∈ {1, . . . , pmax }, the path of line l is part of an old vehicle route due to bijection b. • The departures times at stations that have formerly also been part of a line are the same as before due to the constraints on the aperiodic departure times. • The duration of the parts of the line that have formerly been connecting trips fit to the duration of the connecting trip. To ensure a certain service level for the passengers when minimizing the costs of the new line concept, we use the standard line planning constraints, i.e., we consider fixed minimal frequencies on all PTN edges as described in Problem 1.11. Note that according to Assumption 6.5, we do not consider upper frequency bounds. As the operational costs do not only depend on the line plan, we approximate them by using costs per line as in the cost model of line planning, see Problem 1.12. We determine the line costs costl by using a fixed cost part, a part depending on the length of the edges and a part depending on the number of edges, as done e.g., in [GHS17]. Remember that the costs of the line plan are defined as cost(L) =



costl .

(6.14)

l∈L

The problem ReLinePlanning can now be stated as follows. Problem 6.15 (ReLinePlanning). Given a public transport plan (L, π, V) for PTN (V , E) with line plan L with minimal edge frequencies wait femin , e ∈ E, duration bounds Ldrive , Uedrive , e ∈ E, Lwait e v , Uv , trans trans Lv , Uv , v ∈ V , periodic timetable π for period length T and vehicle schedule V for pmax period repetitions. Let timev1 ,v2 , v1 , v2 ∈ V , be the minimal durations of the potential empty trips. Find a new feasible public transport plan (L , π  , V  ) that is consistent with (L, π, V) and minimizes the line costs cost(L ). In order to find a new line plan, we first need to create a line pool consisting of lines that are consistent with the original public transport plan. In a second step, we choose a line plan from this pool that can be extended to a public transport plan consistent with the original one. Both steps are described in Algorithm 6.1. The functionality of Algorithm 6.1 is demonstrated in the following Example 6.16. Example 6.16. We consider the PTN shown in Figure 6.12, consisting of five nodes and six edges. There are three lines with their corresponding periodic timetable given. The first number stands for the arrival time of the line in the specified station, the second one for the departure time. The next figure, Figure 6.13, shows the vehicle schedule which consists of two vehicle routes. The first vehicle V1 operates line l1 and line l2 alternately while the second vehicle V2 operates only line l3 .

6.2 An Iterative Re-Optimization Approach

137

Algorithm 6.1 ReLinePlanning 1: Input: PTN=(V , E), lower frequency bounds femin , e ∈ E, lower and upper duration bounds wait trans , U trans , v ∈ V , period length T , number of period Ldrive , Uedrive , e ∈ E, Lwait e v , Uv , Lv v repetitions pmax , minimal times for potential empty trips timev1 ,v2 , v1 , v2 ∈ V , public transport plan (L, π, V ) with V = {r1 , . . . , rn } and vehicle Vi operating route ri . 2: Output: A feasible public transport plan (L , π  , V  ) consistent to (L, π, V ). 3:  Define line network. 4: Initialize line network L = (VL , EL ) with VL = V , EL = ∅. 5: for route ri ∈ V do 6: for trip edges e ∈ (p, l), (p, l) ∈ ri do 7:  Add edge e labeled by aperiodic departure time and vehicle. 8: EL = EL ∪ {(e, τ(e,p,l) , Vi )} 9: end for 10: Fix durations d(e, c), e ∈ c, c ∈ ri satisfying (6.12) and (6.13). 11: for connecting trip edges ej ∈ c, c ∈ ri with c = (e1 , . . . , ek ), ej = (u, v) do 12:  Determine if the duration of (ej , c) fits to a potential timetable. drive + U wait ] then 13: if τ(ej +1 ,c) − τ(ej ,c) ∈ [Ldrive + Lwait ej v , Uej v 14:  Add edge ej labeled by aperiodic departure time and vehicle id. 15: EL = EL ∪ {(ej , τ(ej ,c) , Vi )} 16: end if 17: end for 18: end for 19:  Define collapsed line network 20: Initialize collapsed line network C = (VC , EC ) with VC = V , EC = ∅. 21: for (e, τ, Vi ) ∈ EL with τ ∈ {T , . . . , 2 · T − 1} do 22:  Combine parallel edges from the line network 23:  with the same periodic departure time. 24: EL = EL \ {(e, τ, Vi )}, VehList=[Vi ], Etemp = ∅. 25: for p = 1, . . . , pmax − 1 do 26: if ∃(e, τ + p · T , Vk ) ∈ EL then 27: VehList=[VehList, Vk ], Etemp = Etemp ∪ {(e, τ + p · T , Vk )} 28: else 29: Start next iteration in line 21. 30: end if 31: end for 32: EL = EL \ Etemp , EC = EC ∪ {(e, τ mod T , VehList)} 33: end for 34:  Construct line pool. 35: Find set of longest paths P in collapsed line network C, s.t. all edges in a path have identical labels VehList and the departure times of two consecutive edges (e1 = (u, v), π1 , VehList), (e2 = (v, w), π2 , VehList) satisfy drive drive (π2 − π1 − Ldrive − Lwait + Lwait ∈ [Ldrive + Lwait + Uvwait ]. e1 v )mod T + Le1 v e1 v , Ue1

138

6 Two Heuristic Approaches for Integrating Public Transport Problems

36: Set the line pool L0 as the set of all subpaths of P . 37: Find a line plan L by solving a line planning problem for pool L0 such that 38: all PTN edges are covered according to the lower frequency bounds femin , 39: all edges e ∈ EC are part of at most one active line 40: and the line costs are minimized. 41:  Find the corresponding timetable and vehicle schedule. 42: Construct timetable π  and vehicle schedule V  by using the periodic times from the collapsed line network for the departure times, adding the corresponding arrival times and updating the vehicle routes according to the new lines.

From this information we now create the line network shown in Figure 6.14a. Here, we see each driving of a PTN edge marked by the vehicle id and the starting time for the 3 period repetitions we are looking at and where the period length is 60 minutes. The collapsed line network is shown in Figure 6.14b. Here, the periodic drivings are shown, marked by the periodic departure time and the corresponding list of vehicles. Note that a vehicle list does not have to consist of only one vehicle, as is the case in this simple example, but could also consist of different vehicles. The last figure, Figure 6.15, shows which edges of the collapsed line network can be joined to a new line. We get the old line l3 as l11 and all its subpaths as well as a new line l21 with its subpaths in which the old lines l1 and l2 are contained. n2

n3 Lines l1 = (n1 [00 , 05 ], n2 [15 , 20 ], n3 [25 , 30 ])

n5

l2 = (n3 [30 , 35 ], n5 [40 , 45 ], n1 [55 , 00 ])

n1

n4

l3 = (n1 [00 , 05 ], n4 [20 , 25 ], n3 [35 , 40 ])

Fig. 6.12 PTN and line plan.

n2

n3

n3

n5 n1 Vehicle V1 : l1 [01:00, 01:30], l2 [01:30, 02:00] l1 [02:00, 02:30], l2 [02:30, 03:00] l1 [03:00, 03:30], l2 [03:30, 04:00] Fig. 6.13 Vehicle schedule.

n1

n4

Vehicle V2 : l3 [01:00, 01:40], ∅ [01:40, 02:00] l3 [02:00, 02:40], ∅ [02:40, 03:00] l3 [03:00, 03:40], ∅ [03:40, 04:00]

6.2 An Iterative Re-Optimization Approach

139

V1 , 03:15 V1 , 02:15

n2

n3

V1 , 01:15

n2

30

(20’, [V2 , V2 , V2 ])

(00’, [V1 , V1 , V1 ])

V2 , 03:20

0

0

02

:4

1,

1

,V

(00’, [V2 , V2 , V2 ])

n4

,V

]) 1

1

1

0’

01

V

,V

1

n5

0’

V ,[

(4

1,

V

n1

,

,V 1 [V

])

(3

:4

40

3:

,0

V1

V

n5

V2 , 02:20

V

1,

V1 , 01:00

V1 , 03:00

V1 , 02:00

V

1, 02 01 :30 :3 0 V2 , 01:20

3:

,0 1

n3

(15’, [V1 , V1 , V1 ])

n4

V2 , 01:00

n1

V2 , 02:00 V2 , 03:00

(a) Line network.

(b) Collapsed line network.

Fig. 6.14 Line networks for Example 6.16.

n3

(15’, [V1 , V1 , V1 ])

(00’, [V1 , V1 , V1 ])

, 0’

(3

n5

, 0’

[V

,V 1 ,V

])

1

[V

,V

,V 1

l12 = (n1 , n4 )

1

l13 = (n4 , n3 ) l21 = (n1 , n2 , n3 , n5 , n1 ) l22 = (n1 , n2 , n3 , n5 ) l23 = (n2 , n3 , n5 , n1 )

1

l24 = (n3 , n5 , n1 )

(4

n1

Lines l11 = (n1 , n4 , n3 )

])

1

(20’, [V2 , V2 , V2 ])

n2

(00’, [V2 , V2 , V2 ])

n4

...

Fig. 6.15 Coinciding labels.

The line pool generation is now complete and it remains to find a cost-minimal line concept based on this new line pool. In the following theorem we show that Algorithm 6.1 finds a public transport plan that is consistent with the public transport plan (L, π, V) used as input. Theorem 6.17. The public transport plan (L , π  , V  ) constructed by Algorithm 6.1 is consistent with the public transport plan (L, π, V) used as input and line plan L is feasible w.r.t the lower frequency bounds. Proof. The construction of the line network in lines 4 to 18 assigns an aperiodic departure time for each PTN edge e ∈ P (r) covered by vehicle route r ∈ V that can be part of a trip according to the lower and upper bounds. In the collapsed line network constructed in line 20 to 33 these aperiodic coverings of edges are

140

6 Two Heuristic Approaches for Integrating Public Transport Problems

accumulated to a periodic one if the edge is covered in each period repetition at the same periodic time point. These collapsed edges are labeled by the list of vehicles which cover them in each period repetition. The construction of the paths in line 35 guarantees that each line is covered by one vehicle end-to-end in each planning period and that the corresponding timetable is feasible as transfers pose no restriction due to Assumption 6.5. Additionally, line concept L is feasible as the minimal frequencies are respected due to line 38. It remains to show that the new vehicle schedule V  is feasible, that there exists a bijection b : V → V  of the vehicle routes and that the trips of b(r) are part of the path P (r) fitting to the duration of the connecting trips if applicable. As bijection b we map route ri of vehicle Vi to the new route of vehicle Vi . Here, the new route of Vi consists of trips (p, l) where line l corresponds to a path in the collapsed line network with label VehList where vehicle Vi starts in period repetition p. This correspondence is unique as each edge (e, πi , VehList) of the collapsed line network can only be part of one line, see line 39, and the covering of a PTN edge by vehicle Vi in period repetition p, represented by line network edge (e, πi + p · T , Vi ), can only be part of one edge (e, πi , VehList) of the collapsed line network, see line 32. The construction of the collapsed line network also guarantees that all trips (p, l) in vehicle route b(r) are part of P (r) and that the corresponding aperiodic times coincide. The duration of trips that are part of an old connecting trip is fitting to the durations fixed in line 10 and therefore satisfies (6.12) and (6.13). The duration of connecting trips ((p1 , l1 ), (p2 , l2 )) ∈ b(r), r ∈ V, is feasible as well: Let v1 be the last station of line l1 and v2 the first station in line l2 . Then there is a v1 − v2 path Pv1 ,v2 which is part of P (r). Covering Pv1 ,v2 in vehicle route r takes at least as long as timev1 ,v2 which is defined in Assumption 6.5 as the length of the shortest v1 − v2 paths in the PTN according to the lower bounds on the drive times. Therefore, the trips (p1 , l1 ) and (p2 , l2 ) are compatible and the vehicle schedule V  is feasible as well. 

To prove that this line concept is also cost-minimal under a technical assumption, we start by showing that the line pool constructed in Algorithm 6.1 contains all consistent lines. Lemma 6.18. Let the duration of the edges in connecting trips in V be uniquely determined by (6.12) and (6.13) and let for each edge e ∈ E the aperiodic departure times τ(e,p,l) , τ(e,c) be unique for all trips (p, l) ∈ V with e ∈ (p, l) and connecting trips c ∈ V with e ∈ c, i.e., there is at most one departure using edge e at any point in time. Then all lines that are consistent with the public transport plan (L, π, V) used as input are in the line pool L0 constructed in Algorithm 6.1. Proof. Note that due to the fixed duration of edges in connecting trips, the aperiodic departure times of edges in connecting trips can be uniquely determined. Due to the uniqueness of the departure times, the collapsed line network constructed in lines 20 to 33 is unique as well and thus especially the labels VehList. Let l be a line that is not in L0 , i.e., that is not constructed in line 36. We show that this line l is not consistent with (L, π, V).

6.2 An Iterative Re-Optimization Approach

141

At first we consider the case where each edge ei ∈ l corresponds to an edge (ei , πi , VehListi ) in EC . As l ∈ / L0 there either is no common label VehList for all edges ei ∈ l or the periodic departure times of two consecutive edges do not fit to the lower and upper bounds. As the aperiodic departure times of all edges are unique, the list of vehicles operating this edge in each planning period is unique and found by Algorithm 6.1. Therefore, differing labels for different edges show that line l is not covered by one vehicle end-to-end in each period repetition, i.e., the line is not consistent with (L, π, V). If the periodic departure times do not fit to the lower and upper bounds, the corresponding timetable π  is not feasible, i.e., line l is not consistent with (L, π, V). We therefore only have to consider the case where at least one edge e ∈ l has no corresponding edge in EC . Due to the uniqueness of the aperiodic departure times, this means that for edge e there is no departure in each period repetition at the same periodic time. Thus, edge e cannot be part of a line consistent with public transport plan (L, π, V). 

Using Theorem 6.17 and Lemma 6.18, we show that the line plan constructed by Algorithm 6.1 is cost-minimal. Theorem 6.19. Let the duration of the edges in connecting trips in V be uniquely determined by (6.12) and (6.13) and let for each edge e ∈ E the aperiodic departure times τ(e,p,l) , τ(e,c) be unique for all trips (p, l) ∈ V with e ∈ (p, l) and connecting trips c ∈ V with e ∈ c, i.e., there is at most one departure using edge e at any point in time. Then Algorithm 6.1 finds a public transport plan (L , π  , V  ) that is consistent with the public transport plan (L, π, V) used as input such that line plan L is feasible w.r.t the lower frequency bounds and minimizes the line costs (6.14). Proof. Due to Theorem 6.17, the public transport plan (L , π  , V  ) found by Algorithm 6.1 is consistent with (L, π, V) and line plan L is feasible according to the lower frequency bounds. The line pool which is used for the optimization problem contains all consistent lines according to Lemma 6.18. Therefore, it only remains to show that the constraints of the optimization problem posed in lines 38 to 39 of Algorithm 6.1 are necessary. The constraints posed in line 38 are necessary to ensure that L is feasible w.r.t the lower frequency bounds. The constraints posed in line 39 are needed to ensure a bijection between the old and the new vehicle routes, i.e., they are necessary to guarantee a consistent line plan. Thus, the line plan constructed by Algorithms 6.1 is cost-optimal for all feasible line plans that can be extended to a consistent public transport plan. 

Remark 6.20. To show the optimality of the line plan constructed in Algorithm 6.1 we need two technical assumptions, namely that the duration of edges in connecting trips is unique and that for any edge there is at most one departure at any given point in time. The second assumption is easy to ensure by headway activities and is satisfied for realistic instances due to security concerns. On the other hand, the first assumption is unlikely to be satisfied for realistic instances as it allows for no buffer

142

6 Two Heuristic Approaches for Integrating Public Transport Problems

times in connecting trips. If it is not satisfied, the solution quality of Algorithm 6.1 depends on the durations fixed in line 10.

6.2.2 Iteration Scheme As described in [Sch17], the re-optimization problems defined in Section 6.2.1 can be used in an iterative scheme to modify an existing public transport plan. In theory, the three algorithms ReLinePlanning, ReTimetabling, and ReVehicleScheduling can be used in any order. However, not all concatenations of algorithms lead to improvements. In this section, we investigate the influence of different iteration schemes on both the passenger-oriented and the cost-oriented objective of the resulting public transport plan as described in Definition 1.37. Remember that the passenger-oriented objective is to minimize the travel time of all passengers on shortest paths according to the timetable while the costs-oriented objective is to minimize the operational costs of the corresponding vehicle schedule. At first, we consider the influence of the individual algorithms on the travel time and the operational costs. The influence of Algorithm ReVehicleScheduling can be determined most easily. Lemma 6.21. Let (L, π, V) be a public transport plan and (L , π  , V  ) the public transport plan after applying Algorithm ReVehicleScheduling to (L, π, V). Then the operational costs do not increase and the travel time is unchanged, i.e., cost(V  ) ≤ cost(V) RSP (π  ) = RSP (π ). Proof. Note that ReVehicleScheduling does not change the line plan or the timetable, i.e., L = L and π  = π . Therefore, we get RSP (π  ) = RSP (π ). Additionally, ReVehicleScheduling minimizes the operational costs and as V is a feasible solution of ReVehicleScheduling we get cost(V  ) ≤ cost(V). 

Algorithm ReTimetabling has a clear effect on the travel time while its effect on the operational costs depends on the cost parameter set γ . Lemma 6.22. Let (L, π, V) be a public transport plan and (L , π  , V  ) the public transport plan after applying Algorithm ReTimetabling to (L, π, V). Then the travel time does not increase, i.e., RSP (π  ) ≤ RSP (π ). If the duration based costs are neglected, i.e., for γ1 = γ3 = 0, the operational costs are not changed, i.e.,

6.2 An Iterative Re-Optimization Approach

143

cost(V  ) = cost(V). Proof. Note that Algorithm ReTimetabling does not change the line plan, i.e., L = L and the composition of the vehicle routes in V  is the same as in V. However, the start and end times of trips and connecting trips may change. RSP (π ) evaluates the travel time of all passengers on shortest path w.r.t timetable π and Algorithm ReTimetabling sets the passenger weights w according to the same paths. As Algorithm ReTimetabling optimizes the travel time of the passengers on these fixed paths, i.e., Rfix (π  , w), and π is a feasible solution, we get RSP (π ) ≥ Rfix (π  , w). By rerouting the passenger on optimal routes according to timetable π  we get RSP (π ) ≥ Rfix (π  , w) ≥ RSP (π  ). When evaluating the costs of a public transport plan without regarding the duration based costs and without depots, we get    cost(V) = γ2 · lengtht + γ4 · lengthc + γ5 · |V|. r∈V

trip t∈r

connecting trip c∈r

As the composition of the vehicle routes in V and V  are the same, i.e., they contain the same trips and the same connecting trips, we get    cost(V) = γ2 · lengtht + γ4 · lengthc + γ5 · |V| r∈V

=

trip t∈r

  r∈V 

trip t∈r

connecting trip c∈r

γ2 · lengtht +



γ4 · lengthc + γ5 · |V  |

connecting trip c∈r

= cost(V  ). 

Example 6.23 shows that for positive duration based costs, i.e., for γ1 = γ3 > 0, the operational costs can be increased by Algorithm ReTimetabling. Example 6.23. Consider an event-activity network as given in Figure 6.16. Suppose there are W passengers transferring at station n1 from line l2 to line l1 and W passengers transferring from line l1 to line l2 at station n2 . Suppose that in the original timetable the departure of line l2 at station n2 is schedule shortly before the arrival of line l1 at the same station such that the transfer takes almost a full planning period. Then by delaying the departure of line l2 at station n2 , the transfer

144

6 Two Heuristic Approaches for Integrating Public Transport Problems

time gets shorter improving the travel time of the passengers but the duration of line l2 increases, leading to higher operational costs. The effects of Algorithm ReLinePlanning are the most difficult to determine. First note that the travel time can be increased as shown in Example 6.24. Example 6.24. Consider the PTN and line plan given in Figure 6.17a. After applying Algorithm ReLinePlanning we can get the situation depicted in Figure 6.17b, if the minimal frequency of edge (n2 , n3 ) is one and the fixed costs of a line are relatively low. This means that passengers traveling from n1 to n4 have to transfer at station n2 and station n3 and therefore might have significantly higher travel times. It remains to examine the influence of Algorithm ReLinePlanning on the operational costs. Lemma 6.25. Let (L, π, V) be a public transport plan and (L , π  , V  ) the public transport plan after applying Algorithm ReLinePlanning to (L, π, V). Then the operational costs do not increase, i.e., Fig. 6.16 Excerpt of the event-activity network.

n1

n2

l1 W

W

l2 n5

n6

Lines

l1 = (n1 , n2 , n3 , n4 ) n1

n2

n3

n4

(a) Line plan before applying Algorithm

n5 n1

n3

.

l2 = (n5 , n2 , n3 , n6 ) n4

(b) Line plan after applying Algorithm

Fig. 6.17 Line plans for Example 6.24.

ReLinePlanning Lines

n6 n2

l2 = (n5 , n2 , n3 , n6 )

l3 = (n1 , n2 ) l4 = (n3 , n4 ) ReLinePlanning .

6.2 An Iterative Re-Optimization Approach

145

cost(V  ) ≤ cost(V). Proof. We analyze the operational costs of (L , π  , V  ) by looking at the different parts of the operational costs separately. We write cost(V) =



d(r) +

r∈V



length(r) + γ5 · |V|,

r∈V

where d(r) describes the duration of vehicle route r and length(r) its length. From Definition 6.10 we get bijection b of the vehicle routes. Thus we get |V| = |V  |.

(6.15)

The duration of a vehicle route r = ((p1 , l1 ), . . . , (pn , ln )) is defined by the duration of its trips and connecting trips. d(r) =

n 

γ1 · (epi ,li − spi ,li ) +

i=1

n−1 

γ3 · (spi+1 ,li+1 − epi ,li ).

i=1

With γ1 = γ3 from Assumption 6.5 we get d(r) = γ1 ·

n



epi ,li −

i=1

n 

spi ,li +

i=1

n 

spi ,li −

i=2

n−1 

epi ,li = γ1 · (epn ,ln − sp1 ,l1 ).

i=1

Route r and route b(r) differ from one another as not all edges in r have to be covered by b(r). Especially, the route might start later or end earlier. Thus we get d(r) ≥ d(b(r)).

(6.16)

The length of a vehicle route r = ((p1 , l1 ), . . . , (pn , ln )) is defined by the length of its trips and connecting trips. length(r) =

n 

γ2 · lengthli +

i=1

n−1 

γ4 · Dli ,li+1 .

i=1

With γ2 = γ4 and Dli ,li+1 being the length of a shortest path from Assumption 6.5 and the definition of P (r) in Notation 6.8 we get length(r) = γ2 ·

n

 i=1

lengthli +

n−1  i=1

 Dli ,li+1 = γ2 · lengthe . e∈P (r)

146

6 Two Heuristic Approaches for Integrating Public Transport Problems

From Definition 6.10 we get that the paths of all trips of b(r) are contained in the path P (r) but connecting trips of b(r) use a shortest path. With the triangle inequality we get length(r) ≥ length(b(r)).

(6.17)

Combining equations (6.15), (6.16) and (6.17) we get   d(r) + length(r) + γ5 · |V| cost(V) = r∈V





r∈V

d(b(r)) +

r∈V



length(b(r)) + γ5 · |V  |

r∈V

= cost(V  ). 

We now use Lemmas 6.21, 6.22 and 6.25 to formulate convergence results for iteratively applying the Algorithms ReLinePlanning, ReTimetabling, and ReVehicleScheduling. As the travel time is more difficult to improve, we can only guarantee convergence for applying ReTimetabling and ReVehicleScheduling although the objectives of both algorithms differ. Theorem 6.26. Let P0 be a feasible public transport plan with travel time t0 . Let Pi , i ∈ N+ , be a public transport plan derived from Pi−1 by applying either ReTimetabling or ReVehicleScheduling and let ti be the travel time of Pi . Then the sequence of travel time values (ti )i∈N decreases monotonically and converges. Proof. As all feasible activity durations are positive, the sequence is bounded from below by zero. From Lemmas 6.21 and 6.22 we get that the travel time is not increased by ReTimetabling while ReVehicleScheduling has no influence on it. Therefore, (ti )i∈N is monotonic and bounded and converges by the monotone convergence theorem, see e.g., [Sut09]. 

For the operational costs, we can guarantee convergence if duration based costs are neglected, i.e., if γ1 = γ3 = 0. Theorem 6.27. Let P0 be a feasible public transport plan with operational costs c0 where duration based costs are neglected, i.e., with γ1 = γ3 = 0. Let Pi , i ∈ N+ , be a public transport plan derived from Pi−1 by applying either ReLinePlanning, ReTimetabling, or ReVehicleScheduling and let ci be the operational costs of Pi . Then the sequence of operational cost values (ci )i∈N decreases monotonically and converges. Proof. As all vehicle schedules have positive costs, the sequence is bounded from below by zero. From Lemmas 6.21, 6.22 and 6.25 we get that the operational costs are not increased by ReLinePlanning and ReVehicleScheduling as well

6.2 An Iterative Re-Optimization Approach

147

as ReTimetabling if duration based costs are neglected, i.e., if γ1 = γ3 = 0 is satisfied. Therefore, (ci )i∈N is monotonic and bounded and converges by the monotone convergence theorem, see e.g., [Sut09]. 

Especially, we get convergence for travel time and costs if duration based costs are neglected, i.e., if γ1 = γ3 = 0 is satisfied, and only ReTimetabling and ReVehicleScheduling are applied. Corollary 6.28. Let P0 be a feasible public transport plan with travel time t0 and operational costs c0 where duration based costs are neglected, i.e., γ1 = γ3 = 0 is satisfied. Let Pi , i ∈ N+ , be a public transport plan derived from Pi−1 by applying either ReTimetabling or ReVehicleScheduling. Let ti and ci be the travel time and the operational costs of Pi , respectively. Then both the sequence of travel time values (ti )i∈N and the sequence of operational cost values (ci )i∈N decrease monotonically and converge. Proof. The sequence (ti )i∈N converges by Theorem 6.26 and (ci )i∈N converges by Theorem 6.27.



6.2.3 Computational Experiments We test the iterative scheme to modify an existing public transport plan on two different data sets, grid, see Section 1.4.3, and regional, see Section 1.4.4. We use data set grid as a case study with the OD matrix described in Section 1.4.3. For data set regional we apply the algorithms to ten different demand scenarios and report the average increases and decreases of the objectives. The computations are conducted on a compute server with an Intel(R) Xeon(R) X5675 CPU @ 3.07 GHz and 132 GB of RAM. To test the iterative algorithms, we at first compute an initial public transport plan using the LinTim software framework, [SAP+ 18]. Here, the cost model of line planning, see Problem 1.12, the standard periodic timetabling problem, see Problem 1.17 and the vehicle scheduling model, see Problem 1.26 are used. The timetabling problem is solved by a modulo simplex heuristic implemented in LinTim, see [GS13]. Afterwards, we apply one of the following iteration schemes: forward Iteratively compute a public transport plan by applying the Algorithms ReLinePlanning, ReTimetabling and ReVehicleScheduling. backward Iteratively compute a public transport plan by applying the Algorithms ReVehicleScheduling, ReTimetabling and ReLine Planning. mixed Iteratively compute a public transport plan by applying the Algorithms ReLinePlanning, ReTimetabling, ReVehicleScheduling and again ReTimetabling.

148

6 Two Heuristic Approaches for Integrating Public Transport Problems

passenger convenience Iteratively compute a public transport plan by alternately applying the Algorithms ReTimetabling and ReVehicle Scheduling. We use two different cost parameter sets for the computations, either normal which reflects a close-to real-world cost evaluation or convergence which differs from normal by setting the duration based costs to zero, i.e., setting γ1 = γ3 = 0. Note that due to Theorem 6.27, cost parameter set convergence guarantees the convergences of the operational costs. For each public transport plan we compute the travel time on shortest paths according to the corresponding timetable and the operational costs depending on the cost parameter set that was used for the computation. Instead of the absolute values, we plot the relative values depending on the travel time and operational costs of the initial public transport plan, respectively. For both data sets, the runtime of each iteration is in the range of minutes. However using larger data sets for long-distance networks increases the runtime dramatically as not only the network size but also the time horizon increases which both contribute to the problem size. Note that for Algorithm ReTimetabling we use the current timetable as starting solution to speed up the computation. For data set grid we compare the influence of the different iteration schemes for cost parameter set normal on the convergence and the solution quality. Figure 6.18 shows that although convergence is not guaranteed, both travel time and operational costs do not change anymore after a few iterations. However, the travel time does not decrease monotonically. Especially for iteration scheme backward, depicted in Figure 6.18b, the travel time increases multiple times. Note that although for the operational costs monotonicity and convergence is not guaranteed as duration based costs are not neglected, i.e., for γ1 = γ3 > 0, the costs decrease monotonically for all iteration schemes considered here. The solutions found by the different iteration schemes vary in respect to travel time and operational costs. While backward yields the highest operational cost decrease of 18%, the travel time increases by 8%. On the other hand mixed yields a lower decrease of 5% of the initial operational costs but the increase in travel time is much lower, with only 5%. Depending on the preference corresponding to the trade-off between travel time and operational costs, both solutions are interesting options. In contrast, the solution for iteration scheme forward is clearly worse than the one for iteration scheme backward, as both the decrease in operational costs is lower with 10% and the increase in travel time is higher with 15%. Figure 6.19 shows the impact of convergence scheme backward on the line plan. The coverage of the PTN edges decreases, yielding the large improvements in operational costs but also the increase in travel time. While often lines are simply shortened or stay the same, see, e.g., the orange and the dark blue line, also new lines are formed. The cyan line now directly connects station v6 to the stations v12 , v17 , and v22 . In the initial line plan there is at least one transfer necessary to connect these stations. For data set regional, we get even better results when considering iteration scheme mixed for the cost parameter sets normal and convergence. Although monotonically decreasing costs are only guaranteed for cost parameter

6.2 An Iterative Re-Optimization Approach

149

1.20 1.15 1.10 1.05 1.00 0.95 0.90 0.85 Veh

Tim

Lin

Veh

Lin

Tim

Veh

Lin

Tim

Veh

Lin

Tim

Veh

Lin

Tim

Veh

Lin

Tim

init

0.80

relative operational cost relative travel time (a) Iteration scheme forward. 1.20 1.15 1.10 1.05 1.00 0.95 0.90 0.85 Lin

Veh

Tim

Lin

Veh

Tim

Lin

Tim

Tim Tim

Lin

Veh

Tim

Lin

Veh

Veh

Tim

Lin

Tim

Lin

Veh

Tim

init

Veh

0.80

relative operational cost relative travel time (b) Iteration scheme backward. 1.20 1.15 1.10 1.05 1.00 0.95 0.90 0.85 Lin

Tim

Veh

Lin

Tim

Veh

Tim

Tim

Lin

Veh

Tim

Tim

Lin

init

0.80

relative operational cost relative travel time (c) Iteration scheme mixed.

Fig. 6.18 Applying different iteration schemes for data set grid with cost parameter set normal.

150

6 Two Heuristic Approaches for Integrating Public Transport Problems

v1

v2

v3

v4

v5

v1

v2

v3

v4

v5

v6

v7

v8

v9

v10

v6

v7

v8

v9

v10

v11

v12

v13

v14

v15

v11

v12

v13

v14

v15

v16

v17

v18

v19

v20

v16

v17

v18

v19

v20

v21

v22

v23

v24

v25

v21

v22

v23

v24

v25

(a) Initial solution.

(b) After applying iteration scheme backward.

Fig. 6.19 Line concepts of data set grid.

set convergence, Figure 6.20 shows that the costs decrease monotonically for both parameter sets. This can also be observed for data set grid, see Figure 6.18, showing that in practice Algorithm ReTimetabling does not often increase the costs even if duration based costs are considered. Furthermore, the costs decrease is even higher than for data set grid with 24% decrease for parameter set normal and 25% for parameter set convergence. Even though for both parameter sets the travel time does not decrease, the increase is relatively low compared to the reduction in operational costs with 6% and 7% for cost parameters sets normal and convergence, respectively. For parameter set normal there even is one instance where the travel time is slightly reduced by 2% while the operational costs are also reduced by 25%. When considering iteration scheme passenger convenience with cost parameter set convergence, as depicted in Figure 6.21, we see that both the travel time and the operational costs decrease monotonically as expected due to Corollary 6.28. Note that here only the first two iterations are illustrated as no further changes occur in the later iterations. For data set grid the improvement is relatively small with 1% decrease of travel time and 2% decrease in operational costs. However, for data set regional the travel time is decreased significantly by 9% with a small improvement of the operational costs by 2%. This makes the solution clearly preferable to the initial solution and makes for an interesting additional choice to the solution found by iteration scheme mixed for regional with the same cost parameter set convergence with lower costs but significantly higher travel time. In order to investigate the influence of the initial solution on the quality of the solution found by the iteration schemes, we apply the iteration schemes forward, backward, and mixed to two different initial solutions for data set grid with cost parameter set normal. Initialization cost is the initial solution described above, computed by using the cost model of line planning, a periodic timetabling model, and a standard vehicle scheduling model. Initialization direct

6.2 An Iterative Re-Optimization Approach

151

1.3 1.2 1.1 1.0 0.9 0.8 Veh

Tim

Lin

Tim

Veh

Tim

Lin

Tim

Lin

Tim Tim

Veh

Tim

Lin

Tim

Veh

Tim

Lin

Tim

Veh

Tim

Lin

Tim

init

0.7

relative operational cost relative travel time (a) Cost parameter set normal. 1.3 1.2 1.1 1.0 0.9 0.8 Lin

Veh

Tim

Lin

Tim

Veh

Tim

Lin

Tim

Veh

Tim

Tim

Lin

init

0.7

relative operational cost relative travel time (b) Cost parameter set convergence.

Fig. 6.20 Applying iteration scheme mixed for data set regional with different cost parameter sets.

uses the direct travelers model of line planning, see Problem 1.13, combined with the same timetabling and vehicle scheduling models. Figure 6.22 shows that the solutions derived from applying the iteration schemes to initialization cost and initialization direct differ. Especially, the set of solutions found for initialization direct is preferable to the set of solutions found for initialization cost as for each solution derived from initialization cost there exists a strictly dominating solution derived from initialization direct. However, the solution found by the iterative schemes are all similar in travel time and operational costs, with average travel times varying from 23 to 25.8 and average operational costs varying from 890 to

152

6 Two Heuristic Approaches for Integrating Public Transport Problems 1.00

1.000

0.98 0.995

0.96 0.94

0.990

0.92

0.985

relative operational cost relative travel time

Veh

Tim

Veh

Tim

init

Veh

Tim

Veh

Tim

init

0.90

relative operational cost relative travel time

(a) Data set grid.

(b) Data set regional.

Fig. 6.21 Applying iteration scheme passenger convenience with cost parameter set convergence. 2200

average operational costs

2000

1800

1600

1400

1200

1000

800

18

19

20

21

22

23

24

25

26

average travel time [min] initialization cost initialization direct

initial solution forward

backward mixed

Fig. 6.22 Comparing different initial solutions for iteration schemes forward, backward, and mixed on data set grid with cost parameter set normal.

984, although the initial solutions differ a lot with average travel times of 22.29 and 18.65 and average operational costs of 1144 and 2051.28, respectively. Figure 6.22 especially shows that the iteration schemes forward, backward, and mixed are mainly focused on minimizing operational costs instead of minimizing travel time.

6.3 Summary

153

6.3 Summary In this chapter, we present two different heuristic approaches for integrating problems in public transport planning. In the first section, we derive a lookahead heuristic where a sequential planning process is adapted to incorporate the influence of each planning stage on the subsequent stages. In the second section, we investigate an iterative approach to re-optimizing an existing public transport plan by changing either the line plan, the timetable, or the vehicle schedule while the remaining two stages are fixed. Both heuristics show promising results compared to the classical sequential approach, especially by finding solutions with considerably lower operational costs.

Chapter 7

General Multi-Stage Problems

As we have seen in the previous chapters, solving public transport problems as integrated problems instead of sequentially can lead to significant improvements in solution quality but at the same time makes the problem much harder to solve. In this chapter, we have a look at general multi-stage problems and we compare the solution quality of integrated and sequential solution approaches.

7.1 Sequential and Multi-Stage Problems In public transport planning, problems are usually solved sequentially, e.g., by computing a timetable π that is optimal for given passenger weights and afterwards finding an optimal vehicle schedule for timetable π . In a more general form this solution approach is given as follows. Problem 7.1. A set of sequential optimization problems is given by variables xi ∈ Rmi , i ∈ {1, . . . , n}, feasible sets F1 ⊂ Rm1 , Fi (y1 , . . . , yi−1 ) ⊂ Rmi , i ∈ {2, . . . , n}, yj ∈ Rmj , j ∈ {1, . . . , i − 1}, and objective functions fi : Rm1 × . . . × Rmi → Rdi , i ∈ {1, . . . , n}, such that (Seqi (x1 , . . . , xi−1 ))

min fi (x1 , . . . , xi ) s.t. xi ∈ Fi (x1 , . . . , xi−1 ). (continued)

© Springer Nature Switzerland AG 2020 P. Schiewe, Integrated Optimization in Public Transport Planning, Springer Optimization and Its Applications 160, https://doi.org/10.1007/978-3-030-46270-3_7

155

156

7 General Multi-Stage Problems

Problem 7.1 (continued). We call (Seqi (x1 , . . . , xi−1 )), i ∈ {1, . . . , n}, sequential problems and solving (Seqi (x1 , . . . , xi−1 )), i ∈ {1, . . . , n}, the sequential solution approach. For di = 1, i ∈ {1, . . . , n}, let (Seq1 ) be feasible with (optimal) solution x1∗ ∗ )) be feasible with (optimal) solution x ∗ for each and let (Seqi (x1∗ , . . . , xi−1 i i ∈ {2, . . . , n}. Then we call (x1∗ , . . . , xn∗ ) the (optimal) sequential solution. Note that for (Seqi (x1 , . . . , xi−1 )), i ∈ {1, . . . , n}, only variables xi are optimized and in the objective function fi (x1 , . . . , xi−1 , xi ) the variables xj , j ∈ {1, . . . , i − 1}, of the former stages are used as parameters, i.e., for each input x1 , . . . , xi−1 an objective function x ,...,xi−1

gi 1

: Rmi → Rdi x → fi (x1 , . . . , xi )

is optimized. However, the previous chapters show that solving several sequential problems in an integrated way can lead to substantially better solutions. We hence consider multi-stage problems of the following form. Problem 7.2. A multi-stage problem (MSP) with n stages or n-stage problem is an optimization problem with variables xi ∈ Rmi , i ∈ {1, . . . , n}, and feasible sets F1 ⊂ Rm1 , Fi (y1 , . . . , yi−1 ) ⊂ Rmi , i ∈ {2, . . . , n}, yj ∈ Rmj , j ∈ {1, . . . , i −1}, optimizing an objective function f : Rm1 ×. . .×Rmn → Rd , i.e., (MSP)

min f (x1 , . . . , xn )

s.t. x1 ∈ F1 x2 ∈ F2 (x1 ) .. . xn ∈ Fn (x1 , . . . , xn−1 ). Here, variables xi and constraints xi ∈ Fi (x1 , . . . , xi−1 ) form stage i. We call solving (MSP) the integrated solution approach. Relating to the previous chapters, the integrated public transport problems are stated as multi-stage problems. For the example (TimVeh), we get that the set of feasible timetables is F1 as it does not depend on other parts of the problem. The set of feasible vehicle schedules corresponding to a timetable π ∈ F1 is then F2 (π ).

7.1 Sequential and Multi-Stage Problems

157

To understand the relation between the integrated and the sequential solution approach, it is important how the objectives f and fi , i ∈ {1, . . . , n}, correspond to one another. We consider the following possibilities. Definition 7.3. Let f : Rm1 × . . . × Rmn → Rd be the objective function of (MSP) and fi : Rm1 × . . . × Rmi → Rdi , i ∈ {1, . . . , n}, the objective functions of (Seqi (x1 , . . . , xi−1 )). • The objective f is a sum of the sequential objectives fi , i ∈ {1, . . . , n}, if d = di for all i ∈ {1, . . . , n} and f (x1 , . . . , xn ) =

n 

fi (x1 , . . . , xi ).

i=1

• The objective functions f and fi , i ∈ {1, . . . , n}, are called separable if for all i ∈ {1, . . . , n} d = di is satisfied and the objectives fi depend only on variable xi , i.e., there exist functions fi : Rmi → Rdi with fi (x1 , . . . , xi ) = fi (xi ) for all (x1 , . . . , xi ) and f (x1 , . . . , xn ) =

n 

fi (xi ).

i=1

• The objective f is called last stage if it is the objective of the last sequential problem (Seqn (x1 , . . . , xn−1 )), i.e., if d = dn and f (x1 , . . . , xn ) = fn (x1 , . . . , xn ). • The objective f is a multi-criteria combination of the sequential objectives fi , i ∈ {1, . . . , n}, if d = n, di = 1 for all i ∈ {1, . . . , n} and ⎛ ⎜ f (x1 , . . . , xn ) = ⎝

f1 (x1 ) .. .

⎞ ⎟ ⎠.

fn (x1 , . . . , xn ) For multi-criteria combinations we get the following result. Theorem 7.4. If the objective f of (MSP) is a multi-criteria combination of the sequential objectives fi , i ∈ {1, . . . , n}, there is no feasible solution of (MSP) that strictly dominates an optimal sequential solution, i.e., optimal sequential solutions are weakly Pareto optimal. Proof. Let x¯i , i ∈ {1, . . . , n}, be optimal for (Seqi (x¯1 , . . . , x¯i−1 )). Suppose (x1∗ , . . . , xn∗ ) is feasible for (MSP) and (x1∗ , . . . , xn∗ ) strictly dominates (x¯1 , . . . , x¯n ), i.e.,

158

7 General Multi-Stage Problems

  f (x1∗ , . . . , xn∗ ) i < (f (x¯1 , . . . , x¯n ))i ,

i ∈ {1, . . . , n}.

Due to the definition of the objective, we get fi (x1∗ , . . . , xi∗ ) < fi (x¯1 , . . . , x¯i ),

i ∈ {1, . . . , n}

and especially f1 (x1∗ ) < f1 (x¯1 ). This is a contradiction to the assumption of x¯1 being optimal for (Seq1 ) proving that (x¯1 , . . . , x¯n ) is not strictly dominated and therefore weakly Pareto optimal. 

Note that optimal sequential solutions do not need to be Pareto optimal if the optimal solutions of the sequential problems are not unique. In case of uniqueness, we get the following result. Theorem 7.5. If the objective f of (MSP) is a multi-criteria combination of the sequential objectives fi , i ∈ {1, . . . , n}, and the optimal solution x¯i of (Seqi (x¯1 , . . . , x¯i−1 )), i ∈ {1 . . . , n}, is unique, the optimal sequential solution (x¯1 , . . . , x¯n ) is Pareto optimal. Proof. Let x¯i , i ∈ {1, . . . , n}, be the unique optimal solution of (Seqi (x¯1 , . . . , x¯i−1 )) and let (x1∗ , . . . , xn∗ ) be feasible for (MSP) with   f (x1∗ , . . . , xn∗ ) i ≤ (f (x¯1 , . . . , x¯n ))i ,

i ∈ {1, . . . , n}.

Due to the definition of the objective, we get fi (x1∗ , . . . , xi∗ ) ≤ fi (x¯1 , . . . , x¯i ),

i ∈ {1, . . . , n}.

From f1 (x1∗ ) ≤ f1 (x¯1 ) and the uniqueness of the optimal solution x¯1 of (Seq1 ) we get x1∗ = x¯1 . Inductively, we get from fi (x¯1 , . . . , x¯i−1 , xi∗ ) ≤ fi (x¯1 , . . . , x¯i ) and the uniqueness of the optimal solution x¯i of (Seqi (x¯i , . . . , x¯i−1 )) that xi∗ = x¯i is satisfied. Thus, (x1∗ , . . . , xn∗ ) = (x¯1, . . . , x¯n ) and (x¯1 , . . . , x¯n ) is Pareto optimal for (MSP). 

Now we change our point of view and assume that a multi-stage problem is given but is too large to be solved directly. We hence decompose it into sequential problems and wish to define appropriate objective functions. Example 7.6. If the objective function f of (MSP) is one-dimensional and linear, the objective functions fi of (Seqi (x1 , . . . , xi−1 )), i ∈ {1, . . . , n}, can be defined as fi (x1 , . . . , xi ) = f (0, . . . , 0, xi , 0, . . . , 0)

7.1 Sequential and Multi-Stage Problems

159

such that f and fi , i ∈ {1, . . . , n}, are separable and f is the sum of the sequential objectives. If fi , i ∈ {1, . . . , n}, is defined as fi (x1 , . . . , xi ) = f (x1 , . . . , xi , 0, . . . , 0) f is the last stage objective. Remark 7.7. If the objectives of the sequential problems are defined unrelatedly to the objective of (MSP), we cannot expect to find good solutions for (MSP). Consider for example the problem (MSP)

min{x1 + x2 |xi ∈ {0, 1}, i ∈ {1, 2}}

(Seqi )

min{−xi |xi ∈ {0, 1}},

with i ∈ {1, 2}.

The choice of the objective functions can even influence the complexity of the sequential solution approach. Example 7.8. Consider the NP-hard knapsack problem as defined in [GJ79]. Let n items {1, . . . , n} with weights wi ≥ 0, i ∈ {1, . . . , n}, and values ci ≥ 0, i ∈ {1, . . . , n}, as well as amaximal weight W be given. Find a set I ⊂ {1, . . . , n} of items with total weight i∈I wi ≤ W and maximal total value i∈I ci . A possible IP formulation is the following. (K)

max

n 

ci ·xi

i=1

s.t.

n 

wi ·xi ≤ W

i=1

xi ∈ {0, 1}

i ∈ {1, . . . , n}.

Here, xi = 1 if and only if item i is chosen. We define a multi-stage problem with variables y = (yi )i∈{1,...,2n} , for the first stage and variables x = (xi )i∈{1,...,2n} for the second stage. Additionally we define w¯ i = wi , i ∈ {1, . . . , n}, w¯ i = W , i ∈ {n + 1, . . . , 2n}, and c¯i = ci , i ∈ {1, . . . , n}, c¯i = 0, i ∈ {n + 1, . . . , 2n}.

160

(MSP)

7 General Multi-Stage Problems

max

2n 

c¯i · xi

i=1

s.t. y ∈ F1 ={y ∈ {0, 1} : 2n

2n 

yi =n, y1 = . . . =yn , yn+1 = . . . =y2n }

i=1

x ∈ F (y)={x ∈ {0, 1}2n : xi ≤ yi , i ∈ {1, . . . , 2n},

2n 

w¯ i · xi ≤W }.

i=1

As (MSP) is equivalent to (K) it is NP-hard to solve optimally. However, the complexity of the sequential approachdepends on the objective function of the 2n sequential problems. Let f2 (y, x) = i=1 c¯i · xi , i.e., the objective  of (MSP) is the objective of the last sequential stage. Then for f1 (y) = max ni=1 yi we get ∗ ∗ = 0 as optimal y ∗ = (yi∗ )i∈{1,...,2n} with y1∗ = . . . = yn∗ = 1, yn+1 = . . . = y2n ∗ solution of (Seq1 ) and (Seq2 (y )) is equivalent to the knapsack problem (K) and hence NP-hard.  ∗ ∗ For f1 (y) = max 2n i=n+1 yi on the other hand, we get y = (yi )i∈{1,...,2n} with ∗ ∗ ∗ ∗ y1 = . . . = yn = 0, yn+1 = . . . = y2n = 1 as optimal solution of (Seq1 ) and (Seq2 (y ∗ )) is a trivial knapsack problem with optimal solution x ∗ = (xi∗ )i∈{1,...,2n} , xi∗ = 0, i ∈ {1, . . . , 2n}, i.e., (Seq2 (y ∗ )) can be solved optimally in polynomial time.

7.2 Price of Sequentiality In the following we consider multi-stage problems with d = 1 as well as sequential problems with di = 1, i ∈ {1, . . . , n}, and define the price of sequentiality to quantify how well (MSP) is approximated by the sequential solution approach. Similar ideas can be found in [Sch14] where the quality of iterative solution approaches is compared to the quality of integrated ones and in [BHK17] where the benefit of integrating passenger routes in periodic timetabling is investigated as well as in [KDC18] where the value of integration in supply chain management is considered. For defining the price of sequentiality we make no assumptions on the relation between f and fi but we assume that the sequential approach finds a feasible solution. Additionally, we assume that the optimal objective value of (MSP) is strictly greater than zero which can always be achieved by adding a fixed term to the objective. The price of sequentiality is relevant from both perspectives presented in this chapter: If a sequential solution approach is given the price of sequentiality measures the possible benefits of solving the integrated problem instead. If a multi-stage

7.2 Price of Sequentiality

161

problem is given we can use the price of sequentiality to compare different sequential solution approaches in regard to the overall solution quality. Definition 7.9. Let (x1∗ , . . . , xn∗ ) be optimal for (MSP) with d = 1 and let x¯i be optimal for (Seqi (x¯1 , . . . , x¯i−1 )) with di = 1, i ∈ {1, . . . , n}. Then the price of sequentiality is defined as P oS =

f (x¯1 , . . . , x¯n ) − f (x1∗ , . . . , xn∗ ) . f (x1∗ , . . . , xn∗ )

Due to its definition, the price of sequentiality is always positive, i.e., the sequential approach never yields better results than the integrated one. Lemma 7.10. Let (MSP) be a multi-stage problem with optimal solution (x1∗ , . . . , xn∗ ) and (Seqi (x1 , . . . , xi−1 )), i ∈ {1, . . . , n}, be the sequential problems with optimal solutions x¯i for (Seqi (x¯1 , . . . , x¯i−1 )). Then f (x¯1 , . . . , x¯n ) ≥ f (x1∗ , . . . , xn∗ ) holds, i.e., P oS ≥ 0. Proof. As x¯i ∈ Fi (x¯1 , . . . , x¯i−1 ) holds, (x¯1 , . . . , x¯n ) is a feasible solution for (MSP) and thus f (x¯1 , . . . , x¯n ) ≥ f (x1∗ , . . . , xn∗ ) and P oS ≥ 0 are satisfied. 

Clearly, the price of sequentiality is unbounded if the objectives of the sequential problems are unrelated to the objective of (MSP). The following Example 7.11 shows that the price of sequentiality is in general also unbounded, even for linear two-stage problems with separable objectives. Example 7.11. Consider the two-stage problem (MSP)

min 1−x1 +α · x2 s.t.

≤1

x1 x1 −

x2 ≤ 0 ≥0

x1

x2 ≥ 0 with sequential problems (Seq1 )

min 1−x1 s.t.

x1 ≤1 x1 ≥0

(Seq2 (x1 ))

min α · x2 s.t.

x2 ≥x1 x2 ≥ 0.

162

7 General Multi-Stage Problems

For α ≥ 1, x1∗ = x2∗ = 0 is optimal for (MSP) with objective value zMSP = 1. For (Seq1 ) x¯1 = 1 is optimal with objective value f1 (x¯1 ) = 0 and for (Seq2 (x¯1 )) x¯2 = 1 is optimal with objective value f2 (x¯2 ) = α. With f (x¯1 , x¯2 ) = f1 (x¯1 ) + f2 (x¯2 ) = α we get P oS =

α−1 → ∞. 1 α→∞

Nevertheless, there are cases where the price of sequentiality can be bounded. Lemma 7.12. Consider a multi-stage problem (MSP) with sequential problems (Seqi (x1 , . . . , xi−1 )), i ∈ {1, . . . , n}, and sum of sequential objectives. Suppose the objectives of the sequential problems are bounded, i.e., f1 (x1 ) ∈ [a1 , b1 ] f2 (x1 , x2 ) ∈ [a2 , b2 ]

x1 ∈ F1 x1 ∈ F1 , x2 ∈ F2 (x1 )

.. . fn (x1 , . . . , xn−1 ) ∈ [an , bn ]

x1 ∈ F1 , . . . , xn ∈ Fn (x1 , . . . , xn−1 ).

Then the price of sequentiality can be bounded a priori by n n i=1 bi − i=1 ai n . P oS ≤ i=1 ai Proof. Let (x1∗ , . . . , xn∗ ) be an optimal solution of (MSP) with objective value zMSP and x¯i an optimal solution of (Seqi (x¯1 , . . . , x¯i−1 )), i ∈ {1, . . . , n}. Let zSeq be the objective value of the sequential solution (x¯i , . . . , x¯n ), i.e., zSeq = f (x¯1 , . . . , x¯n ) =

n 

fi (x¯1 , . . . , x¯i−1 ).

i=1 ∗ ), i ∈ {1, . . . , n}, we get f (x ∗ , . . . , x ∗ ) ∈ [a , b ], As xi∗ ∈ Fi (x1∗ , . . . , xi−1 i 1 i i i−1 i ∈ {1, . . . , n} and thus

zMSP =

n 

∗ fi (x1∗ , . . . , xi−1 )≥

i=1

n 

ai .

i=1

Since x¯i ∈ Fi (x¯1 , . . . x¯i−1 ), i ∈ {1, . . . , n}, we get zSeq =

n  i=1

Together, this yields

fi (x¯1 , . . . , x¯i−1 ) ≤

n  i=1

bi .

7.2 Price of Sequentiality

163

zSeq − zMSP P oS = ≤ zMSP

n



i=1 bi

n

n

i=1 ai

i=1 ai

. 

Another special case occurs for independent sequential subproblems. Definition 7.13. A multi-stage problem (MSP) with sequential problems (Seqi (x1 , . . . , xi−1 )), i ∈ {1, . . . , n}, is a multi-stage problem with independent sequential subproblems if the feasible set of stage i, i ∈ {1, . . . , n}, does not depend on the other stages, i.e., if Fi (x1 , . . . , xi−1 ) = Fi ,

i ∈ {1, . . . , n}

is satisfied. For this special case of independent sequential problems with separable objectives, the price of sequentiality is zero. Lemma 7.14. Let (MSP) be a multi-stage problem with independent sequential subproblems and separable objectives, i.e., there are functions fi : Rmi → R, i ∈ {1, . . . , n}, with fi (x1 , . . . , xi ) = fi (xi ) for all (x1 , . . . , xi ) and f (x1 , . . . , xn ) =

n 

fi (xi ).

i=1

Then the price of sequentiality is zero. Proof. Consider an optimal solution (x1∗ , . . . , xn∗ ) of (MSP) with (MSP)

min f (x1 , . . . , xn ) =

n 

fi (xi )

i=1

s.t. x1 ∈ F1 .. . xn ∈ Fn . Then, xi∗ is optimal for (Seqi ), i ∈ {1, . . . , n}, with (Seqi )

min fi (xi ) s.t. xi ∈ Fi

as xi∗ is clearly feasible for (Seqi ) and a solution x¯i ∈ Fi with fi (x¯i ) < fi (xi∗ ) ∗ , x¯ , x ∗ , . . . , x ∗ ) of could be extended to a feasible solution x  = (x1∗ , . . . , xi−1 i i+1 n (MSP) with objective value

164

7 General Multi-Stage Problems

f (x  ) =

n 

fj (xj∗ ) − fi (xi∗ ) + fi (x¯i )