About this Journal Submit a Manuscript Table of Contents
Mathematical Problems in Engineering
Volume 2013 (2013), Article ID 102346, 7 pages
Research Article

Optimizing Schedules of Rail Train Circulations by Tabu Search Algorithm

School of Traffic and Transportation, Lanzhou Jiaotong University, Lanzhou 730070, China

Received 21 October 2013; Revised 16 November 2013; Accepted 25 November 2013

Academic Editor: Wuhong Wang

Copyright © 2013 Mingming Chen and Huimin Niu. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.


This paper develops an integer programming model for the scheduling problem in train circulations on an intercity rail line. The model that aims to minimize the sum of interval time for any two consecutive tasks is proposed to characterize the train operation process. Two main constraints, namely, time-shift and equilibrium constraint, are considered to get the feasible and practical solution of train schedules. A heuristic procedure using tabu search algorithm is also designed to solve the model by introducing the penalty function and a neighborhood search method with the trip exchange and insert strategy. A computational experiment performed on test instances provided by two major stations on the Beijing–Tianjin Intercity Railway in China illustrates the proposed model and algorithm.

1. Introduction

Transit scheduling problem is a major area in operations research because of the complexity of problems that arise from various transit modes, such as airlines, railways, maritime, and urban transit. Vehicle scheduling and crew scheduling are two main problems that arise in this area. Generally, these two problems are considered separately, where the first is the vehicle scheduling problem and the second is the crew scheduling problem [13].

Recently, most scholars have focused on the two problems simultaneously. In [4], a single depot case with a homogeneous fleet of vehicles was considered and an exact approach was proposed to solve the simultaneous vehicle and crew scheduling problem in urban mass transit systems. An integrated approach to solve a vehicle scheduling problem and a crew scheduling problem on a single bus route was presented in [5]. An integrated vehicle and crew scheduling problem was described using an integer linear programming formulation combining a multicommodity network flow model with a set partitioning/covering model in [6]. An approach was presented to solve the bus crew scheduling problem that considers early, day, and late duty modes with time-shift and work intensity constraints in [7]. The authors in [8] proposed an integrated vehicle-crew-roster model with days-off pattern, which aimed to simultaneously determine minimum cost vehicle and daily crew schedules.

In the field of rail transit, train and crew scheduling problems are key steps in the rail operational process. The train scheduling problem involves assigning trains to a set of trips generated by a train timetable. The crew scheduling problem involves assigning crews to trains that operate at a given schedule. The authors in [9] proposed a phase-regular scheduling method and applied a regular train-departing interval and the same train length for each period under the period-dependent demand conditions. In [10], a binary integer programming model incorporated with passenger loading and departure events was built to optimize the passenger train timetable in a heavily congested urban rail corridor. The authors in [11] established an optimization model based on maximum passenger satisfaction for train operations at the junction station in passenger dedicated lines. The authors in [12] described research in progress that would determine the minimum circulation of trains needed to execute a given timetable with given bounds on demand and capacities.

Train and crew scheduling is an NP hard problem. Generally, the difficulties stem from a large set of complex and conflicting restrictions that must be satisfied by any solution. Most of these restrictions are reflected in a sizable number of operational conditions that involve trips in daily train timetables, train numbers, train capacities, crew numbers, and certain constraints related to time-shift, equilibrium, and work intensity. The authors in [13] proposed an algorithm which was based on local optimality criteria in the event of a potential crossing conflict to solve the train scheduling problem. A model designed to optimize train schedules on single line rail corridors was described in [14]. In [15], a multiobjective optimization model was developed for the passenger train-scheduling problem on a railroad network which included single and multiple tracks, as well as multiple platforms with different train capacities. To minimize shortages in capacity during rush hours, the authors in [16] described a model that could be used to find an optimal allocation of train types and subtypes for lines.

Meanwhile, various optimization models that relate to many aspects of train and crew schedules in railways are being studied extensively. The column generation approach is an effective algorithm for solving these problems. For example, the authors in [17] developed a column generation approach for a rail crew rescheduling problem. The authors in [18] presented a column generation approach based on the decomposition algorithm, which would achieve high-quality solutions at reasonable runtimes.

