UFDC Home  myUFDC Home  Help 



Full Text  
SOLVING REALLIFE TRANSPORTATION SCHEDULING PROBLEMS By JIAN LIU A DISSERTATION PRESENTED TO THE GRADUATE SCHOOL OF THE UNIVERSITY OF FLORIDA IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY UNIVERSITY OF FLORIDA 2003 This document is dedicated to my wife .. ACKNOWLEDGMENTS I would like to express my sincere gratitude to my advisor, Dr. Ravindra K. Ahuja, for his patient guidance, constant encouragement, endless support and constructive criticism during my study. His profound knowledge and deep understanding of transportation networks set a high bar for me to reach in the future. I would like to acknowledge the help of Dr. Dharma Acharya, the General Manager of Operations Research at CSX Transportation, and Dr. Pooja Dewan, the Manager of Operations Research in the Technology Services Department at BNSF Railway. I gratefully appreciate their help for giving me the access to their data and assessing the implementability of the algorithmic approaches developed in the dissertation. I also want to express my gratitude to Dr. Sartaj K. Sahni, Dr. Joseph P. Geunes and Dr. ZuoJun Shen for serving as my supervisory committee members and for giving me wonderful ideas and advice. Special thanks are owed to Krishna C. Jha for his generous help with editing the original edition. Finally, I am grateful to my parents and my wife for their love, support and encouragement. TABLE OF CONTENTS Page A C K N O W L E D G M E N T S ................................................................................................. iii LIST OF TABLES .................. .................. ................. ............ .............. .. vii LIST OF FIGURES .................................................... ........... ................ viii A B ST R A C T ............... ...................................................................................... x CHAPTER 1 IN TR OD U CTION ............................................... .. ......................... .. 1.1 R railroad Scheduling Problem s ........................................ .......................... 2 1.1.1 R railroad B locking Problem ............................................... .............. 2 1.1.2 Freight Car Management Problem .................................. ........... 3 1.1.3 Train Routing, Timetabling and Dispatching Problem ................... ....3 1.1.4 Crew Scheduling Problem ........................................................ ... ........... 4 1.1.5 BlocktoTrain A ssignm ent Problem ........................................ ................5 1.1.6 Locom otive Scheduling Problem ...................................... ............... 5 1.2 A airline Scheduling Problem s ......................................................................... ... 6 1.2.1 Flight Schedule Design Problem ........................................................8 1.2.2 Fleet A ssignm ent P problem ................................................ .....................8 1.2.3 Through A ssignm ent Problem ................................. ........................ 9 1.2.4 A aircraft R outing Problem .................................... .......................... ......... 9 1.2.5 C rew Scheduling Problem .................................. ..................................... 10 1.3 Dissertation Summ ary and Outline.................................................................... 11 2 SOLVING THE REALLIFE LOCOMOTIVE SCHEDULING PROBLEM........... 14 2 .1 In tro du ctio n ...................................... ............................ ................ 14 2.2 Problem D details ............................................................... .... ...... 25 2.3 SpaceTim e N etw ork ................. ........................................................ 30 2.4 The Mixed Integer Programming Formulation.........................................34 2.5 Sim plifying the M odel ................................................ ...... ............... 39 2.6 Solving the Daily Locomotive Scheduling Problem ........................................41 2.6.1 Constructing the Daily SpaceTime Network and Formulating the MIP...41 2.6.2 Solving the MIP for the Daily Scheduling Problem................................42 2.6.3 Determining TrainTrain Connections ....................................... .......... 43 2.6.4 Determining Light Travel Arcs ...................................... ............... 46 2.6.5 Determining Active and Deadheaded Locomotive Flow Variables...........48 2.6.6 Neighborhood Search Algorithm ...................................................50 2.7 Solving the Weekly Locomotive Scheduling Problem......................................55 2.8 Summary of the Algorithmic Approach...........................................................61 2.9 C om putational R esults................. .. ....... ..................................... ............... 61 2.10 Sum m ary and Conclusions ........................................ ........................... 66 3 SOLVING THE REALLIFE RAILROAD BLOCKING PROBLEM ......................68 3 .1 In tro d u ctio n ..................................................................................................... 6 8 3.2 Background ................................. ... ..................................... 72 3.3 IP Formulation and Lagrangian Relaxation Approach............... ...................73 3.3.1 An Integer Programming Formulation ...............................................73 3.3.2 A BiLevel Lagrangian Relaxation Approach................ .............. ....76 3.3.3 Solving the Blocking Subproblem ................................... ............... 77 3.3.4 Solving the Flow Subproblem ...................................... ...............78 3.3.5 Connectivity in the Blocking Subproblem ...............................................80 3.3.6 Solution A approach Sum m ary ............................................. .....................83 3.4 Very Large Scale Neighborhood Search based Heuristics ..................................84 3.4 .1 C construction H euristic .................................................................... ..... 85 3.4.2 Neighborhood Search Algorithms............................................................87 3.5 A additional C onstraints ........................................................................... ...... 90 3.6 C om putational R esults............................................................................ ... .... 9 1 3 .7 C o n c lu sio n s ..................................................................................................... 9 5 4 SOLVING THE MULTICRITIERIA COMBINED THROUGH AND FLEET A SSIG N M E N T PR O B LEM ............................................................ .....................97 4 .1 Introdu action ............................ ............ ............... ................. .... 97 4.2 Background ..........................................103 4.2.1 Integer Programming Formulation for ctFAM .........................................103 4.2.2 Neighborhood Search Algorithm for ctFAM ..........................................105 4 .3 M ulticriteria ctF A M ............................................................... ..................... 110 4.3.1 Ground Manpower Scheduling ............... ..................................111 4.3.2 Crew Scheduling ............................................................. ........ .. 113 4.4 Neighborhood Search for Multicriteria ctFAM ................................................115 4.4.1 Arc Costs in the AB Improvement Graph..............................................116 4.4.2 A lgorithm s for M ultiCriteria Search......................................................121 4.5 Com putational R results ......................................................... ............... 124 4 .6 C on clu sion s................................................. ................ 12 6 5 SOLVING THE COMBINED THROUGH AND FLEET ASSIGNMENT PROBLEM WITH TIME WINDOWS ....................................... ............... 128 5.1 Introduction.................................................... ........................... ....... 128 5.2 M them atic Form ulation ............................................................................. 130 5.2.1 N rotation .................................... ............................. .........131 5.2.2 C connection G raph............................................. ............................ 132 5.2 .3 D decision V ariables............... ................................................ ...............134 5.2.4 The Integer Programming Formulation of ctFAMTW .........................135 5.3 Neighborhood Search Algorithm for ctFAMTW .............................................136 5.3.1 Obtaining an Initial Feasible Solution.................... .................. ................137 5.3.2 AB Solution Graph ..................................................................137 5 .3 .3 A B Sw ap s ................................................................ 13 8 5.3.4 AB Improvement Graph ............................... ...................140 5.3.5 Identifying AB swaps .................................. 150 5.3.6 Neighborhood Search Algorithm .................................. ...............151 5.4 C om putational T testing ............................................................. ..................... 152 5 .5 C o n c lu sio n s ................................................................................................... 1 5 2 6 FURTHER REASERCH AND CONCLUDING REMARKS..............................154 6 .1 In tro d u ctio n ................................................................................................... 1 5 4 6 .2 Sum m ary of F finding s ........................................... ........................................ 154 6.3 Proposed Research .................. ............................ .. ........ .. ............ 155 L IST O F R E FE R E N C E S ........................................................................ ................... 157 BIOGRAPHICAL SKETCH ............................................................. ...............161 LIST OF TABLES Table page 21. Analysis of trains and their frequencies ................................... .......... ............... 39 22. Summary of problem sizes and solution times at different steps of the algorithm. ...62 23. Comparison of number of locomotives used by the LSM and ALS solutions ..........63 24. Comparison of other statistics for ALS and LSM solutions.................. .......... 63 25. Sensitivity of the solution to three levels of light travel ....................................64 26. Sensitivity of the solution to light different levels of consistbusting.....................65 31. Blocking paths illustration with respect to Figure 31. .......................................... 71 32. Comparison of our solutions with the solutions used by railroads...........................92 51. An example of extra through connection opportunity if time windows are allowedl29 52. Improvements generated by ctFAMTW neighborhood search algorithm .............. 152 LIST OF FIGURES Figure pge 21. A part of the weekly space time network ......... ..................................33 22. Summ ary of the algorithmic steps. ........................................ ......................... 61 31. An example of a blocking network.......... .................. .... ..... ............... 71 32. The VLSN search algorithm for the blocking problem.................... ..................85 33. Im provem ent in average carm iles ........................................ ......................... 94 34. Improvement in intermediate carhandlings................ ................. ................94 35. Tradeoff curve between of intermediate carhandlings and carmiles ..................95 41. Local improvement based algorithm for Approach 1........................................122 42. N ondom inated solutions for M CP1. ................................................. ............... 125 43. Nondominated solutions for M CP2. ....... ......... ...... ........................126 51. An example of part of the connection graph at a city with the inbound flight legs i andj, and outbound flight legs s and t............................................ .................. 133 52. An example of the solution graph at a city with arrival flight legs i,j, k, 1, and departure flight legs s, t, u, v. ............................................................................ 138 53. A simple example of AB swap where flight legs i andj are refleeted and re scheduled .............. ......... .. ..................................... .......... 139 54. An example of the type 1 arc in the improvement graph .............. ..................... 142 55. An example of the type 2 arc in the AB improvement graph.............................. 143 56. An example of the type 3 arc in the AB improvement graph.............................. 143 57. An example of the type 4 arc in the AB improvement graph..............................144 58. An example of the type 5 arc in the AB improvement graph.............................. 145 59. An example of type 6 arc in the AB improvement graph ....................................146 510. An illustrative example of valid cycle and AB swap .......................... ..........149 Abstract of Dissertation Presented to the Graduate School of the University of Florida in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy SOLVING REALLIFE TRANSPORTATION SCHEDULING PROBLEMS By Jian Liu August, 2003 Chair: Dr. Ravindra K. Ahuja Major Department: Industrial and Systems Engineering Transportation by railroads and airlines contains a rich set of optimization problems with substantial potential savings in transportation costs. In the past few decades, unfortunately, optimization models were not widely used in transportation industries, because of (i) the large size and tremendous complexity of these problems, (ii) the lack of suitable algorithmic approaches for solving them, and (iii) insufficient computing power available. However, as major advances have taken place in algorithm design, analysis and implementation, complemented by enhanced computer systems, transportation scheduling problems now appear to be tractable. The goal of this dissertation is to study several reallife transportation scheduling problems that are of great importance for railroads and airlines. The related literatures of these problems have only dealt with simplified models or small instances failing to incorporate the characteristic of reallife applications. In Chapter 2, we present an integrated model for the locomotive scheduling problem. In Chapter 3, we propose two approaches to solve the railroad blocking problem. In Chapters 4 and 5, we study extensions and generalizations of combined through andfleet assignment models. The focus of this dissertation is to model these problems with realistic constraints and solve the reallife instances of those models with modern optimization techniques. The major solution approaches developed in this dissertation are based on Very Large Scale Neighborhood (VLSN) search, which is a heuristic approach but works very well for real life instances. The computational tests for those problems are performed on reallife data from major U.S. transportation carriers. The results reveal that the models and solution approaches developed in this dissertation are practically implementable and capable of generating significant economic impact on transportation industries. CHAPTER 1 INTRODUCTION Transportation is one of the most vital services in modern society. In the U.S. and Europe, transportation service industries account for between 4% and 7% of overall GNP. The U.S. transportation system is an extensive, interrelated network, and consists of around 46.5 thousand miles of interstate highways, 5 thousand airports, 171 thousand miles of freight railroads and 26 thousand navigable waterways. In 1999, the transportation network supported 4.8 trillion passengermiles and 3.9 trillion tonmiles; and around 8228 air crafts and 1.38 million freight cars are involved. In 2000, transportation related goods and services contributed $1050 billion (10.8 %) to a $9.87 trillion U.S. gross domestic product. With so many resources involved, the transportation industry encompasses numerous decision problems which can be formulated mathematically. One important kind of decision problem is called the scheduling problem, which aims to plan for the movement of passengers and freight efficiently in constrained environments with the given resources. The transportation scheduling problem has attracted many researchers in the past due to its interesting nature and economic scale. Some of those researchers are involved in studying the mathematical nature of the problem and in theoretical approaches for solving the problem, whereas others have tried to solve reallife problems and to produce implementable schedules. In this dissertation, we present our effort on modeling and solving several reallife railroad and airline scheduling problems. This chapter is organized as follows. In Section 1.1 and 1.2, we describe some general scheduling problems in railroad and airline transportation in detail. In Section 1.3, we give the summary and outline of this dissertation. 1.1 Railroad Scheduling Problems In the U.S. transportation industry, railroads play a major role in freight movement. Railroads transport over 40% of the tonmiles of intercity freight, including 70% of new automobiles, 40% of farm products and 65% of coal (Association of American Railroads, 1999). Many railroad transportation problems can be modeled and solved using mathematical optimization techniques. Unfortunately, the related research was not very successful in the past, failing to incorporate the characteristics of reallife applications (Assad [1981] and Haghani [1987]). The development of optimization models for routing of trains and freight was for a long time hindered by the large size of the problems and lack of optimization software to solve problems of that magnitude. In addition, the computing capabilities of computers were limited. As a result, practical implementations of optimization models often had a limited success, which deterred both researchers and practitioners from pursuing the effort. However, in recent years, with increased profit incentives, strong competition from other freight carriers (especially trucking companies), and better availability of computer systems, railroads have begun to adopt optimizationbased decision support for their scheduling problems with some success (Cordeau et al. [1998]). Following are some typical railroad scheduling problems that have appeared in the operations research literature with increased level of realism. 1.1.1 Railroad Blocking Problem Railroads carry millions of shipments annually from their origins to their respective destinations. A typical shipment is composed of a set of individual cars that all share a common origin and destination. To reduce the intermediate handling of shipments as they travel over the railroad network, a set of shipments is classified (or grouped) together to create a block. The blocking problem is to identify this classification plan for all shipments in this network, called a blocking plan, so that the total shipment cost is minimum. A blocking plan significantly affects the shipment cost. However, the blocking problem is a very largescale optimization problem, and its complexity and sheer size have not allowed this problem to be solved to optimality or nearoptimality satisfying all the practical considerations required for an implementable plan. The two most recent references on blocking problems are by Newton et al. [1998] and Barnhart et al. [2000]. We present our study on the blocking problem in Chapter 3. 1.1.2 Freight Car Management Problem Every loaded movement on a rail network leads to a supply of empty cars at the destinations. Therefore, if transportation demand is unbalanced, steps must be taken to reposition empty cars and avoid their accumulation in some parts of the network where more traffic is directed. Repositioning empty freight cars can thus help the railroad offer better service to its customers and decrease the capital investment associated with equipment ownership. The freight car management problem consists of dynamically distributing empty cars in the network to improve the railroad's ability to promptly answer requests for empty cars while minimizing the costs associated with their movement. Some recent papers on this problem are by Crainic et al. [1990], Powell et al. [1995], and Nozick and Morlok [1997]. 1.1.3 Train Routing, Timetabling and Dispatching Problem Given a blocking plan and a distribution plan for empty cars, the train routing and timetabling problem is to identify train routes and their timetables so as to minimize the cost of carrying cars from their origins to destinations. Realtime operations of trains also require synchronization of train movements on the lines of the physical railway network. In the U.S., lines are often made of a single track. To allow trains traveling in different directions on a single track, sidings are located at regular intervals along the line. These short track sections allow one train to pull over and free the way for the other one. Sidings are also used to permit a fast train to pass a slower one. Given a train timetable, the train dispatching problem determines a feasible plan of meets and overtakes that satisfies a system of constraints on the operation of trains. Some recent papers on this problem are by Farvolden and Powell [1994], Campbell [1996], Kraft [1998], and Brannlund et al. [1998]. 1.1.4 Crew Scheduling Problem Once the train timetable is planned, the next step is to assign required personnel to perform train services (the actual journey with freight and the transfer of empty trains or equipment between stations). The crew management is concerned with building the work schedules of crews needed to perform train services for a planned train timetable. Each train service has first been split into a sequence of trips, defined as segments of train journeys which must be serviced by the same crew without rest. Each trip is characterized by a departure time, a departure station, an arrival time, an arrival station, and possibly by additional attributes. Each daily occurrence of a trip has to be performed by one crew. In fact each crew performs a roster, defined as a sequence of trips whose operational cost and feasibility depend on several rules laid down by union contracts and company regulations. The problem consists of finding a set of rosters covering every trip of the given time period, so as to satisfy all the operational constraints with minimum cost. Models for crew management and relevant references can be found in Caprara et al. [1997]. 1.1.5 BlocktoTrain Assignment Problem Once the blocking plan is developed and train routings have been identified, the next step is to determine which trains should carry blocks to move shipment from their origins to destinations. At this point, blocks are assigned to the trains so that all blocks are shipped from their origins to their destinations and the total cost of transportation is minimum. A block may be carried by a number of trains as it travels from its origin to its destination. This problem is known as the blocktotrain assignment problem and can also be formulated as a mixed integer programming problem. However, we are not aware of any effective exact or heuristic algorithm to solve the blocktotrain assignment problem. At most railroad companies, this problem is solved either manually or using fairly elementary heuristic algorithms (Shan [1997]). As a result, there is substantial inefficiency in the system, blocks travel much longer distances than they should, and there is unnecessary block swapping between trains. There is a need for effective algorithms for solving the blockto train assignment problem. 1.1.6 Locomotive Scheduling Problem Major U.S. railroads maintain large fleets of locomotives of various types with different pulling capacities. The locomotive scheduling problem is to assign locomotives to the trains to fulfill the motive power requirement of the trains in the train schedule. Usually the motive power requirement by a train is determined by the blocktrain assignment, and is expressed in terms of horsepower and tonnage. A set of operational constraints must also be satisfied for a practical locomotive assignment. In Chapter 2 we give more details on this problem. Recent literature can be found in Ziarati et al. [1997] and Ziarati et al. [1999]. 1.2 Airline Scheduling Problems In the U.S., airlines are the main mode of passenger movement. Growing demand from customers, steep competition among airline carriers, high sensitivity/uncertainty with respect to sociological and political circumstances, and development in the IT industry have motivated the airline companies to adopt Operational Research (OR) tools to improve cost efficiency and customer satisfaction. Airline industries now regularly use optimization models in their planning and scheduling tasks and the use of these models has resulted in hundreds of millions of dollars in annual saving for major airlines (Yu [1998], Barnhart and Talluri [1997] and Ahuja et al. [2001c]). In scheduled passenger air transportation, airline profitability is critically influenced by the airlines' ability to construct flight schedules containing flights at desirable times in markets (defined by origins and destinations pairs) with high demand. To construct such schedules, airlines engage in a complex decision making process referred to as airline schedule planning. Airline scheduling is one of the most important OR problems in the airline industry. This problem has drawn considerable attention from OR researchers and airline companies have adopted many of the OR techniques in practice. We now briefly present here the concepts of demand for air travel, supply of air passenger services and their interaction to better understand the airline scheduling problems. The demand for airtravel in a market is derived from the need for individuals to travel by plane in that market. A market is defined by an origin and destination pair. Two markets are called opposite markets if demands in these two markets are not interacting (for example, Atlanta Miami and Miami Atlanta) and are called parallel markets if the demands in the two markets interact (for example, Atlanta SFO and Atlanta Oakland). Several methods for demand forecasting are in use. Some of them are as follows: (i) stepwise forecasting (first forecast the overall travel demand in a region or zone, then derive the demand for travel for an origindestination pair, then determine the airtravel demand for that origindestination), (ii) demand forecasting based on the population of the cities and distance between cities, and (iii) regression analysis. An airline determines its demand for an origindestination pair based on overall air travel demand for that origindestination, market share of the airline, and capacity of the airline. Once an airline determines the demand to be fulfilled, it either builds or modifies the flight network to compete for the market share. A flight network consists of nodes representing airports and arcs representing direct flights between two nodes. With respect to flight network, the basic airline scheduling problem reduces to deciding the network structure to be followed, flight arcs to be made in the network, and frequency of flights on each arc in network. Generally, U.S. airlines adopt a hubandspoke network (other alternatives may be linear network or complete network), in which the hub airport is directly connected to each of the nonhub airports in the network. If there are n nodes in the flight network, the hubandspoke network requires 2(n1) links. The reason for adopting the hubandspoke network lies in its ability to reduce the variability in the number of passengers in a flight leg (a nonstop flight from an origin to a destination with a specified departure time and an arrival time) by mixing and consolidating demands from different markets on each flight leg. Once the flight network structure is determined, airlines prepare the schedules. Generally they adopt a sequential approach in which schedules are prepared in steps. We now briefly describe the steps involved in airline scheduling. 1.2.1 Flight Schedule Design Problem The flight schedule design problem consists of deciding when and where flights should be flown. A schedule is fixed for a period of time, usually up to three months, with some minor alternations from month to month. The objective of the schedule design is to develop a schedule defining an origin, a destination, a departure time, and an arrival time for each service to accommodate passenger demands. The schedule should meet resource availability constraints. Constrained resources in airline scheduling include vehicles, crews, maintenance facilities, staff, etc. The schedule design problem can be further divided into two problems: (i) route generation deciding which candidate flights should be considered; and (ii) route selection selecting the most profitable flight legs out of all the candidate flight legs. 1.2.2 Fleet Assignment Problem In this step, every flight in the schedule is assigned to an aircraft type, called fleet, subject to the availability of aircraft types and number of aircraft available in each type. An airline's fleet is typically made up of a variety of equipment types such as F100 (Fokker), DC9 (McDonnell Douglas), 757 (Boeing), etc. There are considerable differences in the capacities and operational characteristics of these aircraft types. An F100, for example, has a capacity of 98 in coach class, while a 757 can seat up to 185 in coach. Operational characteristics differ in speed, fuel burn rates, landing weight (airport fees are based on this), range, maintenance costs and minimum turnaround times. These operational differences mean that the cost of flying a flight leg depends on the equipment type assigned to the leg. Therefore, the fleet assignment problem is to assign aircraft type for each flight leg so that airline can fly the schedule, already designed, while matching capacity to the demand as much as possible and minimizing the total operating cost of flying the schedule. Some of the very rigid constraints to be observed in fleet assignments are as follows: (i) the right aircraft should be present at the right place at the right time, (ii) no more aircraft of each type than present in a fleet, and (iii) every flight leg in the schedule has to be assigned exactly one aircraft type. Additional constraints considering maintenance requirements and noise and gate restrictions can also be included. 1.2.3 Through Assignment Problem Once the aircraft types are assigned to each flight leg, decisions are made to connect flight legs with same the aircraft types at an airport. This ensures that the number of incoming aircraft of a type at an airport is equal to the number of outgoing aircraft of that type from the airport. A through connection is a connection between an inbound flight leg and an outbound flight leg at a station which ensures that the same plane flies both legs. Since a through connection allows passengers to remain onboard instead of changing gates at busy airports, passengers are willing to pay a premium for such connections; this premium is termed the through benefit. The through assignment problem takes as an input a list of candidate pairs of flight legs that can make through connections with corresponding through benefits, and identifies a set of most profitable through connections. 1.2.4 Aircraft Routing Problem Once the schedule has been fleeted, the next step is to determine the aircraft rotations (a sequence of flights beginning and ending at the same location) for every plane subject to maintenance requirements. The aircraft routing problem (also known as the aircraft maintenance routing problem) takes a fleeted schedule and the available number of aircraft for each fleet as input. In a traditional fleet assignment process, maintenance requirements are modeled only approximately by ensuring a sufficient number of maintenance opportunities for each fleet type. A maintenance opportunity exists when an aircraft overnights at one of its maintenance locations. While this ensures that, on average, enough aircraft of each type are in maintenance nightly, it does not guarantee that individual aircraft are treated equally: one aircraft might have one maintenance opportunity per day while another might not have any in a week. The aircraft maintenance routing problem addresses this. It determines the actual rotation, or sequences of connected flights beginning and ending at the same location, of individual aircraft subject to maintenance rules imposed by both the regulatory agency and the airline itself. Oftentimes the airline's rules are more stringent than those of the regulatory agency, to avoid the expensive penalty associated with violating maintenance rules. 1.2.5 Crew Scheduling Problem In this step, the planners allocate flight crews pilots and flight attendants to flight legs such that all work rules are satisfied, each flight leg has the necessary crew and crew costs are minimized. There are many restrictions to be met by the crew scheduling problem. Some of these are listed below. * Pilots are qualified to fly only certain aircraft types; * Work schedules must satisfy maximum timeawayfrombase (the period that flight crews are away from their domicile stations) restrictions; * Crews are not allowed to stay on duty longer than a maximum flying time; * Work schedules must satisfy minimum rest time. Typically the crew scheduling problem is broken into two steps: a crew pairing problem and a crew assignment problem. The objective of the crew pairing problem is to find a set of work schedules that covers each flight the appropriate number of times and minimize total crew costs. In crew assignment, these pairings are combined with rest periods, vacations, training times, etc. to create extended work schedules that can be performed by an individual. The objective of the crew assignment problem is to find a minimum cost assignment of employees to these work schedules. The drawback of the stepwise scheduling process is that the overall schedule obtained by this procedure may not be best with respect to system perspective. However, integrated models encompassing all the steps are too complex. Recently, attempts have been made to solve integrated models consisting of two or more steps. Our models in Chapters 4 and 5 solve integrated scheduling problems. 1.3 Dissertation Summary and Outline The focus of this dissertation is to study several reallife scheduling problems in railroad and airline transportation. Airlines have adopted many optimization models in their everyday scheduling, and our research tries to bring more integration in the optimization models that are currently solved sequentially in practice. On the other hand, there is not much use of optimization tools in railroad transportation. Our research tries to model and solve two scheduling problems that are of great importance to railroads with optimization techniques. The outline of this dissertation is as follows. In Chapter 2, we develop an optimization model to solve the locomotive scheduling problem. Because the Mixed Integer Programming (MIP) formulation of this problem is too large for real life instances, we simplify it using a novel approach of solving first the daily locomotive schedule, then extending this solution to the weekly locomotive schedule. One important feature of our model is that it integrates a set of operational constraint, which are critical for reallife locomotive scheduling. The computational testing of our algorithms on data provided by CSX Transportation gives savings of over 400 locomotives, which can be translated into hundreds of millions of dollars per year. Chapter 3 describes the two approaches we have developed to solve the railroad blocking problem: (i) a Lagrangian relaxation based approach, and (ii) a Very Large Scale Neighborhood (VLSN) search based approach. In the first approach we formulate the blocking problem as an MIP and apply multilevel Lagrangian relaxation on the constraints. However, the computational testing of this approach has produced solutions not satisfactory in terms of quality of the solutions and computational time taken. Railroads are more interested in obtaining implementable nearoptimal solutions in reasonable computational time, and hence we develop a VLSN search based approach for this problem, which produces very good solutions in reasonable time. The added advantage of this approach is that many additional constraints can be incorporated. Those constraints are necessary to obtain implementable blocking policies. The computational testing of our VLSN search algorithms on reallife data from CSX Transportation and BNSF Railway has been validated by these two railroads and proved capable of cutting their freight shipping cost substantially. The integrated model for combined through and fleet assignment is called the combined throughfleet assignment model (ctFAM) (Ahuja et al. [2001c]). In Chapter 4, we incorporate ctFAM with two additional criteria: (i) ground manpower planning and (ii) crew planning in the objective function of ctFAM. The solution of the multicriteria ctFAM is more conducive to crew planning and ground manpower planning, which are subsequent scheduling problems of airline operations. The computational testing on the reallife data from United Airlines indicates the quality of the solutions obtained by our algorithms is very good with respect to ground manpower planning and crew planning. In Chapter 5, we study a generalized approach of ctFAM with the additional feature of time windows (ctFAMTW). In ctFAMTW each flight leg has an associated time window with its departure time, so that it can depart flexibly at any time within the time window. It can be noted that ctFAM is a special case of ctFAMTW with zero time window. This extended version of ctFAM allows more profitable through connection opportunities for flight legs. The computational testing of ctFAMTW on reallife data from United Airlines gives revenue improvement of millions of dollars per year over the solution of ctFAM without time windows. CHAPTER 2 SOLVING THE REALLIFE LOCOMOTIVE SCHEDULING PROBLEM 2.1 Introduction Transportation is one of the most vital services in modern society. Transportation of goods by railroads is an integral part of the U.S. economy. Railroads play a leading role in multimodal and container transportation. The rail transportation industry is very rich in terms of problems that can be modeled and solved using mathematical optimization techniques. However, research in railroad scheduling has experienced a slow growth and, until recently, most contributions used simplified models or had small instances failing to incorporate the characteristics of reallife applications. The strong competition facing rail carriers (most notably from trucking companies) and the ever increasing speed of computers have motivated the use of optimization models at various levels in railroad organizations. In addition, recently proposed models tend to exhibit an increased level of realism. As a result, there is growing interest for optimization techniques in railroad problems. In the last few years, a growing body of advances concerning several aspects of rail freight and passenger transportation has appeared in the operations research literature (see, for example, Jovanovic and Harker [1991], Brannlund et al. [1998], Newton et al. [1998], Cordeau et al. [1998], and Sherali and Suharko [1998]). This chapter concerns the development of new models and algorithms for solving reallife locomotive scheduling problems faced by U.S. railroad companies. The locomotive scheduling problem (or the locomotive assignment problem) is to assign a consist (a set of locomotives) to each train in a preplanned train schedule so as to provide them sufficient power to pull them from their origins to their destinations. Locomotive scheduling problems are among the most important problems in railroad scheduling (Florian et al. [1976], Mao and Martland [1981], Smith and Sheffi [1988], Chih et al. [1990], Forbes et al. [1991], Fischetti and Toth [1997], Nou et al. [1997], and Ziarati et al. [1997, 1999]). Often, locomotive availability is the constraining factor in whether a train departs on time. With new locomotives costing in excess of $1.8 million, it is paramount to the railroad business that they be managed efficiently. The variety of types of locomotives, different types of trains, and the diverse geographic networks create very difficult combinatorial optimization problems. There are not satisfactory algorithms to solve these problems. As a result, there are inefficiencies in locomotive management, and substantial savings may be achieved through the development of better models and algorithms. CSX Transportation has over 3,000 locomotives, which translates into a capital investment of over $5 billion, and over $1 billion in yearly maintenance and operational costs. Our study reports an improvement of 5% in average locomotive utilization for CSX, which translates into a saving of over $100 million per year. Locomotive scheduling problems can be studied at two levels planning level or operational level. At the planning stage of the locomotive scheduling problem, we assign locomotive types to various trains. Typically, a railroad company has different type of locomotives with different pulling and cost characteristics. For example, we may assign two CW44AC and one CW408 locomotive to a train. But the railroad company may have several hundred locomotives of type CW44AC and CW408. Of these, which specific units get assigned to the train is handled by the operational locomotive scheduling problem. The operational locomotive scheduling model also takes into account the fueling and maintenance needs of the locomotives, which are ignored in the planning model. Railroad companies differ on their views of the relative importance of the planning problem versus the operational problem. One view holds that the daytoday variability in traffic patterns, locomotive unreliability, changing service priorities and the wide range of train schedule operations create an environment that is so unpredictable that it is a futile exercise to develop a static locomotive scheduling plan. This philosophy, which we refer to as the tactical planning philosophy, would attempt to take into account current conditions on an ongoing basis and dynamically solve the locomotive scheduling problem. This creates an ever changing set of solutions where particular trains may run with very different consists each day, and each train may source those locomotives from a variety of inbound trains, depending on that days' situation. These philosophy differences carry over to many aspects of the business. Ultimately, they can be summarized in two camps: those who believe it is best to operate a scheduled railroad and those who believe it is best to operate a "tonnage" or tactical railroad. The first camp would hold that while running a specific schedule the same way every time may in fact result in local inefficiencies (such as trains with very few cars or terminals that may be over staffed on some shifts), the macro level total cost of the operation is minimized. The second camp would hold that the total cost can be reduced by tactically adjusting the operation to reduce the number of local inefficiencies. These strategic approaches are linked to the view of the role of line managers as well. The operational model based railroad requires managers to be flexible and adjust their local operations to an ever changing pattern of trains, cars, locomotives and crews. The local managers also are expected to make quick, tactical decisions to adjust the operations to reduce inefficiencies both at the local and the network level. The planning model based railroad assumes that managers will anchor their local operation to the foundation of regular, routine, repeatable network operations. Over time, they will make finite adjustments to their many subprocesses that optimize their responsibility area. This fine tuning of the operation is not possible in a tactical operation due to the lack of stability. These strategic approaches are linked to the view of the role of line managers as well. The operational model based railroad requires managers to be flexible and adjust their local operations to an ever changing pattern of trains, cars, locomotives and crews. The local managers also are expected to make quick, tactical decisions to adjust the operations to reduce inefficiencies both at the local and the network level. The planning model based railroad assumes that managers will anchor their local operation to the foundation of regular, routine, repeatable network operations. Over time, they will make small adjustments to their many subprocesses that optimize their responsibility area. This fine tuning of the operation is not possible in a tactical operation due to the lack of stability. The CSX managers who sponsored this research chose to emphasize the planning part of the locomotive assignment problem for several reasons. First of all, they believe that the planning problem is of value in running the railroad. The CSX management philosophy is to operate a scheduled railroad and believes the inherent value of a repeatable, routine, scheduled set of decisions will ultimately not only minimize total locomotive costs but also total operating costs while improving the service product. Second, the planning system could be used as part of a network planning tool to evaluate which engines to buy in the future, and to study the impact of modifying their schedule. Third, any technology developed for the planning problem could possibly be extended to deal with tactical decisions in an operational setting. In this chapter, we consider the planning version of the locomotive scheduling model (LSM). We will now summarize the features of the LSM to give the reader a better understanding of the problem. A large railroad company has a train schedule which consists of several hundred trains with different weekly frequencies. Some trains run each day in a week, whereas others run less frequently. At CSX, there are several thousand train departures per week (assuming that we may count the same train running on different days multiple times). Many trains have long hauls and take several days to go from their origins to their destinations. To power these trains, CSX has several thousand locomotives of different types. Some locomotives are AC powered, some DC powered; they have different manufacturers, and some are more powerful than others. In LSM, we assign a set of locomotives to each train in the weekly train schedule so that each train gets sufficient tractive effort (that is, gets sufficient pulling power) and sufficient horsepower (that is, gets sufficient speed), and the assignment can be repeated indefinitely week to week. At the same time, assigning a single locomotive to a train is undesirable because if that locomotive breaks down, the train gets stranded on the track and blocks the movement of other trains. An additional feature of the LSM is that some locomotives may be deadheaded on trains. Deadheaded locomotives do not pull the train; they are just pulled by active locomotives from one place to another place. Deadheading plays an important role in locomotive scheduling models since it allows extra locomotives to be moved from the places where they are in surplus to the places where are in short supply. Locomotives also light travel; that is, they travel on their own between different stations to reposition themselves between two successive assignments to trains. A set of locomotives in light travel forms a group, and one locomotive in the group pulls the others from an origin station to a destination station. Light travel is different from deadheading of locomotives since it is not limited by the train schedule. In general, light travel is faster than deadheading. However, light travel is more costly as a crew is required to operate the pulling locomotive, and the transportation does not generate any revenue as there are no cars attached. Since we assign a set of locomotives (or a consist) to trains, we need to account for consistbusting. Whenever a train arrives at its destination, its consist is either assigned to an outbound train in its entirety, or its consist goes to the pool of locomotives where new consists are formed. In the former case, we say that there is a traintotrain connection between the inbound and outbound trains and no consistbusting takes place. In the latter case we say that consistbusting takes place. Consistbusting leads to mixing of locomotives from inbound trains and regrouping them to make new consists. This is undesirable from several angles. First, consistbusting requires additional locomotive time and crew time to execute the moves. Second, consistbusting often results in outbound trains getting their locomotives from several inbound trains. If any of these inbound trains is delayed, the outbound train is also delayed, which potentially propagates to further delays down the line. In an ideal schedule, we try to maximize the traintotrain connections of locomotives and thus minimize consistbustings. A major contribution of our research is to explicitly model the economic impacts of consist busting, and to reduce its impacts on the system. Moreover, a schedule that performs a lot of consistbusting may be too complex to be implementable in practice. Another important feature of the locomotive scheduling model is that we want a solution that is consistent throughout the week in terms of the locomotive assignment and traintotrain connections. If a train runs five days a week, we want it to be assigned the same consist each day it runs. If we make a traintotrain connection between two trains and if on three days in a week both trains run, then we want them to have the same train totrain connection on all three days. Consistency of the locomotive assignment and train totrain connections is highly desirable from an operational point of view. Another contribution of our research is that we model the effects of inconsistency, and try to reduce the inconsistency in a schedule. This chapter reports the development of a locomotive scheduling model that models the assignment of active and deadheaded locomotives to trains, light traveling of locomotives, consistency and consistbusting decisions in an integrated model. The objective in the model is to minimize the total cost, which is the sum of the active locomotive costs, deadheading costs, light travel costs, consistbusting costs, locomotive usage costs, and the penalty for using single locomotive consists. The solution is required to provide sufficient power to every train in a timely fashion to meet their prescribed schedules. We first describe a mixed integer programming formulation. Unfortunately, this MIP formulation is too large to be solved to optimality or nearoptimality. We solve this model heuristically using a combination of techniques taken from linear programming, integer programming, and neighborhood search algorithms. Locomotive scheduling problems are similar to the airline scheduling problems where one assigns planes of different types to flight legs. The planning version of the locomotive scheduling problem studied in this paper is similar to the well known fleet assignment model (see, for example, Subramanium et al. [1994] and Hane et al. [1995]), and the operational version of the locomotive scheduling problem is similar to the aircraft routing problem (see, for example, Barnhart et al. [1998]). However, the locomotive scheduling problem considered in this paper is substantially more difficult than the fleet assignment model (FAM). In the FAM, we assign a single plane to a flight leg, but in LSM we assign a set of locomotives to a train. In FAM, there is no deadheading, no light travel, and no consistbusting. Further, the popular and wellsolved FAM models assume that the flight leg schedule is the same each day of the week; that is, they solve the daily scheduling problem and repeat it each day of the week. But in the locomotive scheduling problem, we need to consider the weekly schedule of trains, and train schedules do not repeat on a daily basis. Hence, the LSM is combinatorially much harder to solve than the FAM. The locomotive division at CSX Transportation has developed inhouse software for the LSM which was developed, refined, and improved over a period of 10 years. This software has two main parts: consistbuilder and locomotive scheduler. The consist builder assigns active consists to trains; that is, which set of locomotives will actively pull the trains. This assignment is done based on train types, geography and additional business rules. The locomotive scheduler then routes locomotives in the weekly train network so that each train gets the desired active consist. In order to provide the desired active consists to trains, deadheading of the locomotives is often necessary. The locomotive scheduler considers each locomotive type one by one and solves a minimum cost flow problem to determine locomotive flow in the network. Breaking the LSM into two distinct parts leads to inefficiencies. When consistbuilder assigns active consists, it does not take into account how locomotives will flow in the network to provide those consists to trains. When locomotive flow is determined, then consists cannot be changed. Another source of inefficiency in their approach is that the locomotive scheduler solved the problem one locomotive type (or, one commodity) at a time. In addition, this approach did not handle light travel of locomotives (which was done manually) and was unable to model consistbustings. The planning solution provided by their software had very high consistbustings. As many as 85% of the trains had their consists busted. Our model integrates both parts of their system into a single model, treats all locomotive types simultaneously, and models the impacts of consistbustings, light travel, and deadheading. Our LSM model is substantially different than locomotive scheduling models studied previously by researchers. Single locomotive models have been studied by Forbes et al. [1991], and Fischetti and Toth [1997]. Multicommodity flow based models for planning decisions have been studied by Florian et al. [1976], Smith and Sheffi [1988], and Nou et al. [1997]. Multicommodity flow based models for operational decisions have been developed by Chih et al. [1990], and Ziarati et al. [1997, 1999]. Our multicommodity flow based model for planning decision has more features than any of the existing planning models. The locomotive scheduling problem is a very largescale combinatorial optimization problem. We formulate it as a mixed integer programming (MIP) problem, which is essentially an integer multicommodity flow problem with side constraints. The underlying flow network is the weekly spacetime network where arcs denote trains, nodes denote events (that is, arrival and departure of trains), and different locomotive types define different commodities. Since we assign only integer number of locomotives to trains, we get integer multicommodity flow problems. The constraints that the locomotives assigned to a train must provide sufficient tonnage and horsepower and that the number of locomotives of each type is in limited quantity gives rise to the side constraints. In addition, our formulation has fixed charge variables which result from modeling the light travel and consistbustings. Even when we ignore the consistency constraints, our formulation contains about 197 thousand integer variables and 67 thousand constraints, and is too large to be solved to optimality or nearoptimality using existing commerciallevel MIP software. We developed a methodology to solve the locomotive scheduling problem heuristically. By using linear programming, mixed integer programming, and very large scale neighborhood search techniques, we have attempted to obtain very good solutions of the locomotive scheduling problem. We solve the LSM in two stages. In the first stage, we modify the original problem so that all trains run seven days a week. This approximation of the original problem allows us to handle consistency constraints satisfactorily. In the second stage, we modify the solution of the first stage to solve the original problem where trains do not run all seven days a week. The first stage problem, though substantially smaller than the original problem, is still too large to be solved by the existing MIP software. The source of difficulty is the fixed charge variables introduced by modeling the light travel and consistbustings. We developed linear programming based greedy algorithms to determine the values of these variables. Once these variables were determined, the resulting MIP gave very good solutions quickly, usually within 10 minutes. We developed prototype software for our algorithms and compared our software with the inhouse software used by CSX. On one benchmark instance, for which CSX software required 1,614 locomotives to satisfy the train schedule, our software required only 1,210 locomotives, thereby achieving a savings of over 400 locomotives. We obtained similar improvements on other benchmark instances. In the solutions obtained by the CSX software, locomotives actively pull a train about 31.3% of the time, deadhead about 19.6% of the time, and idle at stations about 49.1% of the time. In the solutions obtained by our software, locomotives actively pull the train about 44.4% of the time, deadhead about 8.1% of the time, light travel about 0.8% of the time, and idle at stations about 46.7% of the time. This chapter is organized as follows. In Section 2.2, we describe the problem in greater detail and define our notation. In Section 2.3, we describe the spacetime network which will be the basis of all of our formulations. Section 2.4 describes the MIP formulation of the problem. In Section 2.5, we show the motivation for solving the problem in two stages, first as a daily scheduling problem followed by the weekly scheduling problem. Section 2.6 describes how we solve the daily scheduling problem, and Section 2.7 the weekly scheduling problem. In Section 2.8, we present a summary of our algorithmic approach. Section 2.9 presents the computational results of our approach and compares with the approach used at the CSX Transportation. Finally, Section 2.10 summarizes our contributions and outlines the future research issues. 2.2 Problem Details In this section, we give the details and notation of the locomotive scheduling problem used for planning at CSX. Train Data: Locomotives pull a set L of trains from their origins to destinations. The train schedule is assumed to repeat from week to week. Trains have different weekly frequencies; some trains run every day, while others run less frequently. We will consider the same train running on different days as different trains; that is, if a train runs five days a week, we will consider it as five different trains for which all data is the same except that they will have different departure and arrival times. We use the index / to denote a specific train. For the planning model, the train schedule is deterministic and prespecified. There are three classes of trains: Auto, Merchandise, and Intermodal. Each train belongs to exactly one class. The required tonnage and horsepower is specified. The tonnage of a train represents the minimum pulling power needed to pull the train. The tonnage depends upon the number of cars pulled by the train, weight of the cars, and the slope or ruling grade of that train's route. The horsepower required by the train is its tonnage multiplied by the factor that we call the horsepower per tonnage. The greater the horsepower per tonnage, the faster the train can move. Different classes of trains have different horsepower per tonnage. For greater model flexibility, we allow each train to have its own horsepower per tonnage. We associate the following data with each train 1. * deptime(1) : The departure time for the train 1. We express this time in terms of the weekly time as the number of minutes past Sunday midnight. For example, if the train I leaves on Monday 6 AM, then deptime(1) = 360; and if it leaves on Tuesday 6 AM, then deptime(l) = 1,800. * arrtime(1) : The arrival time for train / (in the same format as the deptime(1)). * depstation(l) : The departure station for train 1. * arrstation(l) : The arrival station for train 1. * 7T: Tonnage requirement of train 1. * 4,: Horsepower per tonnage for train 1. * H,: Horsepower requirement of train 1, which is defined as H1 = fT7. * E,: The penalty for using a single locomotive consist for train 1. Locomotive Data: A railroad company typically has several different types of locomotives with different pulling and cost characteristics and different number of axles (often varing from 4 to 9). Locomotives with different characteristics allow railroads greater flexibility in locomotive assignments, but also make the locomotive scheduling problem substantially more difficult. We denote by K the set of all locomotive types, and use the index k to represent a particular locomotive type. We associate the following data with each train k SK: * hk : Horsepower provided by a locomotive of type k. * ak : Number of axles in a locomotive of type k. * Gk : Weekly ownership cost for a locomotive of type k. * Bk : Fleet size of locomotives of type k, that is, the number of locomotives available for assignment. Active and Deadheaded Locomotives: Locomotives assigned to a train either actively pull the train or deadhead. Deadheading allows extra locomotives to be moved from places where they are in surplus to the places where they are in short supply. For example, more tonnage leaves a coal mine than arrives at the coal mine; so more pulling power is needed on trains departing from the mine. This creates a demand for locomotives at the mine. Similarly, more tonnage arrives at a thermal power plant than leaves it; so more pulling power is needed on trains arriving at the power plant. This creates a surplus of locomotives at the power plant. Effective deadheading of locomotives reduces the total number of locomotives used and improves the average locomotive utilization. We need the following data for trainlocomotive type combinations: * c:1 The cost incurred in assigning an active locomotive of type k to train 1. * d : The cost incurred in assigning a deadheaded locomotive of type k to train 1. * t : The tonnage pulling capability provided by an active locomotive of type k to train 1. The active cost c captures the economic asset cost of the locomotive for the duration of the train and the fuel and maintenance costs. The deadhead cost d, captures the same asset cost, a reduced maintenance cost, and zero fuel cost. Observe that the tonnage provided by a locomotive depends upon the train. Different train routes have different ruling grades (that is, slopes) and the pulling power provided by a locomotive type is affected by the ruling grade. Also specified for each train / are three disjoint sets of locomotive types: (i) MostPreferredl, the preferred classes of locomotives; (ii) LessPreferredl: the acceptable (but not preferred) classes of locomotives; and (iii) Prohibitedl, the prohibited classes of locomotives. CSX uses business rules based on train types and geographical considerations to determine these classes for each train. When assigning locomotives to a train, we can only assign locomotives from the classes listed as MostPreferredl and LessPreferredl (a penalty is associated for using LessPreferredl). Light Travel: Our model allows light travel of locomotives, that is, locomotives traveling in a group on their own between different stations to reposition themselves. Similar to deadheading, light travel can be an effective way to reposition locomotives. The light travel cost has a fixed component that depends upon the distance of travel in the light move since we need a crew, and a variable component that depends upon the number of locomotives light traveling. ConsistBusting: Consistbusting is a normal phenomenon in railroads because the needs for outgoing locomotives at a station do not precisely match the incoming needs. However, consistbusting incurs a cost in complexity of managing the system, and in delays in repositioning locomotives. Consistbusting can be reduced by a better scheduling of locomotives. We model the cost of consistbusting with a fixed component, B, per consistbusting and a variable component that depends upon the number of locomotives involved in the consistbusting. We will now describe the constraints in the LSM. The constraints can be classified into two parts: hard constraints (which each locomotive assignment must satisfy) and soft constraints (which are desirable but not always required to be satisfied). We incorporate soft constraints by attaching a penalty for each violation of these constraints. Hard Constraints: * Power requirement of trains: Each train must be assigned locomotives with at least the required tonnage and horsepower. * Locomotive type constraints: Each train I is assigned locomotive types belonging to the set MostPreferredl and LessPreferredl only. * Locomotive balance constraints: The number of incoming locomotives of each type into a station at a given time must equal the number of outgoing locomotives of that type at that station at that time. * Active axles constraints: Each train must be assigned locomotives with at most 24 active axles. This business rule is designed to protect the standard couplers used in North America. Exceeding 24 powered axles may result in overstressing the couplers and causing a train separation. * Consist size constraints: Each train can be assigned at most 12 locomotives including both the active and deadheaded locomotives. This rule is a business policy of CSX that reduces its risk exposure if the train were to suffer a catastrophic derailment. * Fleet size constraints: The number of assigned locomotives of each type is at most the number of available locomotives of that type. * Repeatability of the schedule: The number and type of locomotives positioned at each station at the beginning of the week must equal the number and type of locomotives positioned at that station at the end of the week. This ensures that the assignment of locomotives can be repeated from week to week. Soft Constraints: * Consistency in locomotive assignment: If a train runs five days a week, then it should be assigned the same consist each day it runs. CSX believes that crews will perform more efficiently and more safely if they operate the same equipment on a particular route and train. As the crews learn the operating nuances associated with each combination, they will adjust their throttle and braking control accordingly. * Consistency in traintotrain connections: If locomotives carrying a train to its destination station connect to another train originating at that station, then it should preferably make the same connection on each day both the trains run. This is useful to help terminal managers optimize their subprocesses associated with arriving and departing trains. * Same class connections: Trains should connect to other trains in the same class, e.g., auto trains should connect to auto trains; merchandise trains should connect to merchandise trains, etc. This is useful in that different trains have different preferred types of locomotives and may originate and terminate at different locations within a larger terminal area (an unloading ramp, for example). * Avoid consistbusting: Consistbusting should be avoided as much as possible. Objective Function: The objective function for the locomotive scheduling model contains the following terms: * Cost of ownership, maintenance, and fueling of locomotives * Cost of active and deadheaded locomotives * Cost of light traveling locomotives * Penalty for consistbusting * Penalty for inconsistency in locomotive assignment and traintotrain connections * Penalty for using single locomotive consists 2.3 SpaceTime Network We will formulate the locomotive scheduling problem as a multicommodity flow problem with side constraints on a network, which we call the weekly spacetime network. Each locomotive type defines a commodity in the network. We denote the spacetime network as G7 = (N7, A ), where N7 denotes the node set and A7 denotes the arc set. We construct the weekly spacetime network as follows. We create a train arc (1', /") for each train 1; the tail node 1' of the arc denotes the event for the departure of train I at depstation(l) and is called a departure node. The head node /" denotes the arrival event of train I at arrstation(l) and is called an arrival node. Each arrival or departure node has two attributes: place and time. For example, place(l) = depstation(l) and time(') = deptime(l). Similarly, place(l") = arrstation(l) and time(l") = arrtime(l). Some trains are calledforward trains and some trains are called backward trains. Forward trains are those trains for which deptime(l) > arrtime(l) and backward trains are those trains for which deptime(l) < arrtime(l). For example, a train that leaves on Monday and arrives at its destination on Tuesday is a forward train; whereas a train that leaves on Saturday and arrives on Monday is a backward train. (Recall that our timeline begins on Sunday at midnight.) To allow the flow of locomotives from an inbound train to an outbound train, we introduce ground nodes and connection arcs. For each arrival node, we create a corresponding arrivalground node with the same place and time attribute as that of the arrival event. Similarly, for each departure event, we create a departureground node with the same place and time attribute as that of the departure node. We connect each arrival node to the associated arrivalground node by a directed arc called the arrival ground connection arc. We connect each departureground node to the associated departure node through a directed arc called the grounddeparture connection arc. We next sort all the ground nodes at each station in the chronological order of their time attributes, and connect each ground node to the next ground node in this order through directed arcs called ground arcs. (We assume without any loss of generality that ground nodes at each station have distinct time attributes.) The ground nodes at a station represent the pool (or storage) of locomotives at the station at different instants of times, when events take place. As trains arrive, they bring in locomotives to the pool through arrivalground connection arcs. As train departs, they take out locomotives from the pool through grounddeparture connection arcs. The ground arcs allow inbound locomotives to stay in the pool as they wait to be connected to the outbound trains. We also connect the last ground node in the week at a station to the first ground node of the week at that station through the ground arc; this ground arc models the ending inventory of locomotives for a week becoming the starting inventory for the following week. We also model the possibility of an inbound train sending its entire consist to an outbound train. We capture this possibility by creating traintrain connection arcs from an arrival node to those departure nodes whenever such a connection can be feasibly made. Railroads have some business rules about which traintrain connections can be feasibly made. The arrival nodes i" for a train i can be connected to a departure nodej' for train provided minconnectiontime < deptimeo) arrtime(i) < maxconnection time, where minconnectiontime and maxconnectiontime are two specified parameters. For example, minconnectiontime = 120 (in minutes) and maxconnectiontime = 480. We also allow the possibility of light travel, that is, several locomotives forming a group and traveling on their own as a group from one station to another station. Using a method described later in Section 2.6.4, we create possibilities for light travel among different stations. We create a light arc in the weekly spacetime network corresponding to each light travel possibility. Each light arc originates at a ground node (with a specific time and at a specific station) and also terminates at a ground node. Each light arc has a fixed charge which denotes the fixed cost of sending a single locomotive with crew from the origin of the light arc to its destination. We denote this fixed charge for a light travel arc / by Fl. The light arc also has a variable cost which depends upon the number of locomotives light traveling as a group. To summarize, the weekly spacetime network G = (N, A) has three types of nodes  arrival nodes (ArrNodes), departure nodes (DepNodes), and ground nodes (GrNodes); and four kinds of arcs train arcs (TrArcs), connection arcs (CoArcs), ground arcs (GrArcs) and light travel arcs (LiArcs). Let AllNodes = ArrNodes u DepNodes u GrNodes, and AllArcs = TrArcs u CoArcs u GrArcs u LiArcs. We show in Figure 21, a part of the weekly spacetime network at a particular station, which illustrates various kinds of arcs. Train Arcs Ground Nodes / 1 Train Arcs Arrival / \ Nodes I I p Train 1 Nod O Train 1 : .... ) I Departure ***... I Nodes Time ::: **: Train 4O S Train 2. .. .....Train 5 Ir0 OT) Train 3 ..*.. ... I . 'f".' :j Train 6 Train arcs: Connection arcs: ......... Ground arcs:  Figure 21. A part of the weekly space time network We will formulate the locomotive scheduling problem as a flow of different types of locomotives in the weekly spacetime network. Locomotives flowing on train arcs either are active or deadheading, those flowing on light arcs are light traveling, and those flowing on connection arcs are idling (that is, waiting between two consecutive assignments). We shall use the following additional notation for the weekly spacetime networks in our MIP formulations: * I [i]: Set of incoming arcs into node i e AllNodes . * O [i]: Set of arcs emanating from node i e AllNodes. * tail(l): The tail node of arc / e AllArcs. * head (1): The head node of arc / e AllArcs. * F : This cost term denotes the cost of an (active) light traveling locomotive with crew on a light arc / e LiArcs. This cost includes the crew cost as well. If several locomotives light travel on an arc, then only one locomotive is active while others deadhead. For simplicity, we assume that the cost term is independent of the locomotive type pulling the consist. * d : Recall that in Section 2.2, we defined dk as the cost of deadheading of locomotive type k on train arc 1. We now define it for every arc / e AllArcs. For a light arc / e LiArcs dk captures the cost of traveling for a nonactive locomotive of locomotive type k on arc 1. For a connection arc I E CoArcs u GrArcs, d7 captures the cost of idling for locomotive type k on arc 1. * CB: The set of all connection arcs from arrival nodes to ground nodes. These are the arcs on which positive flow represents consistbusting. Alternatively, CB = {(i, j) e AllArcs: i e ArrNodes andj e GrNodes}. * CheckTime : It is a time instant of the week when no event takes place; that is, no train arrives or departs at any station. We will henceforth assume that CheckTime is Sunday midnight. * S: The set of arcs that cross the CheckTime; that is, S = {(i,j) e AllArcs: time(i) < CheckTime < time() }. 2.4 The Mixed Integer Programming Formulation In this section, we present the mixed integer programming (MIP) formulation of the locomotive scheduling model. Decision Variables: * x : Integer variable representing the number of active locomotives of type k e K on the arc / E TrArcs; * y : Integer variable indicating the number of nonactive locomotives (deadheading, lighttraveling or idling) of type k e K on the arc / e AllArcs; 35 * z : Binary variable which takes value 1 if at least one locomotive flows on the arc / e LiArcs u CoArcs, and 0 otherwise; * w,: Binary variable which takes value 1 if there is a flow of a single locomotive on arc / e TrArcs, and 0 otherwise; * sk : Integer variable indicating the number of unused locomotives of type k e K. Objective Function: minz= c c X+ I dfy~+ I F;z,+ Bz, lETrArcs kEK l AllArcs kEK IELArcs IECB (2. a) + Y E11 GkSk leTrArcs keK Constraints: tjx > T,, for all Ie TrArcs, (2.1b) kEK Y hkx > 1T,7, for all / e TrArcs, (2.1c) kEK Sakx < 24, for all e TrArcs, (2.1d) kEK S(xj + y) < 12, for all /e TrArcs, (2.1e) kGK S(xk + y)= ) (x + yk), for all i AllNodes, for all k e K, (2.1f) lGI[z] Gto [z] yI <12z,, for all / CoArcs LiArcs, (2.1g) kEK Sz, = 1, for all i ArrNodes, (2. h) z = 1, for all i DepNodes, (2. i) (x +y)+w, w> 2, for all le TrArcs, (2.1j) keK Z(xy + y)+sk Bk, for all k e K, (2.1k) leS x y _> 0 and integer, for all l e TrArcs, for all k e K, (2.11) z, e {0, 1}, for all le CoArcs uLiArcs, (2.1m) w, e {0, 1}, for all e TrArcs. (2.1n) We now give some explanation for the above formulation to show that it correctly represents the LSM. We first discuss the constraints. The constraint (2.1b) ensures that the locomotives assigned to a train provide the required tonnage, and the constraint (2.1c) ensures that the locomotives assigned provide the required horsepower. The constraint (2. Id) models the constraint that the number of active axles assigned to a train does not exceed 24. The constraint (2. 1e) models the constraint that every train is assigned at most 12 locomotives. The flow balance constraints (2. If) ensures that the number of incoming locomotives equal the number of outgoing locomotives at every node of the weekly spacetime network. The constraint (2. Ig) makes the fixed charge variable zz equal to 1 whenever a positive flow takes place on a connection arc or a light arc; this constraint also ensures that no more than 12 locomotives flow on any light arc. The constraint (2.1h) states that, for each inbound train, all the inbound locomotives use only one connection arc; either all the locomotives go to the associated ground node (in which case consistbusting takes place) or all the locomotives go to another outbound train (in which case consistbusting does not take place and there is a traintotrain connection). The constraint (2. li) states that for each outbound train all the outbound locomotives either come from a ground node or all the locomotives come from an incoming train. The constraint (2. lj) makes the variable w, equal to 1 whenever a single locomotive consist is assigned to train 1. Finally, the constraint (2.1k) counts the total number of locomotives used in the week; which is the sum of the flow of locomotives on all the arcs crossing the CheckTime. The difference between the number of locomotives available minus the number of locomotives used gives the number of locomotives saved (sk). We now discuss the objective function (2. la) which contains six terms. The first term denotes the cost of actively pulling locomotives on train arcs. The second term captures the cost of deadheading locomotives on train and light travel arcs, and the cost of idling locomotives. We also include the variable cost of consistbusting in the definition of the term d, for each arc/ e CB. The third term, lLFArcs Fz, denotes the fixed cost of light traveling locomotives. The fourth term, CBBz,, denotes the fixed cost of consistbusting. The fifth term, YE, I ~ denotes the penalty associated with the single locomotive consists; and the sixth term, EkEKGkI, represents the savings accrued from not using all the locomotives. Observe that the formulation (2.1) assumes that any locomotive type can flow on any train arc. But recall from our discussion in Section 2 that each train arc / has MostPreferredl, LessPreferredl, and Prohibitedl sets of locomotives. We handle these constraints in the following manner. To the formulation (2.1) we add the constraints x = 0 for each k e Prohibitedl and each I e TrArcs. This constraint ensures that prohibited locomotives are never used on train arcs. To discourage the flow of locomotive types belonging to the LessPreferred sets, we multiply cf by a suitable parameter larger than (for example, 1.2) for each k e LessPreferredl and each I e TrArcs. Our formulation (2.1) incorporates all the hard constraints described in Section 2, but not all the soft constraints. The formulation does not incorporate the consistency constraints. Including those constraints would make the formulation unmanageably large. We, however, do handle the same class constraints implicitly in the definition of the term d If a traintrain connection arc / is not the same class connection arc, we multiply its d value by a constant parameter greater than 1, which penalizes the use of these arcs. By suitably selecting the value of this parameter, we can satisfy the same class constraints to varying degrees. We can also obtain different levels of consistbusting by selecting different values of the consistbusting cost B. The greater the value of B we choose, the less will be the amount of consistbusting in an optimal solution. In the data provided to us by CSX, there were 538 trains, each of which operate several days in a week, and 5 locomotive types. The weekly spacetime network consisted of 8,798 nodes and 30,134 arcs. The MIP formulation (2.1) consisted of 197,424 variables and 67,414 constraints. This formulation could not be solved to optimality or nearoptimality using the state of the art commercial software. As a matter of fact, we were unable to solve even the linear programming (LP) relaxation of the problem. When we solved the LP relaxation of a much smaller problem, we found that the LP solution was highly fractional. Most of the variables were noninteger and the integer programming algorithm did not find a good integer solution in several hours. In addition, our MIP formulation (2.1) omits the consistency constraints that the same train running on different days should have the same locomotive assignment. In our formulation, a train running on different days is treated as separate trains and their locomotive assignments can be quite different. In principle, we can add new constraints to enforce the consistency constraints, but that would be impractical as it would increase the size of the MIP substantially. Hence, satisfying the consistency constraints by introducing new constraints did not seem to be a feasible option. Rather we developed an alternative approach that simultaneously helped enforce consistency while dramatically reducing the problem size. We describe our approach in the next section. 2.5 Simplifying the Model We next analyzed the number of trains running with different frequencies in a week for CSX. The Table 21 shown gives these numbers. The first column in the table gives the train frequency in a week; that is, how often the trains run in a week. The second column in the table gives the number of trains in the train schedule with the frequency given in the first column. For example, in the train schedule, there are 372 trains that run all seven days a week, there are 62 trains that run six days a week, and so on. The third column is a product of the first and second columns, the fourth column gives a cumulative sum of the third column, and the fifth column expresses the values in the fourth column in the percentage notation. Observe that the third column gives the number of train arcs in the weekly spacetime network for trains with different frequencies. The table shows that 94% of the train arcs in the spacetime network correspond to the trains that run 5, 6, or 7 days. Table 21. Analysis of trains and their frequencies Train r Cum. Cumulative Number of Frequency Trains (B) A*B Sum of Percentage Trains (B) (A) A*B A*B 7 372 2,604 2,604 78% 6 62 372 2,976 90% 5 29 145 3,121 94% 4 24 96 3,217 97% 3 20 60 3,277 99% 2 16 32 3,309 100% 1 15 15 3,324 100% We now state an approximation that reduces the size of the MIP substantially and also helps us satisfy the consistency constraints. We create a daily locomotive scheduling model that is a simplification of the weekly locomotive scheduling model in the following manner. Each train with a frequency ofp days per week or larger is a train in the daily model. Each train with frequency strictly less than days is not included in the daily model. After some analysis and testing, we chosep = 5. So, if a train has a frequency of 4 or less in the weekly model, we eliminate it from our daily model. Our daily model is roughly seven times smaller than the weekly model, and accordingly much easier to solve. In addition, since we repeat the train's daily schedule for each day of the week, the solution automatically satisfies the consistency constraints. Hence this simplification achieves both of our goals, which is to reduce the problem size and achieve consistency of the solution. The solution to the daily model is not feasible for the weekly model. It assigns locomotives to some train arcs that do not exist (those trains that run 5 or 6 days per week) and does not assign locomotives to train arcs that exist (those trains that run 4 days per week or fewer). But for the CSX data, the approximation we make is relatively small compared to the size of the problem. With our choice ofp = 5, we assign locomotives to 120 train arcs that do not exist in the weekly model and do not assign locomotives to 203 train arcs that do exist in the weekly model. These numbers are small compared to the total number of train arcs, which is 3,324. We take the solution for the daily model and transform it to a feasible solution to the weekly model in a separate algorithm. We thus solve the locomotive scheduling problem in two stages. The first stage solves the daily locomotive scheduling problem, and the second stage takes in the daily locomotive schedule and modifies it to obtain the weekly locomotive schedule. We will in the next few sections focus on the daily locomotive scheduling problem, and return to the weekly locomotive scheduling problem in Section 2.7. In our investigations, we chose p = 5 primarily because the solution of the model with = 5 was more easily converted to a solution of the weekly locomotive scheduling problem than other values of p. 2.6 Solving the Daily Locomotive Scheduling Problem In this section, we describe how to solve the daily scheduling problem. We describe (i) how to construct the daily spacetime network and formulate the MIP for the daily scheduling problem; and (ii) how to solve the daily locomotive scheduling problem using a decompositionbased approach. 2.6.1 Constructing the Daily SpaceTime Network and Formulating the MIP The daily spacetime network is constructed for the daily locomotive scheduling problem where each train is assumed to run each day of the week. It is constructed in a similar manner to the way in which we construct the weekly spacetime network. We represent the daily spacetime network as G' = (N', A'). The daily spacetime network is about seven times smaller than the weekly spacetime network. In the daily model, the departure time is the number of minutes past midnight that the train departs, and the arrival time is the number of minutes past midnight that the train arrives. The day of the week does not play a role in this daily model. For a train 1, let day(l) denote the number of times the train will cross the midnight time line as it goes from its origin to its destination. For example, consider a train that leaves station A on 7 AM on one day and arrives at 4 PM two days later at Station B. For example, the train starts on Monday at 7 AM and arrives at 4 PM on Wednesday. In this case, day(/) = 2. If this train were to repeat each day in our weekly model, then two copies of the train would cross the time line at midnight on Sunday the train that starts at 7 AM on Saturday and ends at 4PM on Monday, and the one that starts at 7 AM on Sunday and ends at 4 PM on Tuesday. In general, if day(l) = k in our daily model, then there are k copies of the train I that cross the midnight at Sunday time line in our weekly model. Therefore, assigning a locomotive in our daily model to a train I with day(l) = k corresponds to assigning k locomotives of the same type in the weekly model. To account for the impact of day(l), we modify the fleet size constraint of the locomotive scheduling problem as follows: S(xk\ + y)day(l) sk Bk, for all k K. IES The rest of the formulation of the locomotive scheduling problem (2.1) on the daily spacetime network is identical to the one given earlier. 2.6.2 Solving the MIP for the Daily Scheduling Problem Though the spacetime network for the daily scheduling problem was substantially smaller than the spacetime network for the weekly scheduling problem, we found it to be too large to be solved to optimality or nearoptimality. The daily locomotive scheduling problem consisted of 463 train arcs, and the daily spacetime network contained 1,323 nodes and 30,034 arcs. The MIP formulation consisted of 22,314 variables and 9,974 constraints. The LP relaxation took a few seconds to solve but the MIP did not give any integer feasible solution in 72 hours of running time. We conjecture that the biggest source of difficulty was the presence of fixed charge variables zl (for connection and light arcs) which take value 1 whenever there is a positive flow on arc 1. It is well known that MIPs with many fixed charge variables often produce weak lower bounds. In order to obtain high quality feasible solutions and to keep the total running time of the algorithm small, we decided to eliminate the fixed charge variables from the MIP formulation using heuristics. The heuristics also allowed us greater flexibility in determining what kind of solution we want. In our formulation, we have two kind of fixed charge variables one corresponding to connection arcs, and the other corresponding to light arcs. We will first consider the fixed charge variables corresponding to the connections arcs, followed by the fixed charge variables corresponding to light arcs. We also consider some cases in which fixed charge variables can be eliminated without any loss of generality. 2.6.3 Determining TrainTrain Connections Train companies often specify some "hardwired" traintrain connections, that is, they specify some inbound trains whose consist must go to the specified outbound trains. These hardwired traintrain connections are easy to enforce. If the inbound train i at a station is hardwired to the outbound train at that station, then in the spacetime network we create the traintrain connection arc (i",j) and do not allow any other connection arc to emanate node i" or enter node'. This arc is the only connection arc leaving node i" and the only connection arc entering node'. This will ensure that all locomotives brought in by the inbound train i directly go to the outbound train without consistbusting. In this case, there will be no fixed charge variables corresponding to the trains i andj. Sometimes, a station has a unique inbound train and a unique outbound train. If this station has no light traveling locomotives coming into it, then all the locomotives brought in by the inbound train will be automatically assigned to the outbound train. Hence, there will be no consistbusting and there will be no need for fixed charge variables. Sometimes, a station has one inbound train and two outbound trains, or it has two inbound trains and one outbound trains. In these cases too, consistbusting cannot be avoided and there is no need to introduce any traintrain connection arcs. Again, there will not be any fixed charge variables; all inbound trains) send their locomotives to the ground node, and all outbound trains) will get their locomotives from the ground node. Railroad companies also have rules about which traintrain connections are permissible or desirable. The difference between the arrival time of the inbound train and the departure time of the outbound train must be between some specified lower and upper bounds in order for a valid traintrain connection to be made. They also prefer connections between trains of the same class; that is, auto trains sending locomotives to auto trains and merchandize trains to the merchandize trains, etc. They also want that the tonnage and HP requirements of the two trains be similar in order for it to be a desirable traintrain connection. Using these business rules, we determine the set of all "candidate" traintrain connections. In the next step, we will "fix" some of these candidate traintrain connections into hardwired traintrain connections and all "unfixed" trains will send (or receive) locomotives to (from) ground nodes. Using these heuristics we eliminate fixed charge variables corresponding to consistbusting in our model. We fix some candidate traintrain connections by solving an iterative procedure that solves a sequence of linear programming relaxations of the daily locomotive scheduling problem given in Section 2.6.1 with some changes. We start with a daily spacetime network containing all the candidate traintrain connection arcs and candidate light arcs. We next solve the linear programming relaxation of the locomotive scheduling model where there are no fixed charge variables and constraints (that is, constraints (2. g) through (2. i) and all the traintoground and groundtotrain connections have a large cost, to discourage the flow on such arcs. This is an alternative way of discouraging consistbusting. Let a(l) denote the total flow of locomotives (of all types) on any arc / in the daily spacetime network. We next select a candidate traintrain connection arc h with the largest value of a(h). This arc indicates a good potential traintrain connection. We make this connection arc the unique connection arc for the two corresponding trains, that is, we make it mandatory for the inbound train to send its locomotive to the corresponding outbound train, and resolve the linear programming relaxation. If this linear programming relaxation is infeasible or increases the cost of the new solution by an amount greater than /, we do not make this traintrain connection; otherwise we keep this connection. In any case, we remove arc h from the list of candidate traintrain connections. This completes one iteration of our procedure to fix traintrain connections. We select another candidate traintrain connection arc h with the largest value of a(h) in the current flow solution, and repeat this process until either we have reached the desired number of traintrain connections (as specified by some parameter y), or the set of candidate traintrain connections becomes empty. Our method of identifying the traintrain connections is a greedy method. It identifies a promising choice, makes it, and resolves the LP problem to assess the impact of this choice. If it turns out to be a bad choice, it is ignored; otherwise, it is made. By suitably identifying the values of the two parameters / and y, we can govern the behavior of the algorithm. By choosing the higher value of /, we can increase the number of train train connections. We can also increase the number of traintrain connections by increasing the value of the parameter y. We show in Section 2.9 that using this heuristic technique we were able to increase the number of traintrain connections to 72%, which was substantially higher than the goals originally set by our industry sponsor. In fact, 72% was originally not considered an achievable goal. The parameters 3 and y need to be assigned right values so that we get the desired consistbusting. We used 3 = $1,000, and varied y to get different levels of consistbustings. 2.6.4 Determining Light Travel Arcs Light travel of locomotives plays an important role in locomotive scheduling and can substantially impact the quality of the solution. Incorporating light travel in the locomotive scheduling model requires two decisions: (i) candidate light arcs: what should be the light travel arcs in the spacetime network; and (ii)flow on light travel arcs: which locomotives will flow on the candidate light arcs. In principle, we could allow light travel of locomotives from any station to any station at any time of the day. To capture all these possibilities of light travel in our network, we would need to add a large number of arcs in the daily spacetime network. This would increase the size of the network substantially and also the number of flow variables. In addition, since we associate a fixed charge variable with each candidate light arc, the number of fixed charge variables would be very high. Rather than introducing a large number of light travel arcs, we developed a heuristic procedure to create a small but potentially useful collection of light travel arcs, and another heuristic procedure for selecting a subset of these arcs for light travel. We now describe these procedures in greater detail. Our first procedure determines the candidate light travel possibilities. For each such arc, we need to decide its origin station, its start time, its destination station, and its end time. The end time can be computed from the origin station, its start time, and its destination station if we know the average speed of the light traveling locomotives. In the railroad network, light traveling locomotives typically travel from "power sources" (stations where inbound trains require substantially more tonnage/horsepower than the outbound trains) to "power sinks" (stations where outbound trains require substantially more tonnage/horsepower than the inbound trains). We first construct the space network, which is the same as the daily spacetime network described in Section 2.6.1 except that we ignore the time element. Equivalently, we shrink all the station nodes with different times into a single station node. We next determine the additional availability of pulling power at the power sources and the additional demand for pulling power at the power sinks in the space network of our weekly model. To incorporate both horsepower and tonnage constraints simultaneously, we translate this information into the number of locomotives of some standard type, such as, SD40. This gives us node imbalances of locomotives in the space network. We then solve a minimum cost flow problem (see, for example, Ahuja, Magnanti and Orlin [1993]) in the space network to determine the optimal locomotive flow in the network. If there is a positive flow of locomotives on arc (i,j) in the space network greater than some threshold value (say, two locomotives), then we create candidate light travel arcs from city i to city in the spacetime network departing from city i every 8 hours. For the data provided to us by CSX, we found 58 arcs in the space network with flow greater than 2 locomotives and we created 174 candidate light arcs in the spacetime network. In our formulation described before, we need to create a fixed charge variable for each candidate light arc and we cannot solve the formulation for these many fixed charge variables in the required time. Our second procedure eliminates the fixed charge variables. From the list generated by the previous heuristic, it selects a small subset of light arcs and assumes that there will be light travel on these arcs. The procedure works as follows. It first solves a linear programming formulation of the locomotive scheduling problem where all the candidate light arcs are added. It then removes all those light arcs which have zero flow. Let a(l) denote the total number of locomotives flowing on an arc 1. We then perform the following iterative step. We select the light arc / with the smallest value of flow a(l). Suppose this is arc q. We delete arc q from the network and solve the LP relaxation of the locomotive scheduling problem. If the deletion of this light arc causes the total cost of flow (of the LP relaxation) to go up by at least 7 units, we do not delete this arc; otherwise we delete this arc and replace a by the new flow. We repeat this process until there are no unexamined light arcs. The number of light arcs generated by this module crucially depends upon the value of the parameter 17. If we increase the value of r7, then we will increase the number of arcs deleted from the network which will result in lesser number of light arcs being generated. Hence, by assigning suitable values to this parameter, one can generate appropriate number of light arcs. We used r = $1,000 in our implementation. 2.6.5 Determining Active and Deadheaded Locomotive Flow Variables As described before, the use of heuristics to determine traintrain connections and light travel arcs eliminates the fixed charge variables. We next determine the remaining variables that are the active and deadheaded locomotives on arcs in the network. To determine these variables, we solve the following integer programming problem: Objective Function: minz= c + dy + C Ew ZGksk (2.2a) leTrArcs keK leAllArcs keK leTrArcs keK Constraints: tjx > T7, for all le TrArcs, (2.2b) kGK hk kx >,17, for all le TrArcs, (2.2c) kGK Sakx < 24, for all e TrArcs, (2.2d) kGK Z(xk +y) < 12, for all / e TrArcs LiArcs, (2.2e) kGK S(xk + yk)= (x + yk), for all i AllNodes, for all k e K, (2.2f) /I[D] 0too[] (xk + y k)+ w1 >2, for all e TrArcs, (2.2g) kGK (x + ) day(l) + sk = Bk, for all k K, (2.2h) IeS x, y > 0 and integer, for all e TrArcs, for all k E K, (2.2i) w, e {0,1}, for all le TrArcs. (2.2j) We refer to a solution of (2.2) by (x, y), since w can be deduced using the solution (x, y). The integer programming model here is much easier to solve than the model described in Section 2.6.1. It does not contain fixed charge variables and has fewer locomotive flow variables. For the locomotive scheduling problem we solved, it had 2,315 xk variables, 6,120 yk variables, 463 w, variables, and 7,782 constraints. We solved (2.2) using CPLEX 7.0, and set the CPLEX parameters so that a very good integer solution is obtained in the early part of the branch and bound algorithm. We found that CPLEX 7.0 gave a very good solution within 15 minutes of execution time, but it did not terminate even when it was allowed to run for over 48 hours. We also found that the algorithm, when run for 24 hours, did not improve much over the best integer solution obtained within 15 minutes; hence prematurely terminating the algorithm after 15 minutes did not affect much the quality of the solution obtained. 2.6.6 Neighborhood Search Algorithm The integer solution obtained by the integer programming software CPLEX 7.0 is not, in general, an optimal solution of the locomotive scheduling problem. We found that this solution can be easily improved by a modest perturbation of the solution. We used a neighborhood search algorithm to look for possible improvements. A neighborhood search algorithm typically starts with an initial feasible solution and repeatedly replaces it by an improved neighbor until we obtain a solution which is at least as good as its neighbors. At this point the current solution is called a local optimal solution (Aarts and Lenstra [1997]). We call a neighborhood search algorithm a Very LargeScale Neighborhood (VLSN) Search Algot itlin if the size of the neighborhood is very large, possibly exponential in terms of the input size parameters. We use the solution obtained by the integer programming software as the starting solution and improve it using a VLSN search algorithm. The locomotive scheduling problem can be conceived of as a multicommodity flow problem with side constraints in the spacetime network where the flow of each locomotive type defines a commodity. When viewed in this manner, the constraints (2.2f) define the flow balance constraints of each commodity and the remaining constraints define the side constraints. The multicommodity flow problem is polynomially solvable when the flow variables x and y\ take real values, but is NPcomplete when flow variables are required to take integer values. (For the time being, we are ignoring the fixed penalty for single locomotive trains captured by the constraints (2.2g).) We define the neighborhood for a feasible solution (x, y) of (2.2) as follows: For a specified value of k e K, send 6 > 0 locomotives of type k along a cycle in the daily spacetime network so that the flow balance and all side constraints remain satisfied. The new solution is a lower cost solution (or a better neighbor) if the cycle along which the flow is sent is a negative cost cycle. In this neighborhood, the neighborhood search algorithm would proceed by identifying negative cost cycles with respect to a given solution (x, y) and a locomotive type k and augmenting flows along these cycles until there is no negative cost cycle for any locomotive type k. We now describe how we identify negative cost cycles for a given locomotive type k. Let a, denote the total number of locomotives of type k on arc / (that is, a, = x4 + y ). We first create a residual network G(a, k), similar to those used in solving minimum cost flow problems (see, for example, Ahuja, Magnanti and Orlin [1993]). We consider each arc / e AllArcs and add arcs to the residual network in the manner described below: * Case 1: If we can send additional locomotives of type k on arc 1, then we add arc 1 to the residual network. The capacity uj of the arc / is equal to the maximum number of locomotives of type k that can be sent on arc / without violating any of constraints in (2.2b)(2.2e) and (2.2h)(2.2j). The cost fk of the arc is equal to the increase in the cost of sending one additional locomotive on the arc 1. * Case 2: If we can reduce locomotives of type k on arc 1, then we add the reversal of arc 1, say, arc / to the residual network. The capacity u of the arc / is equal to the maximum number of locomotives of type k that can be reduced on arc / without violating any of constraints in (2.2b)(2.2e) and (2.2h)(2.2j). The cost fk of the arc / equals the decrease in the cost of sending one fewer locomotive of type k on arc 1. For any negative cost directed cycle Win the residual network, there is a way to improve in the current solution. If the cost of cycle W is c, and if its capacity is units (the capacity of W is the minimum capacity of an arc in W), then 3 locomotives of type k can be sent around the cycle W resulting in a total savings of 8c There exist several efficient negative cycle detection algorithms (see, for example, Ahuja, Magnanti and Orlin [1993], and Goldberg et al. [1995]), and any of these algorithms can be used to identify negative cycles. The neighborhood for a given solution (x, y) is defined so that each neighbor is any solution that can be obtained by sending one or more units of flow around one of the directed cycles in the residual network. The number of directed cycles in each residual network can be very large and may not be polynomially bounded in terms of the number of nodes and arcs in the network. Hence our neighborhood search algorithm is a very largescale neighborhood (VLSN) search algorithm. In the VLSN search algorithms, the size of the neighborhood is too large to be searched explicitly and we use implicit enumeration methods to identify improved neighbors. Algorithms based on VLSNs have been successfully used in the context of optimization problems (Ahuja et al. [2001 a, 200 b, 2001c, 2002]). To apply this algorithm, we start with a feasible solution of the locomotive scheduling problem, select a locomotive type k, construct the residual network, identify negative cycles in it, and send maximum possible flow along this cycle. We then update the residual network and again send flow along a negative cycle. We repeat this process until there is no negative cycle in the residual network. At this time, we select another locomotive type k' and reapply the method. We terminate when no negative cycle is found for any locomotive type. This algorithm, when implemented, ran very efficiently. We were able to obtain a local optimal solution in a few seconds of computer time. The algorithm obtained some improvements over the solution obtained by CPLEX. Although our neighborhood was quite large, ultimately we decided that it was not large enough. The side constraints (2.2h) were often tight and did not permit many locomotives to be rerouted without violating the constraints. In order to find more substantial improvements, we need to permit flows to change in many arcs simultaneously. This observation motivated us to consider another neighborhood that we describe next. This neighborhood can be considered as a specific implementation of the concept of referent domain optimization briefly described in Glover and Laguna [1997]. Let (x, y) be a feasible solution of (2.2). We call a solution (x, y) a neighbor of (x, y) if (x,y) is feasible for (2.2b) (2.2j) and it differs from (x, y) for one locomotive type only, that is x' = x' and y' = y' for all q e K \{k} for some locomotive type k. In other words, all the feasible locomotive flows that can be obtained by changing the locomotive flow for one locomotive type only define the neighborhood of the solution (x, y). Mathematically, all the solutions of the following integer program define the neighborhood of the solution (x, y) . Objective Function: min zk= I c + dy+ I Ew Gksk (2.3a) /lTrArcs lAllIArcs l/TrArcs Constraints: tx > T I xj, for all e TrArcs, (2.3b) qEK\{k} hk x, >T h'x,, forall le TrArcs (2.3c) qGK\{k} akx < 24 aqq, for all / e TrArcs, (2.3d) qgK\{k} x+ yl<12 (x+ ), forall e TrArcs LiArcs, (2.3e) qGK\k)} S(x + y) = ( + y), for all i AllNodes (2.3f) le ( ) leO( ) x + y + w > 2 ( (xk + Y), for all l/ TrArcs, (2.3g) qGK\{k} (x + y )day(l)+sk = B, (2.3h) leAllArcs xj, y > 0 and integer, for all e TrArcs, (2.3i) w, e {0,1}, for all e TrArcs. (2.3j) This new neighborhood subsumes our previous cyclebased neighborhood and is also a very largescale neighborhood. We call the solution (x, y) a local optimal solution if (x, y) is an optimal solution of (2.3) for each k e K. Thus, a solution (x, y) is a local optimal solution of the locomotive scheduling problem if each single locomotive type is optimally scheduled when the schedule of other locomotive types is not allowed to change. Though (2.3) is an integer programming problem with 2,168 variables and 3,437 constraints, CPLEX solved to optimality within a few seconds. To summarize, we take the solution provided by the integer programming software for the daily scheduling problem (2.3) as the starting solution of our neighborhood search algorithm and solve a sequence of problems (2.3) for all locomotive type q e K. We stop when the solution cannot be improved for any locomotive type. The solution at this stage is a local optimal solution. 2.7 Solving the Weekly Locomotive Scheduling Problem We now describe how we solve the weekly locomotive scheduling problem. Recall from our discussion in Section 2.5 that to handle the consistency constraints and to keep the problem size manageable, we solve the problem in two stages. The first stage assumes that all trains run every day of the week. To satisfy this assumption, we eliminate trains which run fewer than p days (for example, p = 5), and all other trains are assumed to run every day of the week. When we apply the solution of the daily scheduling to the weekly scheduling problem by repeating it every day, then we provide locomotives to some trains that don't exist and do not provide locomotives to those trains that do exist. To transform this solution into a feasible and effective solution for the weekly scheduling problem, we take locomotives from the trains that exist in the daily problem but do not exist in the weekly problem and assign them to the trains that do not exist in the daily problem but exist in the weekly problem, and possibly use additional locomotives to meet the constraints. In this section, we describe this method in greater detail. We define some notation to simplify the presentation. There are two kinds of trains in the locomotive scheduling problem: (i) 0 : trains that operate p or more days a week; and P : trains that operate fewer than p days a week. Let c1 denote the set of train arcs corresponding to the trains in 0 in the daily spacetime network G', and D7 denote the set of train arcs corresponding to the trains in 0 in the weekly spacetime network G7 Observe that each arc in c' induces p or more corresponding arcs in 7 Let 7 denote the set of train arcs corresponding to the trains in P in the weekly spacetime network G7 Observe that trains in P do not have any corresponding train arc in G1. Also observe that in the weekly spacetime network, TrArcs = t7 u P7. Suppose that the optimal solution for the daily locomotive scheduling problem produces the following solution: k * xk : The number of active locomotives of type k assigned to train arc / (1. * ylk : The number of deadheaded locomotives of type k assigned to train arc l e . We have the following objectives when we solve the weekly locomotive scheduling problem: (i) Each arc / le 7 has a corresponding arc in c1, say, T. The locomotive assignment of arc / e 61 in the daily locomotive scheduling problem becomes the "target flow" for the corresponding arc / le 7 in the weekly locomotive scheduling problem. We would like the locomotive flow on each arc in (7 be as close to its target flow as possible as this would ensure that the weekly locomotive schedule is consistent. Changes to the target flow can be made but they are penalized as it may affect the consistency of the solution. Henceforth, we will assume that xk and y~ denote the target flow for each arc I E '7. (ii) Each arc / e T7 should be assigned sufficient number of locomotives so that its horsepower and tonnage requirements are satisfied. Observe that we do not consider consistency for train arcs in Y7. Only 10% of the train arcs are in Y7 and ignoring consistency of these arcs will not have a major impact on the overall consistency of the solution. (iii) If there is a traintrain connection from train A to train B in the daily spacetime network, then the same traintrain connection should be carried over to the weekly spacetime network on all the days when both the trains A and B run. We now describe the weekly spacetime network. The objective (iii) requires that we slightly modify the weekly spacetime network defined earlier in Section 2.3. Recall that in the daily spacetime network, we have traintrain connection arcs which force the locomotives to go from an inbound train to an outbound train without consistbusting. When we create the weekly spacetime network, we create these traintrain connections on all days wherever it is possible. For example, suppose that the inbound train 11 runs Monday through Friday, the outbound train 12 runs Wednesday through Sunday, and we had a traintrain connection from 11 to 12 in the daily spacetime network. Then in the weekly spacetime network, we will have traintrain connection arcs only on Wednesday through Friday when both the trains run. On all other days, the train li will send its locomotives to the ground node and the train 12 will get its locomotive from the ground node. Those trains that do not have a traintrain connection in the daily spacetime network, send their locomotives to the corresponding ground node and get their locomotives from the corresponding ground node. Thus, each arrival node has exactly one outgoing arc; either it is a traintrain connection arc or it is a trainground connection arc. Similarly, each departure node has exactly one incoming arc. Either it is a traintrain connection arc or it is a trainground connection arc. The weekly spacetime network also has light arcs. Each light travel arc in the daily spacetime network is repeated seven times in the weekly spacetime network to allow the possibility of light travel each day of the week. We now discuss how to determine a locomotive schedule in the weekly spacetime network. We first formulated this problem as an integer programming problem, which is similar to the IP formulation (2.1) presented in Section 4. But we were unable to solve it using CPLEX 7.0. The integer programming problem for the weekly spacetime network is about seventimes larger than the corresponding problem for the daily spacetime network, and CPLEX ran for 72 hours without obtaining any integer feasible solution. Since our goal was to solve the locomotive scheduling problem within 30 minutes of computational time, we needed to follow another approach. We next attempted to determine the locomotive schedule one locomotive type at a time. This converted a multicommodity flow problem (with each locomotive type defining a commodity) with side constraints into a sequence of single commodity flow problems with side constraints, one for each locomotive type. We found that these single commodity flow problems with side constraints were solved very efficiently by CPLEX 7.0. We now describe this approach in greater detail. We first arranged different locomotive types in some order, and then considered them one by one in this order. Suppose we are considering locomotive type k. Our goal is to determine that schedule of locomotive type k so as to: Objective Function: min (c,M)x +cx + I dx + I E1w, Gksk +PD(ai a +" k)(2.4a) 1GT lD AllArcs lTrArcs le$ subject to (2.3b)(2.3g), (2.3i)(2.3j), and the following constraints: xj <: U1 for all leY (2.4b) a,k = (x, + y ) (xk + k) for all / e D, (2.4c) ac, a k > 0 and integer, for all / e TrArcs, (2.4d) Z(x + Y )+sk Bk, forall k K, (2.4e) IlS ma{ t K\k hl \k where M is a large positive number, and Uk denotes the number of active locomotives of type k needed to meet the tonnage and horsepower requirements of the train arc 1. This formulation is similar to the formulation (2.3), which is to find the optimal flow of locomotives of type k while keeping the flow of other locomotive types intact. In addition, the formulation attempts to send the sufficient number of locomotives on arcs inY ; this is achieved by subtracting a large positive number M from the active locomotive costs of arcs in Y in the objective function (2.4a). The formulation also attempts to find a flow which is "close" to the target flow on arcs inD ; this is accomplished by measuring the positive or negative deviation ( or k) from the target flow through the constraints (2.4c) and (2.4d), and penalizing it in the objective function (2.4a). By assigning a suitable value to the coefficient P, we make the locomotive flow (xk,yk) sufficiently close to the target flow on arcs in the set 0 In our computational investigations, we used P = $1,000. We solved the formulation (2.4) multiple times and with different objective functions to obtain improved solutions. For example, our primary objective is to provide sufficient number of locomotives to trains inY We accomplish it by choosing a sufficiently large value of M (say, 106), and solving (2.4) for all locomotive types. Once all trains have sufficient number of active locomotives, we set M = 0 and solve it again for all locomotive types. Depending upon the value ofP, the optimal solution will balance the total flow cost and the penalty for deviation from the target flow. We may need to experiment with different values of P before we obtain the right balance between the two terms. For our data, the formulation (2.4) is defined over a network with 8,798 nodes and 9,139 arcs. The formulation (2.4) comprises of 15,266 variables and 13,142 constraints. CPLEX 7.0 was able to solve it for one locomotive type in a few seconds. We took a total of 23 minutes to obtain a satisfactory solution in the weekly spacetime network. Whereas the integer programming formulation of the weekly spacetime network was intractable, solving it heuristically using the constrained network flow algorithm was quite efficient. After we obtained a feasible solution of the weekly locomotive scheduling problem, we applied neighborhood search algorithm to it. We considered each locomotive type one by one and tried to determine the optimal flow of the selected locomotive type while keeping the flow of other locomotive types intact. This subproblem is a (single commodity) constrained minimum cost flow problem and can be very efficiently solved. We terminate when the solution value does not improve for any locomotive type. Observe that this algorithm can also be regarded as a very largescale neighborhood search algorithm and is a modification of the neighborhood search algorithm described in Section 2.6 for the daily spacetime network. Recall our discussion in Section 2.3 that we create traintrain connections between several inbound and outbound trains to reduce consistbustings. After we have obtained the solution of the weekly locomotive scheduling problem, we can create additional train train connections. After we have solved the daily locomotive scheduling problem, we know the consists of all trains. Suppose that an outbound train 2 at a station has the same consist as that of an inbound train li at the same station and locomotives from train l1 can feasibly connect to train /2, Then we can create a traintrain connection between li and /2, provided locomotives coming from train l/ are not needed by another train departing before train 12. We developed an efficient algorithm (details are omitted here) to determine a maximal number of traintrain connections that can be made between inbound and outbound trains. We applied this algorithm at each station to identify additional traintrain connections. For the data provided to us by CSX, we were able to create about 1015% additional traintrain connections by the use of this algorithm. 2.8 Summary of the Algorithmic Approach We now summarize our algorithm to solve the weekly locomotive scheduling problem. Figure 22 gives the steps of our algorithm. algorithm locomotive scheduling; begin construct the daily spacetime network including light arcs (see Section 2.5); solve a sequence of LPs in the daily spacetime network to determine traintrain connections (see Section 2.6.3); solve a sequence of LPs in the daily spacetime network to determine light travel arcs (see Section 2.6.4); solve the MIP problem (2.2) to determine the active and deadheaded locomotives for the daily locomotive scheduling problem (see Section 2.6.5); solve a sequence of (single commodity) integer programs (2.3) to improve the solution obtained by the MIP (see Section 2.6.6); use the solution of the daily locomotive scheduling problem to construct the target solution f the weekly locomotive scheduling problem (see Section 2.7); solve a sequence of single commodity integer programs (2.4) to obtain a solution of the weekly locomotive scheduling problem (see Section 2.7); identify additional traintrain connections between inbound and outbound trains at each station (see Section 2.8); end; Figure 22. Summary of the algorithmic steps. 2.9 Computational Results In this section, we present our computational results. We were supplied data files for several scenarios by CSX Transportation. However, for the sake of consistency, we performed most of our computational results on one scenario only. The scenario we tested comprised of 3,324 trains originating from and terminating at 119 stations. It contained 3,316 locomotives belonging to five locomotive types. All of our algorithms were implemented in C++ and we made extensive use of callable libraries in CPLEX 7.0. The algorithms were run and tested on a Pentium III PC with a speed of 750 Megahertz. We call our software the Advanced Locomotive Scheduling (ALS) system. Table 22. Summary of problem sizes and solution times at different steps of the algorithm. Problem Problem Size Solution Time The weekly network contains 8,798 nodes MIP model (2.1) for and 30,134 arcs, of which 3,324 are train The MIP problem is too the weekly arcs, 117 light arcs, 24,577 connection large to be solved by locomotive arcs, and 2,116 ground arcs. The MIP the available MIP scheduling problem formulation contains 197,424 integer software. variables and 67,414 constraints. The daily network contains 1,134 nodes IP model (2.1) for and 3,965 arcs, of which 463 are train The MIP problem is too MIP model (2.1) for i locom e arcs, 26 light arcs, 3,178 connection arcs, large to be solved by the daily locomotive 1 he dily om and 298 ground arcs. The MIP the available MIP scheduling problem ,. formulation contains 22,314 integer software. variables and 9,974 constraints. The daily network contains 1,134 nodes e s 1 We solve 132 LP and 3,965 arcs, of which 463 are train relaxations to Identifying traintrain arcs, 26 light arcs, 3,178 connection arcs, determine traintrain connections and 298 ground arcs. The MIPon arcs. The connection arcs. The formulation contains 22,314 integer total time is 11 minutes. variables and 9,974 constraints. The daily network contains 1,134 nodes s 4 We solve 14 LP and 1,276 arcs, of which 463 are train relaxations to Identifying light arcs, 26 light arcs, 489 connection arcs, determine light determine light travel arcs and 298 ground arcs. The MIPg as Te traveling arcs. The total formulation contains 6,385 integer me is 30 seconds. time is 30 seconds. variables and 7,835 constraints. The daily network contains 1,110 nodes e are able to get the Determining and 1,242 arcs, of which 463 are train first ieger stn Determining first integer solution in locomotive flow arcs, 12 light arcs, 475 connection arcs, minutes, and a very ariables and 292 ground arcs. The MIP solution in 15 formulation contains 8,993 integer minutes. variables and 7,782 constraints. We solve 15 Solving the weekly constrained minimum ocomotiv e wel For each locomotive type, there are 10,768 onred m mm locomotive cost flow problems. vanables, and 14,592 constraints. scheduling problem The total time is 1 minute. Table 22 summarizes the sizes of the MIP and LP problems we solved in various stages, the number of such problems solved, and the time taken to solve these problems. The MIP problem we solved to obtain a solution of the daily locomotive assignment problem was solved heuristically, as the algorithms did not terminate even after several hours of running time. We set the CPLEX parameters so that a very good integer solution to the MIP was obtained early on by the software. Table 23. Comparison of number of locomotives used by the LSM and ALS solutions Type of Locomotives ALS LSM SD40 249 498 SD50 160 171 C40 487 621 AC44 154 164 AC60 160 160 Total 1210 1614 Table 24. Comparison of other statistics for ALS and LSM solutions Performance Measure ALS LSM Active Time 44.4% 31.3% Deadheading Time 8.1% 19.6% Idling Time 46.7% 49.1% Light Traveling Time 0.8% 0% $9.2 $13.5 Total Cost .. .. million million ConsistBusting Rate 49.4% 85.0% Table 23 and Table 24 compare the solution obtained by ALS with the solution obtained by the CSX software, called LSM (Locomotive Scheduling Model). The ALS solution is substantially superior to the LSM solution; it reduces the total cost substantially and dramatically decreases the number of locomotives used. The ALS solution used more than 400 fewer locomotives than the LSM solution with medium consist busting (50%) and medium light travel (0.8%). Recall from Section 2.1 that LSM handles consist assignment and locomotive scheduling separately, and in the locomotive scheduling phase considers each locomotive type one by one. We achieved the dramatic decrease in the number of locomotives, in comparison with the LSM, mainly by combining consist assignment and locomotive scheduling, and considering all locomotive types together in place of each locomotive type one by one. Table 25. Sensitivity of the solution to three levels of light travel Medium Light Sufficient Light ConsistBusting Rate: 50% No Light Travel Travel Tve Travel Travel Total Number Of 1268 1210 1192 Locomotives Used Total Cost $9,431,228 $9,242,092 $9,182,314 Percentage Active Time 39.14% 44.44% 45.26% Percentage Deadheading 12.37 8.09 733 Time Percentage Idling Time 48.49% 46.67% 46.06% Percentage Light Traveling 0.00 0.80 1.35 Time We reduce the number of locomotives by substantially reducing the fraction of the locomotives that deadhead. Table 26 presents the statistics on the percentage of the times locomotives are actively pulling the trains, deadheading on trains, light traveling, or idling at stations (for maintenance or just waiting to be assigned to outbound trains). We observe that in the ALS solution the percentage of the time locomotives are actively pulling the trains is about 13.1% more than the LSM solution. Hence our solution significantly increases the locomotive productivity. We also observe that in the ALS solution, the percentage of the time locomotives deadhead on trains is considerably less than in the LSM solution Table 26. Sensitivity of the solution to light different levels of consistbusting Very Hight Medium Minimum Very Hight Hight Consist Medium Low Consist Minimum Consist n Consist Consist Busting Busting Busting Busting Busting Consist nsist 66.39% 59.48% 49.42% 39.09% 31.06% Busting Rate Number Of Locomotive 1155 1165 1210 1281 1340 Used Total Cost $9,052,779 $9,064,822 $9,242,092 $9,532,021 $9,772,958 Percentage ercentae 46.68% 45.74% 44.44% 42.67% 41.25% Active Time Percentage Deadheading 6.28% 6.79% 8.09% 9.99% 9.57% Time Percentage Idling And 46.23% 46.68% 46.67% 46.35% 48.04% Dwelling Time Percentage Light Light 0.81% 0.79% 0.80% 0.99% 1.14% Traveling Time We also conducted some tests to measure the sensitivity of the solution to the extent of light travel and the number of traintrain connections. Table 25 shows the statistics of the final solution when we allow three levels of light travel: no light travel, medium light travel, and sufficient light travel. We observe that a reasonable level of light travel can increase the locomotive utilization rate significantly. Table 26 shows the statistics of the final solution when we consider several levels of traintrain connections. We observe that consistbusting can be decreased at the expense of lower locomotive utilization rate and requiring more locomotives. 2.10 Summary and Conclusions In this chapter, we present the results of a study of a locomotive scheduling problem faced by CSX Transportation, a major U.S. railroad company. We focused on the planning version of the locomotive scheduling problem, where we assign locomotive types to various trains. Our goal was to develop excellent plans along a number of dimensions. Our primary metric for evaluating a solution was to compare it to the existing software used by the locomotive planning division at CSX. The existing software was inhouse software developed over a period of ten years. While it has the substantial advantage of capturing many constraints and objectives not dealt with in the existing literature, it also has some important limitations. In particular, it was unable to produce acceptable solutions without considerable manual adjustment of the solution produced. Our approach to solve the planning version of the locomotive scheduling problem produced solutions that satisfied the constraints and business rules specified by CSX and offered considerable savings in cost, especially in terms of a significant reduction in the number of locomotives needed. Our model is the first approach to account for consist busting, light travel, and consistency of the solution in a unified framework. Our approach relies upon breaking the locomotive scheduling problem into a twostep process: first solving the daily locomotive scheduling problem, and then solving the weekly locomotive scheduling problem. This approach works reasonably well for those situations where a large number of trains run most days in a week. By incorporating more realistic constraints and costs in our models, we needed to rely on a multistage heuristic procedure to solve the model. In particular, we were unable to solve MIPs involving many fixed charge constraints. We avoided this with a sequential heuristic procedure for determining the three sets of decision variables (i) light travel, (ii) traintrain connections, and (iii) active and deadhead locomotive flow variables sequentially instead of determining them in a single model. Nevertheless, our sequential procedure heavily exploited information from a sequence of LPs, and thus relied on a system wide view of the entire planning problem. When we determine light travel arcs, we consider locomotive flow variables are also part of the LPs solved. Similarly, when we determine traintrain connection variables, we again consider locomotive flow variables in the decision process. Hence we do achieve a certain level of integration in our sequential approach. Perhaps in the future we will be able to obtain a better integration of these different sets of variables. From the CSX perspective, this research demonstrated that advances in OR techniques enabled a simultaneous locomotive assignment and scheduling solution on a much larger network than previously thought possible. CSX used the model in support of its operations planning effort associated with its acquisition of Conrail territory, a 30% increase in network size. Without the aid of the model, CSX would not have been confident in its ability to execute the new integrated operating plan. In addition, CSX executed a major locomotive trade with a locomotive leasing company where they swapped 156 older, low and medium horsepower locomotives for 31 newer, high horsepower locomotives. The model helped quantify the network benefits of recentering the fleet composition. In the future, CSX is interested in expanding on this work to include locomotive fueling and servicing constraints into the algorithm. CSX also intends to introduce decision support tools into its tactical management process. CHAPTER 3 SOLVING THE REALLIFE RAILROAD BLOCKING PROBLEM 3.1 Introduction Most railroad companies in the U.S. are engaged in rail freight transportation. Demand for freight transportation is usually expressed in terms of tonnage of certain commodities to be moved from an origin to a destination. Given these demands, the railroad must establish a set of operating policies that will govern the routing of trains and freight. For every origindestination pair of traffic demand, the corresponding freight may be shipped either directly or indirectly. When demand is important enough, delivery delays are obviously minimized by using direct trains as opposed to sending the traffic through a sequence of links. However, when demand is does not warrant the dispatching of direct trains, delays are inevitable. Either the traffic is consolidated and routed through intermediate nodes, or freight cars have to wait at the origin node until sufficient tonnage has been accumulated. To benefit from economies of scale, trains are thus often formed by grouping cars with various commodities and having different origins and destinations. These trains operate between particular nodes of the network, called classification yards. At these yards, cars are separated, sorted according to their final destination, and combined to form new outbound trains. However, the classification process is labor and capital intensive because many workers and large quantities of equipment are needed to sort the traffic, and construction and maintenance of large yards is necessary to handle the sorting task. To prevent shipments from being reclassified at every yard they pass through, several shipments may be grouped together to form a block. Cars in the same block may then pass through a series of intermediate classification yards, being separated and reclassified only after they have reached the destination of the block. The blocking policy specifies what blocks should be built at each yard of the network and which cars should go into each block. A blocking policy is usually specified as follows: cars at yard i which are destined for yard must be added to a block that will next be shipped to yard k (possibly transiting by other intermediate yards). As explained earlier, cars in a block will not be reclassified until the block reaches its final destination. A blocking model thus places the emphasis on the movement of cars as opposed to the movement of trains. Its solution indicates the routing of freight through the network and the distribution of classification work among yards, but does not specify the trains to be run or the assignment of blocks to trains. Instead, an additional problem must then be solved to determine the routing of trains and their makeup. We next describe the blocking problem in more detail with respect to physical rail system. The physical rail system consists of undirected links (one or more railroad tracks) connecting nodes (rail yards). Classification usually is done on a group of classification tracks that, together, roughly resemble a hexagon (or halfhexagon) with different length tracks. Researchers on the blocking plan have traditionally assumed that an acceptable approximation of the classification capacity is a rectangle with the same area as the hexagon. We do not use these approximations to determine yard capacity. Rather we use data provided by the railroad based on their experience for each of their yards. Also, in our model, we do not limit the size of the blocks based on the physical characteristics of the yard because train frequency will determine how many cars, on average, are present on a given classification track. Cost factors that may be considered in an instance of blocking problem include costs based on the distance traveled (carmiles), the time elapsed (carhours) and the reclassifications handlinggs. Other costs that may be considered are usage fees for links belongings to other railroads and premiums for using routings that are serviced by older, less efficient locomotives. Linkspecific costs depending on the grades involved or congestion in an urban area, might also be included, as well as link or stationdependent labor and equipment costs. There may also be a fixed cost associated with choosing to build a given block. As supplied by the railroad company, we consider the costs of distance traveled, linkspecific impedance factor and car handling cost as objective function. Mathematically, the blocking problem is designing a network, called a blocking network, and routing shipments over this network so as to optimize the total shipment cost. Figure 31 gives a sample blocking network, where there are three types of nodes: origins (where shipments originate), yards (where shipments are reclassified), and destinations (where shipments terminate). (We show here a simplified network as in practice, yards can be origins as well as destinations, and nodes can send as well as receive shipments.) Each arc in the network represents a block with the origin at the tail of the arc and destination at the head of the arc. There is an associated cost c, with each arc (i, j), representing the shortest path length from node i to nodej in physical railroad network. Shipments travel from their origins to their destinations over this blocking network. The arcs on the path of travel for a shipment in blocking network give the sequence of blocks the shipment will follow. Consider, for example, the first shipment S1, which originates at node 1 and destined for destination T1 at node 9. This shipment can follow two paths shown in Table 31. E E.. . U U . Yards Destination Origins Figure 31. An example of a blocking network. Table 31. Blocking paths illustration with respect to Figure 31. Path Length Of The Blocking Path Number Of Intermediate Handlings 159 c15 + c59 1 1589 c15 + c58 + c89 2 This chapter is organized in seven sections. Section 3.2 describes the past attempts made in solving blocking problem. In section 3.3, our IP formulation and new approaches to solve IP formulation along with their limitation is described. The very large scale neighborhood search technique based heuristics to solve blocking problem is presented in section 3.4 and additional constraints are described in section 3.5. Sections 3.6 and 3.7 are for computational results and conclusions respectively. 3.2 Background One of the first models for car blocking belongs to Bodin et al. [1980]. This paper formulates the blocking problem as nonlinear mixed integer programming problem. The model, which is a multicommodity flow problem with additional side constraints, simultaneously determines the optimal blocking strategies for all the classification yards in a railroad system. Besides flow equations that constitute the backbone of the model, yard capacity and block formation constraints are also considered. In particular, the model imposes upper bounds on the number of cars that may be formed in any given yard. With some manual intervention, the authors solved an instance with 33 classification yards and found a solution with 3% of a tight lower bound. Assad [1983] proposes a solution approach for a problem defined on a line network composed of n yards, with traffic flowing from yard 1 to yard n. A dynamic programming formulation with relaxed assumptions led to an efficient solution method. Van Dyke [1986, 1988] describe an interactive heuristic approach that attempts to improve an existing blocking plan by solving a series of shortestpath problems on a network whose arcs represent available blocks. Keaton [1989, 1992] have developed a nonlinear MIP for blocking problem, Huntley [1995] has developed a simulated annealing approach, and Gorman [1995] presents a genetic algorithm for constructing operating plans including blocking, train connections, and blocktotrain assignments. Most recent and promising works for blocking problem are by Newton et al. [1998] and Barnhart et al. [2000]. Newton et al. [1998] models the blocking problem as a network design model and formulates the problem as MIP. Their decision variables are to select a block to be made and distribution of traffic among potential paths (consists of blocking arcs). They apply column generation and branchandprice algorithms to solve the problem. Barnhart et al. [2000] use same formulation as Newton et al. [1998] and propose Lagrangian relaxation technique to decompose the problem in two subproblems. In spite of using novel techniques, their approach falls short of needs of a large railroad company (CSXT). Their approaches focus on determining a solution which is very close to the optimal solution, but the running times were excessive which prohibited its use. The software developed by the CSXT team using their approaches ran for several days without producing an implementable solution. 3.3 IP Formulation and Lagrangian Relaxation Approach Using the approach ofBarnhart et al. [2000] and Newton et al. [1998] as the starting point, we propose a new formulation to solve the Blocking problem. Our approaches in this section use Lagrangian relaxation in place of integer/linear programming problems to solve Lagrangian subproblems which significantly reduces the running time of algorithms and develops specialpurpose network flow based techniques to convert the intermediate solutions obtained by solving Lagrangian subproblems into very good or near optimal feasible solutions. As against the formulation in section 3.2., our formulation does not split a shipment among different paths. 3.3.1 An Integer Programming Formulation Now we give an integer programming formulation of the blocking problem. We first present some notation. N = a set of nodes denoting the yards where shipments start, end or are swapped. We will use the index i to denote a terminal. A = a set of potential blocking arcs in N x N, i.e., (i, j) EA if it is reasonable to send a block from i toj. We use index a to denote a potential blocking arc. G = (N, A), the potential blocking network. 0(i) = the set of arcs in A emanating from i. 3(i) = the set of arcs in A entering node i. K = a set of OD shipments. We will refer to an OD shipment as a commodity. We will use index k to denote a commodity. o(k) = the origin of commodity k K. d(k) = the destination of commodity k E K. Vk = volume of cars to be shipped for commodity k K. Va = the maximum number of cars that can flow on block a e A (observe that V, I kK Vk ). d,= maximum volume of cars that can be handled at yard i eN. b, = maximum number of blocks that can be made at yard i N. ma = cost of flow per car on block a A (it can be a scalar multiple of the distance of block a). h, = the cost of handling a car at yard i E N. It will be useful to describe the size of the blocking problem for CSXT as a test case. CSXT has an underlying railroad network spanning 13,000 locations. OD shipments originate, terminate, and swap only at a subset of these locations. Further, many of these locations send or receive shipments only from one location. We can use this information to shrink many nodes into other nodes. In addition, when considering potential blocking possibilities, one need not consider blocking between every pair of locations. One can use some business rules to eliminate unnecessary blocking possibilities. We estimate that after suitable preprocessing has been done, the size of the blocking network will be reduced to about 3,000 nodes and 3,240,000 potential blocking arcs. We anticipate that there are about 80,000 distinct OD shipments that need to be sent in this network. In the blocking problem we require that (i) each commodity k e K consisting of vk cars must be sent along a single path in the blocking network; (ii) the total number of cars entering node i in the blocking network be at most d,; and (iii) the number of blocking arcs out of node i used by any path in the blocking network be at most b,. The objective function in the blocking problem is to minimize the weighted sum of (i) the total number of car handling, and (ii) the total number of miles traveled by cars as they travel from their origins to their respective destinations. The blocking problem has two sets of decision variables: xi andya. The decision variable xi denotes the number of cars of commodity k flowing on arc a e A, andya is 1 if arc a e A is used by the flow of some commodity k, and 0 otherwise. The blocking problem can be formulated as the following mathematical programming problem: Objective Function: min max+Z C h x (3.1a) kGK aGA IEN kGKaGS+(l) Constraints: ZkK Xa aya, Vae A, (3.1b) Z Z <6 d,I Vi e N, (3.1c) k ae (z) y y xk induces a flow of Vk units along a single path in G from o(k) to d(k), (3.1 e) y= 0, 1}. (3.1f) We refer to the constraint (3. b) as the cardinality constraints, and (3.1 c) as the volume constraints. Let us now analyze the size of the problem (3.1). The dimensions of the problem at CSXT are approximately \N\ = 3,000, \A\ = 3,240,000, and \K\ = 80,000. The constraints on the total car volume passing through a node are not required to be "hard" constraints and they can be violated to a small extent. It should be noted that this formulation does not allow splitting of a shipment of a given commodity along several paths. In contrast with this, the model ofBamhart et al. [2000] does allow such splitting. 3.3.2 A BiLevel Lagrangian Relaxation Approach It is imperative to develop some relaxation approaches for the above formulation. We propose a bilevel Lagrangian relaxation based approach to solve (3.1). For a comprehensive discussion of the Lagrangian relaxation technique, we refer the reader to the book by Ahuja, Magnanti, and Orlin [1993]. Observe that in the formulation (3.1) of the blocking problem, there is only one set of constraints (3. b) that involve both the variables x andy; all other constraints involve either x ory. We propose to solve the blocking problem by the Lagrangian relaxation technique and relaxing the constraints (3.lb). For a given set of Lagrangian multipliers ua 2 0, we define the Lagrangian subproblem as follows: Objective Function: L(u)=minZZmax +Z I I hx +Zu,(Zx V^y,) (3.2a) kGK aGA IzN kGKa +S+(1) aGA kGK Constraints: SZ x < d,, Vi e N, (3.2b) kGK aK S (I) Sy < b,, Vi e N, (3.2c) xk induces a flow of vk units on a single path in G from o(k) to d(k), (3.2d) y= {0, 1}. (3.2e) The Lagrangian multiplier problem is to determine the value of u for which L(u) is maximum. We can use subgradient optimization, dual ascent, the volume algorithm, or any other effective multiplier adjustment method to solve the Lagrangian multiplier problem. For an example of a relevant dual ascent procedure see Balakrishnan et al. [1989] and for the volume algorithm see Barahona and Anbil [2000]. The relaxation described above decouples the problem into two separate problems in the x and y variables respectively. We refer to the problem in y as the blocking subproblem, and the problem in x as theflow subproblem. 3.3.3 Solving the Blocking Subproblem The blocking subproblem (BSP) is as follows: Objective Function: ZBsP = min Y Vauy (3.3a) aGA Constraints: Y y, aG+ (1) y = {0, 1}. (3.3c) Observe that BSP further decomposes for each i EN. The decomposition for each i EN, denoted by (BSP,), is as follows: Objective Function: ZBs,) = min (Vau)ya (3.4a) Constraints: y y< aGSi (1) y = {, 1}. (3.4c) The BSP, (3.4) can be solved by the obvious greedy method, i.e., sort the arcs a 3+ (i) in the decreasing order of Vau, and choose ya = 1 for the first b, arcs in + (i) and ya = 0 for the rest of the arcs. 3.3.4 Solving the Flow Subproblem We now discuss how to solve the flow subproblem, the problem in x. The flow subproblem (FSP) is given below. Objective Function: ZFP = min (ma +ua)x + a + hx (3.5a) keK aeA IeN keK at+ (i) Constraints: Sx keK aet (I) xk induces a flow of vk units on a single path in G from o(k) to d(k). (3.5c) It can be shown that the flow subproblem is a 01 multicommodity flow problem, where the flows of different commodities are linked by the volume constraint, and the flows must induce single OD paths. This is a hard combinatorial optimization problem. We next use the fact that the volume constraints are not binding constraints since in practice it is difficult to determine d,, the maximum volume of cars that can pass through the node i. Hence we suggest relaxing these constraints too. If we take p, > 0 to be the (Lagrangian) multiplier for flow into node i, then we get the relaxed flow subproblem, FSP(p), given as follows, where s(a) denotes the tail node of arc a and t(a) denotes its head node: Objective Function: ZFsp(p) = pd, + min Z (ma +hs(a) +ua +Pt))xa (3.6a) IEN kEK aEA Constraints: xk induces a flow of vk units on one path from o(k) to d(k). (3.6b) The problem (3.6) decomposes for each commodity k and the solution for each commodity k would be simply a flow of vk units along the shortest path in G from o(k) to d(k) with arc lengths given by ma + h(a) + u, + pt(a) for arc a. Observe that these arc lengths are independent of the commodity k. Thus, using these arc lengths, there are three alternative approaches that might be considered for solving the FSP(p): 1. For each commodity k, determine a shortest path from o(k) to d(k), and send the flow Vk along this path. 2. Solve for each origin node o e N the problem of finding a shortest path tree rooted at node o, in which case we have simultaneously solved the shortest path problem for each commodity k with o(k) = o. 3. Solve an allpairs shortest path problem in G, which simultaneously determines the shortest path distances for all commodities from their origins to their destinations. While the approaches in (3.2) and (3.3) might look attractive since they determine shortest path distances for several commodities simultaneously, a careful analysis of the computational effort likely to be incurred in each case shows that the first is likely to be the most efficient. The computational effort required in case (3.3) is of the order of \N Ai. In case (3.2), we are likely to consider the whole blocking network G for each shortest path tree calculation and each of these requires work of the order of A I (if we solve the shortest path problem using the labelcorrecting algorithm), and we have to perform about \N\ of these calculations (one per node); again the total work required is of the order of \N A. Since for the blocking problem at CSXT, ]NV = 3,000 and JAI = 3,240,000, the work required is of the order of 2 x 1013 By contrast, in case (3.1), for each commodity we could reasonably restrict ourselves to consider only a few alternative physical routes. If for each commodity, we consider R physical routes and assume that all blocking subpaths are possible for each route, and also assume that the commodity will use no more than B blocking arcs to reach its destination, then we can solve, for each commodity, R separate shortest path problems, each on an acyclic network containing B(B+ 1)/2 arcs. This will require work of the order of \K\RB(B+ 1)/2, where \K\ is the total number of commodities. If we take R = 10, B = 5, and \K\ = 80,000, this works out to be equal to 107, which is an order of magnitude less than that required for the other two approaches. 3.3.5 Connectivity in the Blocking Subproblem We have described above how to solve the blocking subproblem efficiently. It has been observed by Barnhart et al. [2000]. that the lower bounds provided by (3.4) are quite weak. To strengthen the bounds for the Lagrangian subproblem (3.4), we may impose additional constraints that variables must satisfy. For example, y variables must induce a graph in which there is a path between every OD pair. This is not quite the same thing as saying that the graph must be connected, but is close to it. Barnhart et al. [2000] observed that this constraints tightens the relaxed problems and yields substantially tighter bounds. The blocking subproblem BSP with the additional connectivity constraints is as follows: Objective Function: min Vauay (3.7a) aGA Constraints: Z y < b,, Vi N, (3.7b) a >1+ (1) Y y, > 1, VS c N, such that there is a k with o(k) e S, d(k) V S, (3.7c) a,+ (S) y= {0, 1}. (3.7d) In the above formulation, '+ (S) denotes the set of all arcs a e A with the tail node s(a) e S and the head node t(a) e N\S. Let Q denote the set of all sets S c N that separate the OD pair of some commodity, i.e., such that there exists a commodity k with o(k)e S and d(k)e N\S. To solve (3.7), we propose to use Lagrangian relaxation. We introduce Lagrange multipliers rS > 0 for each SE 0, and solve the following problem which we refer to as BSP(r): Objective Function: z,,(r)= rs + min { Vauay Z rs Z a} (3.8a) Sen aeA SeQ a + (S) Constraints: Sy, y = {0, 1}. (3.8c) Clearly, (3.8) also decomposes for each node i EN and, for a given r, can be solved greedily solving each of the following subproblems which we refer to as BSP,(r): Objective Function: z'jp(r)= max I (Vau + rs)ya (3.9a) aGS+(S) S a,+(S) Constraints: Y Y, a {,1} (3.9c) y" G to1} (3.9c) and observing that zBp(r)= rs I zsp (r). (3.10) SGQ zGN For any r > 0 solving (3.9) we obtain ZBsp(r) giving a valid lower bound on ZBSP. We will seek to adjust r so that this bound improves, which corresponds to encouraging the y variables resulting to satisfy the connectivity constraints. We propose to adjust the r values using subgradient optimization, dual ascent, or some other appropriate method. In order to adjust r, and find (truncated) subgradients of zBsp(r), we will need to determine violated connectivity constraints, i.e., given a solution, y*, for BSP(r), we seek the set(s) S e n such that l t,,(s) y <1. (Note that* is a 0,1 vector.) Although several approaches to this problem are possible, we expect that the most efficient approach will be to seek a path from o(k) to d(k) for each commodity k in the network induced by y*. Arguments for this are similar to those given in Section 3.3.4, although it is possible that if one fails to find a path from among the R physical routes considered, there is still one in the wider network, and a more expensive shortest path calculation would have to be made. An alternative would be to modify the connectivity constraints to force a path to exist amongst the physical routes considered. Let R denote the set of all physical routes considered for commodity k and let (Nk,", Ak',) denote the subnetwork of the blocking network induced by physical route oc Rk for commodity k. For S cN, define dk (S) c Ak'.;r to be the set of arcs (i, j) e Ak with i e S and j S We could then rewrite the connectivity requirements as: ya >1, Vk e K, VS e o(k) S,d(k) S (3.11) aGA (S) where A;(S)= U s, (S). (3.12) o Rk The procedure for finding a violated constraint of this type could then be easily integrated with the heuristics to determine good feasible solutions. The only possible disadvantage of this approach is that the dimension of the multipliers r will increase, as we need a multiplier rs for each k and S pair. However, since the dimension of (3.7) was already exponentially large, so it is hard to imagine that this would be a serious disadvantage. 3.3.6 Solution Approach Summary We summarize the discussion so far. We propose a twolevel Lagrangian relaxation approach. At the top level, the constraints linking the x and y variables are relaxed. This toplevel Lagrangian multiplier problem will be solved by subgradient optimization or some other appropriate method. At the second level, we have the BSP with connectivity constraints, and the FSP to solve. The former can be solved by Lagrangian relaxation of the connectivity constraints, leading to decomposed very rapidly solved subproblems. It is not expected that this Lagrangian dual can be solved to optimality: instead some effort should be invested in achieving connectivity, but not at the expense of speed. The FSP can be solved by Lagrangian relaxation of the volume constraints, and the resulting subproblem solved by solving shortest path problems for each commodity. Since the volume constraints are not likely to be binding, and are not hard constraints, we would expect to only adjust the Lagrange multipliers at each iteration only a small number of times. Since at both the levels the Lagrangian relaxations provide lower bounds, we will maintain a valid lower bound at all times. Although our approach as proposed above have many merits above the approaches of Barnhart et al.[2000] and Newton et al. [1998], once implemented, did not give satisfactory performance on the fronts of quality of lower bounds and time taken. We observed that the lower bounds obtained by the lagrangian relaxation approach were too loose and it was taking hours of computing time. The reason for unsatisfactory performance might be attributed to the size of the problem. As railroad companies are more concerned in solving the problem to nearoptimality in less time and Lagrangian relaxation based approaches were not working satisfactorily, we thought it more appropriate to develop heuristics to solve the problem. In following sections, we describe heuristics to solve blocking problem using very large scale neighborhood search technique. 3.4 Very Large Scale Neighborhood Search based Heuristics Motivated by the success on applying VLSN search for airline scheduling and locomotive scheduling problems, we developed a VLSN search algorithm for railroad blocking problem. VLSN search algorithm search improving solutions in very large neighborhood and blocking problem is also very large scale optimization problem. Therefore, VLSN search algorithm for blocking problem is required to be very time and space efficient. We have used networkflow based optimization techniques to find local optimal solution for blocking problem. This algorithm is highly scalable, robust and produces high quality solution in reasonable computational time. Our algorithm is very flexible and can easily number of additional constraints as outlined in section 3.5. The railroad blocking problem can be modeled as network design problem as we need to construct a blocking network and to route shipments on the resulting network. With respect to the blocking network, we can state blocking problem as constructing a blocking network honoring the blocking capacity constraints and routing commodities on the blocking network honoring car handling capacity constraints. In this section we describe a very large scale neighborhood (VLSN) based local search heuristic, which produces a local optimal solution for the blocking problem with respect to network design formulation. The neighborhood search heuristic uses network flow based techniques to implicitly enumerate very large number of neighbors. Figure 32 describes our VLSN search algorithm for railroad blocking problem. algorithm VLSNBlocking; begin construct an initial feasible solution x of the blocking problem; while the solution is not locally optimal do begin {one pass} consider each node in the blocking network one by one and reoptimize the blocks emanating from this node; end; {one pass} end; end; Figure 32. The VLSN search algorithm for the blocking problem This algorithm is a neighborhood search algorithm. It starts with a feasible solution of the blocking problem and iteratively improves the current solution by replacing it by its neighbor. This algorithm has two important subroutines: to construct the initial feasible solution; and to reoptimize the blocking arcs emanating from a node. In the rest of this section, we will first describe the construction heuristic to generate initial solution and then neighborhood search heuristics to get local optimal solution. 3.4.1 Construction Heuristic A construction heuristic produces a feasible solution to the optimization problem from scratch by assigning values to one or more decision variables at a time. The railroad blocking problem is also a decision problem, where we select the potential blocks to construct the blocking network and route the commodities on the resulting blocking network without violating the blocking capacity constraints. Therefore, the construction heuristic should be able to choose blocks to be made out of all potential blocks and to route the commodities. As the number of blocks to be made at a node is restricted and large number of commodities is to be routed on these blocks, finding a feasible solution for the blocking problem is itself a difficult problem. Therefore, an efficient algorithm is needed which can produce a feasible solution and at the same time should produce a good quality solution. As commodities can be classified at any yard, a feasible path for any commodity can pass through any number of classification yards. Therefore, to ensure the generation of a feasible solution, a directed cycle (Hamiltonian Cycle) containing all yards is constructed in which starting from any yard, it will visit all the yards only once and returns back to the starting yard. To route any commodity from its origin to its destination, we first connect the origin of the commodity to nearest yard and connect the destination from nearest yard having available blocking capacity. As there exists a path from the yard, to which origin is connected, to the yard from which destination is connected, this procedure always ensure a feasible solution to the blocking problem. The problem of finding a Hamiltonian Cycle (HC) in a graph is a well known NPComplete problem and we have used heuristic to find HC. To get a good quality feasible solution we use nearest neighbor approach to connect origin to the yard and to connect destination from a yard. We also use greedy approach to make direct blocks for a commodity from its origin to its destination, if blocking capacity is available at the origin or at any intermediate node at any stage. Before making a new block for a commodity, we first check whether a blocking path with better cost as compared to cost of the path if new block is created exists. If found any such path, we do not make new block and assign the commodity to blocking path found. Our construction heuristic, essentially perform following steps. Step 0: Find a HC connecting all the classification yards. Step 1: If all the commodities are routed, stop; otherwise go to Step 2. Step 2: Find the best blocking path in the existing network for a commodity not having any assigned blocking path. If found any such path, compare the cost if a new blocking path is constructed (using nearest neighbor approach) without violating the blocking capacity. Assign the better path to the commodity and update the blocking capacity of nodes in the path. We tested many variations of above algorithms and observed that the final solution obtained from our local search heuristic is quite insensitive to the quality of initial solution. We next describe our neighborhood search heuristic. 3.4.2 Neighborhood Search Algorithms In the starting feasible solutions, we get the sets of blocks made at each node in the blocking network and blocking paths for each of the commodity. With respect to this solution, we define neighborhood as all the solutions obtained by changing blocking policy at a node and keeping blocks made at all other nodes fixed. The algorithm selects nodes in sequence, drop all the blocks currently made at the node selected, reroute all the commodities which currently assigned to blocking path containing dropped blocks, and reoptimizes the blocking policy at the node selected. If we could not find any alternate blocking path for any commodity required to be rerouted, we assign very large cost of transportation to the commodity. Reoptimizing blocking policy at a yard (say p) is a largesize optimization problem. This problem can be stated as selecting a set of blocks out of all possible blocks at yardp, honoring the blocking capacity constraint atp, and rerouting commodities such that improvement in objective function is maximum. If we use c,, to denote the benefit of routing commodity k to use potential blocking arc (p, i), this problem can be formulated as Integer Programming problem as given below. Objective Function: max CZ Xk (3.13a) kGK iN\{p} Constraints: yZ Sx ,< K y,, Vie N, (3.13c) k K/{p} yp {O,1}, Vie N, (3.13d) x e{0,1}, VkeK,VieN. (3.13e) In above formulation, binary decision variable y, takes value 1 if blocking arc (p, i) will be built, and 0 otherwise. Binary decision variable xk takes value 1 if commodity k will be routed using blocking arc (p, i). The objective function (3.13a) maximizes the total benefit of building new blocks at yard p. Constraint (3.13b) enforces that the number of blocks built at yard p will not exceed the blocking capacity of yard p. A commodity can be routed using blocking arc (p, i) only when the blocking arc will be built, which is stated in constraints (3.13c). Solving above problem optimally is very difficult problem. To better understand the difficulty of the problem, we briefly analyze here the number of binary decision variables. For a typical U.S. railroad, such as CSX Transportation, blocking capacity of a node is around 1050, and there are around 600 classification yards and 2400 destinations to which block can be made. Hence the optimization algorithm should be able to choose best 20 blocks out of around 3,000 possible blocks. Once blocks are made, we need re route the commodities. As there are around 80,000 commodities, needless to say optimally rerouting these commodities is very difficult problem. With the data provided by the railroads, we could not find optimal solution for this problem even after spending hours of computer time. We reoptimize the blocking policy at every node in each pass (explained later) and there are around 3000 nodes in the network, even 1 second of computer time per node results in hours of computer time for railroad problem, which is not acceptable by the railroads. We have developed an algorithm for reoptimizing blocking policy at a node (say p) which uses following maximum savings scheme. * For each potential blocking arc at the nodep, compute the savings in total cost if that blocking arc is built and commodities are rerouted keeping the newly built blocking arc in consideration. * Select the blocking arc with the maximum savings in transportation cost and build it. * Reroute some commodities to pass through newly built blocking arc. * Repeat the process until no more saving is possible by building new block is possible or the no more blocking capacity is available. In above scheme, most time consuming task is to compute the saving by creating a new blocking arc. We use a scheme based on the shortest path algorithm to compute the savings. Our scheme very efficiently calculates the shortest blocking path between two nodes whenever a new arc is added to or deleted from the blocking network. With the use of efficient data structure our algorithm takes around 0.01 computer second for re 