# Train-Scheduling Optimization Model for Railway Networks with Multiplatform Stations

^{1}

^{2}

^{*}

^{†}

## Abstract

**:**

## 1. Introduction

- Development of an original mathematical formulation as a mixed linear optimization problem of the complex system, including the microscopic detail of railway-service requirements. The model obtains optimal solutions improving this computation time of some results published in the literature in similar scenarios, and is scalable in the sense that the computation time is independent of the number of train requests;
- heuristics based on genetics able to generate good-enough timetables for a large geographical area and many trains with multiplatform stations. With this algorithm, optimal or near-optimal solutions can be quickly computed in a reasonable execution time, improving others’ published alternatives solutions; and
- performance evaluation of the results of this work comparing with other literature solutions. Moreover, a study of the sustainability of our proposal is included, analyzing how does it work keeping a constant number of train instances and reducing the number of platforms in the stations, being a more sustainable solution. Here, sustainability refers to the ability of maintaining the existing railway infrastructures while the traffic of trains increases, requiring better utilization of the resources. Avoiding increasing the infrastructure can improve sustainability by reducing the maintenance costs.

## 2. Literature Review

## 3. Mathematical-Model Formulation

#### 3.1. Subscripts and Superscripts

**in**, indicating a parameter or a variable related to the entrance in a section; and**out**, indicating a parameter or a variable related to the exit from a section.

#### 3.2. Parameters

- minimum running time, mrt;
- minimum stopping time, mst;
- penalty in case of using route section by a service intention, p;
- earliest/latest entry/out times, EarIn, EarOut, LatIn, LatOut;
- entry/exit delay weights, win, wout;
- release time or minimum time to wait for coincidence between two SIs at a common section R; and
- route alternatives between source and destination.

**SI**- Set of Service Intentions. This is the list of train demands required in the problem.
**P**- Set of Paths of each SI, taking into account alternative paths. Each element of this set depends on the service intention, si, and one feasible route of the si, r. Thus, the set of indexes of one element of P is (si, r).
**RS**- Set of Route Sections of each path of each SI (counting alternative paths). Each element of this set depends on the service intention, si, one feasible route of the si and one route section of this path, rs. Thus, the set of indexes of one element of RS is (si, r, rs).
**RE**- Set of Resources feasible to be used by each SI. Each element of this set depends on the service intention, si, and one feasible route section to be used by it, re, i.e., the set of indexes of one element of RE is (si, re).
**RSE**- Set of Resources of each SI at each route. Each element of this set depends on the service intention, si, one feasible route of the si, and one section of whatever path of the list of resources, re. Therefore, the set of indexes of one element of RSE is (si, r, re).
**RSI**- Set of pairs of service intentions and possible resources to be occupied by them. Each element of this set depends on the pair of service intentions, si1, si2, and one section of the list of resources, re. Thus, the set of indexes of one element of RSI is (si1, si2, re).
**RSIRE**- Set of pairs of service intentions, their routes, and possible resources to be occupied by them. Each element of this set depends on the pair of service intentions with feasible routes, si1, r1, si2, r2, and one section of the list of resources, re. Therefore, the set of indexes of one element of RSIRE is (si1, r1, si2, r2, re).

#### 3.3. Variables

#### 3.4. Objective Function

#### 3.5. Constraints

## 4. Heuristic Solver

#### 4.1. Input and Output Model

#### 4.2. Internal Representation

#### 4.3. Resource Manager

#### 4.4. Generation of Initial Population

Algorithm 1 Event assignment considering mrt and mst |

$i\leftarrow 0$ |

while${t}_{i}$ is None do |

$stack.push\left(i\right)$ |

$i\leftarrow i+1$ |

end while |

$j\leftarrow i$ |

while not stack.is_empty() do |

${t}_{i-1}\leftarrow {t}_{i}-minimum\_running\_time-minimum\_stopping\_time$ |

$i\leftarrow stack.pop\left(\right)$ |

