Train scheduling has been a significant issue in the railway industry. Over the last few years, numerous approaches and tools have been developed to compute railway scheduling. In this paper, we present a set of heuristics for a constraint-based train scheduling tool, which is a project in collaboration with the National Network of Spanish Railways (RENFE), Spain. We formulate train scheduling as constraint optimization problems. Three heuristics are developed to speed up and direct the search toward suboptimal solutions in periodic train scheduling problems. The feasibility of our problem-oriented heuristics is confirmed with experimentation using real-life data. The results show that these techniques enable MIP solvers such as LINGO and ILOG Concert Technology (CPLEX) to terminate earlier with good solutions.

Railway
transportation has played a major role in the economic development of the last
two centuries. It represented a major improvement in land transport technology
and has obviously introduced important changes in the movement of freight and
passengers. Over the last few years, railway traffic has increased
considerably, which has created the need to optimize the use of railway
infrastructures. This is, however, a very difficult task. Thanks to
developments in computer science and advances in the fields of optimization and
intelligent resource management, railway managers can optimize the use of
available infrastructures, obtain more robust timetables [

The

In this paper, we propose several problem-oriented heuristics for solving periodic train scheduling. The problem formulation is (traditionally) translated into a mathematical model to be solved for optimality by means of mixed integer programming (MIP) techniques. However, hundred of trains, in different directions, along paths of dozens of stations, with constraints about departure and arrival times, generate thousands of inequalities and a high number of variables take only integer values. As is well known, this type of model is far more difficult to solve than linear programming models.

In our framework, the mathematical model is simplified by heuristics in order to be solved efficiently. We present two main classes of heuristics.

Heuristics based on linear programming and local search.

A heuristic based on railway topological characteristics and on constraint satisfaction techniques.

The first heuristic shares the following idea:

to execute the linearized problem,

to obtain the value of decision variables,

carry out local search techniques guided by the previous result for assigning values to decision variables such that the entire problem is optimized,

to execute the simplified linear programming problem.

The second heuristic carries out a study of the
railway topological characteristics such as the distance between stations, the
number of tracks, and the railway capacity. This heuristic is able to identify
the set of stations, where a bottleneck is more probable. Thus, based on the

The train
scheduling problem has received considerable attention in the literature:
[

Furthermore, several European companies are also
working on similar systems. These systems include complex stations,
rescheduling due to incidents [

Many researchers have modeled the problem as a
mathematical model. Mathematical programming methodology was first applied to
this problem by Amit and Goldfarb [

Most of these optimization models are solved by using branch and bound techniques. Nevertheless, due to the complexity of the problems, it is necessary the use of heuristics to solve them efficiently. For solving this drawback, we propose some problem-oriented heuristics for solving periodic train scheduling in a single line. These heuristics make the problem easier, and branch and bound algorithms can solve the problem more efficiently.

In this section, we provide the terminology used by the railway operators of the National Network of Spanish Railways (RENFE). Furthermore, we present our mathematical model which can be described as a constraint optimization problem. The objective function is to minimize the journey time of all trains. Variables are frequencies, arrival, and departure times of trains at stations and decision variables generated for modeling disjunctive constraints. Constraints are composed by user requirements, traffic rules, and topological constraints. These constraints are composed by the parameters defined by user interfaces and database accesses.

A running map contains information regarding railway
topology (stations, tracks, distances between stations, traffic control
features, etc.) and the schedules of the trains that use this topology (arrival
and departure times of trains at each station, frequency, stops, junctions, crossings,
etc.). A sample of a running map is shown in Figure

A sample of a running map.

A railway line is basically composed of stations and one-way or two-way tracks. A dependency can be the following.

Place for trains to park, stop, or pass through. Each station is associated with a unique station identifier. There are two or more tracks in a station where crossings or overtaking can be performed.

Place for trains to stop, pass through, but not park. Each halt is associated with a unique halt identifier.

In Figure

The type of trains to be scheduled determines the time
assigned for travel between two locations on the path. The path selected by the
user for a train trip determines which stations are used and the stop time
required at each station for commercial purposes. In order to perform crossing
in a section with a one-way track, one of the trains should wait in a station.
This is called a

Constraints related to crossing and overtaking in stations.

In the mathematical model the notation mentioned at the end of the paper will be used.

Variables

Variables

The mathematical model is presented in Algorithm

(1)

/frequency constraint

(2)

/Time constrains

(3.1)

(3.2)

/Stations time constrains

(4)

/Constrains to limit journey time

(5.1)

(5.2)

/Crossing constrains

(6.1)

(6.2)

/Expedition time constrains

(7.1)

(7.2)

/Reception time constrains

(8.1)

(8.2)

/Binary constraints

The main complexity of the problem derives in solving the MIP problem due to the decision variables. If we are able to assign values to these decision variables, the linearized problem can be solved more efficiently. Therefore, the main goal of our heuristics is to find values for these decision variables. This assignment will be carried out by means of local search and railway topological knowledge.

The objective function is devoted to travel time. This
function reflects mainly the users concerns; however, the railway companies are also
interested in saving time due to the more efficient usage of rolling stocks.
There are hundreds of studies being undertaken for evaluating savings in travel
time (for a review see [

Thus our objective function:

Regarding the constraints, there are three groups of scheduling rules in our railway system: traffic rules, user requirements rules, and topological rules. A valid running map must satisfy and optimize the above rules. These scheduling rules can be modeled using the following constraints:

Any two trains going in opposite directions
must not simultaneously use the same one-way track:

At least are required

At least are required

The main constraints due to user requirements are:

Number of

In accordance with user requirements, the system should obtain the best solution available so that all the above constraints are satisfied. Several criteria can exist to qualify the optimality of solutions: minimize duration and/or number of technical stops, minimize the total time of train trips (span) of the total schedule, giving priority to certain trains, and so on.

Railway capacity has been a significant issue in the
railway industry. Many approaches and tools have been developed to compute
railway capacity. However, capacity is a complex and loosely defined term that
has numerous meanings. In general, within a rail concept, capacity can be
described as “a measure of the ability to move a specific amount of traffic
over a defined rail line with a given set of resources under a specific service
plan” [

People might ask how a railway section can be full, if
a train passes only once every 10 minutes or so. Most of the time, there is
nothing to see [

We formalize railway capacity (theoretical capacity) to design heuristic 2 for solving periodic train scheduling. This technique has been inserted in our system in order to solve this problem and to be able to obtain as good and feasible running map as possible.

We will adopt the following definition of railway capacity.

Railway capacity is the maximum number of trains that can be scheduled in the railway in a fixed period of time.

Based on this definition, railway capacity will be subjected to topological restrictions of the railway (distance between trains, number of lines, speed of trains, etc.). For instance, if all sections have two-way tracks, railway capacity will be four time higher than in sections with only one-way tracks. On the contrary, if there are two very distant cities joined by a one-way track, the railway capacity will be conditioned by this track, because once a train departs from one station to the other station, no train can depart from the second station until the first train arrives. These tracks are bottlenecks, and the railway capacity is conditioned by these tracks. This is the explanation of why there are so few trains visible on the track (the question above).

In this section, we formalize the distance that trains must maintain to guarantee a feasible schedule. This distance will determine railway capacity. Thus, our aim is to geometrically study each train with tracks between stations.

We assign to each type of train and to each track an
angle that represents the speed of this train on this track. As we maintain the
distance of each track (

In this way, we define the angle

Once, we have bounded the speed in the interval [0, 90], we will study railway capacity by means of the minimum safety distance for each track. We will focus on periodic trains and one-way tracks. Thus, all trains in each direction are of the same type.

For each track of distance “

By applying this formula to each of the

It must be taken into account that the bottleneck of
the railway will occur in the station that satisfies

Journey time for a round trip.

Given a railway

Assume to the contrary that there is a new train

Given the mathematical model presented in Algorithm

Here, we present two different types of heuristics that have been inserted in the system with the aim of reducing the number of variables and the complexity of the complete mathematical model.

Given the mathematical model, heuristic 1 works on the
decision variables defined in Section

Heuristic 1.0 is also called

Heuristic 1.0 is sound and complete.

Heuristic 1.1 is a metaheuristic based on heuristic
1.0. This heuristic carries out a guided local search over the binary
variables. Once many decision variables have been removed by heuristic 1.0, a
new filtering process on the reduced problem can eliminate other decision
variables by means of a guided local search. Instead of assigning a random
station as a crossing station between two opposite trains, heuristic 1.1
performs a linearized execution where the decision variables have been
transformed into continues ones. Thus, the crossing between two trains may not
be assigned in stations but on a track between two stations. This will be the
initial point to start the search to find the station, where the crossing will
finally be performed. The search of each crossing between two opposite trains
is bounded by

Heuristic 1.1

/

DeterminePossibleCrossing ();

LinearSolution = SolveLinearProblem ();

Crossings = DetectCrossings (LinearSolution);

while (Not Solution)

Solution = SearchCrossingCombination (window,Crossings);

if (Solution)

FinalSolution = SolveCrossingOrder (Solution);

The aim of this heuristic is to solve the railway
scheduling problem by means of constraint satisfaction techniques. To this end,
the original formulation (MIP problem) is separated into two different
subproblems: first, the crossings are solved and then the running maps are
calculated. Thus, the problem constraints are classified so that most
restricted constraints are studied first [

The main idea of this heuristic is to generate a
traffic pattern based on our definition of railway capacity. Each traffic
pattern is generated for each set of stations such that the union of these
traffic patterns determines the journey of each train. Figure

First traffic pattern generation.

The block of stations is selected taking into account
the speed of the trains, the distance between stations, and overall the
frequency inserted into the problem. Each traffic pattern covers the block of
stations necessary for a train (Train 1) to go from the first station of the block
to the last station of the block and return from the last station to the first
station (round trip). The train making this round trip must arrive to the first
station (St. 1) as close as possible but before, the following train departs
(Train 2) (Figure

Once the first traffic pattern has been generated, the
block of stations involved in this traffic pattern is temporarily removed in
order to study the following pattern with the remaining stations. Figure

Therefore, when the second traffic pattern is
generated, heuristic 2 studies the following traffic patterns until there is no
station left. In Figure

Periodic pattern generation.

Figure

Generate-RunningMap (Frequency, Information of Stations, Information of Trains)

GenerateTheBestPatterns ();

GenerateTheRunningMap (SetOfPatterns)

The general outline of our system [

General scheme of our tool.

This database stores the set of locations, lines, tracks, trains, and so forth. Normally, this information does not change, but authorized users may desire to change this information. With the data acquired from the database, the system generates the mathematical model.

According to the quality of the required solution and the problem size, the optimization process is carried out in the following ways.

Complete. The process is performed taking into account the entire problem. This decision is carried out when the number of trains and stations is low, or the running time is not a important. In this case, heuristic 1.0 will be selected.

Incremental. The process performs an incremental coordination of trains. It can be useful in anytime systems, where the number of trains and stations is not very high. In this case, heuristics 1.0 and 1.1 are the most appropriate due to the fact that as the number of combinations is checked, the quality of the solution is better.

Topological. The solution is obtained by replicating a pattern found in each block of stations. It is very useful in huge problems with thousand of variables and constraints (hundred of trains and stations) and in real-time systems. Heuristic 2 solves these types of problems efficiently in a short period of time.

However, the system can also automatically recommend or select the appropriate choices depending on different parameters and the complexity of the problem.

If the mathematical model is not feasible, the user must modify the parameters, mainly the most restrictive ones. If the running map is consistent, the graphic interface plots the scheduling. Afterwards, the user can graphically interact with the scheduling to modify the arrival or departure times. Each interaction is automatically checked by the constraint checker in order to guarantee the consistency of changes. The user can finally print out the scheduling, to obtain reports with the arrival and departure times of each train in each location, or graphically observe the complete scheduling topology.

The application and performance of this system depends on several factors: railway topology (locations, distances, tracks, etc.), number and type of trains (speeds, starting and stopping times, etc.), frequency ranges, initial departure interval times, and so forth.

In this section, we compare the performance of our heuristics using some well-known branch and bound techniques included in CPLEX and LINGO solvers, because they are the most appropriate tools for solving these types of problems. Thus, each instance was evaluated by a single branch and bound algorithm (B&B), a branch and bound-based algorithm included in CPLEX filtered by heuristic 1.0 and heuristic 1.1, a branch and bound-based algorithm included in LINGO filtered by heuristic 1.1, and our topological algorithm (heuristic 2).

This empirical evaluation was carried out on a real
railway infrastructure that joins two important Spanish cities (“

In our empirical evaluation, each set of instances was
defined by the 3-tuple

System interface solving and plotting instance

In Table

Runtime and journey time in problems with different number of trains.

B&B | CPLEX (B&B) | LINGO (B&B) | TOPOL. | ||||||
---|---|---|---|---|---|---|---|---|---|

Heuristic 1.0 | Heuristic 1.1 | Heuristic 1.1 | Heuristic 2 | ||||||

Trains | Run | Run | Journey | Run | Journey | Run | Journey | Run | Journey |

time | time | time | time | time | time | time | time | time | |

5 | 6” | 5” | 2:19:48 | 4” | 2:29:33 | 6” | 2:30:54 | 2” | 2:21:54 |

10 | 337” | 8” | 2:20:19 | 8” | 2:26:04 | 12” | 2:31:37 | 3” | 2:22:08 |

15 | 601” | 13” | 2:20:29 | 12” | 2:26:18 | 19” | 2:31:51 | 3” | 2:22:08 |

20 | 1065” | 16” | 2:20:34 | 16” | 2:26:25 | 25” | 2:31:58 | 3” | 2:22:08 |

50 | 55” | 2:20:43 | 43” | 2:31:09 | 1098” | 2:32:11 | 7” | 2:22:08 |

System interface solving and plotting instance

Table

Runtime and journey time in problems with different number of stations.

B&B | CPLEX (B&B) | LINGO (B&B) | TOPOL. | ||||||
---|---|---|---|---|---|---|---|---|---|

Heuristic 1.0 | Heuristic 1.1 | Heuristic 1.1 | Heuristic 2 | ||||||

Stations | Run | Run | Journey | Run | Journey | Run | Journey | Run | Journey |

time | time | time | time | time | time | time | time | time | |

10 | 3” | 2” | 0:25:06 | 2” | 0:25:06 | 4” | 0:25:06 | 1” | 0:25:06 |

20 | 303” | 3” | 1:04:11 | 5” | 1:04:11 | 8” | 1:04:11 | 2” | 1:04:11 |

30 | 15” | 1:45:38 | 6” | 1:45:08 | 14” | 1:45:38 | 3” | 1:45:08 | |

40 | 2131” | 56” | 2:20:10 | 56” | 2:23:36 | 21” | 2:24:36 | 6” | 2:20:22 |

60 | 340” | 3:33:15 | 217” | 3:39:30 | 180” | 3:40:30 | 15” | 3:30:58 |

In Table

Runtime and journey time in problems with different frequencies.

B&B | CPLEX (B&B) | LINGO (B&B) | TOPOL. | ||||||
---|---|---|---|---|---|---|---|---|---|

Heuristic 1.0 | Heuristic 1.1 | Heuristic 1.1 | Heuristic 2 | ||||||

Frequency | Run | Run | Journey | Run | Journey | Run | Journey | Run | Journey |

time | time | time | time | time | time | time | time | time | |

140 | 15” | 17” | 2:16:19 | 15” | 2:20:18 | 24” | 2:16:19 | 4” | 2:18:35 |

120 | 156” | 16” | 2:16:17 | 14” | 2:16:17 | 23” | 2:18:47 | 4” | 2:18:55 |

100 | 18” | 2:22:55 | 15” | 2:23:10 | 28” | 2:22:55 | 4” | 2:19:09 | |

90 | 1065” | 17” | 2:20:34 | 15” | 2:26:25 | 28” | 2:31:58 | 4” | 2:22:08 |

75 | 2:29:18 | — | 25” | 2:24:16 | 6” | 2:23:30 | |||

60 | 2:21:23 | — | — | 46” | 2:32:11 |

We have reported the design and development of heuristics for solving periodic train scheduling, which is a project in collaboration with the National Network of Spanish Railways (RENFE), Spain. We have formulated the train scheduling as constraint optimization problems. Three heuristics are developed to speed up and direct the search towards suboptimal solutions. The feasibility of our algorithms and heuristics is confirmed with experimentation using real-life data. These heuristics has been inserted into the system to solve periodic timetables more efficiently. This system, at a current stage of integration, supposes the application of methodologies of Artificial Intelligence in a problem of great interest and will assist railway managers in optimizing the use of railway infrastructures and will also help them in the resolution of complex scheduling problems.

Number of stations

Number of trains running in the down direction

Number of trains running in the up direction

Frequency between departures of two consecutive trains

Represents
that train

Means that
train

The journey
time of train

Is the allowed percentage for a train to arrive at destination

The
technical stop times of train

The
commercial stop times of train

The
expedition time of train

The reception
time of train

The upper bound of the travel train for this line.

This work has been partially supported by the Research Projects TIN2007-29666-E and TIN2007-67943-C02-01 (Min. de Educacion y Ciencia, Spain-FEDER), GV/2007/274 (Generalidad Valenciana), and by the Future and Emerging Technologies Unit of EC (IST priority-6th FP), under Contract no. FP6-021235-2 (project ARRIVAL).