a self-adjusting algorithm for driver schedulingjli/papers/joh2005.pdf · a self-adjusting...

17
Journal of Heuristics, 11: 351–367, 2005 c 2005 Springer Science + Business Media, Inc. Manufactured in The Netherlands. A Self-Adjusting Algorithm for Driver Scheduling JINGPENG LI School of Computer Science and Information Technology, The University of Nottingham, Nottingham, NG8 1BB, UK email: [email protected] RAYMOND S. KWAN School of Computing, University of Leeds, Leeds, LS2 9JT, UK email: [email protected] Submitted in April 2002 and accepted by Anthony Cox, Jr. in May 2005 after 3 revisions Abstract Public transport driver scheduling is a world wide problem, which is NP-hard. Although some mathematically based methods are being used in the transport industry, there is still much scope for improvements. This paper presents a novel evolutionary approach that simulates the self-adjusting process on a single schedule. Five factors characterized by fuzzy membership functions are first aggregated to evaluate the shift structure. This evaluating function is incorporated into a constructing heuristic to make shift selection. A self-adjusting algorithm is then designed to guide the constructing heuristic to improve a given initial schedule iteratively. In each generation an unfit portion of the working schedule is removed. Broken schedules are repaired by the constructing heuristic until stopping condition is met. Experimental results on real-world driver scheduling problems has demonstrated the success of the proposed approach. Key Words: driver scheduling, combinatorial optimization, fuzzy subset, evolutionary algorithm 1. Introduction Driver scheduling is a world wide problem, and what we discussed in this paper is specifi- cally for public transport, e.g. train, bus, and tram. Efficient schedules can make significant monetary savings for transportation operators because driver wages are a very large cost element. For example, bus driver wages account for about 45% of the total operating cost (Meilton, 2001). To clarify the problem, some terminologies need to be introduced. A shift is the work a single driver carries out in one day, and a driver schedule is a solution that uses a set of shifts to cover all the required driver work. The shifts are only notional because they are not yet assigned to actual personnel. The subsequent packaging of work for actual drivers is usually performed on a weekly basis, allowing for rest days and taking into account issues such as fairness and safety regulations. The work of one vehicle is illustrated by a vehicle graph shown in figure 1. Author to whom all correspondence should be addressed.

Upload: others

Post on 12-May-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Self-Adjusting Algorithm for Driver Schedulingjli/papers/JOH2005.pdf · A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 353 least cost subset covering all the work is selected

Journal of Heuristics, 11: 351–367, 2005c© 2005 Springer Science + Business Media, Inc. Manufactured in The Netherlands.

A Self-Adjusting Algorithm for Driver Scheduling

JINGPENG LI∗School of Computer Science and Information Technology, The University of Nottingham, Nottingham,NG8 1BB, UKemail: [email protected]

RAYMOND S. KWANSchool of Computing, University of Leeds, Leeds, LS2 9JT, UKemail: [email protected]

Submitted in April 2002 and accepted by Anthony Cox, Jr. in May 2005 after 3 revisions

Abstract

Public transport driver scheduling is a world wide problem, which is NP-hard. Although some mathematicallybased methods are being used in the transport industry, there is still much scope for improvements. This paperpresents a novel evolutionary approach that simulates the self-adjusting process on a single schedule. Five factorscharacterized by fuzzy membership functions are first aggregated to evaluate the shift structure. This evaluatingfunction is incorporated into a constructing heuristic to make shift selection. A self-adjusting algorithm is thendesigned to guide the constructing heuristic to improve a given initial schedule iteratively. In each generation anunfit portion of the working schedule is removed. Broken schedules are repaired by the constructing heuristic untilstopping condition is met. Experimental results on real-world driver scheduling problems has demonstrated thesuccess of the proposed approach.

Key Words: driver scheduling, combinatorial optimization, fuzzy subset, evolutionary algorithm

1. Introduction

Driver scheduling is a world wide problem, and what we discussed in this paper is specifi-cally for public transport, e.g. train, bus, and tram. Efficient schedules can make significantmonetary savings for transportation operators because driver wages are a very large costelement. For example, bus driver wages account for about 45% of the total operating cost(Meilton, 2001).

To clarify the problem, some terminologies need to be introduced. A shift is the work asingle driver carries out in one day, and a driver schedule is a solution that uses a set ofshifts to cover all the required driver work. The shifts are only notional because they are notyet assigned to actual personnel. The subsequent packaging of work for actual drivers isusually performed on a weekly basis, allowing for rest days and taking into account issuessuch as fairness and safety regulations. The work of one vehicle is illustrated by a vehiclegraph shown in figure 1.

∗Author to whom all correspondence should be addressed.

Page 2: A Self-Adjusting Algorithm for Driver Schedulingjli/papers/JOH2005.pdf · A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 353 least cost subset covering all the work is selected

352 LI AND KWAN

Figure 1. Portion of a vehicle graph.

Figure 2. Illustration of a two-spell shift.

A Relief Opportunity is a time (marked on the horizontal timescale) and place (representedby letter codes) where a driver can leave the current vehicle, for reasons such as taking ameal break or transferring to another vehicle. The work between two consecutive reliefopportunities on the same vehicle is called a piece of work. Not all relief opportunities willbe used to relieve drivers and therefore a driver may be covering a number of consecutivepieces of work, called a spell, on a vehicle before being relieved.

A shift typically starts with the driver signing on at a depot. The driver then works on oneor more spells with breaks in between. Normally, there is at least one break long enoughfor taking a meal. Finally the driver returns to depot to sign off. Figure 2 illustrates thecomposition of a shift in relation to some vehicle work.

The main constraints and objectives of driver scheduling are:

• every piece of work is assigned to a shift;• the shifts must comply with all the operational constraints and labour rules;• the total number of shifts is minimized;• the total cost is minimized.

Bus and train driver scheduling has attracted much interest since the 1960’s, and researchinto this area has only become more active since the 1990’s (Kwan et al., 1999; Caprara et al.,1997; Wren et al., 2003). Wren and Rousseau (1995) gave an overview of the approaches,many of which have been reported in a series of international workshop conferences (e.g.Voß and Daduna, 2001).