end while |

$i\leftarrow j$ |

while i <= path.size() do |

${t}_{i}\leftarrow max({t}_{i},{t}_{i-1}+minimum\_running\_time+minimum\_stopping\_time).$ |

$i\leftarrow i+1$ |

end while |

Algorithm 2 Pseudocode of recursive function responsible for resource allocation. |

loop |

for all resources in route section i do |

try allocation |

if Occupied then |

Compute when resource become free |

Delay the timetable |

Backtrack |

Return an Error |

end if |

end for |

Recur with $i\leftarrow i+1$ |

if Ok then |

return Ok |

end if |

end loop |

#### 4.5. Look Ahead

- For the scheduling service, the result of applying the look_ahead function with the delay necessary to move the allocation after the last offending one; and
- for already scheduled intentions, the sum of results obtained by applying the look_ahead method to all offending services with the delay necessary to move the first offending interval after allocation that is being performed.

#### 4.6. Genetic Optimization

## 5. Implementation Tools

## 6. Performance Evaluation

#### 6.1. Results

- (a)
- The easiest is scheduling four trains that do not have conflicts. Minimal routing is possible with some discouraged paths;
- (b)
- routing 58 trains with some conflicts and minimal routing alternatives;
- (c)
- more difficult, increasing the number of trains to 143 but still keeping a minimal number of alternative paths;
- (d)
- increases routing alternatives and features slightly more trains;
- (e)
- very similar but with one more train and no optimal solution;
- (f)
- Sixth and seventh instances continue to increase the alternatives and add a lot more trains, while the eighth and ninth again reduce the number of trains but increase the number of paths; and
- (g)
- it was uncertain whether there was a solution with an objective value of 0.

#### 6.2. Sustainability

## 7. Conclusions

- Implementing a mutation strategy to further exploit the solution space around good solutions, for example, by exploring alternative paths or changing some time events in ways that are not explored in the generation of the individuals;
- using some data structures that implement a copy-on write mechanism in order to reduce overall memory footprint and the number of program allocations; and
- improving the look-ahead method and fine-tuning the value of the threshold to obtain a better initial population.

## Author Contributions

## Funding

## Conflicts of Interest

## Abbreviations

MILP | Mixed Integer Linear Problem |

NP | Nondeterministic polinomial-time |

SBB | Schweizerische Bundesbahnen |

## References