In recent years, a number of studies have paid more attention to developing a heuristic algorithm for the train scheduling problem. An algorithm that combined a compact assign and a matrix, as well as an operational time strategy was proposed in [19]. The authors in [20] developed two-solution approaches based on a space-time network representation that would operate a predetermined set of train duties to satisfy the strict day-off requirement for crew in railways. On the premise of unfixed train used sections, the authors in [21] built an optimized train operation and maintenance planning model using an algorithm with a penalty function and a 3-opt neighborhood structure to solve the model. A particle swarm optimization algorithm with a local search heuristic was presented to solve the crew scheduling problem in [22].

For an overview of the above papers, most studies on constructing the train scheduling model have been paid to the factors associated with train numbers, train capacities, interval time of trains, and so on. Moreover, interval time often includes night waiting time, which allows a train to conduct the trip tasks for the following day when the shortest layover time is less than the interval time of two consecutive trips. In fact, most trains run on the intercity line with high frequency, which is highly similar to bus transit. The origin and destination stations are generally equipped with train bases. In this paper, the factor of night waiting time is neglected, and the train scheduling problem is merely based on the train timetables in one day.

This paper is organized as follows. In Section 2, the rail train scheduling problem and an optimization model that minimizes the total interval time cost are described. A tabu search algorithm is presented in Section 3. In Section 4, a numerical example is provided to illustrate the application of the model and algorithm. The last section draws conclusions and discusses future research directions.

2. Rail Train Scheduling Model

2.1. Problem Description

This paper considers train scheduling on a bidirectional intercity railway line with several stations. The location and number of trains available in each station are known. Every day, the trains are arranged from the designated stations to perform a set of trips. For each trip, the departure and arrival times and locations, which are determined by train timetables, are also known. Figure 1 shows a simple train timetable with three stations and 10 trips.

Figure 1: A simple train timetable.

Train scheduling aims to assign a number of timetabled trips to a set of trains with the objective of minimizing total train operation costs and satisfying a range of constraints, including labor union agreements, government regulations, and company policy. For clarity, the following assumptions have to be considered.(1)Any two consecutive trips arranged for a train should have compatible terminals. Deadhead trips are not considered in this paper. Thus, the arrival location of a trip should be similar to the departure location of the next trip (e.g., Trips 1 and 6).(2)Any two consecutive trips arranged for a train should be compatible in time. A lower bound, called layover time, is present when a train arrives at a terminus. During this time, the trains wait for passengers to alight, board, turnaround, and so on. If the interval time of two trips cannot exceed the shortest layover time, the two trips for any train is voided. If we assume that the shortest layover time is 15 minutes, then we can say that Trips 4 and 5 cannot be compatible.(3)The train scheduling problem is solved as a daily problem in which every train schedule is assumed to be obtained from a daily train timetable. For two consecutive trips, the departure time of one trip should not be earlier than the arrival time of the next trip (e.g., Trips 1 and 2).(4)The number of required trains cannot exceed the prescribed maximum number of trains.

Figure 2 illustrates train schedules corresponding to the data from the train timetable in Figure 1. Three trains are arranged for 12 trips. Each row corresponds to the trip tasks of a train. For instance, the trip tasks of the first train (no. 1) are in a chain with C-A, A-C, C-B, B-C, and C-A. The columns correspond to the trips in a timetable. Notably, the number of columns that correspond to different trains differs from one another. For any trip task of a particular train, the departure station of the first trip and the arrival station of the last trip are not necessarily the same.

Figure 2: Illustration of train schedules.
2.2. Objective Function

The train is an important piece of equipment used in intercity railways, which is expensive to produce or purchase. To complete train timetables, the required number of trains should be as few as possible. Furthermore, the interval time of trains, a key factor in measuring their circulation efficiency, can be described as follows: a train runs in a section and reaches an intermediate station in one trip. It operates and waits at the station and then departs from the station for the following trip task. The interval time includes the operation time and waiting time at the station. When the train arrives and departs from the terminus, the interval time can be called the turn-back time. Therefore, the optimal objective of rail train scheduling is to determine the minimum number of trains required and ensure the minimum cost of interval time.

As the sum of interval time and running time of trains is a multiple of the number of trains, and the running time of each train is a constant number, the objective of having the smallest number of trains is equivalent to the objective of having minimal cost in interval time. In this paper, the optimal objective is to minimize the total interval time, which can be formulated as follows: where represents the number of trains required in a day, represents the number of trips provided by a train timetable in a day and is the interval time between trip and trip . is a binary 0-1 variable that indicates the status of trip and trip conducted by train . has two values: if trip is the next trip after trip conducted by train , and otherwise.

