Scheduling of Train Driver in Tiwan Rail Companyd
Transcript of Scheduling of Train Driver in Tiwan Rail Companyd
-
8/11/2019 Scheduling of Train Driver in Tiwan Rail Companyd
1/15
SCHEDULING OF TRAIN DRIVER FOR TAIWAN RAILWAY ADMINISTRATION
Chi-Kang LEE Chao-Hui CHEN
Professor Instructor
Department of Transportation and Department of Traffic and Transportation
Communication Management Engineering and Management
National Cheng Kung University Feng Chia University
1, University Rd., Tainan, 70101 100, Wenhwa Rd., Seatwen Taichung,
Taiwan, R.O.C. 407 Taiwan, R.O.C.
Fax: +886-6-275 3882 Fax: +886-4-24520678
Email: [email protected] Email:[email protected]
ABSTRACT
The paper presents the experience of two approaches in solving driver-scheduling problem for
a depot at Taiwan Railway Administration. The driver-scheduling problem consists of
generating feasible duties, selecting a schedule of duties for the depot, and circulating the
duties in the schedule into a roster for each driver. By using mathematical programming
approach, the set covering problem and the constrained traveling salesman problem are solved
for the pairing and rostering problems respectively. Comparing to TRAs practical solution,
we find a schedule with less duties, but a roster with a little longer cycle length. By using
Genetic algorithm approach, we have a very flexible process to deal with all kinds of rules
and objectives in the pairing and rostering problems. In the study, we consider multiple
objectives for both pairing and rostering problems, and obtain very good solutions.
Key Words: Crew scheduling, Railway transport, Genetic algorithm, Mathematical
Programming.
1. INTRODUCTION
1.1 The Problem
In railway practice, a sequential decision process is widely used for pairing and rostering train
drivers. As illustrated in Figure 1, it includes1.partitioning vehicle blocks into drivers trips
for each depot, 2.pairing trips and generating feasible and potential duties, 3.selecting one
efficient schedule of duties covered the depots daily trips, and 4.circulating of duties and
selecting one efficient roster for a drivers monthly work plan at the depot. An example duty
is shown in Figure 2, where a duty starts and ends at a specific depot, and it total lengthconsists of driving time, general work time, and rest time. The general work time includes
Journal of the Eastern Asia Society for Transportation Studies, Vol.5, October, 2003
292
-
8/11/2019 Scheduling of Train Driver in Tiwan Rail Companyd
2/15
time for engine warm-up, transport time from (to) depot to (from) starting (terminal) station,
time for hand-over or take-over a driving trip, and so on. In TRA, there are compensations
for driving and general works, and the ratio of the compensation for driving time to that for
general work time is 4 to 3. A piece of driving work is a trip or a piece of consecutive
driving trips. A piece of consecutive driving trips is a set of continuous driving trips, where
there is only a small break between any two consecutive trips. A driver may take the train
driving by another diver in a duty, and it is called a deadhead trip for general work. A daily
schedule of duties is a table listed all duties covering all daily trips for the depot. For
example, by using train diagram, Figure 3 shows all trips for the depot; and Figure 4 shows a
set of duties, where each colored line is a feasible duty. There are many criteria for a
feasible duty, such as the total length for a duty, the total length for driving time, and so on.
Each criterion may have different rules for different situations. For example, the definition
of a piece of consecutive trip is different for early trips, daily trips, and night trips. Since alltrips for the depot, illustrated in Figure 3, are covered by the duties shown in Figure 4, the set
of duties is a feasible schedule for the depot. Moreover, Figure 5 shows the schedule of
driving duties for the depot, where five drivers are required for the schedule. Cyclic
assignment is widely used in intercity railway, and a roster for a driver. As illustrated in
Figure 6, it is a cycle of the required duties in the schedule. There are many criteria for
consecutive duties in a roster. For example, the rest time between the two duties should be
longer than the work time of the previous duty. Moreover, each criterion may have different
rules for different situations.
Figure 1: Practical process of driver scheduling
Partitioning vehicle blocks into
driver trips for each depotStep 1
Pairing trips and generating
feasible and potential duties for
the depot
Step 2
Selecting one efficient schedule
of duties for the depotStep 3
Circulating duties and selecting
one efficient roster for the depotStep 4
Journal of the Eastern Asia Society for Transportation Studies, Vol.5, October, 2003
293
-
8/11/2019 Scheduling of Train Driver in Tiwan Rail Companyd
3/15
trip1
2:17
trip 2
2:54
5:20 6:20 8:37 9:07 11:48 12:28 15:22 16:02
station B station Astation Bststion Adriving time
general work time
rest time
from depot hand over take over to depot
Figure 2: An example duty
time
A
B
Depot
C
t1
t2
t3
t4 t5
t6
t7
t8
t9
t10
t11
t12
t14
t16
t13
Figure 3: Driving trips for a depot
time
A
B
Depot
C
D1
D2
D3
D4 D5
Figure 4: Duties for a depot
Journal of the Eastern Asia Society for Transportation Studies, Vol.5, October, 2003
294
-
8/11/2019 Scheduling of Train Driver in Tiwan Rail Companyd
4/15
Figure 5: A schedule of duties for a depot
Driver 1
Driver 2
Driver 3
Driver 4
Driver 5
Driver 6
Day Day Day3 Day4 Day5 Day6
Holiday
Holiday
D1 D2 D3 D4 D5
D1 D2 D3 D4 D5
D5 Holiday D1 D2 D3 D4
D4 D5 Holiday D1 D2 D3
D3 D4 D5 Holiday D1 D2
D2 D3 D4 D5 Holiday D1
Figure 6: A roster for a depot
1.2 Literature Overview
Many research results have been published on crew pairing problem in operations research
literature, for a review please refer to Barnhart, et al. 1999 and Deasauliners, et al. 1998.The researchers developed efficient methods to solve the problems of step 2 and step 3 in the
Duty
Trip connection
B Depot C
D1
D2
D3
D4
D5
t 7
t 14
t 12
t 1
t 8
t 12t 9
t 6t 3
t 4t 11
t 16
t 5
t 10
t 13
A
Journal of the Eastern Asia Society for Transportation Studies, Vol.5, October, 2003
295
-
8/11/2019 Scheduling of Train Driver in Tiwan Rail Companyd
5/15
sequential process, e.g. Caprara, et al. 1997 and Yan, et al. 2002. Furthermore, there are
some research results on crew rostering problem in operations research literature, please refer
to Caprara, et al. 1998 as an example. The researchers developed efficient methods to solve
the problem of step 4 in the sequential process. In brief, the crew scheduling problem is a
NP-hard problem to be solved exactly. In addition, most studies are considering the cases
with simple rules for a feasible duty and a feasible roster, and simple objectives for pairing
problem and rostering problem. For example, as illuminated by Kwan 1999, a rule-based
expert system or a heuristic is used to generate feasible and potential duties, if there are
complex rules, which are not easy to be written as simple equations. In recent years, some
studies solve the crew scheduling and related problems by intelligent search methods, e.g.
Beasely, et al. 1996, Chatterjee, et al. 1996, and Levine, et al. 1996. These methods are
suitable to deal with NP hard problem with practical size. Furthermore, these methods are
flexible to deal with various difficult constraints associated with the standard crew schedulingproblem.
In the practice of Taiwan Railway Administration (TRA), there are very complex rules for a
feasible duty and a feasible roster. Moreover, there is a meeting between TRA and her union
every year, discussing possible changes for the rules. Therefore, the study emphasizes the
development of decision method not only for efficiency but also for flexibility. Moreover, a
railway company needs an efficient decision process, and little research has considered the
whole decision process. For example, the generally selected objective for the pairingproblem is the number of duties, and that for the rostering problem is the total cycle length.
The connection of sub-optimal solutions in the sequential process may not result in an optimal
solution as a whole. Therefore, the study emphasizes the development of the method for the
whole decision process, including both the pairing and the rostering problems. Besides, we
will present our experiences in the paper on solving TRAs problem using mathematichal
programming and Genetic algorithms.
2. Mathematical Programming Approach
2.1 Generation of Feasible and Potential Duties
Since the number of feasible duties can be enormous, we need a process generating a certain
number of feasible duties, with high potential to be implemented in the following scheduling
problem. We had an in-depth interview with TRAs crew manager, and examine the
practical duties used in the past and current schedules. Finally, we develop some heuristic
methods to generate two-spell duties, three-spell duties, four-spell duties, and so on. For a
three-spell duty, we can first select the one trip from different stating times as the first, second,
Journal of the Eastern Asia Society for Transportation Studies, Vol.5, October, 2003
296
-
8/11/2019 Scheduling of Train Driver in Tiwan Rail Companyd
6/15
or third spell in the duty. Moreover, we develop some heuristic methods for over-night
duties.
2.2 Selecting an Efficient Schedule of duties
As illustrated in the following, a bi-objective set covering problem is used to solve the pairing
problem for TRA, where the primary objective is to minimize the total number of duties, and
the secondary objective is to minimize the compensation for the selected duties. As shown
by Ignizio et al. 1984, the bi-level problem can be converted into a single objective and single
level linear program. In this study, we solve the converted single objective LP by
commercial package LINDO. One trouble in solving such a problem is the size of feasible
duty set D . In this study, as shown in Figure 7, we solve the pairing problem with the duty
generation iteratively. We first solve the set covering problem with a small set of feasible
and potential duties, then we try to enrich the rules for generating potential duties, so as tosolve the set covering problem with a big set of feasible and potential duties, and so on. As
the results shown in Figure 8, it does not take long when we reach very good solution at the
3rditeration. After that, the increase of the size of feasible duties has very little effect on the
quality of optimal solution. In the study, the computer time for solving the model with
TRAs practical problem is quite fast. With TRAs practical problem in 2000, the optimal
solution is better than TRAs practical schedule by 3 duties and 389 units of compensation.
Dj j
xMin (1)
Dj
jjxcMin (2)
tosubject
Dj
jijxa 1 Ti (3)
{ }1,0jx Dj ; (4)
where T is the set of trips, D is the set of feasible and potential duties, jc is the cost or
compensation for dutyj , ija is the indicator parameter for trip i and duty j , and jx is
the model decision variable for the selection of duty j .
Journal of the Eastern Asia Society for Transportation Studies, Vol.5, October, 2003
297
-
8/11/2019 Scheduling of Train Driver in Tiwan Rail Companyd
7/15
Figure 7: An interactive process for the set covering problem with practical size
Figure 8: Testing results of the pairing problem
2.3 Circulating Duties and Selecting an Efficient Roster
Given the schedule of selected duties, the duty assignment or rostering problem is a
constrained asymmetric traveling salesman problem. As the model shown in the following,
the roster length is the objective, where two duties can be connected without or with a holiday.
Equations 8 to 15 are constrains for a feasible roster. In order to simplify the problem, we do
not formulate the rules accurately. For example, equation 9 represents that there is a holiday
Generate feasible and potential duties
Formulating the set covering problem
LINDO solution
Modifying rules for duty generation
Generating feasible and potential duties
Convergence? End
No
Yes
Master problem
Sub-problem
60
55
50
45
40
Driver
97 194 291 388 485
The size of duty set
56(1st iteration)
46(2nd) 45(3rd) 45(4th)
120000
110000
100000
90000
80000
Compensation
97 194 291 388 485
The size of duty set
117480 (1st iteration)
88032 (2nd) 87339 (3rd) 86306 (4th)
Journal of the Eastern Asia Society for Transportation Studies, Vol.5, October, 2003
298
-
8/11/2019 Scheduling of Train Driver in Tiwan Rail Companyd
8/15
in a week on average, but the rule is a holiday in every week. However, we are lucky that
testing results give solutions of feasible roster, not only for the constraints in the model but
also for the rules in practice. Moreover, we do not put sub-tour elimination constrains so as
to control the size of the model. The computer time for such a model with TRAs practical
problem is very long. After solving the linear integer programming model by LINDO, we
have to deal with the sub-tour problem by heuristic methods. In the study, we found
multiple optimal solutions for the model, and there are several ways to eliminate the sub-tours
of an optimal solution into one cycle. Given the output of the pairing problem as the input
of the rostering problem, we obtain 19 good rosters with the same value of the objective
function. As shown in Table 1, they have very good characteristics, e.g. low variance of
weekly work-time. An example roster, number 15, is illustrated in Table 2. However, these
rosters are one day longer than TRAs practical solution. That is, testing results in the
pairing and rostering problems give us an example of good schedule but bad roster. Onereason is that TRA take some rules as soft constrains but we put all rules in the model as hard
constrain. In other words, TRAs practical solution is not feasible in our roster model.
+ Ni Nj
ijijijij xdxdMin )(2211 (5)
tosubject
1)( 21 = +Ni
ijij xx Nj (6)
1)( 21 = +Nj
ijij xx Ni (7)
TDxdxd
t
Ni Njijijijij
Nkk
+
)( 2211 (8)
+
Wxdxd
x
Ni Njijijijij
Ni Njij
)( 2211
2
),( ji (9)
ijijij yMHxr 4022 ),( ji (10)
)1(40 22 ijijij yMxrH ),( ji (11)
+
Rxdxd
y
Ni Njijijijij
Ni Njij
)( 2211 ),( ji (12)
0)( 11 ijiij xwr ),( ji (13)
111 ijjk xx = Bkjikji ,,),,( (14)
+
Rxdxd
x
Ni Njijijijij
Bi Bjij
)( 2211
1
),( ji (15)
{ }1,0,, 21 ijijij yxx Nji ),( ; (16)
Journal of the Eastern Asia Society for Transportation Studies, Vol.5, October, 2003
299
-
8/11/2019 Scheduling of Train Driver in Tiwan Rail Companyd
9/15
where dij1 is the time between duty iand dutyj, and dij
2 is the time between duty i and dutyj
with a holiday; kt is the driving time of duty k; iw is the work time of duty i ;1
ijr is the
rest time between duty i and dutyj ; 2ij
r is the rest time between duties with a holiday; T
is the limit of average daily work time; RWDH ,,, are the minutes of an hour, a day, a week,
and a month; B is the duty set for the duties with 2 hours or more driving-time during 22:00
to 6:00; is the holiday limit for a week; is the holiday limit for a month; is the
limit number of duties with 2 hours or more driving-time during 22:00 to 6:00 in a month;
is a big number; ijy is a 0-1 variable for the rest time between duties great than 40 hours;
1
ijx and2
ijx are 0-1 decision variables for the consecutive connection of duties i and j .
Table 1: Characteristics of Selected Rosters
Roster 1 2 3 4 5 6 7 8 9 10
Max weekly
work-time
38.00 41.40 39.28 41.15 39.17 39.08 39.5 39.5 40.17 39.50
Min weekly
work-time
28.37 28.37 28.37 28.37 28.87 28.37 28.37 28.37 28.37 28.87
Range 9.63 13.03 10.91 12.78 10.3 10.71 11.13 11.13 11.8 10.63
value 3.5876 4.7803 3.9877 4.7614 3.6348 4.1618 3.7850 4.0139 4.7188 3.6973
Roster 11 12 13 14 15 16 17 18 19 TRAMax weekly
work-time
37.77 37.77 37.77 41.95 37.77 38.38 40.47 44.35 39.95 45.52
Min weekly
work-time
28.37 28.37 28.37 28.37 28.87 28.37 28.37 28.87 28.37 29.72
Range 9.4 9.4 9.4 13.58 8.9 10.01 12.1 15.48 11.58 15.80
Value 4.1930 3.5736 3.8888 4.8329 3.4485 4.1331 4.1620 5.2283 4.2377 6.7749
Table 2: An example roster optimal solution
Roster # 15
Holiday 26 22 29
Holiday 15 4 19 21
Holiday 8 3 25 10
Holiday 9 31 12 30
Holiday 11 27 7 6
Holiday 35 24 5 36 33
Holiday 28 18 20 34
Holiday 32 16 23 17
Holiday 1 14 13 2
Journal of the Eastern Asia Society for Transportation Studies, Vol.5, October, 2003
300
-
8/11/2019 Scheduling of Train Driver in Tiwan Rail Companyd
10/15
3. GENETIC ALGORITHM APPROACH
3.1 Generating Feasible and Potential Duties
Besides the heuristic methods described in section 2.2, we develop some indicators used to
discard some feasible duties, which have no potential to be selected eventually. They are
efficiency indicator, distribution indicator, and so on. For example, the efficiency indicator
is the ratio of driving time over duty length. As illustrated in Figure 9, there is a negative
relation between the number of generated feasible duties and the efficiency indicator.
Thence, we can choose feasible duties with high values of efficient indicator for solving the
set covering problem.
38 635
28 54
34
5 975
95 6
766
625
0
50000
100000
150000
200000
250000
300000
350000
400000
non 0.15 0.2 0.25 0.3 0.35 0.4
The efficiency indicator
duties
Figure 9: the relation between the number of feasible duties and the efficiency indicator
3.2 Selecting an Efficient Schedule of Duties
The coding method of Genetic algorithm for the set covering problem in the study is binary
coding. As the example illustrated in Table 3, a binary coding is a series of 0-1 numbers,
and each number represent the selection result of a duty. Many parameters have to be
decided so as to have an efficient Genetic algorithm. For example, Figure 10 shows the
effect of population size, and Figure 11 shows the effect of uniform crossover method. After
doing many experiments, we formulate the Genetic algorithm with 200 population size, 2000
generations, roulette wheel method by nonlinear rank, uniform crossover with fusion operator,
100% reproduction rate, 0.05 mutation rate, and Elitism of 10. In addition, several practical
objectives are considered in the algorithm, and they are the number of duties, total length of
duties, total length of work-time, and the variance of work-time. Moreover, there are three
penalty values, and they are the number of uncovered, the number of covered, and the number
of dead-head trips. At last, the fitness function is the sum of objective function and penalty
Journal of the Eastern Asia Society for Transportation Studies, Vol.5, October, 2003
301
-
8/11/2019 Scheduling of Train Driver in Tiwan Rail Companyd
11/15
function. The weights used in the functions are also tested in many experiments. For
example, the final selected objective function is written as follows.
Obj 0.136 Sj
jx /37 + 0.193 Sj
jjxt /26578 + 0.632 Sj
jjxw /18300 + 0.038
Sj
j
Sj Sj
j
Sj
jjjj
x
xxwxw
1
)(2
/122.46
With TRAs practical dada in 2001, the Genetic algorithm in general produces promising
solutions for the pairing problem. Comparing to TRAs practical solution, all objectives
except the total length of duties can get about 10% improvements by the Genetic algorithm.
Table 3: Coding for the set covering problem
ija Duty INon-binary
Coding
1 1 0 0 0 1
0 0 1 1 1 4
0 1 0 1 0 4
1 0 0 0 1 1
Trip j
0 0 1 1 1 4
Binary
coding1 0 0 1 0
0
10
20
30
40
50
60
70
80
90
100
1 11 21 31 41 51 61 71 81 91generation
objective 100-1000 200-500
Figure 10: The effect of population size
Journal of the Eastern Asia Society for Transportation Studies, Vol.5, October, 2003
302
-
8/11/2019 Scheduling of Train Driver in Tiwan Rail Companyd
12/15
0
20
40
60
80
100
120
1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96generation
objective U-value U-rank U-nlrank U-tournament
Figure 11: The effect of various uniform crossover method
3.3 Circulating Duties and Selecting an Efficient Roster
The coding method of the Genetic algorithm in the study is non-binary coding. As the
example illustrated in Table 4, given a holiday pattern, a gene of roster is represented by a
series of numbers in sequence, while each number is a duty. Note that holiday pattern in
Table 4 is different from the case used in section 2, because holiday regulation is changed in
2001. The objectives of the rostering problem are the cycle length and the variance of
weekly work-time. There are many rules for a feasible roster, and one penalty is formulatedfor each of them. Many parameters have to be decided so as to have an efficient Genetic
algorithm. For example, Figure 12 shows the effect of roulette wheel method. After doing
many experiments, we formulate the Genetic algorithm with 200 population size, 1000
generations, roulette wheel method by nonlinear rank, greedy selection crossover operator,
100% reproduction rate, 0.2 mutation rate, 0.1 rate of inversion operation, and Elitism of 10.
Table 4: The coding of gene for a roster
Holiday Roster
40 hrs 1 25 24 19
24 hrs 16 37 6 7 1324 hrs 27 15 17 34
40 hrs 20 33 23 2
40 hrs 8 5 21 10
40 hrs 3 32 4 9
40 hrs 28 30 11 22
24 hrs 35 18 31 29 36 12
40 hrs 26 14
24 hrs
Journal of the Eastern Asia Society for Transportation Studies, Vol.5, October, 2003
303
-
8/11/2019 Scheduling of Train Driver in Tiwan Rail Companyd
13/15
62000
64000
66000
68000
70000
72000
74000
76000
78000
80000
82000
1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96
generation
objective By value By rank By nonlinear rank
Figure 12: The effect of roulette wheel method
Table 5 is TRAs practical solution of the pairing and rostering problems. With TRAs
practical dada in 2001, Table 6 is the rostering solution by the Genetic algorithm with the
duties of TRAs schedule; and Table 7 is the rostering solution by the Genetic algorithm, with
the duties of an efficient schedule obtained from the pairing problem by the Genetic algorithm
described in section 3.2. Comparing Table 5 and Table 6, it is evident that the Genetic
algorithm for the rostering problem can decrease the roster length by 1 week. Comparing
Table 5 and Table 7, it is clear that the Genetic algorithms developed in this study canimprove the roster length by 1 week and the schedule by 7 duties. However, with regard to
the cycle length, the combined effect of the Genetic algorithms for the two sub-problems is
similar the Genetic algorithm for the rostering problem. That is, the decrease of the number
of duties in the pairing problem may not have positive impact on the rostering problem.
Further research is necessary to clarify the relationship between the sub-problems.
Table 5: TRAs practical roster in 2001
Week Holiday Roster of duties
Duty and
holidaytime
Worktime
1 40 hrs 836801822833 10318 1931
2 40 hrs 827811803810 9937 2456
3 24 hrs 830808861866832 10067 2141
4 24 hrs 834813804882828 10087 2627
5 40 hrs 812802867826 8593 2055
6 24 hrs 815809829825838 10369 2178
7 24 hrs 814821805847823 9854 2715
8 40 hrs 831881824807837 9975 2197Total 37 duties 79200 18300
Journal of the Eastern Asia Society for Transportation Studies, Vol.5, October, 2003
304
-
8/11/2019 Scheduling of Train Driver in Tiwan Rail Companyd
14/15
Table 6: One solution of the Genetic algorithm for the rostering problem
Week Holiday Roster of duties
Duty and
holiday
time
Work
time
1 24 hrs 836826830815833 8783 2632
2 24 hrs 832828834811821 9224 2569
3 40 hrs 813827829801867 9862 2643
4 24 hrs 807808805802814 9733 2551
5 40 hrs 838831837812881825 9338 2638
6 24 hrs 861803804882823 9230 2599
7 24 hrs 847822824866809810 10070 2668
Total 37duties 66240 18300
Table 7: One roster of the Genetic algorithms for the pairing and rostering problems
Week Holiday Roster of duties
Duty and
holiday
time
Work time
1 40 hrs 1216 9 4 10024 2615
2 40 hrs 141122 5 9201 2622
3 24 hrs 242018 3 8565 2625
4 40 hrs 1517 821 9588 2631
5 40 hrs 302326 67 9763 2630
6 40 hrs 11910 2 9484 2631
7 40 hrs 1325292827 9615 2611Total 30duties 66240 18365
4. CONCLUDING REMARKS
In the study, we found the following major points: 1.mathematic programming is not efficient
and flexible for TRAs driver scheduling problem, especially for the rostering problem; 2.the
connection of suboptimal solutions of pairing and rostering problems may not result in the
optimal solution as a whole; 3.Genetic algorithm provides a flexible structure for driver
scheduling problem with multiple objectives and various constrains; and 4.the solution of
Genetic algorithm approach in general give better results the TRAs practical solution.
Moreover, Genetic algorithm may provide a structure to integrate the sub-problems of
generating feasible duties, selecting duties, and rostering duties into an integrated problem.
ACKNOLEDGEMENTS
Authors are grateful to Taiwan National Science Council for the financial support; and the
authors would like to thank their research assistants, Mr. Hsieh, S-H and Mr. Koa, Z-S, for
their computing works.
Journal of the Eastern Asia Society for Transportation Studies, Vol.5, October, 2003
305
-
8/11/2019 Scheduling of Train Driver in Tiwan Rail Companyd
15/15