- Grechi, D.; Maggi, E. The importance of punctuality in rail transport investigation on the delay determinants. Eur. Transp. Trasp. Eur.
**2018**, 70, 1–23. [Google Scholar] - Makovsek, D.; Benezech, V.; Perkins, S. Efficiency in Railway Operations and Infrastructure Management; Discussion Paper No. 2015-12; OECD, International Transport Forum: Leipzig, Germany, 2015. [Google Scholar]
- SBB. Train Schedule Optimisation Challenge: Optimizing Train Schedules. 2018. Available online: https://www.crowdai.org/challenges/train-schedule-optimisation-challenge (accessed on 27 July 2019).
- Higgins, A.; Kozan, E.; Ferreira, L. Optimal scheduling of trains on a single line track. Transp. Res. Part B
**1996**, 30, 147–161. [Google Scholar] [CrossRef][Green Version] - Higgins, A.; Kozan, E.; Ferreira, L. Heuristic Techniques for Single Line Train Scheduling. J. Heuristics
**1997**, 3, 43–62. [Google Scholar] [CrossRef][Green Version] - Lenstra, J.; Kan, A.R.; Brucker, P. Complexity of Machine Scheduling Problems. In Studies in Integer Programming, Annals of Discrete Mathematics; Elsevier: Amsterdam, The Netherlands, 1977; Volume 1, pp. 343–362. [Google Scholar]
- Lawler, E.L.; Lenstra, J.K.; Kan, A.R.; Shmoys, D.B. Sequencing and Scheduling: Algorithms and Complexity. In Handbooks in Operations Research and Management Science; Elsevier: Amsterdam, The Netherlands, 1993; Volume 4, pp. 445–522. [Google Scholar]
- Boccia, M.; Mannino, C.; Vasilyev, N. The Dispatching Problem on Multitrack Territories: Heuristic Approaches Based on Mixed Integer Linear Programming. Networks
**2013**, 62, 315–326. [Google Scholar] [CrossRef] - Harrod, S.S. A tutorial on fundamental model structures for railway timetable optimization. Surv. Oper. Res. Manag. Sci.
**2012**, 17, 85–96. [Google Scholar] [CrossRef] - Desrosiers, J.; Dumas, Y.; Solomon, M.M.; Soumis, F. Time Constrained Routing and Scheduling. In Network Routing, Handbooks in Operations Research and Management Science; Elsevier: Amsterdam, The Netherlands, 1995; Volume 8, pp. 35–139. [Google Scholar]
- Bussieck, M.R.; Winter, T.; Zimmermann, U.T. Discrete optimization in public rail transport. Math. Program.
**1997**, 79, 415–444. [Google Scholar] [CrossRef] - Cordeau, J.-F.; Toth, P.; Vigo, D. A survey of optimization models for train routing and scheduling. Transp. Sci.
**1998**, 32, 380–404. [Google Scholar] [CrossRef] - Huisman, D.; Kroon, L.G.; Lentink, R.M.; Vromans, M.J.C.M. Operations research in passenger railway transportation. Stat. Neerl.
**2005**, 59, 467–497. [Google Scholar] [CrossRef][Green Version] - Caprara, A.; Monaci, M.; Toth, P.; Guida, P.L. A Lagrangian heuristic approach toreal-world train timetabling problems. Discret. Appl. Math.
**2006**, 154, 738–753. [Google Scholar] [CrossRef] - Lusby, R.M.; Larsenz, J.; Ehrgott, M.; Ryan, D. Railway track allocation: Models and methods. OR Spectr.
**2010**, 33, 843–883. [Google Scholar] [CrossRef] - Liu, L.; Dessouky, M. A decomposition based hybrid heuristic algorithm for the joint passenger and freight train scheduling problem. Comput. Oper. Res.
**2017**, 87, 165–182. [Google Scholar] [CrossRef] - Nedeljkovic, N.B.; Narton, N.C. Computerized Train Scheduling; Western Australian Government Railway Report; Australian Government: Melbourne, Australia, 1984; pp. 105–123.
- Mees, A.I. Railway Scheduling by Network Optimization. Math. Comput. Model.
**1991**, 15, 33–42. [Google Scholar] [CrossRef] - Cai, X.; Goh, C.J. A Fast Heuristic for the Train Scheduling Problem. Comput. Oper. Res.
**1994**, 21, 499–510. [Google Scholar] [CrossRef] - Carey, M.; Crawford, I. Scheduling trains on a network of busy complex stations. Transp. Res. Part B
**2007**, 41, 159–178. [Google Scholar] [CrossRef] - Simon, D. Evolutionary Optimization Algorithms, 1st ed.; John Wiley & Sons Inc.: New York, NY, USA, 2013; pp. 35–60. [Google Scholar]
- Nirmala, G.; Ramprasad, D. A Genetic Algorithm based railway scheduling model. Int. J. Sci. Res.
**2014**, 3, 11–14. [Google Scholar] - Reddy, S.S.; Prasada Reddy, G.S.; Hemanth, P.V.; Chatterjee, P. Train Time Scheduling using Genetic Algorithm. Int. J. Civ. Eng. Technol.
**2017**, 8, 410–413. [Google Scholar] - Tormos, P.; Lova, A.; Barber, F.; Ingolotti, L.; Abril, M.; Salido, M.A. A Genetic Algorithm for Railway Scheduling Problems. Stud. Comput. Intell.
**2008**, 128, 255–276. [Google Scholar] - Arenas, D.; Chevrier, R.; Hanafi, S.; Rodriguez, J. Solving the Train Timetabling Problem, a mathematical model and a genetic algorithm solution approach. In Proceedings of the 6th International Conference on Railway Operations Modelling and Analysis (RailTokyo2015), Tokyo, Japan, 23–36 March 2015. [Google Scholar]
- Wang, M.; Wang, L.; Xu, X.; Qin, Y.; Qin, L. Genetic Algorithm-Based Particle Swarm Optimization Approach to Reschedule High-Speed Railway Timetables: A Case Study in China. J. Adv. Transp.
**2019**, 2019, 6090742. [Google Scholar] [CrossRef][Green Version] - Crainic, T.G.; Toulouse, M. Parallel Strategies for Meta-Heuristics. In Handbook of Metaheuristics; Springer: Boston, MA, USA, 2003; pp. 475–513. [Google Scholar]
- Kapetanović, M.; Van Oort, N.; Núñez, A.; Goverde, R.M.P. Sustainability of Railway Passenger Services—A Review of Aspects, Issues, Contributions and Challenges of Life Cycle Emissions. In Proceedings of the 8th International Conference on Railway Operations Modelling and Analysis (ICROMA), Norrköping, Sweden, 17–20 June 2019. [Google Scholar]
- Union International des Chemins de fer (UIC). Timetable Recovery Margins to Guarantee Timekeeping—Recovery Margins, 4th ed.; UIC CODE 451-1 OR; UIC: Paris, France, 2000. [Google Scholar]
- Goverde, R.M.P.; Hansen, I.A. Performance indicators for railway timetables. In Proceedings of the 2013 IEEE International Conference on Intelligent Rail Transportation Proceedings, Beijing, China, 30 August–1 September 2013; pp. 301–306. [Google Scholar]
- Hart, W.E.; Laird, C.D.; Watson, J.-P.; Woodruff, D.L.; Hackebeil, G.A.; Nicholson, B.L.; Siirola, J.D. Pyomo—Optimization Modeling in Python, 2nd ed.; Springer Science & Business Media: New York, NY, USA, 2017. [Google Scholar]
- Hart, W.E.; Laird, C.D.; Watson, J.-P.; Woodruff, D.L. Pyomo: Modeling and Solving Mathematical Programs in Python. Math. Program. Comput.
**2011**, 3, 219–260. [Google Scholar] [CrossRef] - Gurobi-Optimizer. Available online: https://www.gurobi.com/es/products/gurobi-optimizer/ (accessed on 20 October 2019).
- Garrisi, G. oxigen (Fork). Available online: https://www.github.com/garro95/oxigen (accessed on 27 December 2019).
- Crates.io. Available online: https://crates.io (accessed on 27 December 2019).
- Jordi, J. SBB Train Schedule Optimisation Challenge. 2018. Available online: https://github.com/crowdAI/train-schedule-optimisation-challenge-starter-kit (accessed on 20 October 2019).

