Case Study of Beijing Bus CRW Scheduling
Case Study of Beijing Bus CRW Scheduling
Case Study of Beijing Bus CRW Scheduling
Jihui Ma3, Avishai (Avi) Ceder1,2*, Yang Yang3, Tao Liu1 and Wei Guan3
1
Department of Civil and Environmental Engineering, University of Auckland, Auckland, New Zealand
2
Technion-Israel Institute of Technology, Haifa, Israel
3
MOE Key Laboratory for Urban Transportation Complex Systems Theory and Technology, Beijing Jiaotong
University, Beijing 100044, China
SUMMARY
Crew scheduling for bus drivers in large bus agencies is known to be a time-consuming and cumbersome
problem in transit operations planning. This paper investigates a new meta-heuristics approach for solving
real-world bus-driver scheduling problems. The drivers’ work is represented as a series of successive pieces
of work with time windows, and a variable neighborhood search (VNS) algorithm is employed to solve the
problem of driver scheduling. Examination of the modeling procedure developed is performed by a case
study of two depots of the Beijing Public Transport Group, one of the largest transit companies in the world.
The results show that a VNS-based algorithm can reduce total driver costs by up to 18.1%, implying that the
VNS algorithm may be regarded as a good optimization technique to solve the bus-driver scheduling
problem. Copyright © 2015 John Wiley & Sons, Ltd.
KEY WORDS: crew scheduling problem; variable neighborhood search; local search; meta-heuristic
1. INTRODUCTION
Crew scheduling of bus drivers working for large bus agencies involves finding the most efficient way of
assigning notional drivers to the daily operations of a fleet of vehicles. The precursor to the driver/crew
scheduling problem is the vehicle-scheduling problem, which deals with the allocation of vehicles to
the trips to be operated. Two solution approaches are commonly used for the crew scheduling problem,
the sequential approach and the integrated approach. In the sequential approach, vehicle schedules are the
base for the crew schedules having several constraints related to vehicle scheduling such as the maximum
driver transfer times [1, 2]. In the integrated approach, vehicles and drivers are scheduled simultaneously.
This work uses the sequential approach because of being adaptive, as opposed to the integrated approach,
to the various labor-agreement restrictions and the handling of large numbers of trips. That is, the inte-
grated approach, used by Freling et al. [3] and Steinzen et al. [4] through solving quasi-assignment
problems, increases the computational time exponentially for large numbers of trips.
When all daily driver duties for a schedule or set of schedules (sometimes weekdays have different
schedules from weekends) have been complied with, it is necessary to combine them into sets of
work for actual drivers on a weekly basis. In China, the weekly duties are usually organized by
the management into a rotating roster, and the drivers work through all the weekly rotations in turn.
The driver scheduling problem presented here is concerned with the assignment of notional drivers
to a predetermined bus schedule. In this problem, the operators prefer to adopt the minimum number
of duties and/or have the lowest total cost. The number of possible combinations for partitioning the
*Correspondence to: Avishai (Avi) Ceder, Department of Civil and Environmental Engineering, University of Auckland,
New Zealand, Technion-Israel Institute of Technology, Haifa, Israel. E-mail: a.ceder@auckland.ac.nz
vehicle work into a schedule is usually astronomical. There is, though, a set of restrictions on driver
schedules. For example, the daily working time for a driver has to be limited to a certain number of
hours; a driver is normally required to have a break if the continuous driving time has reached a
certain limit. These restrictions, usually incorporated into labor agreements, vary a great deal among
different operators.
For the sake of clarification, a few terminologies should be introduced. Piece of work is the basic unit of
a schedule; it is composed of a time–location pair, start and end, in which time means the departure (start)
or arrival (end) time and location represents the start point or end point. A duty is the work to be performed
by a crew during one day from sign-on until sign-off at the depot and consists of pieces of work. A block is
a set of consecutive pieces of work performed by one vehicle from its departure until its return to the
depot. The relationship between duty and block is depicted in the next section. Vehicle work is the set
of blocks performed by the same vehicle over the course of a day. A schedule, which is a solution to
the crew scheduling problem, consists of a set of duties, legally performed, that together cover all the
required vehicle work.
Since the 1960s, many computer programs have been developed for solving the bus-driver sched-
uling problem. The earliest of these may be the system developed by Elias in the United States in
1964 [5]. Elias’s system is mainly based on three steps: first, cut 8-h straight-run (without a break)
duties from vehicle schedules; second, connect the pieces of work that are left from the first step if
some of them together could compose nearly to 8-h duty without violating the labor rules; and last,
to deal with the remaining pieces. Strictly speaking, the Elias’s system cannot be classified as an
intelligent algorithm. Many researchers have since developed approaches to solve the driver schedul-
ing problem by means of heuristic and meta-heuristic methods. These approaches roughly fall into
two groups: generate-and-select and heuristic search.
Generate-and-select group: he basic steps of the generate-and-select method are as follows first,
generate a set of valid duties according to the duty constraint; then, use a method such as a genetic
algorithm [6], integer linear programming method [7, 8], or fuzzy evaluation [9, 10] to screen out a
set of duties satisfying the constraints of the schedule. The duty-generation stage is independent of
the duty-selection stage. Many computer packages, such as Integer Mathematical Programming for
Automatic Crew Scheduling by Smith [11], Technique for Running Automatic Crew Scheduling by
Weaver and Wren [12], Computer Assisted Crew Scheduling by Wren et al. [13], and the known Tech-
niques for Running Automatic Crew Schedules Mark II (TRACEII) by Kwan et al. [14], have been
applied in real bus companies based on the generate-and-select method. In this study, we introduce
briefly TRACEII because up to now it has been considered the best system for solving the driver
scheduling problem. TRACEII was developed at Leeds University in 1994 and in essence constitutes
upgrades of the Integer Mathematical Programming for Automatic Crew Scheduling system. The first
module of TRACEII involves the generation of a set of valid duties; the second module is that of con-
solidation; the duties are ranked and eliminated if they are deemed to be inferior; the third module
deals with schedule search, in which an integer linear programming method is adopted to generate a
subset of the first module, and that subset is taken as a solution.
Heuristic search group: the main idea of the heuristic search method is to generate an initial
schedule and then to refine it iteratively. Shen [15] shows that tabu search is a prominent approach
for solving the driver scheduling problem. The algorithm used by Shen and Kwan [16] is a combi-
nation of the neighborhood search method and tabu strategy. First, an initial solution is generated,
which might be an invalid schedule; second, an analysis is made on the initial solution and a feasible
solution set, called neighborhood, is generated. If a solution exists that is better than the initial one, it
is recorded in the tabu list. The process is repeated until no further improvement can be obtained. We
adopted some of these ideas in our approach.
Specifically, in this work, we employ the variable neighborhood search (VNS) algorithm proposed
by Mladenović and Hansen [17]. This VNS algorithm solves the bus crew scheduling problem and is
classified under the heuristic search group in searching for the solution space.
In the past two decades, the VNS algorithm has been applied in many fields, such as graph coloring
problem [18], vehicle routing problem [19, 20], berth allocation problem [21], nurse rostering problem
[22], job shopping problem [23], and dial-a-ride problem [24], all of which indicate that VNS is an effec-
tive method to solve combinatorial non-convex continuous problems. Driver scheduling problem is an
Copyright © 2015 John Wiley & Sons, Ltd. J. Adv. Transp. 2016; 50:434–445
DOI: 10.1002/atr
436 J. MA ET AL.
important daily undertaking in bus companies, and to the best of our knowledge, none used the VNS-
based approach to solve this problem; this is the motivation behinds this work.
Given this background, the present paper is organized as follows: Section 2 describes the bus-driver
scheduling problem in detail. Section 3 investigates the VNS method and the steps for solving driver
scheduling with time windows. The experiments and analysis will be discussed in Section 4. Conclusions
will be finally drawn and recommendations for further work are made in Section 5.
Copyright © 2015 John Wiley & Sons, Ltd. J. Adv. Transp. 2016; 50:434–445
DOI: 10.1002/atr
VNS ALGORITHM FOR BUS CREW SCHEDULING 437
The objective of the bus-driver scheduling process is to minimize the total cost of the vehicle schedules
covering all the pre-arranged pieces.
Copyright © 2015 John Wiley & Sons, Ltd. J. Adv. Transp. 2016; 50:434–445
DOI: 10.1002/atr
438 J. MA ET AL.
3.3. Variable neighborhood search algorithm for solving bus-driver scheduling with time windows
3.3.1. Neighborhood structure construction
In order to describe the neighborhood structure systematically, we first represent the solution with
regard to movements. In doing this, we follow the method proposed by Shen and Kwan [16]. In the
following notation, i is the index of duty in a schedule and j is the index of link in a duty.
pij = (tp, wp): Link tp is the departure time and wp is the departure point
qij = (tq, wq): Link tq is the arrival time and wq is the arrival point
lij = (pij, qij): Piece a link, defined by a directed pair of departure–arrival
ni: Number of links in Duty i
Di ¼ fli1 ; li2 ; li3 ; …; lidi g: A duty, defined by a linearly ordered set of links in the order they occur
in the duty
s = {D1, D2, D3, …, Dsi}: A solution; si is the number of duties
S = {s1, s2, s3, ....}: The solution space
Copyright © 2015 John Wiley & Sons, Ltd. J. Adv. Transp. 2016; 50:434–445
DOI: 10.1002/atr
VNS ALGORITHM FOR BUS CREW SCHEDULING 439
Break and reconnect: break the links, d1i, d2i, and d1j, and connect p1i with q2i, p1j with q1i, and p2i
with q1j. This procedure results in two new duties, Duty1′ and Duty2′, as shown in Figure 6.
• Swapping two pieces
Given two different duties, Duty1 and Duty2, d1i, d2i, d1j, and d2j are four links, and d1i = (p1i,
q1i) ∈ Duty1, d2i = (p2i, q2i) ∈ Duty1; d1j = (p1j, q1j) ∈ Duty2, and d2j = (p2j, q2j) ∈ Duty2 (p1i, p2i, p1j, and
p2j are departure times; q1i, q2i, q1j, and q2j are arrival times).
Break and reconnect: break the links d1i, d2i, d1j, and d2j, and connect p1i with q1j as d ′li, p2j with q2i
as d2i, p1j with q1i as d ′lj , and p2i with q2j as d ′2j ; this procedure results in two new duties: Duty1 ′ and
Duty2′, as shown in Figure 7.
As illustrated in the previous text, the operations on the old duties generate new duties, which are
composed of the solution neighborhood of the initial solution. However, the operations also bring an
unexpected condition: invalid duties when the moves are operated. In the next section, we will intro-
duce two functions, penalty and costing, to ensure convergence of the process.
Copyright © 2015 John Wiley & Sons, Ltd. J. Adv. Transp. 2016; 50:434–445
DOI: 10.1002/atr
440 J. MA ET AL.
pieces should be feasible. A typical condition will be depicted in detail in the next section. In this
paper, this parameter is represented by p.
As the initial schedule was created roughly, the duties may be infeasible. Meanwhile, in swapping
links and pieces and inserting pieces, we may also bring infeasibility to the duties. Figure 8 presents a
common illustration of the infeasibility of a duty. The black bars represent the pieces of work, the num-
bers above the bars are the departure or arrival points, and the horizontal line represents time. As can
be seen from Figure 8, the departure point of the third piece, B, does not coincide with the arrival point
of second piece, A; this calls for a deadheading (empty) trip between A and B. This situation will lead
to two conditions, which are depicted in Figure 9. In Condition 1, a dummy piece is added between the
second trip and the third trip; thus, the vehicle is able to operate the third piece continuously after its
arriving at point B. However, if the arrival time of the dummy piece is later than the departure time of
the third piece, a severe penalty should be added to this condition.
The search process for the optimal solutions includes two steps as follows.
Step 1 (feasibility check): Given a candidate solution duty D (regardless if it is feasible or not) that
may include a set of infeasible connections. If there is an overlap of trip connection pr (Case
2 of Figure 9), this candidate duty is infeasible and will be deleted instantly from the solution
space; otherwise, go to Step 2.
Step 2 (penalty calculation): Given a feasible solution duty D including a set of duty pieces I, the duty
penalty function is defined as follows:
2 !2 !2 3
X X
F ðDÞ ¼ min4λ1 t i L þ λ2 Ti Q 5 (1)
i∈I i∈I
where ti is the total working time of duty piece i and Ti is the spreadover time of duty piece i; L
and Q are the working time limit and spreadover time limit, respectively; λ1 and λ2 are weighting
parameters. The first term of Equation (1) captures the duty working time deviation, and the second
term quantifies the spreadover time deviation. The aim of the two terms is to maintain the duty
working time and spreadover time as close as possible to the planned parameters. Optimality of
D is at F(D) = 0.
Copyright © 2015 John Wiley & Sons, Ltd. J. Adv. Transp. 2016; 50:434–445
DOI: 10.1002/atr
VNS ALGORITHM FOR BUS CREW SCHEDULING 441
(3) Spreadover time: the duration of time from signing on to signing off at the depot; it is less than a
given maximum.
(4) Gap: the time between two successive pieces of work; it is less than a given time.
(5) Meal-break: a gap in which the driver travels to/from the canteen to have a meal; it is always from
40 to 50 min.
If a duty Di is valid, the cost of a duty is defined as being equal to the sum of the driving time and the
idle time of the duty.
4.1. The VNS algorithm for bus-driver scheduling with time windows
The main steps of the VNS algorithm for bus-driver scheduling with time windows are as follows:
*penalizing a duty
Generate an initial schedule x,
Repeat
Set k ¼ 1; xbest ¼ x
Repeat
∀x′ ∈Nk ðxÞ, if f x′ < fðxÞ, then x ¼ x′ k = 1;
Else k = k + 1
Until k ¼ kmax
Until t > tmax
Obtain the result xbest
*costing a duty
Obtain the solution x from penalizing stage
Repeat
Set k = 1, xbest ¼ x
Repeat
∀x*′∈Nk ðx*Þ, if fðx*′Þ < fðx*Þ, then x* ¼ x*′ k = 1;
Else k = k + 1
Until k ¼ kmax
Until t > tmax
(tmax is the maximum execution time allowed)
Copyright © 2015 John Wiley & Sons, Ltd. J. Adv. Transp. 2016; 50:434–445
DOI: 10.1002/atr
442 J. MA ET AL.
and runs on a personal computer with the following hardware configuration: Core i3 CPU, 3 GB
RAM, 500 GB Hard Disk.
4.3. Experiments
4.3.1. Experiments on different single neighborhood structures
As discussed in Section 3.1, a local search will lead to the local optimal. First, we use a single neigh-
borhood structure to detect whether the local search algorithm could reach this aim; the results are
showed in Table II.
Following the results of Table II, we can reach the conclusion that the swapping-link operation
could not cause the penalty of the duties to converge to 0, whereas the inserting piece and the swapping
pieces will make the penalty converge to 0; the performance of the inserting-piece operation is better
for converging to the total number of hours (cost). The problem, though, is that the schedule cost
appears to be even more than that obtained with the manual method. For that reason, we next unite
the three operations to produce a VNS algorithm to test the data sets of Section 4.2.
Table II. Results obtained by local search with different single-swapping neighborhood structures.
Manual VNS
Data No. Cost (h) Time No. Cost (h) Time (h:mm:ss)
D1 14 120:56 More than 2h 14 120:06 00:03:12
D2 17 144:21 More than 2h 16 130:55 00:09:54
D3 23 190:33 More than 4h 22 169:22 00:14:31
D4 44 350:01 More than 4h 43 330:12 00:22:12
VNS, variable neighborhood search.
Copyright © 2015 John Wiley & Sons, Ltd. J. Adv. Transp. 2016; 50:434–445
DOI: 10.1002/atr
VNS ALGORITHM FOR BUS CREW SCHEDULING 443
Table IV. Solutions obtained by the variable neighborhood search with multi-neighborhood approaches.
Swap L.→Insert P. →Swap P.* Insert P. →Swap P.→Swap L.* Swap P. →Insert P.→Swap L.*
Data No. Cost (h) Time No. Cost (h) Time No. Cost (h) Time
D1 14 120:06 00:03:12 14 120:31 00:03:09 14 122:16 00:03:01
D2 16 130:55 00:09:54 16 128:21 00:09:54 16 132:51 00:08:24
D3 22 169:22 00:14:31 22 161:21 00:14:20 22 169:55 00:11:30
D4 43 330:12 00:22:12 43 327 :12 00:22:01 43 340:12 00:20:12
*Swap L., swapping links; Insert P., Inserting piece; Swap P., swapping pieces.
Data VNS Ave Manual PI (%) VNS Ave Manual PI (%) VNS Manual PI (%)
D1 14 14 14 0 120.5 120.69 120.9 0.3 3.1 130 4026
D2 16 16 17 5.8 128.4 130.71 144.4 12.4 9.9 140 1314
D3 22 22 23 4.5 161.4 180.08 190.6 18.1 14.3 250 1648
D4 43 43 44 2.3 327 0.2 329.10 350.0 7.0 22.0 290 1218
VNS, variable neighborhood search; PI, percentage increase.
5. CONCLUSION
In this paper, an efficient VNS-based algorithm is proposed to solve the bus-driver scheduling problem.
Examination of the modeling developed is performed by a case study associated with two depots used by
the Beijing Public Transport Group, one of the largest transit companies in the world. The results show
that a VNS-based algorithm can significantly reduce total driver costs by up to 18.1%, implying that
the VNS algorithm can be regarded as a good solution approach to the bus-driver scheduling problem.
A further study is planned to deal with the expansion of the VNS-based algorithm when dealing
with search uncertainty. More specifically, we intend to consider uncertainty when executing a local
search on the neighborhood of a not-so-good solution, in other words, to check the acceptance of an
infeasible solution with a certain probability. This strategy may exploit a larger search space within
whole sets of solutions and, therefore, may result in better solutions.
Copyright © 2015 John Wiley & Sons, Ltd. J. Adv. Transp. 2016; 50:434–445
DOI: 10.1002/atr
444 J. MA ET AL.
s initial solution
S Solution set
N(s) Neighborhood of solution s
Ni(s) The ith Neighborhood of solution s
kmax The maximum iteration times
tmax The maximum running time
tp departure time
wp departure point
tq arrival time
wq arrival point
lij link
Di a duty
No. number
Swap L. Swapping links
Insert P. Inserting piece
Swap P. Swapping pieces
ACKNOWLEDGEMENTS
This work was supported in part by National Basic Research Program of China (2012CB725403), and
Fundamental Research Funds for the Central Universities(T11JB00430).
REFERENCES
1. Aarts E, Korst J. Simulated Annealing and Boltzmann MachinesJohn Wiley & Sons., Inc.: New York, 1988.
2. Adibi MA, Zandieh M Amiri M. Multi-objective scheduling of dynamic job shop using variable neighborhood
search. Expert Systems with Applications 2010; 37(1): 282–287.
3. Avanthay C, Hertz A Zufferey N. A variable neighborhood search for graph coloring. European Journal of Operational
Research 2003; 151(2): 379–388.
4. Bräysy O. A reactive variable neighborhood search for the vehicle-routing problem with time windows. INFORMS
Journal on Computing 2003; 15(4): 347–368.
5. Burke E, De Causmaecker P, Petrovic S Vanden BG. Variable Neighborhood Search for Nurse Rostering Problems,
Metaheuristics: Computer Decision-Making (Combinatorial Optimization Book Series)2004 153–172.
6. Chen S, Shen Y. An improved column generation algorithm for crew scheduling problems. Journal of Information
and Computational Science 2013; 10(1): 175–183.
7. Elias SE. The use of digital computers in the economic scheduling for both man and machine in public transportation.
Kansas State University Bulletin, Special Report 49, 1964; Manhattan, Kansas, United States.
8. Escobar AH, Gallego RA Romero RA. Using traditional heuristic algorithms on an initial genetic algorithm
population applied to the transmission expansion planning problem. Revista Ingenieria E Investigacion 2011;
31(1): 127–143.
9. Fores S, Proll L. Driver scheduling by integer linear programming—the TRACS II approach. Research Report
Series 1998; University of Leeds School of Computer Studies.UK.
10. Fores S, Proll L Wren A. An improved ILP system for driver scheduling. Computer-Aided Transit Scheduling 1999;
471: 43–61.
11. Freling R, Wagelmans AP Paixão JMP. An overview of models and techniques for integrating vehicle and crew
scheduling. Computer-Aided Transit Scheduling 1999; 471: 441–460.
12. Freling R, Huisman D Wagelmans A. Models and algorithms for integration of vehicle and crew scheduling. Journal
of Scheduling 2003; 6(1): 63–85.
13. Glover F. Tabu search—part I. ORSA Journal on Computing 1989; 1(3): 190–206.
14. Hansen P, Oğuz C Mladenović N. Variable neighborhood search for minimum cost berth allocation. European
Journal of Operational Research 2008; 191(3): 636–649.
15. Hansen P, Mladenović N Pérez JAM. Variable neighborhood search: methods and applications. Annals of Operations
Research 2010; 175(1): 367–407.
16. Kwan ASK, Kwan RSK, Parker ME Wren A. Producing train driver schedules under differing operating strategies.
Computer-Aided Transit Scheduling 1999; 47: 129–154.
17. Li J, Kwan RS. A fuzzy simulated evolution algorithm for the driver scheduling problem. Evolutionary Computation,
Proceedings of the 2001 Congress on Evolutionary Computation 2001; 2:1115–1122.
18. Li J, Kwan RS. A fuzzy genetic algorithm for driver scheduling. European Journal of Operational Research 2003;
147(2): 334–344.
Copyright © 2015 John Wiley & Sons, Ltd. J. Adv. Transp. 2016; 50:434–445
DOI: 10.1002/atr
VNS ALGORITHM FOR BUS CREW SCHEDULING 445
19. Mladenović N, Hansen P. Variable neighborhood search. Computers & Operations Research 1997; 24(11):
1097–1100.
20. Parragh SN, Doerner KF Hartl RF. Variable neighborhood search for the dial-a-ride problem. Computers &
Operations Research 2010; 37(6): 1129–1138.
21. Polacek M, Hartl RF Doerner K. A variable neighborhood search for the multi depot vehicle routing problem with
time windows. Journal of Heuristics 2004; 10(6): 613–627.
22. Shen Y. Tabu search for bus and train driver scheduling with time windows. Doctoral dissertation 2001; Faculty of
Engineering, University of Leeds, UK.
23. Shen Y, Kwan RS. Tabu search for driver scheduling. Computer-Aided Transit Scheduling 2001; 505: 121–135.
24. Shen Y, Peng K, Chen K Li J. Evolutionary crew scheduling with adaptive chromosomes. Transportation Research
Part B: Methodological 2013; 56: 174–185.
25. Smith BM. IMPACS—a bus crew scheduling system using integer programming. Mathematical Programming
1988; 42: 181–187.
26. Steinzen I, Gintner V, Suhl L Kliewer N. A time-space network approach for the integrated vehicle and crew
scheduling problem with multiple depots. Transportation Science 2010; 44(3): 367–382.
27. Tóth A, Krész M. An efficient solution approach for real-world driver scheduling problems in urban bus transpor-
tation. Central European Journal of Operations Research 2013; 21(1): 75–94.
28. Weaver A, Wren A. Bus crew scheduling by computers. Report in Operational Research Unit 1972; School of
Computing, University of Leeds, UK.
29. Wren A, Smith BM Miller AJ. Complementary approaches to crew scheduling. Computer Scheduling of Public
Transport 1985; 2: 262–278.
Copyright © 2015 John Wiley & Sons, Ltd. J. Adv. Transp. 2016; 50:434–445
DOI: 10.1002/atr