行政院國家科學委員會專題研究計畫 成果報告
鐵路司機員排班與輪班問題之研究(I)
計畫類別: 個別型計畫
計畫編號: NSC92-2211-E-006-075-
執行期間: 92 年 08 月 01 日至 93 年 10 月 31 日 執行單位: 國立成功大學交通管理科學系(所)
計畫主持人: 李治綱
計畫參與人員: 蔡宗憲、張亦寬
報告類型: 精簡報告
報告附件: 出席國際會議研究心得報告及發表論文 處理方式: 本計畫可公開查詢
中 華 民 國 93 年 11 月 15 日
行政院國家科學委員會補助專題研究計畫 □※成果報告
□期中進度報告
鐵路司機員排班與輪班之研究(I)
計畫類別:□※ 個別型計畫 □ 整合型計畫
計畫編號:NSC 92-2211-E006-075
執行期間: 92 年 8 月 1 日至 93 年 10 月 31 日
計畫主持人:李治綱
共同主持人:無
計畫參與人員:蔡宗憲、張亦寬
成果報告類型(依經費核定清單規定繳交):□※精簡報告 □完整報告
本成果報告包括以下應繳交之附件:
□赴國外出差或研習心得報告一份
□赴大陸地區出差或研習心得報告一份
□※出席國際學術會議心得報告及發表之論文兩份
□國際合作研究計畫國外研究報告書一份
處理方式:除產學合作研究計畫、提升產業技術及人才培育研究計畫、
列管計畫及下列情形者外,得立即公開查詢
□涉及專利或其他智慧財產權,□一年□二年後可公開查詢
執行單位:國立成功大學交通管理科學系
中 華 民 國 93 年 11 月 11 日
摘要
本研究應用基因演算法發展二個模式架構來求解台鐵司機員排班以及輪班的問題。第一個 程序性模式將排班及輪班視為兩個前後階段之工作,用兩個模式根據不同的目標來分別求 解。第二個模式保留排班及輪班的前後關係,設計出一個整合模式來進行求解。基因演算 法提供一個非常彈性之架構,可以有效處理配對及滿足輪班之規則,此外也可以將排班及 輪班之間的關係加以整合在一起。透過上述三個模式的求解,我們可以發現排班以及輪班 問題之間的關係。此外,我們也檢驗了整合模式中可行工作班集合對模式績效的影響,如 此一來我們可以找到更適合之輸入資料來進行模式之求解。
關鍵字:鐵路司機員,排班問題,輪班問題,基因演算法
Abstract
For a practical problem of scheduling and rostering drivers at Taiwan Railway Administration, we develop a sequential model, a sequential model with multiple objectives, and an integrated model using Genetic algorithms. Genetic algorithms provide a general and flexible framework for us to deal with all kinds of pairing and rostering rules, and to connect the scheduling and rostering operations. We investigate the relationship between the scheduling and rostering sub-problems by solving the three models. Moreover, we examine the effect of the set of feasible duty on the performance of the integrated model, so as to find an appropriate input data for running the models.
Keyword: Train drivers, Crew scheduling, Crew rostering, Genetic algorithm
1 Introduction.
1.1 Problem
A sequential process is used in practice for scheduling and rostering train drivers at Taiwan Railway Administration (TRA). The first step is to partition vehicle blocks into driving trips, and assign trips to each depot; the second step is to pair the driving trips and generate feasible and potential duties for each depot; the third step is to select one efficient schedule of duty, which cover all the depot’s driving trips; and the last step is to circulate the selected duties, so as to create one efficient roster for each driver at the depot. There are many criteria for building a feasible duty at TRA in step 2, such as the total length for a duty, the total length for driving time, the total length of consecutive 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, day trips, and night trips. There are many criteria for connecting duties in a roster at TRA in step 4. For example, the rest time between the two consecutive duties should be longer than the work time of the leading duty. Similar to the scheduling sub-problem, each rostering criterion may have different rules for different situations. Moreover, TRA and her union may discuss and revise the criteria for pairing driving trips and rostering train drivers every year. For example, one rostering rule is that there is one holiday for each period of 7 days. Based on that, the union proposes a new rule recently, that there is at least one holiday in weekend in every period of 30 days. Partly because of the complexity and variability of the problem, TRA still deals with the problem by hand.
An example duty is shown in Figure 1, where the duty starts and ends at a specific depot, and its total length consists of driving time, general work time, and rest time. The general work includes engine warm-up, transport from (to) depot to (from) starting (terminal) station, hand-over or take-over a driving trip, and so on. At TRA, there are extra-compensations for driving and general works. A piece of driving work is a trip or a piece of consecutive driving trips. A driver may take the train which driving by another diver in a duty, and it is called a deadhead trip for a general work. A daily schedule of duty is a table listed all duties covering all daily trips for the depot. For example, Figure 2 shows all trips for the depot in a train diagram.
Figure 3 shows a set of duty for the example, where each colored line is a feasible duty. Since all trips illustrated in Figure 2, are covered by the duties in Figure 3, the set of duties is a feasible schedule for the depot. Moreover, Figure 4 shows the daily operation schedule of duty for the depot, where five drivers are required for the schedule. Cyclic assignment or roster is used at TRA. As the example illustrated in Figure 5, it is a cycle of the duties in the schedule.
TRA 804 Duty
Station From
depot Take
over Hand-
over
Consecutive trip To depot
A Depot C
Duty content
Trip 1
Trip 2
Trip 3
◎
●
08:35
08:58 11:34
08:15
16:18 18:15
60
--
-- --
--
40 --
30
-- --
--
40 23 min
Length of duty 700 Total work time min
486 min
Driving time
316 min
General work time
170 min
Consecutive driving time
199 min --
Fig. 1. An example duty
Fig. 2. Driving trips for a depot Fig. 3. Duties for a depot
Fig. 4. A schedule of duty for a depot Fig. 5. A roster for a depot
1.2 Literature Overview
Many research results have been published on one of the two problems, please refer to (Barnhart et al. 1999; Ernst et al. 2004) for a review. Many mathematical programming techniques have been developed for one of the two problems, especially for the scheduling problem. There are only a few research results on the whole scheduling and rostering problem. (Caprara et al. 1997, 1999; Ernst et al. 2001) have solved the two problems in sequence for the railway problem.
Recently, (Caprara et al. 2001) developed a feedback mechanism to integrate the scheduling and rostering problems, so as to improve the model performance. Besides, intelligent search is a flexible and robust approach for such a difficult problem. For example, many research results of Genetic algorithms have been published on the set covering problem and traveling salesman problem (Beasely et al. 1996; Chatterjee et al. 1996; Levine et al. 1996; Kwan 1999). These methods are suitable to deal with the NP hard problem of practical size.
time A
B
Depot
C D1
D2 D3
D4 D5
time A
B
Depot
C t1
t2 t3
t4 t5 t6
t7 t8
t9 t10
t11 t12 t14
t16
t13
Driver 1 Driver 2 Driver 3 Driver 4 Driver 5 Driver 6
Day1 Day2 Day3 Day4 Day5 Day6
Holiday Holiday
D1 D2 D3 D4 D5
D5 Holiday
D4 D5 Holiday
D5 Holiday
D5 Holiday D1
D1 D2 D3 D4 D5
D2 D3 D4
D1 D2 D3 D4
D1 D2 D3
D1 D2
D3 D4
Duty
Trip connection
B Depot C
D1
D2
D3
D4
D5
◎
●
◎
◎
◎
●
●
●
●
◎ t 7 t 14
t2 t 1
t 8
t 12 t 9t 6 t 3 t 4 t 11 t 16
t 5 t 10
t 13 A
In an application study on TRA’s scheduling and rostering problem using mathematical programming techniques, we had a lot of difficulty to write the practical rules of pairing and rostering into constraint equations precisely (Lee et al. 2000). Similar to the study of (Kwan 1999), a rule-based expert system or a heuristic is used to generate feasible and potential duties in step 2. Moreover, we found that a better solution in the scheduling problem may result in a bad solution in the rostering problem (Lee et al. 2003). Therefore, we intend to build and solve an integrated scheduling and rostering problem, and to clarify the relationship between scheduling and rostering operations in the practical and sequential scheduling process. In addition, TRA’s rules for duty or roster constructions are very complex and changeable. A Genetic algorithm provides a general framework to deal with all types of hard or soft constraints, multiple objectives, as well as to take practical heuristics into account. Therefore, we use Genetic algorithms in this study for a sequential scheduling and rostering model, a sequential model with multiple objectives, and an integrated scheduling and rostering model.
2 Method
2.1 The Sequential Scheduling and Rostering Model
In order to solve the scheduling sub-problem, the binary coding method is used to represent a daily schedule of duty (Beasely, et al. 1996). The gene is a series of 0-1 numbers, and its length equals to the size of the set of feasible duty, which is the input of the scheduling sub-problem.
In brief, each 0-1 number represents the result of a feasible duty. The objective or fitness function is the number of duty. Since the binary coding or its corresponding solution may not be feasible for the set covering problem, two penalty terms respectively for under-cover and over-cover constraints are added to the fitness function.
In order to solve the rostering sub-problem, a non-binary coding method is used to represent a roster. The coding is similar to that for the traveling sales man problem (Goldberg 1985). The gene is a series of numbers in sequence, and its length equals to the size of the daily schedule of duty, which is the solution of the scheduling sub-problem. In brief, each number represents the sequence of a duty in the roster and the gene represents a roster. The fitness function is the cycle length of roster. Since the gene or its corresponding solution may not be feasible for the rostering sub-problem, some penalty terms for rostering rules are added to the fitness function.
2.2 The Sequential Scheduling and Rostering Model with Multiple Objectives
For the scheduling sub-problem, we consider the following objectives: the number of duty, total length of duty, total length of work-time, and the variance of work-time for the daily schedule.
They are conflicts among these objectives, for example, minimization of the number of duty may result in a schedule with some long duties. For the rostering sub-problem, we consider two objectives, and they are the cycle length of roster and the variance of weekly work-time. In the study, we do not try any complicated method of multicriteria decision making. We simply
convert the multiple objectives into a weighted fitness function, and do not assume any preference function. An example fitness function for the pairing sub-problem is written as Eq.
1. In order to find a good final solution, several sets of weight are tried.
Fitness=0.136×
∑
∈S j
x /37+0.193×j
∑
∈S j
j jx
t /26578+0.632×
∑
∈S j
j jx
w /18300
+ 0.038×
∑
∑ ∑ ∑
∈
∈ ∈ ∈
−
−
S j
j S
j j S
j S
j j j j
j
x
x x
w x
w
1
)
( 2
/122.46 (1)
where xj is a 0-1 variable for duty j, tj is the duty length for duty j, wj is the work time for duty j.
The TRA’s values of the number of duty, the length of duty, the length of work-time, the variance of work-time are respectively 37, 26587, 18300, and 122.46.
2.3 The Integrated Scheduling and Rostering Model
In order to solve the integrated scheduling and rostering sub-problems, the non-binary coding method is used to represent a roster. The gene is a series of numbers, and its length equals to the size of the set of feasible duty, which is the input of the integrated problem. A duty is not selected if its corresponding number is 0. In brief, each number represents the choice and the sequence of a duty in a roster and the gene represents a roster. The objective or fitness function of the integrated model is the cycle length of roster. Since the coding or its corresponding solution may not be feasible for the scheduling and rostering sub-problems, many penalty terms have to be added to the fitness function for constraints in the two sub-problems.
3. Result
3.1 Performance of the Sequential Model
TRA’s roster for the class of electric intercity trains (E train) is shown in Table 1. There are 37 duties in a daily operation schedule. The cycle length of the roster is 55 days, or the minimum number of drivers for the class of E train at Kaoshiung depot is 55.
Table 1. TRA’s roster for E trains at K depot
Week Holiday(Hr) Roster of duties (duty number) Worktime (Min)
1 40 →836→801→822→833 1931
2 40 →827→811→803→810 2456
3 24 →830→808→861→866→832 2141
4 24 →834→813→804→882→828 2627
5 40 →812→802→867→826 2055
6 24 →815→809→829→825→838 2178
7 24 →814→821→805→847→823 2715
8 40 →831→881→824→807→837 2197
Total 55 days 37 duties 18300
The best roster for the sequential pairing and rostering model is illustrated in Table 2. There are 28 duties in a daily operation schedule. Comparing duty number and the sequence of duties in Table 2 to those in Table 1, it is clear that the schedule is quite different from the schedule used at TRA. The length of the roster is 47 days, or the minimum number of drivers for the class of E train is 47. Since, a Genetic algorithm may produce a different result in each run. The stability of the algorithm seems fairly high, while we get 11 results of 47 cycle length in 30 runs of the experiment. With regard to the cycle length of roster, the sequential scheduling and rostering model (Table 2) performs much better than the practical approach at TRA (Table 1).
Table 2. The roster of the sequential scheduling and rostering model
Week Holiday(Hr) Roster of duties (duty number) Worktime (Min)
1 40 →49→41→1037→26 2660
2 24 →150→542→606→236 2580
3 40 →347→524→622→372 2656
4 24 →786→442→20→839 2735
5 40 →721→678→18→174 2614
6 24 →353→820→842→63 2603
7 40 →151→983→84→2 2720
Total 47 days 28 duties 18568
3.2 Performance of the Integrated Model
The best roster for the integrated scheduling and rostering model is shown in Table 3. There are 30 duties in a daily operation schedule. It is evident that the schedule in Table 3 is quite different from those in Table 1 and Table 2. The cycle length of the roster is 46 days, or the minimum number of drivers for the class of E train is 46. Comparing the number of duty in Table 3 to that in Table 2, it is clear that the integrated model does not find the best solution for the pairing sub-problem. However, it results in a better solution, in terms of the cycle length of roster, for the whole scheduling and rostering problem.
Table 3. The roster of the integrated scheduling and rostering model
Week Holiday(Hr) Roster of duties(duty number) Worktime (Min)
1 40 →16→63→66→256 2654
2 24 →479→676→72→49 2717
3 40 →298→459→335→26 2531
4 24 →2→917→800→951 2582
5 40 →79→511→19→619 2609
6 24 →309→442→43→1105 2517
7 40 →1066→1014→1041→1080→1011→1058 2763
Total 46 days 30 duties 18365
3.3 Relationship between the Pairing and the Rostering Sub-problems
Table 4 shows a roster for solving the rostering sub-problem by a Genetic algorithm with multiple objectives with the input data of TRA’s daily schedule of 37 duties. The objectives are the cycle length of roster, and the variance of weekly worktime. Comparing the practical roster
in Table 1 to the roster in Table 4, it is evident that the duty sequence is quite different, the weekly worktime distribution in Table 4 is much more stable than that in Table 1, and the cycle length of roster in Table 4 is 8 days shorter than that in Table 1. In brief, we obtain a very good result of roster by Genetic algorithm with the practical schedule of 37 duties, instead of the schedule of 28 duties, which generated by the scheduling sub-problem in the sequential model.
Table 4. The Roster of a Genetic Algorithm for the Rostering Sub-problem
Week Holiday(Hr) Roster of duties Worktime(Min)
1 24 →836→826→830→815→833 2632
2 24 →832→828→834→811→821 2569
3 40 →813→827→829→801→867 2643
4 24 →807→808→805→802→814 2551
5 40 →838→831→837→812→881→825 2638
6 24 →861→803→804→882→823 2599
7 24 →847→822→824→866→809→810 2668
Total 47 days 37duties 18300
Since the number of duties in a daily operation schedule may not critical for the rostering sub-problem, we have tried Genetic algorithms with multiple practical objectives, which are used by TRA’s scheduling experts, in the scheduling sub-problem. The objectives are the number of duty, the length of duty, the length of worktime, and the variance of duty worktime. As the roster result illustrated in Table 5, we solve the rostering sub-problem using a Genetic algorithm with the new solution of the scheduling sub-problem with multiple objectives. It is clear that the sequential model with multiple objectives produces the cycle length of roster for 46 days, which is as good as the result of the integrated model in Table 3. Therefore, the sequential model may perform as good as the integrated model, if the relationship between the scheduling and the rostering sub-problems has been taken into account in the sequential modeling process.
Table 5. The Roster of Gentic Algorithms with Multiple Objectives for the Sequential Model
Week Holiday (Hr) Roster of duty (duty number) Worktime (Min)
1 40 →12→16→ 9→ 4 2615
2 40 →14→11→22→ 5 2622
3 24 →24→20→18→ 3 2625
4 40 →15→17→ 8→21 2631
5 40 →30→23→26→ 6→7 2630
6 40 → 1→19→10→ 2 2631
7 40 →13→25→29→28→27 2611
Total 46 days 30 duties 18365
3.4 The Effect of the Set of Feasible Duty on the Integrated Model
The set of feasible duty is the input data for the scheduling and rostering problem, i.e. the input of the sequential and/or integrated models. It is important to understand the effect of the input data on model performance. Figure 6 and Figure 7 demonstrate respectively the effect of distribution index and efficiency index on the number of duty for the integrated model. Figure 8 and Figure
9 illustrate respectively the effect of distribution index and efficiency index on the cycle length of roster for the integrated model. It is evident that the integrated model will result in good solutions, when the distribution index is grater or equal then 20, and the efficiency index is about 0.33. For a fixed value of efficiency index, e.g. 0.33, an increase of distribution index when it is grater then 20, will decrease the number of duties until the distribution index is grate than 30.
Moreover, Figure 10 and Figure 11 show respectively the effect of distribution index and efficiency index on the probability of finding feasible solution. It is evident that there is very low probability to find feasible solution if the efficiency index is lower than 0.33.
Fig. 6. The Effect of Distribution on the Number of Duty Fig. 7. The Effect of Efficiency Index on the Number of Duty
Fig. 8. The Effect of Distribution Index on the Cycle Length of Roster Fig. 9. The Effect of Efficiency Index on the Cycle Length of Roster
Fig. 10. The Effect of Distribution Index on the Solution Feasibility Fig. 11. The Effect of Efficiency Index on the Solution Feasibility
4. Concluding Remarks
For the complex and variable problem of scheduling and rostering drivers at TRA, we develop Genetic algorithms to solve it sequentially and integratedly. Using the proposed method for the integrated model, it is straight forward to obtain the best result for the whole problem. If the sequential model is used, it is good to consider multiple objectives for the scheduling sub-problem, so as to have a good input for the rostering sub-problem. In our case study, it will be a trouble for the rostering sub-problem if there are many long and/or over-night duties in the
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
Distribution Index
Probability of finding feasible solution
10 15 20 25 30 35 40
28 30 32 34 36
Distribution Index
Number of Duty
10 15 20 25 30 35
40 30
31 32 33 34
Efficiency Index
Number of Duty 0.3
0.33 0.35
67800 68000 68200 68400 68600 68800
Efficiency Index Cycle Length of Roster (Min)
0.3 0.33 0.35
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
Efficiency Index Probability of Finding feasible Solution
0.3 0.33 0.35
66000 67000 68000 69000 70000 71000 72000
Distribution Index Cycle Length of Roster (Min)
10 15 20 25 30 35 40
solution of the scheduling sub-problem. Moreover, the size of the set of feasible duty is too big for practical computation. With consideration of efficiency and distribution indexes, the input data is somewhat sensitive to model performance, especially for the probability of finding feasible solution. Selection the set of feasible duty is important for the scheduling and rostering problem. In the study, we develop a duty based scheduling and rostering model using Genetic algorithms. In the near future, we will integrate the sub-problems from step 2 to step 4 in the sequential process, and build a trip based model of scheduling and rostering. Moreover, we will investigate the effect of pairing and rostering rules, from management point of view, using the integrated scheduling and rostering model.
Reference
Barnhart C et al. (1999) Crew scheduling. In: Hall R (ed) Handbook of Transportation Science.
Kluwer, Boston
Beasely JE et al. (1996) A genetic algorithm for the set covering problem. European Journal of Operational Research 94: 392-404
Caprara A, Fischetti M, Toth P, Vigo D (1997) Algorithms for Railway Crew Management.
Mathematical Programming 79: 125-141
Caprara A, Fischetti M, Guida P, Toth P, Vigo D (1999) Solution of large-scale railway crew planning problems: the Italian experience. In: Wilson N (ed.) Computer-Aided Transit Scheduling. Springer, pp 1-18
Caprara A, Monaci, M., and Toth P. (2001) A global method for crew planning in railway application. In: Vob S, Daduna JR (eds) Computer-Aided Scheduling of Public Transport.
Springer, pp 17-36
Chatterjee S et al. (1996) Genetic algorithms and traveling salesman problems. European Journal of Operational Research 93: 490-510
Ernst A et al. (2001) Rail crew scheduling and rostering optimization algorithms. In: Vob S, Daduna JR (eds) Computer-Aided Scheduling of Public Transport. Springer, pp 53-71
Ernst A et al. (2004) Staff scheduling and rostering: A review of applications, methods and models. European Journal of Operational Research 153: 3-27
Kwan A (1999) Train Driver Scheduling. Ph.D. thesis, University of Leeds School of Computer Studies
Lee C-K et al. (2000) TRA’s driver scheduling and rostering problem. Paper presented at the 5th Transportation Network Conference. Taiwan.
Lee C-K et al. (2003) Scheduling of train drivers for Taiwan Railway Administration. Journal of Eastern Asia Society for Transportation Studies 5: 292-
Levine D (1996) Application of a hybrid genetic algorithm to airline crew scheduling. Computers Operations Research 23: 547-558
計劃成果自評
1. 研究內容與原計畫相符程度 研究內容與原計畫相符。
2. 達成預期目標情況
研究過程完成預期研究目標。
3. 研究成果之學術或應用價值
針對實務鐵路司機員排班與輪班的複雜問題,研究過程發展了遺傳演算法。研究過程 使用台灣鐵路管理局高雄機務段之實務範例,研究成果具有實務應用價值。
4. 是否適合在學術期刊發表
研究成果已經發表於”2003 Eastern Asia Society for Transportation Studies Conference”
與 “2004 Computer-Aided Scheduling for Public Transport”等國際研討會,兩者均經過 全文審查通過後發表。期刊論文正在準備中。
5. 主要發現或其他有關價值等
研究發現排班問題與輪班問題之相關性,若分別循序求解可能會產生不利之結果。
6. 綜合評估
3 年之研究計畫,因只獲得 1 年之補助。努力為之,幾乎完成 2 年之研究目標。研究 成果已經發表兩篇國際研討會論文,期刊論文正在準備中。研究過程尚稱圓滿。