**Figure 2.**Sequence of time events in the case of coincidence of two trains at a common route section.

**Figure 3.**Representation of graph contained in Route structure. Arcs represent route sections. Numerical label is the identifier of the section, composed of the concatenation of the route identifier with the sequence number of the route section; literal label, when present, identifies the section requirement related to that section. Nodes are events in which the train passes from one route section to the next. In this phase, they are left unassigned.

**Figure 4.**Unified Modeling Language (UML) class diagram of relevant classes that compose internal system representation.

**Figure 5.**High-level block diagram of individual-generation function, for which a random path is chosen, time events are assigned, and resources are allocated.

**Figure 8.**Example of graph contained in TrainRun data structure. It is similar to that in Figure 3, but in this case, all events were assigned along the path.

**Figure 11.**Comparison of mathematical model and heuristic results [25].

Case | S.I. | A | B | C |
---|---|---|---|---|

1 | 111 | EarIn: 8:20:00 | EarOut: 8:30:00 | LatOut: 8:50:00 |

113 | EarIn: 7:50:00 | – | LatOut: 8:16:00 | |

2 | 111 | EarIn: 8:20:00 | EarOut: 8:30:00 | LatOut: 8:50:00 |

113 | EarIn: 8:20:50 | EarOut: 8:30:00 | LatOut: 8:48:50 | |