Driver scheduling can be modelled as a set covering problem, which is NP-hard (Chvatal,1979). A large set of possible legal shifts is first generated by heuristics that are usuallyhighly parameterized to reflect on the driver work rules of individual companies. Then, a

Page 3: A Self-Adjusting Algorithm for Driver Schedulingjli/papers/JOH2005.pdf · A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 353 least cost subset covering all the work is selected

A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 353

least cost subset covering all the work is selected to form a solution schedule. Fores, Proll,and Wren (1999, 2002) use a blend of heuristics and Integer Linear Programming (ILP),the success and limitations of which have been discussed in Kwan et al. (2001).

In recent years, meta-heuristics (Rayward-Smith et al., 1996) have been widely used forseeking practical near-optimal solutions to NP-hard problems. The main advantages of meta-heuristics are that they are usually very efficient in searching through very large solutionspaces, always returning a solution, and each class of meta-heuristics has a methodical andstrategic structure that is problem domain independent. Genetic Algorithms (GAs) forma major class of meta-heuristics, which have been extensively used for driver scheduling(Wren and Wren 1995; Clement and Wren, 1995; Gonzalez Hernandez and Corne, 1996;Kwan and Wren, 1996; Kwan, Kwan, and Wren, 2001; Li and Kwan, 2003). A number ofattempts have also been made by using other meta-heuristics such as Tabu search (Cavique,Rego, and Themido, 1999; Shen and Kwan, 2001), constraint programming (Layfield,Smith, and Wren, 1999; Curtis, 2000) and ant system (Forsyth and Wren, 1997).

To investigate a new class of meta-heuristics and apply them to driver scheduling, a self-adjusting approach has therefore been proposed by the authors and preliminarily outlinedin Li and Kwan (2001). In this paper we articulate the approach from a fresh and clearerperspective, and report on further research developments and their results.

In the first stage of the approach, greedy heuristic is presented to evaluate all the possiblelegal shifts based on fuzzy subsets theory, and to decide which shift is going to be selected inthe process of constructing a schedule. The main idea is to set up five criteria, characterizedby fuzzy membership functions, to evaluate the structure and generally the goodness of ashift. Since each criterion reflects only one aspect of the shift structure, an arithmetic meanoperator is used to aggregate all the criteria, and make an overall evaluation. In the secondstage, a self-adjusting algorithm is then designed to guide the above constructing heuristic tobuild an initial schedule and iteratively improve it. In each generation an unfit portion of theworking schedules is removed. Broken schedules are repaired by the constructing heuristic.By carrying out iterative improvement and constructive perturbation, this algorithm has theability to escape from local minima.

2. A constructing heuristic for driver scheduling

From the viewpoint of driver scheduling, the vehicle schedule consists of a set of piecesof work I = {1, . . . , m} to be covered. A very large set of possible legal shifts S = {S1,. . . , Sn} has been generated. Each shift covers a subset of the pieces of work (Sj ⊆ I forj ∈ J = {1, . . . , n}), and has an associated cost c j (hours paid). A subset of shifts(J ∗ : J ∗ ⊆ J ) covers all the work if

⋃(Sj∗ : j∗ ∈ J ∗) = I . (1)

Because of the advantage of fast computational speed, greedy techniques are sometimesemployed for driver scheduling. A simple greedy heuristic for the set covering problem isat each step, to choose the unused set (shift) which covers the largest number of remainingelements (pieces of work). For the weighted set covering problem, choose the unused shift

Page 4: A Self-Adjusting Algorithm for Driver Schedulingjli/papers/JOH2005.pdf · A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 353 least cost subset covering all the work is selected

354 LI AND KWAN

Sj ( j ∈ J ) with the largest ratio 〈Sj 〉/c j , based on the assumption that at each iterationthe possibility for shift Sj to be selected increases with its number of uncovered piecesof work, denoted as 〈Sj 〉, and decreases with its cost c j . In terms of driver scheduling, astraightforward greedy operator would be choosing the unused Sj with the largest uncoveredworked time in each iteration. The solution quality of these simple greedy heuristics hasbeen proven unacceptable in Li (2002).

This paper presents a more refined greedy heuristic, given that a partial schedule con-sisting of some seeding shifts has been provided. It is based on the assumption that thedesirability of using shift Sj in an optimal solution increases with its functional valueF(Sj ). This function consists of two components, formulated as

F(Sj ) = f1(Sj ) × f2(Sj ), ∀ j ∈ J, (2)

where f1(Sj ) ∈ [0, 1] is called the over-cover ratio, and f2(Sj ) ∈ [0, 1] is called thestructural coefficient (to be described in Section 3). Over-cover means a piece of work hasbeen covered by more than one shifts. The over-cover ratio of a shift is the ratio of thenon-overlapped worked time to the total worked time in this shift, which is formulated as

f1(Sj ) =|Sj |∑

k=1

(α jk × β jk)

/ |Sj |∑

k=1

β jk, ∀ j ∈ J, (3)

where |Sj | = number of pieces of work in Sj ;