The interval time of any two trips in train timetables is significantly influenced by factors related to the trip, such as origin station, destination station, and arrival and departure time at the two stations. For any two trips, if the destination station of the former trip is different from the origin station of the latter trip, or if the interval time is less than the shortest layover time , then the two trips cannot be arranged using the same train. Obviously, the two trips cannot satisfy the time-shift constraint. In this paper, the interval time can be set to an infinite positive number . If the interval time of the two trips meets the time-shift constraint, then it can be calculated using the formula . Therefore, interval time between trips and can be expressed as follows: where is the destination station of trip , is the origin station of trip , is the arrival time of trip at destination station, and is the departure time of trip at origin station.

2.3. Constraints

(1)To ensure that each trip can be conducted using only one train, we formulate (2)The relationship between decision variable and auxiliary variable can be formulated using the following equation: (3)The two consecutive trips taken by the same train should satisfy the time-shift constraint, which means that the arrival time when the former trip ends at the destination station must be earlier than the departure time when the latter trip starts at the origin station. The minimum difference should be not less than , where represents sign function, which is calculated using (6), (4)To ensure that the running mileage between different trains is equal, we have to make sure that the actual operation time between different trains does not vary significantly because of the constant speed of each train. The parameter , which represents the total operation time of train , can be calculated using the following equation: Therefore, we can calculate the maximum and minimum operation times of trains, and the difference should not exceed the maximum value of the operation time between any two trains , (5)The decision variable is a 0-1 variable to indicate whether trip is conducted by train . has two values: if trip is conducted by train , and otherwise. Thus,

3. Algorithm Design

The tabu search algorithm uses a neighborhood search procedure to iteratively move from one potential solution to an improved solution, until a stopping criterion is satisfied. Tabu search is a metaheuristic local search algorithm that can be used to solve combinatorial optimization problems. The major advantages of this algorithm are its simplicity, speed, and flexibility, and the scheduling model for rail train circulations in this paper is a complex zero-one programming problem. Thus, the tabu search algorithm can be used easily. The main parameters of the algorithm are designed as follows.

3.1. Expression of Solution

The two-dimensional integer array encoding method can be used to solve the train scheduling problem. In this method, rows represent trains, and columns represent trips. The trips are numbered according to departure time in ascending order. For example, in the train operation data presented in Figure 2, the trip chains of each train can be expressed as follows: train 1: 1-6-7-8-9, train 2: 2-5-10, and train 3: 3-4-11-12. The expression of solution is shown in Figure 3.

Figure 3: Expression of solution.

Based on the values in the two-dimensional array, the decoding process is the inverse of the encoding process. For example, Figure 3 contains 3 trains and 12 trips. The numbers of trips conducted by train 2 are 2, 5, and 10. Thus the variables are , , , , and . Other trains are decoded using the same method used in the former method.

3.2. Generation of Initial Solution

The initial solution is the starting point of the algorithmic search. A superior initial solution enables the algorithm to arrive quickly at the optimal solution. In the process of generating the initial solution, the time-shift constraint should be satisfied. The procedure of the algorithm is as follows.

Step 1 (initialization). The set of trips to be conducted by train is set , for all . Let , , and .

Step 2. The train number and consecutive trip number corresponding to trip are determined. If , then let and Step 4 is performed. Otherwise, , , where , and go to Step 3.

Step 3. The time-shift constraint is verified. If and , then go to Step 4. Otherwise, , and go to Step 2.

Step 4. Let , ; go to Step 5.

Step 5. If , then the algorithm ends and the results are obtained. Otherwise, go to Step 2.

3.3. Neighborhood Structure

The neighborhood structure uses trips exchange and insert strategies between different trains. The trips exchange strategy can be described as follows: a single exchange point on both the trip chains of the two parents is selected. The trip number of that point is swapped between the two parent organisms. The resulting organisms are the children. For example, trip 7 of train 1 (1-6-7-8-9) is exchanged with trip 5 of train 2 (2-5-10), and new solutions can be obtained. The trip chain of train 1 becomes 1-6-5-8-9 and that of train 2 becomes 2-7-10, as shown in Figure 4.

Figure 4: Trips exchange strategy.