3 | 111 | EarIn: 8:20:00 | EarOut: 8:30:00 | LatOut: 8:50:00 |

113 | EarIn: 8:19:30 | – | LatOut: 8:45:30 |

Problem Instance | Number of Trains | Route Alternatives |
---|---|---|

01_dummy | 4 | Minimal |

02_a_little_less_dummy | 58 | Minimal |

03_FWA_0.125 | 143 | Minimal |

04_V1.02_FWA_without_obstruction | 148 | Few |

05_V1.02_FWA_with_obstruction | 149 | Few |

06_V1.20_FWA | 365 | Some |

07_V1.22_FWA | 467 | Some |

08_V1.30_FWA | 133 | Lots |

09_ZUE-ZG-CH_0600-1200 | 287 | Lots |

Problem Instance | Objective Value | Computation Time ($\mathbf{s}$) | Individuals |
---|---|---|---|

01_dummy | 0.0 | 0.045 | 2 |

02_a_little_less_dummy | 2.95 | 7.062 | 128 |

03_FWA_0.125 | 627.2 | 26.930 | 256 |

04_V1.02_FWA_without_obstruction | 1253.33 | 31.246 | 256 |

05_V1.02_FWA_with_obstruction | 1462.37 | 33.105 | 256 |

06_V1.20_FWA | 5148.70 | 14.511 | 32 |

07_V1.22_FWA | 21,919.95 | 24.399 | 32 |

08_V1.30_FWA | 4770.65 | 14.895 | 64 |

09_ZUE-ZG-CH_0600-1200 | 5262.78 | 24.720 | 64 |

Problem Instance | Objective Value | Computation Time ($\mathbf{s}$) | Individuals |
---|---|---|---|

01_dummy | 0.0 | 0.044 | 2 |

02_a_little_less_dummy | 106.32 | 26.969 | 128 |

03_FWA_0.125 | 1530.42 | 213.188 | 256 |

04_V1.02_FWA_without_obstruction | 4844.83 | 255.336 | 256 |

05_V1.02_FWA_with_obstruction | 7140.10 | 300.249 | 256 |

06_V1.20_FWA | - | - | 32 |

07_V1.22_FWA | - | - | 32 |

08_V1.30_FWA | 45,995.0 | 169.738 | 64 |

09_ZUE-ZG-CH_0600-1200 | 7690.9 | 49.902 | 64 |

**Table 5.**Execution times of model solver and heuristic solver in case study cited in [25].

Train Instances | MILP Time ($\mathbf{s}$) | Heuristic Time ($\mathbf{s}$) |
---|---|---|

8 | 5.87 | 0.433 |

12 | 6.08 | 0.476 |

16 | 6.13 | 0.453 |

48 | 5.88 | 0.484 |

108 | 5.93 | 0.488 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Garrisi, G.; Cervelló-Pastor, C. Train-Scheduling Optimization Model for Railway Networks with Multiplatform Stations. *Sustainability* **2020**, *12*, 257.
https://doi.org/10.3390/su12010257

**AMA Style**

Garrisi G, Cervelló-Pastor C. Train-Scheduling Optimization Model for Railway Networks with Multiplatform Stations. *Sustainability*. 2020; 12(1):257.
https://doi.org/10.3390/su12010257

**Chicago/Turabian Style**

Garrisi, Gianmarco, and Cristina Cervelló-Pastor. 2020. "Train-Scheduling Optimization Model for Railway Networks with Multiplatform Stations" *Sustainability* 12, no. 1: 257.
https://doi.org/10.3390/su12010257