α jk ={

0, if work piece k in Sj has been covered by any other used shifts Si ;

1, otherwise;.

β jk = worked time for work piece k in Sj .If every piece of work in Sj has been covered by other used shifts, f1(Sj ) = 0; conversely

if none of the pieces of work is overlapped, f1(Sj ) = 1.Considering all the large number of legal shifts with respect to the pieces of work to be

covered, each piece of work i has an associated coverage list of length Li , where Li is thenumber of shifts that cover i . The greed-based constructor assumes that the desirability ofadding shift Sj ( j ∈ J ) into the partial schedule increases with its function value F(Sj ).Moreover, to introduce diversification, we randomly select one of the candidates, not nec-essarily the top candidate, from a Restricted Candidate List (RCL) that consists of k bestshifts. From empirical results we find that k ≤ 3 achieves better solutions. The steps togenerate a complete schedule based on a partial schedule are:

Step 1. J ∗ = {l1, l2, . . . , ls} is a partial schedule, where li is the index number of each shift.Step 2. Set the set of uncovered pieces of work I ′ = I − ⋃

(Sj∗ : j∗ ∈ J ∗).Step 3. If I ′ = φ then stop: J ∗ is a complete solution and C(J ∗) = ∑

(c j∗ : j∗ ∈ J ∗). Oth-erwise locate a work piece t ′ ∈ I ′ having Lt ′ = min(Li ′ : i ′ ∈ I ′), re-evaluate the shifts,and then randomly select a shift Sr within RCL from the coverage list of t ′. Go to step 4.

Step 4. Add r to J ∗, set I ′ = I ′ − Sr , and return to step 3.

Page 5: A Self-Adjusting Algorithm for Driver Schedulingjli/papers/JOH2005.pdf · A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 353 least cost subset covering all the work is selected

A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 355

The constructing heuristic is to assign shifts until every piece of work is covered. Candidateshifts are then assigned to the unassigned pieces of work sequentially. The criterion ofchoosing the next uncovered piece of work for assignment is that it has the shortest coveragelist, and within the coverage list the shift with the one of the k-largest function value F(Sj )is chosen at random. Noted that in a real schedule, over-cover is not existed since no pieceof driver work will be assigned to more than one shifts. However, in a feasible scheduleobtained by our algorithm, over-cover is often inevitable which usually can be resolvedeasily by manual editing before the schedule is implemented.

3. Fuzzy evaluation of shift structure

The process of constructing a potential schedule by means of greedy heuristics is inherentlysequential. Among the large set of possible shifts, it would be difficult to judge which oneis more effective than others because the criteria bear some uncertainty. To mitigate theproblem, fuzzy evaluation (Klir and Yuan, 1995), a powerful tool to describe quantitativeuncertain values and relations between them, is used to introduce the concept of structuralcoefficient. It gives each shift a quantitative value according to its structural state. The fitterthe structure, the larger the value is.

There are two steps in establishing the new concept. First, a number of fuzzified criteriashould be obtained according to the efficiency of a shift, which describes quantitativelythe characteristic of its structural state from different aspects by means of membershipfunctions. Secondly, fuzzy evaluation method will be applied to appraise effectively theshift structural state for decision-making. These two steps are presented respectively asfollows.

3.1. Construction of the fuzzified criteria

The main criteria for evaluating shift structure are total worked time (u1), ratio (u2) of totalworked time to spreadover (normally the paid hours for a driver from sign on to sign off),number of pieces of work (u3), and number of spells (u4) contained in a shift. Furthermore,the fractional cover by Linear Programming (LP) relaxation (u5) is regarded as the fifthcriterion.

3.1.1. Criterion u1. In driver scheduling, not all the time from sign on to sign off isregarded as worked time, although it might be fully paid. On average shifts with longerworked time are more efficient than those with shorter worked time. Hence we can assumethat the goodness of a legal shift Sj ( j ∈ J ) generally increases with its total workedtime. Furthermore, since in most real world driver scheduling problems only a very smallproportion of the shifts in the large set will be used to produce efficient schedules, it is notdesirable to have larger variations in the measure of goodness among these elite shifts. Onthe contrary, for shifts with longer worked time, their goodness should increase as smoothlyas possible, allowing more chances to be selected later.

Based on this consideration, the kind of increase should be non-linear. Thus, the S-shapequadratic membership function (µ A1

), rather than the simple linear function, can be applied

Page 6: A Self-Adjusting Algorithm for Driver Schedulingjli/papers/JOH2005.pdf · A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 353 least cost subset covering all the work is selected

356 LI AND KWAN

to define criterion u1 as

µ A1=

2

(x1 − a(1)

min

a(1)max − a(1)

min

)2

, a(1)min ≤ x1 <

a(1)min + a(1)

max

2

1 − 2

((x1 − a(1)

max

a(1)max − a(1)

min

))2

,a(1)

min + a(1)max

2≤ x1 ≤ a(1)

max

, (4)

where

x1 = total worked time of Sj ;a(1)

max = maximum total worked time;a(1)

min = minimum total worked time.

3.1.2. Criterion u2. Besides the absolute worked time, the relative ratio of actual workedtime to spreadover (paid hours) can be regarded as another important criterion. In general,shifts with larger ratio of worked time to the spreadover are more efficient than thosewith shorter ratio. Hence an associated membership function can be designed based on theassumption that the goodness of a legal shift S j ( j ∈ J ) generally increases with this ratio.For the similar reason given in Section 3.1.1 above, this increase should be non-linear as well.Again, the S-shape quadratic membership function (µ A2

) is applied to define criterion u2 as

µ A2=

2

(x2 − a(2)

min

a(2)max − a(2)

min

)2

, a(2)min ≤ x2 <

a(2)min + a(2)

max

2

1 − 2

(x2 − a(2)

max

a(2)max − a(2)

min

)2

,a(2)

min + a(2)max

2≤ x3 ≤ a(2)

max

, (5)

where

x2 = ratio of total worked time to spreadover for Sj ;a(2)

max = maximum ratio;a(2)

min = minimum ratio.

3.1.3. Criterion u3. A shift may contain several spells, and each spell contains a numberof consecutive pieces of work. If every shift in the final schedule covers as many pieces ofwork as possible, the number of shift potentially might be minimised. Hence the associatedmembership function of the third criterion is designed based on the assumption that thegoodness of a legal shift Sj ( j ∈ J ) generally increases with the number of pieces it covers.Since the range of number of work pieces among the shifts is small (normally smaller than30) and this variable is discrete, the non-linear curve used in u1 or u2 is not appropriate. Alinear membership function (µ A3

) is therefore applied to define criterion u3 as

µ A3= x3 − a(3)

min

a(3)max − a(3)

min

, (6)

Page 7: A Self-Adjusting Algorithm for Driver Schedulingjli/papers/JOH2005.pdf · A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 353 least cost subset covering all the work is selected

A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 357

where

x3 = number of pieces of work contained in Sj ;a(3)

max = maximum number of pieces of work;a(3)

min = minimum number of pieces of work.

3.1.4. Criterion u4. In our current system, the maximum number of spells in a shift isfour. The reason why shifts with more than 4-spell are not generated is that they are seldomefficient, and also the combinations of work pieces for forming them would be so enormousthat they would cause computational difficulties. However, among the shifts with up to fourspells, differences of structural efficiency or user preferences still exist.

Normally, 1-spell shifts are shorter shifts without a meal break in between the workpieces. These shifts may either be an overtime shift, or a half shift where a meal break canbe placed at the beginning or at the end of it, and the other half would be made up withrequired work such as shunting. These shifts seem to be inefficient and are discouraged bytransport operators, even if sometimes they are crucial in forming optimal schedules.

On the other hand, 2-spell shifts are highly encouraged because they are inherently morerobust and preferred than shifts with three or four spells. Between the 4-spell shift and the3-spell shift, the 3-spell one seems to be more desirable, because a shift with more spellswould inevitably result in an additional meal break, or more time for the driver to transferfrom one vehicle to another vehicle. Hence membership function µ A4

for the spell factoru4 can be designed as

µ A4=

0, if x4 = 1 or x4 = 412 , if x4 = 3

1, if x4 = 2

, (7)

where x4 = number of spells contained in Sj .

3.1.5. Criterion u5. The driver scheduling problem can be formulated as a set coveringproblem and solved by the method of Integer Linear Programming (ILP). The basic modelis shown below.

n Number of legal shifts generated by heuristics (briefly described in Section 1)m Number of driving work pieces to be coveredc j Cost of shift jaij 0–1 integer constants: 1 indicates shift j covers work piece i , and 0 otherwisex j 0–1 integer variables: 1 indicates shift j is used in the solution, and 0 otherwise

Minimizen∑

j=1

c j x j (8)

Subject ton∑

j=1

ai j x j ≥ 1, i ∈ {1, 2, . . . , m} (9)

x j = 0 or 1, j ∈ {1, 2, . . . , n} (10)

Page 8: A Self-Adjusting Algorithm for Driver Schedulingjli/papers/JOH2005.pdf · A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 353 least cost subset covering all the work is selected

358 LI AND KWAN

Objective (8) minimizes the total cost. Constraint (9) ensures that each piece of work iscovered by at least one driver, and constraint (10) requires that whole shifts be considered. Inpractice, the model has been extended to cater for other practical objectives and constraintsFores, Proll, and Wren (1999, 2002).

Integer solution techniques, e.g. Branch-and-Bound, are limited by the amount of searchspace that can be explored within reasonable time. For this reason, ILP solution processesmay sometimes have to be terminated before any integer solution is found. However therelaxed LP, i.e. ignoring the integer constraints, can usually be solved quickly. Reportedin Kwan, Kwan, and Wren (2001), the non-integer relaxed LP solution has been shownto contain an average of 79% of the shifts forming the integer solution yielded by the fullILP. Therefore, the relaxed LP solution u5, if applicable, can be considered as an additionalcriterion.

Whether or not a shift has a fractional value in the relaxed LP solution significantlyaffects its chance to be included in the optimum integer solution. In the relaxed LP solution,the values of the shift variables lie between 0 and 1. It has been observed that the closerto a value of 1, the higher the chance the shift will be used in the final solution schedule(Kwan, Kwan, and Wren, 2001). Furthermore, since the shifts in the integer solution areconcentrated in fractional values close to 1, the membership function of criterion u5 shouldbe non-linear. With the advantage of being smooth and nonzero at all points, the Gaussiandistribution function (µ A5

) is applied to define criterion u5 as

µ A5=

{e− (x5−α)2

β , if Sj is in the fractional cover

0, otherwise. (8)

Let µ A5= 1 when x5 = a(5)

max, and µ A5= 0.01 when x5 = a(5)

min, where x5= fractional value ofSj in the relaxed LP solution; a(5)

max =maximum value in fractional cover; a(5)min =minimum

value in fractional cover.Therefore,

α = a(5)max

β = − (a(5)max − a(5)

min)2

ln 0.01

(9)

3.2. Evaluation of shift structure by fuzzy aggregation

Five criteria ui (i = 1, . . . , 5) have been abstracted for the evaluation of the shift structure,and each criterion is assigned a numerical evaluation by fuzzy membership function µ Ai

(i = 1, . . . , 5), where Ai is the fuzzy subset on the i-th criterion. These evaluations referto local feature of each criterion respectively, thus an overall evaluation on fuzzy subset Acould be made by aggregation of these five criteria.

Since the above criteria are compensative each other (Li, 2002), compromise aggregationoperators such as product, arithmetic mean and geometric mean are normally applied toaggregate all criteria. This paper uses the arithmetic mean operator to formulate the structural

Page 9: A Self-Adjusting Algorithm for Driver Schedulingjli/papers/JOH2005.pdf · A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 353 least cost subset covering all the work is selected

A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 359

coefficient f2(Sj ) of shift Sj as

f2(Sj ) = µ A(x) =5∑

i=1

wiµ Ai, ∀ j ∈ J, (10)

where wi (wi ≥ 0) denotes the corresponding weights for criteria ui (i = 1, . . . , 5). Theyall satisfy the normalizing condition

5∑

i=1

wi = 1. (11)

If the i-th criterion were dominant in assessing the shift structure, its weight should havea high value.

4. A self-adjusting algorithm for driver scheduling

This section will investigate and elucidate a novel emergent approach in evolutionary com-putation for driver scheduling, which was inspired by Kling and Banerjee (1991) for theplacement problem in electronic circuit design.

4.1. General description

In many real world optimisation problems, their solutions consist of components intricatelywoven together. Each solution component may be a strong candidate in its own right, butit also has to fit well with other components. This paper investigates a new approach ofoptimisation algorithms, which simulates the self-adjusting process on a single solution.Each component has to prove continuously its worthiness to stay in the solution. Hence ineach generation (iteration), a number of components will be deemed not worth keeping andperished. The evolution strategy adopted may also throw out, at a low probability, someworthy components similar to mutation in traditional evolutionary algorithms. Then thedepleted component is replenished with new ones. This replenishment process is a greedyheuristic that selects one component at a time with the criterion that it would give the mostbenefit to the current solution under construction. Of key importance is that the admittanceof a new component is based on a dynamic evaluation function, which takes into accountof how well the prospective component will fit in with others already in the solution.

The self-adjusting approach can be viewed as a particular (and unusual) hybrid ofpopulation-based search and local search. Its chief characteristic, the fitness-biased ‘hy-permutation’ effected by the Selection and Reconstruction steps, has been echoed in partby mutation operators occasionally used in advanced and highly domain-tailored evolu-tionary algorithms, which have always been successful. The evolutionary element (i.e. theuse of fitness-biased selection) comes cleverly within the mutation operator itself—thisenables highly disruptive mutations to occur (greatly reducing the bane of local optima)while retaining a good chance of movement towards good new points.

Page 10: A Self-Adjusting Algorithm for Driver Schedulingjli/papers/JOH2005.pdf · A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 353 least cost subset covering all the work is selected

360 LI AND KWAN

4.2. A self-adjusting algorithm to archive improvement

The basic idea behind the algorithm is to determine, for each current schedule, the goodnessof each shift in its current position. The goodness value is a figure of merit (normalizedin the range [0, 1]) of how well the shift is used with respect to the other shifts to whichit has relations. The goodness is high if the other shifts it is related to cause overlappedwork time as little as possible in the present schedule. Conversely, the goodness is low ifthose shifts result in more overlapped work time. The process of evolution keeps the shiftsthat are well arranged (having high goodness values) in their present positions and tries toreplace the others that have low goodness values. At a particular iteration, a random numberin the range [0, 1] is generated for each generation, and all shifts whose goodness valuesexceed that number are labelled as “good shifts” and survive in their present positions; theremaining shifts are labelled as “bad shifts” and do not survive (become extinct) in thecurrent schedule. The goodness value therefore corresponds to the survival chance of a shiftin a specific position. The “bad” shifts are removed from the schedule and are put into aqueue for the new assignment by using constructive techniques. The above steps are iteratedupon. Thus the global scheduling procedure is based on iterative improvement, while aniterative constructive process is performed within.

Basically, the algorithm iteratively operates a sequence of Evaluation, Selection, Mutationand Reconstruction steps in a loop on one solution. Besides these three steps, some inputparameters (e.g. stopping conditions) and a valid starting solution is initialised in an earlierstep called Initialisation. Throughout these iterations, the best solution is retained and finallyreturned as the final solution.

The algorithm has two places where probabilistic techniques help prevent the solutionfrom getting stuck at a local minimum. The first one is the generation of the thresholdvalue to distinguish “good” shifts from “bad” shifts. The second is in the Mutation step.Periodically during the evolution-based iterative improvement process, the system state ismutated, i.e. randomly changed. Usually the mutation rate is much less than the evolutionrate to ensure convergence.

4.2.1. Precomputation. The structural coefficient f2(Sj ) is a component of the goodnessevaluation function, and is a constant once the five weights involved have been fixed. Toavoid the repeated computation in each iteration and thus speed up the algorithm, thecalculation of f2(Sj ) is put outside of the loop as a Precomputation step.

4.2.2. Initialisation. In this step, an initial solution is generated to serve as a seed for theevolutionary process. Due to the fact that the initial exchange rate is relatively high, thealgorithm’s performance is generally independent of the quality of the initial generation.However, if this seed is already a relatively good solution, the overall computation timewill decrease. In our experiments, two sets of initial schedules have been used as the inputof the algorithm: the first set is generated by a simply greedy heuristic to be described inSection 5, while the second set is generated by a GA described in Li and Kwan (2003).

4.2.3. Evaluation. The first step in the iterative loop is to evaluate the current arrangementfor each shift in a schedule. A goodness value for every shift is established. The purpose

Page 11: A Self-Adjusting Algorithm for Driver Schedulingjli/papers/JOH2005.pdf · A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 353 least cost subset covering all the work is selected

A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 361

of computing this measure is to determine, besides the structural goodness of shifts, whichshifts are in positions that lead to less total overlapped work time, and which shifts contributeunnecessarily to large amounts of overlapped work time.

In this step, goodness F(Sj∗ ) of the individual shift Sj∗ in a complete schedule J ∗ is com-puted. The formulation of its evaluation function is similar to that used in the constructingheuristic (described in Section 2). The major difference is that the former one only evaluatesshifts in the current schedule, while the latter needs to evaluate all unused shifts from thelarge possible legal shift set, for the purpose of selecting some shifts to form a feasibleschedule.

4.2.4. Selection. The step is to determine whether a shift Sj∗ ( j∗ ∈ J ∗) is retained for thenext generation, or discarded and placed in a queue for the new allocation. This is done bycomparing its goodness F(Sj∗ ) to (ps − p), where ps is a random number generated for eachgeneration in the range [0, 1], and p is a constant smaller than 1.0. If F(Sj∗ ) > (ps − p)then Sj∗ will survive in its present position; otherwise Sj∗ will be removed from the currentevolutionary schedule. The pieces of work it covers, except those also covered by othershifts in the solution, are then released for the next Reconstruction. By using this Selectionprocess, shift Sj∗ with larger goodness F(Sj∗ ) has higher probability of survival in thecurrent schedule.

The purpose of subtracting p from ps is to improve the convergence capability of theself-adjusting algorithm. Without it, in the case of ps close to 1, nearly all the shifts will beremoved from the schedule, which is obviously ineffective in searching. If p > ps , then set(ps − p) to be 0.

4.2.5. Mutation. To escape from local minima in the solution space, capabilities for uphillmoves must be incorporated. This can be carried out in the Mutation step by probabilisticallydiscarding even some superior components of the solution. Therefore, following the Selec-tion step, each retained shift Sj∗ ( j∗ ∈ J ∗) still has a chance to be mutated, i.e. randomlydiscarded from the partial solution at a given rate of pm , and release its covered pieces ofwork, except those also covered by other retained shifts, for the next Reconstruction. Themutation rate should be much smaller than the selection rate to guarantee convergence.From empirical results we find that pm ≤ 0.05 yields better results.

4.2.6. Reconstruction. The Reconstruction step takes a partial schedule as the input, andproduces a complete schedule as the output by using a refined greedy heuristic described inSection 2. Since the new schedule should be an evolution of the previous schedule, all shiftassignments in the partial schedule should remain unchanged. Therefore, the Reconstructiontask reduces to that of assigning shifts to all uncovered pieces of work to repair a brokenschedule.

It should be noted that a shift added by the Reconstruction step might become redundantwhen a complete schedule is produced, since it is possible that all of its pieces of work arealso covered by other shifts added later. Under this circumstance, in the next Selection, theseredundant shifts will be removed automatically because of their zero goodness. Moreover,the goodness values of all shifts in the current Reconstruction might be different from thosein the next Selection as well due to the updated over-cover ratios at each iteration.

Page 12: A Self-Adjusting Algorithm for Driver Schedulingjli/papers/JOH2005.pdf · A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 353 least cost subset covering all the work is selected

362 LI AND KWAN

5. Computational results

The proposed approach combines the two main objectives of minimising total cost andnumber of shifts into a weighted-sum cost function, i.e. minimizing

∑lj∗=1 (c j∗ + C), where

l is the number of shifts in the schedule, c j∗ is the cost of shift Sj∗ and C is a large constant.Since in most driver scheduling problems the first objective is to minimize the number ofshifts, a large constant of C per shift gives priority to this.

In fact, a problem exists with the above weighted sum function if the Pareto surface isnon-convex. Furthermore, the determination of weights per shift will be difficult. However,since the best known solutions were all obtained using a weighted-sum objective function,the new approach used the same simple weighted-sum objective function for benchmarkcomparisons.

This approach was coded in Borland C++. All problems were run on the same PentiumII 333 MHz with 192 megabyte RAM PC using Windows 98 operating system. The sameweight distribution of membership functions, W = (0.20, 0.10, 0.10, 0.20, 0.40), is appliedto all these thirteen cases. If no improvement has been achieved for 1000 iterations, theprogram will terminate. Furthermore, we set C in the objective function be 2000, p inSelection be 0.3, pm in Mutation be 0.05 and size k of RCL in Reconstruction be 2. Notethat these fixed parameter values are not necessarily the best for each problem. At thisstage, there are based on our experience and intuition, and we have kept them the same forconsistency.

Table 1 shows the sizes and the best known results of thirteen real world problems. Forexample, the largest case ‘Rrne’ is a scheduling problem from the former Regional Railways

Table 1. Size and the best known schedules of the test problems.

Best known schedule

Number of Number of Solution cost Elapsed timeData Type pieces of work legal shifts Shifts (hours paid) (seconds)

Colx Bus 127 3560 34 288.16 22

Gmb Bus 154 11817 34 289.32 84

Neur Train 340 29380 62 509.25 955

Ews Train 437 25099 116 1003.55 69

Wag3 Train 456 16636 50 403.42 34

F2x Train 546 43743 64 562.22 >40000

Tram Tram 553 6437 49 419.50 24

Trmx Tram 553 29500 49 408.47 139

Nb2 Bus 613 22568 75 851.09 452

Gall2 Train 707 144339 242 2247.52 >80000

G532 Train 1164 29465 276 2083.15 >80000

Gall Train 1495 28639 349 2661.12 >80000

Rrne Train 1873 50000 395 3137.20 >40000

Page 13: A Self-Adjusting Algorithm for Driver Schedulingjli/papers/JOH2005.pdf · A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 353 least cost subset covering all the work is selected

A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 363

North East (RRNE), which had a diverse operation comprising rural, inter-urban and urbanoperations to cover most area of northeast England. For the last three larger instances, thenumber of legal shifts is low for the number of pieces of work considered because we haveused some heuristics rules to restrict the set of legal shifts and thus enable the problemto be handled by the ILP approach. The best known schedules are mostly obtained by theTRACS II system (Fores, Proll, and Wren, 2002), a commercial ILP solver with more than100 person-years devoted in its development. In cases where TRACS II has difficulty infinding solutions, results reached by hybrid GAs incorporating strong domain knowledge(Kwan, Kwan, and Wren, 2001) are cited.

Two sets of initial schedules have been used as the input of the algorithm. To demonstratethe feasibility of our approach, the first set is to use initial solutions generated by a straight-forward operator, which chooses the unused shifts with the largest number of uncoveredpieces of work in each iteration (Li, 2002). The benchmark results in terms of shift numberand total cost, including the qualities of the initial schedules and the final schedules forindividual cases, are compiled in Table 2.

The second set is to use seeds generated by a GA (Li and Kwan, 2003), the purpose ofwhich is to find how good our final solutions would be if a relatively good initial solutionis used. The benchmark results are compiled in Table 3.

Computational results show that the results of the new approach are very close to that ofthe best known solutions, regardless which kind of initial solutions are used as the seed. In

Table 2. Results of using crude initial schedules generated by simple heuristics.

Crude initial schedule Final schedule

Data Shifts %∗ Cost (h)+ % Time (s)$ Shifts % Cost (h)+ % Time (s)$

Colx 44 29.41 382.62 32.78 <1 35 2.94 294.85 2.32 25

Gmb 42 23.53 359.93 24.41 <1 36 5.88 296.82 2.59 14

Neur 75 20.97 643.07 26.28 <1 63 1.61 509.77 0.10 131

Ews 128 10.34 1241.78 23.74 <1 118 1.72 1006.41 0.28 72

Wag3 59 18.00 495.66 22.86 <1 51 2.00 415.60 3.02 22

F2x 70 9.38 693.72 23.39 <2 64 0.00 572.23 1.78 320

Tram 61 24.49 564.12 34.47 <1 50 2.04 430.78 2.69 17

Trmx 63 28.57 571.50 39.91 <1 50 2.04 422.28 3.38 69

Nb2 84 12.00 1006.67 18.28 <1 77 2.67 836.83 −1.68 189

Gall2 291 20.25 2946.22 31.09 <3 243 0.41 2263.33 0.70 776

G532 323 17.03 2537.32 21.80 <1 276 0.00 2149.25 3.17 132

Gall1 402 15.19 3308.95 24.34 <2 344 −1.43 2695.33 1.29 239

Rrne 471 19.24 4024.17 28.27 <3 397 0.51 3277.33 4.47 969

Avg. 19.11% 27.05% 1.57% 1.86%

∗‘%’ denotes the Relative Percentage Deviation (RPD) over the best known schedule.+“Cost(h)” means “Solution cost (hours paid)”.$“Time(s)” means “Elapsed time (seconds)”.

Page 14: A Self-Adjusting Algorithm for Driver Schedulingjli/papers/JOH2005.pdf · A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 353 least cost subset covering all the work is selected

364 LI AND KWAN

Table 3. Results of using GA’s initial schedules.

Initial schedule derived by GA Final schedule

Data Shifts % Cost (h) % Time (s) Shifts % Cost (h) % Time (s)

Colx 36 5.88 302.51 4.98 20 35 2.94 294.06 2.05 24

Gmb 37 8.82 307.33 6.22 75 35 2.94 294.92 1.94 16

Neur 66 6.45 531.02 4.27 230 62 0.00 507.67 −0.31 120

Ews 118 1.72 1022.08 1.85 105 117 0.82 1000.18 −0.34 167

Wag3 51 2.00 416.65 3.28 22 51 2.00 406.55 0.78 11

F2x 66 3.13 613.86 9.19 341 62 −3.13 583.28 3.75 530

Tram 51 4.08 442.10 5.39 26 49 0.00 421.56 0.49 23

Trmx 51 4.08 427.70 4.71 79 49 0.00 414.38 1.45 59

Nb2 76 1.33 881.92 3.62 351 74 −1.33 830.60 −2.41 216

Gall2 244 0.83 2287.68 1.79 766 243 0.41 2250.53 0.13 981

G532 277 0.36 2152.38 3.32 275 271 −1.81 2104.33 1.02 130

Gall1 350 0.29 2749.32 3.31 509 343 −1.72 2663.05 0.07 358

Rrne 407 3.04 3399.62 8.36 1350 390 −1.27 3242.75 3.36 1320

Avg. 3.23% 4.63% −0.01% 0.92%

Table 4. Results of ten runs with fixed parameters but different random seed numbers.

Number of shifts

Distribution of 10 runs Cost(h)

Data In Table 3 −1 = +1 ≥2 Ave. Min. Max. Std. dev.

Colx 35 5 5 294.12 293.76 295.83 1.61

Gmb 35 6 4 295.07 293.82 295.44 1.58

Neur 62 4 4 2 508.33 507.32 510.64 1.47

Ew3 117 1 7 2 1003.37 998.36 1006.41 2.56

Wag3 51 7 3 407.31 405.68 410.56 1.77

F2x 62 4 3 3 584.82 572.23 589.23 3.86

Tram 49 6 4 422.14 420.13 426.65 1.73

Trmx 49 5 5 415.47 413.83 420.21 2.14

Nb2 74 6 2 2 830.44 829.86 835.24 2.87

Gall2 243 9 1 2251.03 2249.35 2265.69 5.85

G532 271 5 2 3 2106.45 2102.32 2122.13 6.13

Gall1 343 1 4 3 2 2663.46 2661.72 2673.41 5.98

Rrne 390 1 3 2 4 3244.16 3238.57 3259.87 7.64

Page 15: A Self-Adjusting Algorithm for Driver Schedulingjli/papers/JOH2005.pdf · A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 353 least cost subset covering all the work is selected

A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 365

particular, compared with all the best known solutions, our solutions using the GA’s resultas the seed are even 0.01% better in terms of total shift number, and are only 0.92% moreexpensive in terms of total cost on average. In any cases, our results are much faster ingeneral, especially for larger cases.

To test the robustness of the proposed algorithm, each data set started from the seedderived from the GA was run ten times by fixing the above parameter values and varyingthe pseudo random number seed at the beginning. The summary results are showed inTable 4. Comparing the number of shifts in the ten times with the best solutions foundbefore the runs, on average 56.9% of the runs have the same or better results. In terms ofsolution costs, there is no noticeable variation between the runs. Except the last four largercases that have higher standard deviations in cost, no obvious trend can be observed.

Figures 3 and 4 respectively depicts the improvement of the schedule from aspects of totalcost and shift number versus the number of iterations for the Tram case. Although the actualvalues may differ among various cases, the characteristic shapes of the curves are similar.

Figure 3. RPD of total cost (in current and best schedule respectively) versus iteration number.

Figure 4. RPD of shift number (in current and best schedule respectively) versus iteration number.

Page 16: A Self-Adjusting Algorithm for Driver Schedulingjli/papers/JOH2005.pdf · A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 353 least cost subset covering all the work is selected

366 LI AND KWAN

6. Conclusions

This paper presents a self-adjusting approach for driver scheduling. It incorporates theidea of fuzzy evaluation into a self-adjusting process, combining the features of iterativeimprovement and constructive perturbation, to explore solution space effectively and obtainsuperior schedules. Experiments with benchmark tests using data from the transportationindustry demonstrate the success of the proposed approach in solving large size problems.

Applying the proposed approach to driver scheduling problems has several advantages.First, it is simple to carry out because it utilizes greedy algorithm and local heuristic.Secondly, due to its characteristics of maintaining only a single schedule at each generationand discarding inferior shifts from this schedule, the approach converges fast comparedwith other meta-heuristics. Thirdly, combined with probabilistic hill climbing, the approachachieves superior schedules by effective exploration of the solution space.

Although this work is presented in terms of driver scheduling, it is suggested that, besidesgeneral set covering problems (Li and Kwan, 2002, 2004), this self-adjusting approach couldalso be applied to many other scheduling problems whose solutions can be decomposedinto elements. Even the process of identifying fuzzified criteria could be generalized andapplied elsewhere.

References

Caprara, A., M. Fischetti, P. Toth, D. Vigo, and P.L. Guida. (1997). “Algorithms for Railway Crew Management.”Mathematical Programming 79, 25–141.

Cavique, L., C. Rego, and I. Themido. (1999). “Subgraph Ejection Chains and Tabu Search for the Crew SchedulingProblem.” European Journal of Operational Research 50, 608–616.

Chvatal, V. (1979). “A Greedy Heuristic for the Set-Covering Problem.” Mathematics of Operations Research 4,233–235.

Clement, R. and A. Wren. (1995). “Greedy Genetic Algorithms, Optimising Mutations and Bus Driver Scheduling.”In J.R. Daduna, et al. (eds.), Computer-Aided Transit Scheduling. Springer Verlag, pp. 213–235.

Curtis, S.D. (2000). “Constraint Satisfaction Approaches to Bus Driver Scheduling.” Doctoral Thesis, Universityof Leeds, England.

Fores, S., L. Proll, and A. Wren. (1999). “An Improved ILP System for Driver Scheduling.” In N.H.M. Wilson,(ed.), Proceeding of the Seventh International Workshop on Computer-Aided Scheduling of Public Transport,Spring-Verlag, pp. 43–61.

Fores, S., L. Proll, and A. Wren. (2002). “TRACS II: A Hybrid IP/Heuristic Driver Scheduling System for PublicTransport.” Journal of the Operational Research Society 53, 1093–1100.

Forsyth, P. and A. Wren. (1997). “An Ant System for Driver Scheduling.” Technical Report 97.25, School ofComputing, University of Leeds.

Gonzalez Hernandez, L.F. and D.W. Corne. (1996). “Evolutionary Divide and Conquer of the Set CoveringProblem.” In T.C. Fogarty (ed.), Evolutionary Computing, Springer, pp. 198–208.

Kling, R.M. and P. Banerjee. (1991). “Empirical and Theoretical Studies of the Simulated Evolution MethodApplied to Standard Cell Placement.” IEEE Transaction on Computer-Aided Design 10, 1303–1315.

Klir, G.J. and B. Yuan. (1995). Fuzzy Sets and Fuzzy Logic: Theory and Applications. New Jersey: Prentice Hall.Kwan, A.S.K., R.S.K. Kwan, M.E. Parker, and A. Wren. (1999). “Producing Train Driver Schedules under Different

Operating Strategies.” In N.H.M. Wilson (ed.), Computer-Aided Transit Scheduling, Springer-Verlag, pp. 129–154.

Kwan, R.S.K., A.S.K. Kwan, and A. Wren. (2001). “Evolutionary Driver Scheduling with Relief Chains.” Evolu-tionary Computation 9, 445–460.

Page 17: A Self-Adjusting Algorithm for Driver Schedulingjli/papers/JOH2005.pdf · A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 353 least cost subset covering all the work is selected

A SELF-ADJUSTING ALGORITHM FOR DRIVER SCHEDULING 367

Kwan, R.S.K. and A. Wren. (1996). “Hybrid Genetic Algorithms for Bus Driver Scheduling.” In I. Bianco and P.Toth (eds.), Advanced Methods in Transportation Analysis, Springer-Verlag, pp. 609–619.

Layfield, C.J., B.M. Smith, and A. Wren. (1999). “Bus Relief Opportunity Selection Using Constraint Program-ming.” Practical Application of Constraint Technologies and Logic Programming Conference. The PracticalApplication Company Ltd., pp. 537–552.

Li, J. and R.S.K. Kwan. (2001). “A Fuzzy Simulated Evolution Algorithm for the Driver Scheduling Problem.” InProceedings of the 2001 Congress on Evolutionary Computation. IEEE Press, pp. 1115–1122.

Li, J. (2002). “Fuzzy Evolutionary Approach for Bus and Rail Driver Scheduling.” Doctoral Thesis, University ofLeeds, England.

Li, J. and R.S.K. Kwan. (2002). “A Fuzzy Evolutionary Approach with Taguchi Parameter Setting for the SetCovering Problem.” In Proceedings of 2002 Congress on Evolutionary Computation. (CEC2002), IEEE Press,pp. 1203–1208.

Li, J. and R.S.K. Kwan. (2003). “A Fuzzy Genetic Algorithm for Driver Scheduling.” European Journal ofOperational Research 147(2), 334–344.

Li, J. and R.S.K. Kwan. (2004). “A Meta-Heuristic with Orthogonal Experiment for the Set Covering Problem.”Journal of Mathematical Modelling and Algorithms 3(3), 263–283.

Meilton, M. (2001). “Selecting and Implementing a Computer Aided Scheduling System for a Large Bus Com-pany.” In S. Voß and J.R. Daduna (eds.), Computer-Aided Scheduling of Public, Transport, Springer Verlag,pp. 203–214.

Rayward-Smith, V.J., I. Osman, C.R. Reeves, and G.D. Smith, (eds.). (1996). Modern Heuristic Search Methods.Wiley.

Shen, Y. and R.S.K. Kwan. (2001). “Tabu Search for Driver Scheduling.” In S. Voß and J.R. Daduna (eds.),Computer-Aided Scheduling of Public Transport, Springer-Verlag, pp. 121–135.

Voß, S. and J.R. Daduna, (eds.). (2001). “Computer-Aided Scheduling of Public Transport.” In Proceedings of the8th International Workshop on Computer-Aided Scheduling of Public Transport, Springer-Verlag.

Wren, A., S. Fores, A.S.K. Kwan, R.S.K. Kwan, M. Parker, and L. Proll. (2003). “A Flexible System for SchedulingDrivers.” Journal of Scheduling 6, 437–455.

Wren, A. and J.M. Rousseau. (1995). “Bus Driver Scheduling—an Overview.” In J.R. Daduna, I. Branco, andJ.M.P. Paixao (eds.), Computer-Aided Scheduling of Public Transport, Springer-Verlag, pp. 173–187.

Wren, A. and D.O. Wren. (1995). “A Genetic Algorithm for Public Transport Driver Scheduling.” Computers andOperations Research 22, 101–110.