The trips insert strategy can be described as follows: two consecutive trips from train 1 are inserted into the trip chain of train 2. The insert point depends on the departure time in the trips chain of train 2 in ascending order, and two new trip chains for the trains result. For example, if trip 5 of train 1 (1-5-7-8-10) is inserted into the trip chain of train 2 (2-6-9), then new solutions can be obtained. The trip chain of train 1 becomes 1-8-10 and the trip chain of train 2 becomes 2-5-7-6-9, as shown in Figure 5. The trips exchange or insert operation cannot be performed if the trip chain of any crew cannot satisfy the time-shift constraint using any operation.

Figure 5: Trips insert strategy.
3.4. Evaluation of Solution

To search for better solutions in the algorithmic iterative process, we have to evaluate the solution. It must simultaneously calculate the value of the objective function and consider the constraints. Given that the initial solution satisfies the time-shift constraint and the new solution generated in the neighborhood search also satisfies the former constraint, we can consider only the equilibrium constraint as the only factor in the former steps that should be punished.

In this study, the parameters in can be considered as the punish factors and the value becomes a large positive number. If the solution can satisfy the equilibrium constraint, then the values of the fitness function and the objective function become equal. Otherwise, the value of the fitness function becomes significantly larger than that of the objective function, which means that the set of values for the decision variables cannot create a feasible solution. The fitness function can be formulated as follows: where represents the value of the objective function.

3.5. Other Parameters

The record of the tabu table is the transform (exchange or insert) node, and tabu length has a fixed value. Regulation is selected based on the value of evaluation as the aspiration criterion. In other words, the solution of the objective can be free if it is better than any of the best candidate solutions currently known. The stopping criterion is based on the value of the fitness function. If the best value does not change after a given number of iterations, then the algorithm stops the calculation.

4. Numerical Example

The Beijing-Tianjin intercity rail line is a major railway system that serves passengers who travel between the cities of Beijing and Tianjin in China. The line starts from Beijing South Railway Station and ends at Tianjin Railway Station. It has a total length of 119.4 km and covers 74 trips in two directions every day. The main pieces of information about each trip, such as origin and destination stations as well as departure and arrival time, are presented in Table 1.

Table 1: Departure and arrival time of trips.

The shortest layover time for trains at switchback station is 15 minutes, and the maximum deviation value of any two trains is set to 90 minutes. The parameters for the tabu search algorithm are as follows: the tabu length is 6; the punish factor is 10,000; and the given number of iterations without improving the solution is 100. The optimal solution can be calculated using the VC++ program, as shown in Table 2. The objective value of the optimal solution is 5,099 minutes.

Table 2: The optimal results for train scheduling.

Table 2 indicates that the total number of trains is 15 in two directions. The maximum value of train operation time is no more than 360 minutes (nos. 3 and 14). The minimum value of train operation time is 302 minutes (no. 12). The deviation value of operation time between train nos. 3 and 12 is 58 minutes, which is less than the specified value of 90 minutes. Thus, the equilibrium constraint is satisfied.

5. Conclusions

In this paper, we present an optimized scheduling method of rail train circulations on a bidirectional intercity railway line. A binary integer programming model with the objective of minimizing the train fleet and the total interval times is presented to show the schedule process. To work out a practical schedule, the time-shift and equilibrium constraints are also considered. We have developed a tabu search algorithm to solve the proposed scheduling model.

Computational results with the trip data on Beijing-Tianjin have shown that the algorithm can produce high-quality train scheduling solutions. Furthermore, this method can be widely applied to rail train circulations characterized by high-density trips and large-quantity trains. During the peak period of an intercity railway line, because of the unbalanced feature of trip numbers in both two directions, future research work may focus on considering the rail train circulations with deadhead strategy.


