1、Scheduling Train Crews: a case studyfor the Dutch RailwaysRICHARD FRELING1, 2, RAMON M. LENTINK2, AND MICHIEL A. ODIJK21 Econometric Institute, Erasmus University Rotterdam (The Netherlands)2 ORTEC Consultants b.v., Gouda (The Netherlands)e-mail: frelingfew.eur.nlEconometric Institute Report EI2000-
2、17/AAbstract: In this paper the problem of scheduling train crew is considered. We discuss ageneral framework of which the method for solving the train crew scheduling problem is aspecial case. In particular, our method is a heuristic branch-and-price algorithm suitable forlarge scale crew schedulin
3、g problems. This algorithm is applied to a real life train guardscheduling problem which is provided to us by the Dutch Railways. Computational resultsshow that our algorithm is capable of getting sub-optimal solutions for a large scaleinstance within reasonable computation time.IntroductionIn this
4、paper we consider a case study dealing with the scheduling of train crews atDutch Railways (NS). The Crew Scheduling Problem (CSP) is a well-knownproblem in the field of Operations Research. It consists of designing duties usingpre-defined tasks with fixed starting and ending times and locations. Ea
5、ch dutymust satisfy a set of work laws and agreements. The objective is to minimize acombination of fixed costs (the number of duties) and variable costs (e.g. penaltiesfor less desired constructions).For many years public transport companies use planning systems whichincorporate automatic crew sche
6、duling. Although usually the crew schedulingproblem is solved after the vehicle schedules have been designed, it has recentlyalso become possible to design integrated vehicle and crew schedules for small tomedium-scale problems (see the paper by Freling, Huisman and Wagelmans,presented at this works
7、hop). After solving the crew scheduling problem, the2resulting duties must be assigned to individual crew members. This process iscalled crew rostering.In this paper, we discuss a heuristic algorithm for the crew scheduling problem,which uses column generation to solve linear programming problems an
8、d abranch-and-price heuristic to get integer solutions. Columns are generatedimplicitly using a dynamic programming algorithm. The main benefit of this workis that it fits in a general framework, which can easily be applied to crewscheduling problems in different contexts. In fact, slightly differen
9、t versions ofthis algorithm have been used for scheduling bus drivers and airline crew, and alsofor train and airline crew rostering. Furthermore, the approach allows for solvinglarge scale crew scheduling problems within reasonable computation time, and isvery robust in the sense that different sce
10、narios with respect to for example unionand/or governmental regulations can easily be implemented. The mathematicaltechniques are not discussed in great detail here. For a more comprehensivedescription of the subject, including the technical details, we refer the readers toLentink (1999).The heurist
11、ic algorithm has been tested in a case study, which deals with thescheduling of train guards. This study has been carried out for NS by ORTECConsultants in the Netherlands. NS currently plan their crew manually, butrecently several researchers have done case studies to see whether automatic crewsche
12、duling is an interesting alternative (see also the paper by Fischetti and Kroon,presented at this workshop).Most of the Operations Research literature on crew scheduling deals with busdriver scheduling and airline crew scheduling. From our experience, the maindifferences between scheduling train cre
13、w and bus drivers are that: train crew travels more often as passenger on a train to get to differentlocations, train crew can begin/end a duty at a relative longer distance from their homebases (sometimes spending the night at a hotel away from the home base), delays are more critical for trains be
14、cause of the stronger interconnectivity ofa train network.Just like in the airline context, sometimes trains may be run all round the clock,which makes it harder to schedule the crew on a daily basis. In the airline context,a schedule (also called a pairing) usually may cover two or three days.This
15、paper is organized as follows. In the next section, we introduce the generalframework that is used in a crew planning system at ORTEC Consultants for bothcrew scheduling and rostering problems arising in airline and railway applications.In Section 3, we introduce the case provided to us by NS. One o
16、f our primaryresearch objectives for this particular case was to adapt our algorithms to be ableto deal with large-scale problems. The resulting branch-and-price heuristic, whichis a special case of the general algorithm, is presented in Section 4, where we alsodiscuss techniques for speeding up the
17、 algorithm. Finally, in Section 5, we showcomputational results for the scheduling of train guards. For the instance providedto us by NS, which consists of 1114 tasks, we are able to get a sub-optimalsolution within reasonable computation time.Automatic Crew Planning at ORTECORTEC Consultants is a m
18、edium sized company located in the Netherlands withabout 250 employees. Since its foundation in 1981, ORTEC has worked in closecollaboration with the Erasmus University Rotterdam. The company is specialisedin decision support systems that contain (advanced) Operations Researchtechniques. More inform
19、ation about some systems that are focused on railwayplanning can be found in Lentink et al. (2000). Several personnel planningsystems are developed at ORTEC for various fields of industry. One such systemis CDR-Lite (Crew Duty Rostering), a crew planning system for the airline andrailway industry. T
20、he module for automatic crew scheduling and rostering is basedon a branch-and-price algorithm for a generalised set partitioning model. In thissection, we briefly introduce this model and the general algorithm. In Section 4,we present a special version of this algorithm, which is the heuristic branc
21、h-and-price algorithm we used for the railway crew scheduling problem.General Mathematical FormulationThe generalised set covering model presented below can be used to formulate mostcrew planning problems arising in practice. For similar work on a more generalframework in the context of time constra
22、ined routing and scheduling problems, werefer to Desrosiers et al. (1995). These types of problems have in common that thecolumn generation technique is used because the mathematical formulationscontain a huge number of variables.For presenting the model, we need the following definitions: R = the s
23、et of all feasible columns (e.g. duties); K = the set of all resource units (e.g. crew); I = the set of rows which need to be covered (e.g. tasks); Q(i) = the set of columns covering row iI; R(k) = the set of eligible columns for resource unit kK; dr = the cost of column rR; pi = a penalty for not a
24、ssigning row iI. bi = number of columns which need to cover row iI. ck = maximum number of columns covering resource unit kK. Xr = 1, if column r is selected, 0 otherwise;4 Si = 1, if row i remains unassigned, 0 otherwise.The generalised set partitioning model on which our framework is based is asfo
25、llows:Minimiser Rr ri Ii i d X + p S subject toiirQ(i)rb S + X = iI (i)r R(k)r k X c kK (ii)r iX S 0,1, rR, iI (iii)The objective is intended to minimise the total costs of the partition, plus the totalpenalty costs of uncovered rows. Constraints (i) are generalised set partitioningconstraints, whic
26、h state that exactly bi columns of the set Q(i) are in the solution.Variables Si are added to allow rows to remain uncovered by X variables, forexample, a task may not be covered by any duty. Constraints (ii) guarantee that eachresource unit can be assigned to at most ck columns. We assume that the
27、intersectionof the sets R(k) for all k is empty, that is, each column rR is uniquely defined forone resource unit. In case of crew rostering this means for example that a set ofrosters (columns) is uniquely defined for each crew member. Variations for bothConstraints (i) and (ii) are possible by int
28、erchanging equality signs and inequalitysigns. Additional constraints may be added for modelling global constraints whichdeal with sets of columns (e.g. a maximum percentage of duties with duration above9 hours).General Solution ApproachThe general solution approach consists of an exact branch-and-p
29、rice algorithm forthe generalised set partitioning model. Branch-and-price is a special application ofbranch-and-bound, where column generation is used to solve linear programmingrelaxations with a huge number of variables. See also Barnhart et al. (1998) for ageneral discussion of column generation
30、 in the context of integer programming. Inthe last decade many papers, also presented in this and previous proceedings, dealwith column generation approaches for public transport scheduling problems.Here, we only briefly discuss our approach. The main elements of the generalsolution approach are vis
31、ualized in Figure 1. The column generation algorithm tosolve the linear programming (LP) relaxation in the root node of the branch-and-bound tree starts with an initial selection of columns. Then, additional columns aregenerated implicitly while needed until the linear programming (LP) relaxation is
32、solved to optimality. Rules that define the feasibility of a column are checkedduring the generation of columns. The procedure to solve the integer programming(IP) problem uses the same column generation algorithm to solve the LPrelaxations in each other node of the branch-and-bound tree. Here, the
33、columngeneration procedure is started with the columns in the final LP problem of theparent node.Two aspects are of major importance in this solution approach: how columns aregenerated, and which branching rule is used. The system contains severalalgorithms for generating columns based on one or mor
34、e acyclic networks. Forexample, for crew scheduling one network is used, while for crew rostering anetwork is used for each crew member. The networks are defined such that eachnode corresponds to a task (or trip, flight, duty, etc.) and each arc corresponds to afeasible sequence of two tasks in one
35、duty. In addition a source and sink arc areadded to each network, denoting the start and end of a duty. A path in the networkcorresponds to a feasible duty if the duty constraints are satisfied. See alsoDesrochers et al. (1992) for an example of a similar network for crew scheduling.Paths in the net
36、works are constructed by solving a resource constraint shortestpath algorithm (see Desrosiers et al. (1995). The algorithms we implemented aredynamic programming, depth-first search, and all-pairs shortest path algorithmsFigure 1: Flowchart of the general solution approachInputInitialize problemGene
37、rate columns Check rulesSolve LP-relaxationSolve IP problemOutput6(see Freling (1997). The choice of the algorithm depends on the applicationconsidered.For the branching rule we implemented we branch on the arcs in the underlyingnetworks (see e.g. Desrosiers et al. (1995). Each branch consists of ei
38、therforbidding or forcing one arc to be in the solution. The consequence in both nodesresulting from a branch is that several variables are fixed to zero, and that thecorresponding networks are adjusted by deleting arcs to force or forbid an arc tobe in the solution. In case of forcing an arc to be
39、in the solution, all other arcsleaving and entering the corresponding nodes are deleted.This general framework is very robust in the sense that both the constraintsdefining the feasibility of each duty, and the constraints defining the feasibility ofa set of columns can be easily incorporated withou
40、t changing the structure of thealgorithm. In addition, for large scale problems several exact and heuristictechniques can be used in a straightforward manner to speed-up the algorithm (seeSection 4.2).A Case Study for NSIn this section we discuss a case study carried out for NS. The case consists of
41、four Intercity lines. These lines connect the north east of the Netherlands with theurban part in the west, and therefore it is called the North-East case. The networkrepresenting these lines is visualised in Figure 2, which is taken from Fischetti andKroon (1999).Train guards and drivers have to be
42、 assigned to the trains that operate on theselines. For this case study, we examined the generation of schedules for guards on aweekday for intercity lines. The generation of schedules for drivers is outside thescope of this case. It is assumed that a timetable has already been generated, andalso th
43、at rolling stock has been assigned to operate the timetable.A task is defined as the minimum portion of work that has to be carried out by oneperson. Here, this means a part of a line where it is not allowed for a guard tochange trains in between. The data consisted of 1114 tasks that had to be assi
44、gnedto the guards. These tasks where not spread evenly across a day. In the morningand evening peaks more guards are necessary because more and longer trains areused. When the length of a train exceeds certain thresholds more guards arenecessary. Figure 3 shows the demand for guards during the whole
45、 day.010203040506005:30 06:30 07:30 08:30 09:30 10:30 11:30 12:30 13:30 14:30 15:30 16:30 17:30 18:30 19:30 20:30 21:30 22:30 23:30 00:30 01:30Time of the dayDemandFigure 3: Demand for guards during a weekdayFigure 2: Lines that form the North-East case8The duties must satisfy the following criteria
46、: Efficient, that is, the number of required guards is as low as possible. Robust, that is, the duties must be of high quality with respect to delays oftrains. This is taken care of by penalizing changes from one train to anotherwithin a duty.The duties that are generated in the solution approach ha
47、ve to meet certain worklaws and agreements in order to be feasible. These laws and agreements aredescribed below. There are three levels of feasibility restrictions:1. High level restrictions. Here we find rules that are called coupling restrictionsbecause they relate to a set of duties. There are t
48、hree of those rules in thiscase:a) At most 5% of all selected duties have duration shorter than 5 hours.b) At most 5% of all selected duties have duration longer than 9 hours.c) The average length of the selected duties is at most 8 hours.2) Medium level restrictions. Rules at this level determine t
49、he feasibility of aduty. Most restrictions in the case are at this level:a) The maximum length of a duty is 9 hours.b) The minimum length of a duty is 4 hours.c) A duty with a length of at least 5 hours should contain a meal break ofat least 30 minutes.d) The meal break should not start more than 5 hours after the start of theduty.e) The meal break should not end more than 5 hours before the end of theduty.f) Each duty must start with a sign-in time of 20 minutes.g) Each duty must end with a sing-off time of 15 minutes.h) A duty has to