Solution of large-scale railway crew planning problems: The Italian experience

17

Transcript of Solution of large-scale railway crew planning problems: The Italian experience

Solution of Large-Scale Railway CrewPlanning Problems: the Italian ExperienceAlberto Caprara�, Matteo Fischetti+, Pier Luigi Guida�,Paolo Toth� and Daniele Vigo�� DEIS { University of Bologna { Italy+ DMI { University of Udine { Italy� Ferrovie dello Stato SpA { ItalyAbstractCrew scheduling is a very well known problem which has been historically asso-ciated with airlines and mass transit companies; recently also railway applicationshave come on the scene. This now happens especially in Europe, where deregula-tion and privatization issues are forcing a re-organization of the rail industry andbetter productivity and e�cient services are strongly required by the market andthe public ownership. Therefore, this sector is showing an increasing interest inOperations Research and Management Science. Railway crew planning representsa hard problem due to both the dimensions and the operational/regulation con-straints involved. This paper gives an account of the development of a new crewplanning system set up by Ferrovie dello Stato SpA (the Italian railway company)in co-operation with the University of Bologna.1 European railways: a new scenarioThe European railways are being reshaped by a new phase of their historical life cycle,where privatization and deregulation are the underlining themes of the sector. Thisalso follows general European Union (EU) policy directives concerning the separationof the railway system into separate enterprises: infrastructure or track managementcompanies, and transport or train operating companies. The infrastructure companyshould retain state control in the rail business through natural monopoly or governmentregulations and investments. On the other hand, train operations should give rise to anumber of independent and more business-oriented companies, which have access to theinfrastructure via a market mechanism such as payment of track fees. This represents amajor change from the traditional status of the European railways, usually regarded astotally state-owned and vertically-integrated industries.Although this scenario takes di�erent forms in various European countries, it is nev-ertheless established as the current trend and long-term objective of the railway industry.(However, some protected segments, such as regional and local services with social in-terest, may not be a�ected by these objectives.) The new rail policy, which has close1

counterparts in other transport modes (e.g., new access procedures in air transportationand airport slot allocation mechanisms), has its roots in the general EU principles of\open markets" and free movement of people and goods across the Union's countries.In the railway sector, this also means improved exploitation of international and high-speed operations, technological inter-operability, and overall industry standards. Thiswould also transform European railways into more productive, customer-oriented, cost-conscious and e�ciently-managed companies.In some cases the European railway \revolution" has already happened, as a resultof parallel national policies. In Sweden, separation between infrastructure and transportoperations took place in 1988, when two di�erent companies were set up (Banverket andSJ, for infrastructure and transport operations, respectively). In the United Kingdom,track management now belongs to an independent, publicly traded company (Railtrack),and train services have been privatized (mostly franchised) to a number of transportoperating companies. In other European countries the process is continuing towards thecreation of independent business units, with their own accounting systems. This is the�rst step in the direction of further separation and privatization. According to EU policy,railways should be less state aided to avoid market distortions, and cross-subsidizationacross market segments and parts of the network should be eliminated. The trunks (i.e.,the most heavily operated and �nancially sustainable rail lines) are providing the �eldwhere new market rules and concepts are brought in.In this scenario the European railways are introducing new management styles inorder to improve their business results. In particular, new tools are being sought inorder to optimize their use of human and other production resources. Like in othertransport industries (air transportation and mass-transit), where bene�ts of OperationsResearch and Management Science methods have been intensively exploited, railwaysare now exploring new paths to improve their system optimization.In this paper we report about the implementation of a new crew planning system atFerrovie dello Stato SpA (FS), the Italian state railways. In the next section we givean overview of the crew planning problem to be solved. The solution of this problemis obtained by subdividing it into three phases, namely pairing generation, pairing op-timization and rostering optimization, dealt with in Sections 3, 4, and 5, respectively.Preliminary computational testing of the proposed approach is illustrated in Section 6.Finally Section 7 draws some conclusions and describes future extensions.2 Crew planning at the Italian railwaysVarious resource planning problems are peculiar to large railway companies. FS is stilla traditionally-integrated enterprise, although it is now structured into Strategic Busi-ness Units (SBUs). In particular, the Infrastructure SBU provides train control andtrack/installations maintenance, whereas transport operations are managed by threeSBUs: Intercity, Metropolitan, and Freight/Logistics. Locomotive and drivers are pro-vided by the Traction SBU. Finally, Engineering and Property SBUs complete the basicorganization. FS operates a network of 16,000 track kilometers, with a total manpower ofabout 125,000 people. The productivity level (i.e., trains�Km/employee) of FS is better2

than the Western European average. Production is of about 8,000 trains daily, approx-imately 800 of which are long/medium range passenger trains (Intercities), 1,500 arefreight trains, and the remaining ones are regional, local and metropolitan services. Theworkforce includes about 40,000 crew members (25,000 drivers and 15,000 conductors)located in about 50 depots (crew home bases). These �gures result in very large plan-ning problems. In fact, one of the largest problems, limited to intercity and long-rangepassenger trains, involves about 2,000 trains and 5,000 crew working segments.Following the re-organization in the early '90s, the company undertook the develop-ment of a new computer-based crew planning system aimed at:a) looking at the process from an \integrated" (yet classical) point of view;b) taking advantage of OR techniques and close co-operation between company sta�and academics;c) updating the state-of-the-art of railway crew planning methods.The system, which also takes into account the locomotive scheduling problem (notconsidered here), was nicknamed ALPI (\Applicazione Locomotive e Personale Informa-tizzata", i.e., Automation of Locomotive and Personnel System).In railways, crew planning is concerned with building the work schedules of traincrews (drivers and conductors), given a planned timetable. This is also part of moregeneral activities within the rail industry which can broadly be called \tactical plan-ning" and must be normally rede�ned at every timetable update (i.e., yearly or on aseasonal basis). Planning of locomotive schedules, designing train routes, station trackassignment (platforming), maneuver, maintenance and other scheduling tasks must alsobe undertaken at this stage to guarantee a feasible and e�cient use of the productionresources. In this industry-wide planning e�ort, focusing on a \single" resource (e.g.,crew) should be also considered a tactical way of approaching a very large and complexproblem, which usually requires a lot of co-ordination, agreements and feed-back pro-cesses among the parties involved (functional or business unit managers). Furthermore,the hypothesis of a given timetable should be carefully considered, as the timetable itselfcan be the result of an iterative decision process.Notice that tactical planning is not concerned with:i) long-term (i.e., multi-year) and resource acquisition problems, which belong tostrategic planning;ii) daily resource assignment tasks that must cope with unscheduled or contingenttransport;iii) resource instances, but only with their types; that is resources (crew or locomotives)are not identi�ed at this stage by their personal name or identi�cation code.The crew planning problem examined in this paper may be de�ned as follows. Weare given a planned timetable for the train services (i.e., both the actual journeys withpassengers or freight, and the movement of empty trains or equipment between di�erentstations) to be performed every day of a certain time period. Each train service has3

�rst been split into a sequence of trips, de�ned as segments of train journeys which mustbe serviced by the same crew without rest. Each trip is characterized by a departuretime, a departure station, an arrival time, an arrival station, and possibly by additionalattributes (e.g., overnight). During the given time period each crew performs a roster,de�ned as a cyclic sequence of trips whose operational cost and feasibility depend onseveral rules laid down by union contracts and company regulations. To ensure thateach daily occurrence of a trip is performed by one crew, for each roster whose lengthis, say, k days, k crews are needed. In fact, in a given calendar day each of these crewsperforms the activities of a di�erent day of the roster. Moreover, in consecutive calendardays each crew performs the activities of (cyclically) consecutive days of the roster. Thecrew planning problem then consists of �nding a set of rosters covering every trip once,so as to satisfy all the operational constraints with minimum cost. Analogous crewplanning problems arising in di�erent public transportation areas are examined in Wren[31], Bodin et al. [10], Carraresi and Gallo [13], Rousseau [27], Daduna and Wren [16],Desrochers and Rousseau [17], Barnhardt et al. [4], and Desrosiers et al. [18].In transportation jargon and literature, rosters that are produced within crew plan-ning are sometimes called \blank", in the sense that they will be assigned to speci�cpeople during daily operations management, which also copes with contingencies, un-scheduled tra�c, service perturbations, etc.The general approach used by FS for the solution of the above de�ned crew planningproblem follows a methodology which is fairly traditional in the literature (see, e.g.,Bodin et al. [10]). The problem is decomposed into three phases as follows:1. Pairing generation: a very large number of feasible pairings is generated. A pairingis de�ned as a sequence of trips which can be assigned to a crew in a short workingperiod (1-2 days). A pairing starts and ends at the same depot and can have variouscharacteristics (e.g., with/without intermediate rest period outside the depot, nightworking period, etc...) which determine its cost.2. Pairing optimization: a selection is made of the best subset of all the generatedpairings so as to guarantee that all the trips are covered at minimum cost. Thisphase follows quite a general approach, based on the solution of set-covering orset-partitioning problems (SCP/SPPs), possibly with additional constraints (e.g.,lower and upper bounds on the number of pairings selected for each depot).3. Rostering optimization: the pairings selected in the previous phase are sequencedinto rosters, de�ning a periodic duty assignment to each crew which guaranteesthat all the trips are covered for a certain number of consecutive days (e.g., amonth). Rosters are generated separately for each depot.Phases 1 and 2 are often referred to as the crew scheduling problem (see, e.g., Bodin etal. [10]).It should be noted that an algorithmic approach to any of the previous phases hasto comply with several trade union and company operational rules. This adds a lot ofdi�culties and binding constraints to the overall process, and usually makes this kindof planning problem very specialized and di�cult. For instance, a number of constraints4

apply to: maximum daily, weekly and monthly working strips (number of driving andother working hours), length of rest periods, number of night services, and so on. More-over, the instances to be solved are often very large. As a consequence, the problemsarising in Phases 2 and 3 are solved using heuristics.Clearly the proposed sequential optimization method does not guarantee \global"optimality even if each of the phases is solved exactly. Nevertheless the solutions obtainedmay be improved by iterating and tuning together some of the above phases, as thepreliminary testing of Section 6 shows.The above three-step approach was implemented due to its relatively low developmentrisk, and also because it maps fairly well the process currently followed by the planners.The overall project had in fact to computerize the traditional, nation-wide organization,and this critical target was considered easier to achieve with the proposed approach.To provide the algorithmic core of Phases 2 and 3 of the ALPI crew planning sys-tem, FS promoted, jointly with the Italian Operational Research Society (AIRO), twocompetitions among Italian Universities. These competitions aimed at both challengingclassical and new solution methods with some real-life test cases, and stimulating theinterest of the researchers towards these large scale optimization problems.The �rst competition, named FASTER (Ferrovie Airo Set-covering TendER), was onthe design and implementation of e�ective heuristic algorithms for very large scale setcovering problems arising in Phase 2, whereas the second one, named FARO (FerrovieAiro Rostering Optimization), concerned the peculiar rostering optimization problemarising in Phase 3. A timetable pre-processor and a pairing generator were developedby FS to produce a set of relevant test problems to be used for the competitions andthe successive validation of the algorithms. The competitions were held in 1994 and1995, respectively, and the unit of DEIS, University of Bologna, was awarded the �rstprize in both of them. This resulted in a joint project between FS and the Universityof Bologna for the development of the actual codes to be included in the ALPI crewplanning system.In the following we give a more detailed description of the three phases above, pre-senting for each of them the most important constraints, and outlining the algorithmicapproaches currently adopted within the ALPI system.3 The pairing generation phaseThe pairing generation phase calls for the determination of a set of feasible pairings fromthe given timetabled trips. Each pairing is a trip sequence starting and ending at thesame depot, and satisfying the constraints described below.First of all, sequencing rules require that each pair of consecutive trips i and j in apairing is compatible, namely:� The arrival station of i coincides with the departure station of j.� The time interval between the arrival of i and the departure of j is greater than atechnical time, depending on i and j. This includes the times possibly required tochange trains, to perform maneuver and other technical operations in the station.5

An external rest of a pairing is a rest interval between two compatible consecutivetrips, ending and starting at a station di�erent from the depot, which exceeds the techni-cal time by at least 7 hours. A pairing can contain at most one external rest. Moreover,the following characteristics are associated with each pairing:� spread time, de�ned as the time between the departure of its �rst trip and thearrival of its last trip;� driving time, de�ned as the sum of trip durations plus all rest periods shorter than30 minutes;� working time, de�ned as the driving time plus all rest periods, except the externalrest, not shorter than 30 minutes;� paid time, de�ned as the spread time plus possible additional transfer times withinthe depot.A pairing is de�ned to be overnight if it requires some work between midnight and 5am. The operational constraints require that for each pairing:� The spread time must be smaller than 24 hours.� If the pairing does not contain an external rest, the total working time must besmaller than 7 hours if it is overnight, and 8 hours and 45 minutes otherwise. Ifthe pairing contains an external rest, the working time may not exceed 7 hours foreach part before and after the rest.� If the pairing does not contain an external rest, the total driving time must besmaller than 7 hours. Otherwise, the driving time may not exceed 4 hours and 30minutes for each part before and after the external rest.� In the intervals between 11 am and 3 pm, and between 6 pm and 10 pm, a mealrest of at least 30 minutes is required.� A maximum total traveled distance may be imposed on a pairing depending on theset of trips included.Each pairing has an associated cost based on its characteristics.The typical sizes of the instances to be solved and the tightness of the above con-straints make it practical to perform explicit generation of the feasible pairings. Inaddition, operational rules allow a crew to be transported with no extra cost as a pas-senger on a trip, hence the overall solution can cover a trip more than once. This impliesthat the pairing optimization phase actually requires the solution of a set covering ratherthan a set partitioning problem. As a result, only inclusion-maximal feasible pairings,among those with the same cost, need be considered in the pairing generation, thusconsiderably reducing their number.When the number of generated pairings is too big, the best pairings are selected asinput for the pairing optimization phase, based on a score re ecting the pairing cost andthe trips covered. 6

FS implemented an enumerative algorithm which generates all the feasible pairingsaccording to a depth-�rst scheme and backtracks as soon as infeasibilities are detected.Simple bounds on the additional spread, working and driving time required to completea partial pairing are used to speed-up the enumeration.4 The pairing optimization phaseThe pairing optimization phase requires the determination of a min-cost subset of thegenerated pairings covering all the trips and satisfying additional constraints. Theseconstraints are known as base constraints and impose, for each depot:� A lower and an upper bound on the number of selected pairings associated withthe depot.� A maximum percentage of selected overnight pairings over all those associated withthe depot.� A maximum percentage of selected pairings with external rest over all those asso-ciated with the depot.Similar constraints are imposed with respect to the overall set of selected pairings.Even without the above base constraints, set covering problems arising in Phase 2appear rather di�cult, mainly because of their size. Indeed, the largest instances at theItalian railways involve up to 5; 000 trips and 1; 000; 000 pairings, i.e., they are 1-2 ordersof magnitude larger than those arising in typical airline applications.The pure Set Covering Problem (SCP) can formally be de�ned as follows. LetI1; : : : ; In be the given collection of pairings associated with the trip set M = f1; : : : ;mg.Each pairing Ij has an associated cost cj > 0. For notational convenience, we de�neN = f1; : : : ; ng and Ji = fj 2 N : i 2 Ijg for each trip i 2 M . SCP calls forv(SCP) = minXj2N cjxj (1)subject to Xj2Ji xj � 1; i 2 M (2)xj 2 f0; 1g; j 2 N (3)where xj = 1 if pairing j is selected in the optimal solution, xj = 0 otherwise.The exact SCP algorithms proposed in the literature can solve instances with upto few hundred trips and few thousand pairings, see Beasley [5], Beasley and J�ornsten[8], and Balas and Carrera [2]. When larger instances are tackled, one has to resortto heuristic algorithms. Classical greedy algorithms are very fast, but typically do notprovide high quality solutions, as reported in Balas and Ho [3] and Balas and Carrera[2]. The most e�ective heuristic approaches to SCP are those based on Lagrangianrelaxation. These approaches follow the seminal work by Balas and Ho [3], and thenthe improvements by Beasley [6], Fisher and Kedia [19], Balas and Carrera [2], Ceria,7

Nobili and Sassano [15], and Wedelin [30]. Lorena and Lopes [26] propose an analogousapproach based on surrogate relaxation. Recently, Beasley and Chu [7] and Jacobs andBrusco [24] proposed a genetic and a local search algorithm, respectively.We next brie y outline the heuristic method proposed by Caprara, Fischetti and Toth[11] which has been designed to attack very-large scale instances and is included in theALPI system. The method is based on dual information associated with a Lagrangianrelaxation of model (1)-(3). For every vector u 2 Rm+ of Lagrangian multipliers associatedwith constraints (2), the Lagrangian subproblem reads:L(u) = min8<:Xj2N cj(u)xj + Xi2M ui : xj 2 f0; 1g; j 2 N9=; (4)where cj(u) = cj�Pi2Ij ui is the Lagrangian cost associated with pairing j 2 N . Clearly,an optimal solution to (4) is given by xj(u) = 1 if cj(u) < 0, xj(u) = 0 if cj(u) > 0,and xj(u) 2 f0; 1g when cj(u) = 0. The Lagrangian dual problem associated with (4)consists of �nding a Lagrangian multiplier vector u� 2 Rm+ which maximizes the lowerbound L(u). To solve this problem, a common approach uses the subgradient vectors(u) 2 Rm associated with a given u, de�ned by si(u) = 1�Pj2Ji xj(u) for i 2 M . Theapproach generates a sequence u0; u1; : : : of nonnegative Lagrangian multiplier vectors,where u0 is de�ned arbitrarily.For near optimal Lagrangian multipliers ui, the Lagrangian cost cj(u) gives reliableinformation on the overall utility of selecting pairing j. Based on this property, we useLagrangian (rather than original) costs to compute, for each j 2 N , a score �j rankingthe pairings according to their likelihood to be selected in an optimal solution. Thesescores are given as input to a simple heuristic procedure that �nds a hopefully goodSCP solution in a greedy way. Computational experience shows that almost equivalentnear-optimal Lagrangian multipliers can produce SCP solutions of substantially di�erentquality. In addition, no strict correlation exists between the lower bound value L(u) andthe quality of the SCP solution found. Therefore, it is worthwhile applying the heuristicprocedure for several near-optimal Lagrangian multiplier vectors.The approach consists of three main steps. The �rst one is referred to as the subgra-dient step. It is aimed at quickly �nding a near-optimal Lagrangian multiplier vector. Tothis end, an aggressive policy is used for the updating of the step-size and the reductionof the subgradient norm. The second one is the heuristic step, in which a sequence ofnear-optimal Lagrangian vectors is determined. For each vector, the associated scores aregiven as input to a greedy heuristic procedure to possibly update the incumbent best SCPsolution. In the third step, called �xing, one selects a subset of pairings having a highprobability of being in an optimal solution, and �xes to 1 the corresponding variables.In this way one obtains an SCP instance with a reduced number of pairings (and trips),on which the three-step procedure is iterated. After each application of the three-stepprocedure, an e�ective re�ning procedure is used to produce improved solutions.When very large instances are tackled, the computing time spent on the �rst twosteps becomes very large. To overcome this di�culty, one can de�ne a core problemcontaining a suitable set of pairings, chosen among those having the lowest Lagrangiancosts. The de�nition of the core problem is often very critical, since an optimal solution8

typically contains some pairings that, although individually worse than others, must beselected in order to produce a good overall solution. Hence it is better not to \freeze" thecore problem, by using a variable pricing scheme to update the core problem iterativelyin a vein similar to that used for solving large scale linear programs. The use of pricingwithin Lagrangian optimization drastically reduces computing time, and is one of themain ingredients in the success of the overall scheme.5 The rostering optimization phaseIn the rostering optimization phase the previously selected pairings are sequenced intocyclic rosters.Most of the published works on crew rostering refer to urban mass-transit systems,where the minimum number of crews required to perform the pairings can easily bedetermined, and the objective is to distribute the workload evenly among the crews: seeJachnik [23], Bodin, Golden, Assad and Ball [10], Carraresi and Gallo [14], Hagberg [22],and Bianco, Bielli, Mingozzi, Ricciardelli and Spadoni [9]. Set partitioning approaches forairline crew rostering are described in Ryan [28], Gamache and Soumis [20], Gamache,Soumis, Marquis and Desrosiers [21], and Jarrah and Diamond [25]. Finally, relatedcyclic scheduling problems are dealt with in Tien and Kamiyama [29], and Balakrishnanand Wong [1].We next give a description of the real-world crew rostering problem arising at theItalian railways. We are given a set of n pairings to be covered by a set of crew rosters.As mentioned in Section 3, each pairing is characterized by a start time, an end time, aspread time, a driving time, a working time and a paid time. Moreover, each pairing canhave the following additional characteristics:� pairing with external rest, if it includes a long rest out of the depot;� long pairing, if it does not include an external rest and its working time is longerthan 8 hours and 5 minutes;� overnight pairing, if it requires some work between midnight and 5 am;� heavy overnight pairing, if it is an overnight pairing without external rest requiringmore than 1 hour and 30 minutes' work between midnight and 5 am.A roster contains a subset of pairings and spans a cyclic sequence of groups of 6consecutive days, conventionally called weeks. Hence the number of days in a roster isan integer multiple of 6. The length of a roster is typically 30 days (5 weeks) and doesnot exceed 60 days (10 weeks), although these requirements are not explicitly imposedas constraints.The crew rostering problem consists of �nding a feasible set of rosters covering allthe pairings and spanning a minimum number of weeks. As already discussed in Section2, the global number of crews required to cover all the pairings every day is equal to 6times the total number of weeks in the solution. Thus, the minimization of the numberof weeks implies the minimization of the global number of crews required.9

We next list all the constraints of the crew rostering phase. For short, we call completeday a time interval of 24 hours (i.e., 1440 minutes) starting at midnight. Moreover, acomplete day is called free if no pairing or part of a pairing is performed during that day.Each week can include at most the following number of pairings having particularcharacteristics: (i) 2 pairings with external rest; (ii) 1 long pairing; (iii) 2 overnightpairings. Furthermore, each week must be separated from the next one in the roster bya continuous rest, called weekly rest, which always spans the complete sixth day of theweek. There are two types of weekly rests, conventionally called simple and double rests.Simple rests must be at least 48 hours long, whereas double rests must span at least twocomplete days, i.e., either the �fth and sixth day of a week or the sixth day of a weekand the �rst day of the following one.For each roster, the number of double rests must be at least 40% of the total numberof weekly rests, and the average weekly rest time must be at least 58 hours. Moreover, foreach (cyclic) group of 30 consecutive days within a roster, no more than 7 pairings withexternal rest can be included, and the total paid time of the included pairings cannotexceed 170 hours. Finally, for each (cyclic) group of 7 consecutive days within a rosterthe total working time of the included pairings cannot exceed 36 hours.Two consecutive pairings of a roster, say i and j, can be sequenced either directlyin the same week, or with a simple or double rest between them. The break betweenthe end of a pairing and the start of the subsequent pairing within a week lasts at least18 hours. If both pairings are overnight and at most one of them is a heavy overnightpairing, the minimum break lasts 22 hours, while if both are heavy overnight pairings thebreak must span at least one complete day. Moreover, after two consecutive overnightpairings in a week whose intermediate break does not span a complete day, the breakbefore the start of any other pairing in the same week must last at least 22 hours.When a simple rest is preceded by an overnight pairing, then either the �rst pairingin the next week starts after 6:30 am, or the rest must span two complete days. Finally,if the �rst pairing in a week following a double rest starts before 6 am, then the restmust span at least three complete days.The solution approach implemented within the ALPI system is based on a heuristicalgorithm proposed by Caprara, Fischetti, Toth and Vigo [12], which is driven by theinformation obtained through the computation of lower bounds.Simple lower bounds can easily be obtained by considering each of the operationalconstraints imposing a limit either on the total number of pairings with a given charac-teristic, or on the total working and paid time in a week and in a (cyclic) group of 30consecutive days in a roster, respectively. A more sophisticated relaxation is proposedin Caprara, Fischetti, Toth and Vigo [12] in order to take into account all the rules forsequencing two consecutive pairings within a roster. The relaxation also imposes that thetotal number of weekly rests is equal to the total number of weeks making up the rosters,and that the total number of double rests is at least 40% of the total number of weeklyrests. The resulting relaxed problem calls for the determination of a minimum-cost setof disjoint circuits of a suitably de�ned directed multigraph G, whose nodes representthe pairings and the arcs between each pair of nodes representing the di�erent possibleways of sequencing the corresponding pairings, i.e., directly or with a simple or dou-ble weekly rest in between. Each of these circuits corresponds to a, possibly infeasible,10

roster. Moreover, the set of selected circuits must satisfy the following constraints:(i) each node of G is covered by exactly one circuit;(ii) the total number of simple- or double-rest arcs in the circuits has to be at least thetotal cost of the circuits, expressed in weeks;(iii) the total number of double-rest arcs in the circuits has to be at least 0:4 times thetotal number of simple- or double-rest arcs.The relaxed problem is further relaxed in a Lagrangian way by dualizing constraints(ii) and (iii). The corresponding Lagrangian problem is solved as an Assignment Problem(AP) on a suitably de�ned cost matrix. Computational experience on railway instancesshowed that a tight lower bound may be obtained by simply considering two speci�cpairs of Lagrangian multipliers, i.e., by solving only two APs.We �nally describe the constructive heuristic of [12], which extensively uses the in-formation obtained from the solution of the relaxed problem mentioned above. Theheuristic constructs one feasible roster at a time, choosing in turn the pairings to besequenced consecutively in the roster. Once a roster has been completed, all the pairingsit contains are removed from the problem. The process is iterated until all pairings havebeen sequenced.The procedure we use to build each single roster, as it applies to the construction ofthe �rst roster, works as follows. One �rst computes the Lagrangian lower bound, andthen starts building the roster by selecting its \initial pairing" which will be performedat the beginning of a week, i.e., preceded by a weekly rest. (The term \initial" isconventional as rosters are cyclic.) Once the initial pairing has been selected, a sequenceof iterations is performed where:a) the best pairing j to be sequenced after the current pairing i is chosen, accordingto an appropriate score taking into account the characteristics of pairing j and thepossible lower bound increase occurring when j is sequenced after i;b) the Lagrangian lower bound is parametrically updated;c) the possibility of \closing" the roster is considered, possibly updating the bestroster found.The procedure is iterated until no better roster can be constructed, stopping anyway ifthe current roster spans more than 10 weeks.When a complete solution to the problem is found, one can try to improve it byapplying a re�ning procedure, which removes the last rosters constructed (which aretypically worse than the others) from the solution, and re-applies the heuristic algorithmto the corresponding pairings. To this end, some parameters of the roster constructionprocedure are either changed with a random perturbation or tuned so as to take intoaccount the constraints that made the construction of the last rosters di�cult.11

Name m � n Density LB CFT Sol. Others' Sol.FASTER507 507� 63; 009 1.2% 173 174 174FASTER516 516� 47; 311 1.3% 182 182 182FASTER582 582� 55; 515 1.2% 210 211 211FASTER2536 2; 536� 1; 081; 841 0.4% 685 691 692FASTER2586 2; 586� 920; 683 0.4% 937 947 951FASTER4284 4; 284� 1; 092; 610 0.2% 1051 1065 1070FASTER4872 4; 872� 968; 672 0.2% 1509 1534 1534Table 1: Results on real-life SCP instances from FS.6 Preliminary computational testingThe heuristic algorithms implemented for Phases 2 and 3 of the ALPI system have beenpreliminarily validated through separate computational testing.The set covering algorithm described in Section 4, hereafter called CFT, was testedboth on instances from the literature and on real-life instances provided by FS. Thetechnique outperforms previously published methods: in 92 out of the 94 literature in-stances the method found, within short computing time, the optimal (or the best known)solution. Moreover, among the 22 instances for which the optimum is not known, in 6cases the solution is better than any other solution found by previous techniques. Table1 reports the results for the FS instances. For each instance the table gives the instancename, the number of trips (m) and pairings (n), the instance density Pj2N jIjj=(m � n),the value of the lower bound LB computed by the subgradient procedure, the value ofthe heuristic solution found by code CFT, and the best solution obtained by other SCPalgorithms tested by FS. The reported solutions were obtained within time limits of 3,000CPU seconds on a PC 486/33 for the �rst three instances, and 10,000 CPU seconds ona HP 9000 735/125 for the remaining instances.The table shows that algorithm CFT is capable of providing near-optimal solutionswithin limited computing time even for very-large size instances. The average percentagegap between the lower bound and the heuristic solution value is 0.9%.The rostering optimization algorithm described in Section 5 was tested on real-lifeinstances provided by FS, involving up to about 900 pairings. The results obtained areillustrated in Table 2. For each instance we report the instance name, the number ofpairings, the best simple lower bound, the Lagrangian lower bound, the heuristic solutionvalue, and the corresponding computing time, expressed in PC Pentium 90 CPU seconds.The table clearly shows the e�ectiveness of the approach, since 26 out of 36 instanceshave been solved to proven optimality within limited computing time.The encouraging results obtained with the above experiments led to the implementa-tion of the prototype version of the ALPI system. A �rst testing of the overall procedurewas performed by using the instance FASTER516, which includes all the pairings ob-tained from a set of 516 trips currently covered by crews from the Milan depot (one ofthe largest in Italy). The pairing set contains 47,311 pairings, 161 of which were selectedin Phase 2. The rostering optimization phase determined within a few minutes a solu-tion with 46 weeks. The information associated with this solution was used to better12

Lower Bounds Heuristic SolutionName n Simple Lagrangian weeks timeFARO021 21 6 7 7 8FARO033 33 9 11 11 17FARO069 69 18 19 19 650FARO134 134 34 39 39 365FARO164 164 43 48 48 106FARO360 360 108 108 111 342FARO386 386 110 118 118 443FARO525 525 154 164 164 1185F21F33 54 15 17 17 29F21F69 90 24 25 26 180F21F134 155 40 45 45 645F21F164 185 48 54 54 103F21F360 381 114 114 118 1805F21F386 407 116 124 124 447F21F525 546 160 170 170 1026F33F69 102 26 29 29 533F33F134 167 43 50 50 117F33F164 197 51 58 58 149F33F360 393 117 118 121 638F33F386 419 118 128 128 1587F33F525 558 162 174 174 1936F69F134 203 51 57 58 1135F69F164 233 60 66 66 327F69F360 429 125 126 130 1892F69F386 455 127 136 136 7462F69F525 594 171 182 182 11317F134F164 298 76 87 87 595F134F360 494 142 146 148 16160F134F386 520 143 157 157 1396F134F525 659 188 203 203 2107F164F360 524 150 155 158 2134F164F386 550 152 166 166 956F164F525 689 196 211 211 7715F360F386 746 217 225 228 4434F360F525 885 261 271 274 6898F386F525 911 263 282 282 3806Table 2: Results on real-life crew rostering instances from FS.13

de�ne the pairing costs for the pairing optimization phase, by taking into account thecharacteristics that made the roster construction di�cult. The new pairing optimizationsolution selected 151 pairings, and the corresponding rostering solution, again found in afew minutes, contained 45 weeks. The overall process was iterated, achieving a rosteringsolution of 44 weeks (signi�cantly better than the initial one) at the fourth iteration.This gives an idea of the improvements that could be achieved by feedbacking betweenPhases 2 and 3. This is one of the main points to be investigated in the future.7 ConclusionsThe ALPI system was scheduled to become operational in June 1997. However, crewplanning for this year will not be done completely via the new system, due to some re-organization issues, that have delayed some training and testing activities. The \turmoil"in which European railways are operating these days does not usually help in makingall the scheduled progress; nevertheless it is inspiring a lot of innovative projects, likethe one just described. The tests made so far with the new algorithms demonstrate thecapability of ALPI in carrying out its future job: work timing and personnel savings aredramatic; the original planner workforce (about 50 people) may be substantially reduced,or better utilized, and the time needed to produce a new planning national worksheet willbe incomparably shorter than before. In terms of driver resources, some test problemshave identi�ed reductions over hand made rosters corresponding to a saving of at least1%. Even better results are expected once the system is fully operational. Improvede�ectiveness will be used to increase output rather than to reduce the workforce size.In Italy the market share of rail tra�c has been increasing consistently over the lastfew years, although it is still small relative to road freight tra�c. The new planningsystem will also help the railway sta� to improve its market response and to proposenew working rules and productivity/bene�ts trade-o�s which can be more easily acceptedby the trade unions. We also believe that this approach should represent a model for theintroduction of MS methods into complex enterprises, like rail transportation. We mightconclude that this \experiment" is rewarding for both the application and the progressin the state-of-the-art of this class of problems. Moreover, it con�rms the high potentialfor OR technologies in the real world, and the bene�ts from open collaboration betweenindustry and academia.AcknowledgmentsWe would like to acknowledge Ferrovie dello Stato SpA, in particular the Infrastructureand Traction Business Units and the Computer Science Division for giving their supportto the ALPI project and the related FASTER and FARO competitions. F. Olimpieri andA. Locatelli, from FS, have the merit of having prepared the real-life instances; the formerwas a rail driver who graduated in engineering (no one else could have been able to dowhat he did in such a short time). Other people to be acknowledged for their support toOR development in FS are E. Maestrini, P. Vellucci, V. S. Achille and the third author.14

Finally, AIRO and its appointed members, who attended the computer evaluation tests,deserve special thanks: A. Colorni, G. Gallo, G. Improta, M. G. Speranza, and R. Tadei.References[1] N. Balakrishnan and R.T. Wong, \A Network Model for the Rotating WorkforceScheduling Problem", Networks 20 (1990) 25{42.[2] E. Balas and M.C. Carrera, \A Dynamic Subgradient-Based Branch-and-BoundProcedure for Set Covering", Operations Research 44 (1996) 875{890.[3] E. Balas and A. Ho, \Set Covering Algorithms Using Cutting Planes, Heuristics andSubgradient Optimization: A Computational Study", Mathematical ProgrammingStudy 12 (1980) 37{60.[4] C. Barnhart, E.L. Johnson, G.L. Nemhauser, M.W.P. Savelsbergh and P.H. Vance,\Branch{and{Price: Column Generation for Solving Huge Integer Programs", inJ.R. Birge and K.G. Murty (eds.), Mathematical Programming: State of the Art1994, The University of Michigan, 1994, 186{207.[5] J.E. Beasley, \An Algorithm for Set Covering Problems", European Journal of Op-erational Research 31 (1987) 85{93.[6] J.E. Beasley, \A Lagrangian Heuristic for Set Covering Problems", Naval ResearchLogistics 37 (1990) 151{164.[7] J.E. Beasley and P.C. Chu, \A Genetic Algorithm for the Set Covering Problem",European Journal of Operational Research 94 (1996) 392{404.[8] J.E. Beasley and K. J�ornsten, \Enhancing an Algorithm for Set Covering Problems",European Journal of Operational Research 58 (1992) 293{300.[9] L. Bianco, M. Bielli, A. Mingozzi, S. Ricciardelli and M. Spadoni, \A Heuristic Pro-cedure for the Crew Rostering Problem", European Journal of Operational Research58 (1992) 272{283.[10] L. Bodin, B. Golden, A. Assad and M. Ball, \Routing and Scheduling of Vehiclesand Crews: the State of the Art", Computers and Operations Research 10 (1983)63{211.[11] A. Caprara, M. Fischetti and P. Toth, \A Heuristic Method for the Set CoveringProblem", Technical Report OR-95-8, DEIS University of Bologna, 1995, extendedabstract published in W.H. Cunningham, S.T. McCormick and M. Queyranne (eds.)Proceedings of the Fifth IPCO Conference, Lecture Notes in Computer Science 1084,Springer, 1995, 72{84.[12] A. Caprara, M. Fischetti, P. Toth and D. Vigo, \Modeling and Solving the CrewRostering Problem", Technical Report OR-95-6, DEIS University of Bologna, 1995,to appear in Operations Research. 15

[13] P. Carraresi and G. Gallo, \Network Models for Vehicle and Crew Scheduling",European Journal of Operational Research 16 (1984) 139{151.[14] P. Carraresi and G. Gallo, \A Multilevel Bottleneck Assignment Approach to theBus Drivers' Rostering Problem", European Journal of Operational Research 16(1984) 163{173.[15] S. Ceria, P. Nobili and A. Sassano, \A Lagrangian-Based Heuristic for Large-ScaleSet Covering Problems", Technical Report R.406, IASI-CNR, Rome, 1995, to appearin Mathematical Programming.[16] J.R. Daduna and A. Wren (eds.), Computer-Aided Transit Scheduling, Lecture Notesin Economic and Mathematical Systems 308, Springer Verlag, 1988.[17] M. Desrochers and J.-M. Rousseau (eds.), Computer-Aided Transit Scheduling, Lec-ture Notes in Economic and Mathematical Systems 386, Springer Verlag, 1992.[18] J. Desrosiers, Y. Dumas, M.M. Solomon and F. Soumis, \Time Constrained Routingand Scheduling", in M.O. Ball, T.L. Magnanti, C.L. Monma and G.L. Nemhauser(eds.), Handbooks in OR & MS, Vol. 8, Elsevier Science, 1995, 35{139.[19] M.L. Fisher and P. Kedia, \Optimal Solutions of Set Covering/Partitioning Prob-lems Using Dual Heuristics", Management Science 36 (1990) 674{688.[20] M. Gamache and F. Soumis, \A Method for Optimally Solving the Rostering Prob-lem", Les Cahiers du GERAD G-93-40, Montr�eal, 1993.[21] M. Gamache, F. Soumis, G. Marquis and J. Desrosiers, \A Column GenerationApproach for Large Scale Aircrew Rostering Problems", Cahiers du GERAD G-94-20, Montr�eal, 1994.[22] B. Hagberg, \An Assignment Approach to the Rostering Problem", in J.-M.Rousseau (ed.), Computer Scheduling of Public Transport 2, North Holland, 1985.[23] J.K. Jachnik, \Attendance and Rostering Systems", in A. Wren (ed.) ComputerScheduling of Public Transport, North Holland, 1981.[24] L.W. Jacobs and M.J. Brusco, \A Local Search Heuristic for Large Set-CoveringProblems", Naval Research Logistics 52 (1995) 1129{1140.[25] A.I.Z. Jarrah and J.T. Diamond, \The Crew Bidline Generation Problem", Techni-cal Report, SABRE Decision Technologies, 1995.[26] L.A.N. Lorena and F.B. Lopes, \A Surrogate Heuristic for Set Covering Problems",European Journal of Operational Research 79 (1994) 138{150.[27] J.-M. Rousseau (ed.), Computer Scheduling of Public Transport 2, North Holland,1985. 16

[28] D.M. Ryan, \The Solution of Massive Generalized Set Partitioning Problems inAircrew Rostering", Journal of the Operational Research Society 43 (1992) 459{467.[29] J.M. Tien and A. Kamiyama, \On Manpower Scheduling Algorithms", SIAM Re-view 24 (1982) 275{287.[30] D. Wedelin, \An Algorithm for Large Scale 0-1 Integer Programming with Applica-tion to Airline Crew Scheduling", Annals of Operations Research 57 (1995) 283{301.[31] A. Wren (ed.), Computer Scheduling of Public Transport, North Holland, 1981.

17