The work accomplished for this paper was supported by the National Natural Science Foundation of China (no. 71261014).


  1. G. Desaulniers, J. Lavigne, and F. Soumis, “Multi-depot vehicle scheduling problems with time windows and waiting costs,” European Journal of Operational Research, vol. 111, no. 3, pp. 479–494, 1998. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus
  2. J. E. Beasley and B. Cao, “A dynamic programming based algorithm for the crew scheduling problem,” Computers & Operations Research, vol. 25, no. 7-8, pp. 567–582, 1998. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus
  3. Y. D. Shen, K. K. Peng, K. Chen, and J. P. Li, “Evolutionary crew scheduling with adaptive chromosomes,” Transportation Research B, vol. 56, no. 12, pp. 174–185, 2013.
  4. K. Haase, G. Desaulniers, and J. Desrosiers, “Simultaneous vehicle and crew scheduling in urban mass transit systems,” Transportation Science, vol. 35, no. 3, pp. 286–303, 2001. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus
  5. D. Huisman, R. Freling, and A. P. M. Wagelmans, “Multiple-depot integrated vehicle and crew scheduling,” Transportation Science, vol. 39, no. 4, pp. 491–502, 2005. View at Publisher · View at Google Scholar · View at Scopus
  6. M. Mesquita and A. Paias, “Set partitioning/covering-based approaches for the integrated vehicle and crew scheduling problem,” Computers & Operations Research, vol. 35, no. 5, pp. 1562–1575, 2008. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus
  7. M. M. Chen and H. M. Niu, “A model for bus crew scheduling problem with multiple duty types,” Discrete Dynamics in Nature and Society, vol. 2012, Article ID 649213, 11 pages, 2012. View at Publisher · View at Google Scholar
  8. M. Mesquita, M. Moz, A. Paias, and M. Pato, “A decomposition approach for the integrated vehicle-crew-roster problem with days-off pattern,” European Journal of Operational Research, vol. 229, no. 2, pp. 318–331, 2013. View at Publisher · View at Google Scholar · View at MathSciNet
  9. H. M. Niu and M. H. Zhang, “An optimization to schedule train operations with phase-regular framework for intercity rail lines,” Discrete Dynamics in Nature and Society, vol. 2012, Article ID 549374, 13 pages, 2012. View at Publisher · View at Google Scholar
  10. H. M. Niu and X. S. Zhou, “Optimizing urban rail timetable under time-dependent demand and oversaturated conditions,” Transportation Research C, vol. 36, no. 16, pp. 212–230, 2013. View at Publisher · View at Google Scholar
  11. Z. Huang and H. Niu, “Study on the train operation optimization of passenger dedicated lines based on satisfaction,” Discrete Dynamics in Nature and Society, vol. 2012, Article ID 451201, 11 pages, 2012. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet
  12. A. Schrijver, “Minimum circulation of railway stock,” CWI Quarterly, vol. 6, pp. 205–221, 1993.
  13. X. Cai and C. J. Goh, “A fast heuristic for the train scheduling problem,” Computers & Operations Research, vol. 21, no. 5, pp. 499–510, 1994. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus
  14. A. Higgins, E. Kozan, and L. Ferreira, “Optimal scheduling of trains on a single line track,” Transportation Research B, vol. 30, no. 2, pp. 147–158, 1996. View at Publisher · View at Google Scholar · View at Scopus
  15. K. Ghoseiri, F. Szidarovszky, and M. J. Asgharpour, “A multi-objective train scheduling model and solution,” Transportation Research B, vol. 38, no. 10, pp. 927–952, 2004. View at Publisher · View at Google Scholar · View at Scopus
  16. E. Abbink, B. Van den Berg, L. Kroon, and M. Salomon, “Allocation of railway rolling stock for passenger trains,” Transportation Science, vol. 38, no. 1, pp. 33–41, 2004. View at Publisher · View at Google Scholar · View at Scopus
  17. D. Huisman, “A column generation approach for the rail crew re-scheduling problem,” European Journal of Operational Research, vol. 180, no. 1, pp. 163–173, 2007. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus
  18. S. Jütte and U. W. Thonemann, “Divide-and-price: a decomposition algorithm for solving large railway crew scheduling problems,” European Journal of Operational Research, vol. 219, no. 2, pp. 214–223, 2012. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet
  19. S. Qu and X. Xu, “Scheduling model of multiple units on intercity railway,” Journal of Tongji University, vol. 38, no. 9, pp. 1298–1302, 2010. View at Publisher · View at Google Scholar · View at Scopus
  20. G. Sahin and B. Yüceoglu, “Tactical crew planning in railways,” Transportation Research E, vol. 47, no. 30, pp. 1221–1243, 2011. View at Publisher · View at Google Scholar
  21. F. Shi, W.-L. Zhou, Y.-W. Yu, and L. Qing, “Optimized model and algorithm of motor train-sets scheduling for dedicated passenger lines,” Journal of the China Railway Society, vol. 33, no. 1, pp. 7–13, 2011. View at Publisher · View at Google Scholar · View at Scopus
  22. A. Azadeh, M. H. Farahani, H. Eivazy, S. Nazari-Shirkouhi, and G. Asadipour, “A hybrid meta-heuristic algorithm for optimization of crew scheduling,” Applied Soft Computing, vol. 13, pp. 158–164, 2013. View at Publisher · View at Google Scholar