# Locomotive Assignment Problem with Heterogeneous Vehicle Fleet and Hiring External Locomotives

Authors: Dušan Teichmann; Michal Dorda; Karel Golc; Helena Bínová
Journal: Mathematical Problems in Engineering
 (2015)

---

## Abstract

This paper focuses on solving the problem of how to assign locomotives to assembled trains optimally. To solve the problem, linear programming is applied. The situation we model in the paper occurs in the conditions of a transport operator that provides rail transport in the Czech Republic. In the paper, an extended locomotive assignment problem is modeled; the transport operator can use different classes of the locomotives to serve individual connections, some connections must be served by a predefined locomotive class, and the locomotives can be allocated to several depots at the beginning. The proposed model also takes into consideration the fact that some connections can be served by the locomotives of external transport companies or operators. The presented model is applied to a real example in order to test its functionality.


---

## Body

## 1. Introduction: Our Motivation to Solve the Problem

Optimization methods are of vital importance for transport processes. The optimization methods can be employed especially to control the transport processes. By using the optimization methods, we can solve a lot of problems related to rail, road, public, air, or water transport. Our paper is devoted to an application of the optimization methods in rail transport. The problem that we solve in the paper is generally known as the vehicle scheduling problem. The vehicle scheduling problem can be generally formulated as the problem of optimal moving of locomotives or cars. However, there are also special applications of vehicle scheduling. In the paper we present one of the special applications—the problem of the optimal assignment of locomotives to assembled trains. In the literature this problem is denoted most frequently by thelocomotive assignment problem,locomotive scheduling problem, orlocomotive routing problem. In our contribution we will use the designationlocomotive assignment problem.In practice, sometimes it can happen that the transport operator is not able to serve all the connections using its own locomotives only. There are two main reasons for this situation.(i)
The transport operator does not own enough locomotives.(ii)
The transport operator has enough locomotives but the operator is not willing to use all of them because the operator is awaiting some more lucrative jobs.In such situations some connections can be served by the locomotives that the transport operator hires from other transport operators or companies, external locomotives. It is clear that costs which have arisen from serving the connections by external locomotives must be borne by the transport operator ordering the external locomotives.The main problems are the following:(i)
scheduling the operator’s own locomotives,(ii)
planning whether it is necessary or advantageous to serve some connections by external locomotives,(iii)
assigning the operator’s own locomotives to the depots (if there are at least two depots)—the own locomotives are allocated to the depots.Our paper extends the spectrum of existing mathematical models used for solving the locomotive assignment problem by a model devoted to the specific scheduling application. The specification of our paper is the possibility of using external locomotives. The authors have not met with such application in studied literature but the situations often exist in practice (a case study presented in Section6 confirms the statement).


## 2. State of the Art

The contributions [1, 2] give very detailed information about the literature dealing with solving the locomotive assignment problem. In particular, we must mention the works [3, 4] and the recent works [5, 6].Apart from the abovementioned works we must also refer to the following contributions and articles. Article [4] develops the approach from article [7]. The authors propose three different branching methods, which obtain better results in a shorter time in their article. In contribution [8] the authors solve the problem using the vehicle routing problem with time windows. For custom solution a hybrid genetic algorithm is used. The task is solved for more depots and a homogeneous vehicle fleet. In  paper [9] a mathematical model minimizing the locomotive turnaround time is included. In the work, a two-stage heuristic algorithm is proposed as well. In the first stage, the optimum locomotive routing connection on the station is solved and the second stage deals with locomotive deadheading and optimization of the locomotive routing on all the stations. In article [10], the authors use the feedback neural network based on Ising Mean Field Approach to approximate stochastic simulated annealing with a deterministic process for solving the locomotive assignment problem. A genetic algorithm is used for solving the locomotive assignment problem in article [11]. The authors propose a two-phase approach. In the first phase, the multidepot locomotive assignment is converted to a set of single depot problems, and in the second phase each single depot problem is solved heuristically by a hybrid genetic algorithm. The results of the locomotive assignment problem achieved using a tabu search metaheuristics algorithm are described in article [12].The next problem associated with locomotive fuelling strategies is described in article [13]. This article includes a linear mixed-integer mathematical model that integrates not only fuel station location decisions but also locomotive fuelling schedule decisions.The last important group of contributions describes specific decision support systems for solving the locomotive assignment problem. In the contribution [14] the authors present a proposed system named Locomotive Simulator/Optimizer, which simulates the movement of locomotives across a railroad network. Article [15] describes a decision support system including an algorithm for solving the locomotive assignment problem in which the trains may be delayed.The articles that motivated us, dealing with scheduling vehicles, were published in the Czech Republic and in Slovakia as well. We can mention the publications [16, 17] and the articles [18–21]. In these publications and articles, the proposed models were usually applied in bus transport.For solving the locomotive assignment problem with using external locomotives we drew inspiration from the article written by Plevný [22]. The author deals with vehicle scheduling in the travelling salesman problem in which some customers can be served by external vehicles.


## 3. Basic Terminology Used in the Paper

Connection. It is a productive journey of a locomotive (or a group of locomotives) hauling wagons from anoriginating railway station toa destination railway station.Depot. It is a place where the locomotives are found when they are not being utilized (a railway yard).Own Locomotive. It is a locomotive which is in the property of the transport operator that serves the connection. The transport operator can own locomotives with different technical parameters. Let alocomotive class be all the own locomotives with the same technical parameters.External Locomotive. It is a locomotive that the transport operator uses in cases when the operator does not have enough of its own locomotives to serve a connection or when using its own locomotive is not advantageous for the transport operator.Group of Locomotives. They are two (or more than two if necessary) locomotives of the same class that move together from their departure from an originating depot to their arrival to a destination depot (in other words, several locomotives serving the same connections together form the group of locomotives).Relation. It is a route between an originating railway station and a destination railway station.


## 4. The Problem Formulation

Let a setK of all the locomotive classes that the transport operator uses to serve the connections be given. For each class k∈K of the own locomotives a number mk of the available locomotives and fixed costs fk of holding the own locomotive in working condition are known. Let us assume that the costs fk are equal for all the locomotives of the same class and do not depend on the place (the depot) where the locomotive is found at the beginning of the planning period. However, if the assumption was not satisfied, the presented mathematical model could be easily modified.Let a setS of the places where the locomotives must be found at the beginning of the planning period be given. The set S usually represents the set of the depots that the transport operator uses.A setL represents the set of all the connections that must be served by the locomotives; it holds that L=m. The number pvlk of the locomotives of the class k∈K that must be used to serve the connection l∈L is defined for each connection l∈L (one locomotive or more than one locomotive can be requested to serve the connection). Sometimes it can happen that some classes of the locomotives cannot be used for serving some connections; for example, the electric locomotives cannot be used on railway tracks that are not electrified. And if it is necessary to use at least two locomotives to serve the connection, it is presumed that the locomotives must be of the same class.The model operates with three types of costs that correspond to the costs resulting from the operation of the own locomotives. Costsesik are given for each locomotive of the class k∈K that departs from the depot s∈S, where the locomotive is found at the beginning of the planning period, to serve the connection i∈L. The costs esik represent the costs that are connected with deadheading to the originating railway station of the connection i and with serving the connection i. Costs oisk correspond to the costs that are associated with deadheading the own locomotive to the defined depot s∈S after serving the connection i∈L. And finally, let us denote the last group of costs cijk. The costs cijk are the costs for serving the connection j∈L arising if the own locomotive class k∈K must run from the destination railway station of the connection i∈L to the originating railway station of the connection j∈L (the connection j is served after the connection i by the same own locomotive and the destination railway station of the connection i differs from the originating railway station of the connection j; the locomotive must deadhead between these railway stations). If the connection i∈L is served by the external locomotive then the transport operator must pay a price di for serving the connection.For each connectioni∈L its scheduled departure time tdi from the originating railway station and its scheduled arrival time tai at the destination railway station must be given. For each connection i∈L we must also define a parameter pvik—how many locomotives of the class k∈K we need to serve the connection i.Because it is enabled that after serving the connectioni∈L the locomotive can serve the connection j∈L, we must define the time period tij- that expresses how much time the own locomotive (or the group of locomotives) needs to deadhead between the destination railway station of the connection i∈L and the originating railway station of the connection j∈L in order to serve the connection j∈L.Our task is to decide whether the individual connections should be served by the own locomotives or by the external locomotives. If the connection should be served by the own locomotives, it is also necessary to choose the suitable locomotive class. Please note that if the connection is served by an external locomotive, then the external transport operator also chooses the suitable locomotive class and therefore we do not solve these cases. Moreover, we must also define where the own locomotives should be found at the beginning of the planning period. The optimization criterion corresponds to the total costs resulting from serving the defined set of connections. It is more than obvious that our goal is to minimize the total costs.


## 5. The Linear Mathematical Model

To describe the linear mathematical model we must discuss the depots. The depots represent two types of places—the place the own locomotive departs from to serve the planned connections (the originating depot) and the place the own locomotive arrives in after serving the planned connections (the destination depot). In practice it is usual that the originating depot is the same as the destination depot. However, a potential difference between the sets of the originating and destination depots has no influence on the presented mathematical model. A setS corresponds to the set of the depots. In the proposed model it can hold that S>1. In this case the model does not ensure the same numbers of the locomotives of the individual classes in the originating and the destination depot. The model ensures such transfers that are the most advantageous from the point of view of the total costs. If the transport operator requested the same number of locomotives in the originating and destination depots (that means each locomotive must return to the depot where the locomotive was found at the beginning of the planning period), the model should be supplemented by a suitable constraint ensuring it.The individual connections are arranged according to their scheduled departure times from the originating railway station. That means the connection that is scheduled to depart first has subscript 1 and the connection with the last departure time has subscriptm.The model functions as follows.(1)
If it is requested that at least two locomotives must be used to serve the connection, the model must assign the requested number of locomotives to this connection. Please note that the model uses locomotives of the same class in such cases.(2)
If the connection is served by a group of locomotives, then all the locomotives from the group go together from the departure from the originating depot to the arrival in the destination depot.(3)
If it is not possible to move any own locomotive (or any group of the locomotives) after serving the connectioni∈L to serve the connection j∈L or such move is not advantageous from the point of view of the objective function, then the connection j∈L is served by a locomotive (or a group of locomotives) departing from one of the originating depots.(4)
If no locomotive (or group of locomotives) is available or no move of any own locomotive (or any group of locomotives) is advantageous, then the connectionj∈L must be served by an external locomotive.(5)
It was written in the previous text that it is not possible to serve some connections by some locomotive classes. The fact that the connectionj∈L can be or cannot be served by the locomotive class k∈K is modelled using an incidence matrix A. Elements of the matrix A take value 0 or 1. It holds that if pvjk>0 then ajk=1 and if pvjk=0 then ajk=0.(6)
If the locomotive (or group of locomotives) serves a subsequent connection after serving the previous connection, the move between the connections must be admissible from the point of view of time. The admissibility of the locomotive which moves to serve the connectionj∈L∖{1} after serving the connection i∈L∖{m} is ensured using an incidence matrix B. Elements of the matrix B also take value 0 or 1. If it holds that tai+tij-≤tdj for a pair of the connections i∈L∖{m} and j∈L∖{1}, then bij=1; otherwise bij=0.(7)
If the own locomotive (or group of locomotives) cannot move to serve the next connection or the move is not advantageous, then the locomotive (or group of locomotives) deadheads to the destination depot.Summary of the Symbols Used in the Mathematical Model. The symbols are as follows:mk: The number expressing how many locomotives of the class k∈K can be allocated to the depots (the number of locomotives the transport operator owns).cijk: The variable costs that correspond to deadheading the locomotive of the class k∈K to serve the connection j∈L after serving the connection i∈L and the service of the connection j∈L.eslk: The variable costs that include deadheading the locomotive of the class k∈K from the depot s∈S to serve the connection l∈L and the service of the connection l∈L.olsk: The variable costs resulting from the situation when the locomotive of the class k∈K is deadheaded to the depot s∈S after serving the connection l∈L.dl: The price the transport operator pays for serving the connection l∈L by the external locomotive to the external transport operator.fk: The fixed costs related to each locomotive of the class k∈K.pvlk: The number expressing how many locomotives of the class k∈K we need to serve the connection l∈L.Nsk: The variable modeling how many locomotives of class k∈K are found in the depot s∈S at the beginning of the planning period.zl: The variable modeling the decision on whether the connection l∈L will be (zl=1) or will not be (zl=0) served by the external transport operator.xijk: The variable that models deadheading the locomotive (or group of locomotives) of class k∈K to serve the connection j∈L after serving the connection i∈L.usjk: The variable that models the locomotive of the class k∈K departing from the originating depot s∈S to serve the connection j∈L (usjk=1); in other cases usjk=0.vjsk: The variable that models the locomotive of the class k∈K deadheading to the destination depot s∈S (vjsk=1) after serving the connection j∈L; if not then vjsk=0.The mathematical model has the following form:(1)min⁡fN,z,x,u,vmin⁡=∑s∈S∑k∈KNsk·fkmin⁡+∑i∈L∖m∑j∈L∖1∑k∈Kpvjk·cijk·xijkmin⁡+∑j∈Ldj·zjmin⁡+∑s∈S∑j∈L∑k∈Kpvjk·esjk·usjkmin⁡+∑s∈S∑j∈L∑k∈Kpvjk·ojsk·vjsk(2)subjectto∑s∈SNsk≤mkfork∈K,(3)subjectto:∑j∈Lusjk·pvjk≤Nskfork∈K,s∈S,(4)subjectto:zj+∑k∈Kajk·∑i∈L∖mbij·xijk+∑s∈Susjksubjectto:=1forj∈L,(5)subjectto:∑i∈L∖mbij·xijk+∑s∈Susjksubjectto:-∑i∈L∖1bji·xjik+∑s∈Svjsk=0subjectto:forj∈L,k∈K,(6)subjectto:zj∈0,1forj∈L,(7)subjectto:xijk∈0,1fori∈L,j∈L,k∈K,(8)subjectto:usjk∈0,1fors∈S,j∈L,k∈K,(9)subjectto:vjsk∈0,1forj∈L,s∈S,k∈K,(10)subjectto:Nsk∈Z0+fors∈S,k∈K.Let us discuss the model. Function (1) represents the optimization criterion—the total costs of the transport operator associated with(i)
serving the planned connections,(ii)
keeping all the own locomotives in working condition,(iii)
a sum of money the transport operator pays to the external transport operators if some connections are served by them.Let us focus on the meaning of the individual parts of function (1). The first part represents the costs that do not depend on the realized traffic performance (by the realized traffic performance we mean serving the individual connections and necessary deadheading among the connections). The first part of the function includes all the costs arising when the own locomotives are idle (e.g., daily costs of locomotive parking in depots, etc.) The other parts of function (1) correspond to the costs that depend on serving the connections. The costs include the costs of traction energy or fuel, the costs of a train crew, or infrastructure charges. The second part of the function expresses the costs in the case that the connections are served by the own locomotives. It includes the costs that are connected with serving the connections by the own locomotives and locomotive deadheading among the scheduled connections if it is necessary for serving the following connection. The third part represents the costs arising when the connections are served by the external locomotives. The costs correspond to the prices that the transport operator must pay to hired transport companies. The penultimate part of function (1) includes the costs of own locomotive deadheading from the depot (where the locomotive is found) to the place where the own locomotive (or the group of the locomotive) starts to serve its first scheduled connection. And finally, the last part of function (1) expresses the costs of own locomotive deadheading after serving the last scheduled connection (the locomotives return to the depot).The group of constraints (2) must ensure that the numbers of the locomotives allocated to the individual depots do not exceed the given limits mk for any locomotive class. The value mk represents the number of the own locomotives of the class k∈K. It is obvious that it is not possible to allocate more own locomotives than the transport operator owns to the individual depots. This is ensured by the group of constraints (2). The group of constraints (3) assures that the number of locomotives of the class k∈K that depart from the depot s∈S to serve the connections does not exceed the number of the locomotives found in the depot. It is clear that the number of the locomotives departing from the depot s∈S must not be higher than the number of the locomotives allocated to the depot and the group of conditions (3) ensures it. The group of constraints (4) ensures that each connection l∈L will be served. The group of constraints (5) models the continuity of the locomotive class at the beginning and at the end of the connection. The groups of conditions (6)–(10) represent domains of definition for all the variables used in the mathematical model. Please note that if the capacity of any depot was limited, a capacity constraint related to the depot should be added to the mathematical model.


## 6. Case Study

The proposed model was tested in the conditions of the railway network in the Czech Republic and partially in Slovakia. There are 20 relations in the case study (see Figure1). Figure 1 depicts 10 relations only because each relation is served in both directions (e.g., the relations Ostrava-Přerov and Přerov-Ostrava).Figure 1
The map of the individual relations.For each relation its length in [km] and assumed weight of the trains in [t] are given. The weights of the trains take their values from 700 tons to 2,400 tons.The model was tested on the situation in which the real transport operator must serve 50 connections per day. The defined number of connections per day corresponds to real traffic situations that the transport operator handles ordinarily. For each connection the expected departure time from the originating railway station and the expected arrival time in the destination railway station are defined. Apart from the departure and arrival time, a manipulation time of 2 hours is given. The time is reserved for all the technological operations that must be done in the railway station if the locomotive serves the subsequent connection after finishing the previous connection.The transport operator owns locomotives of two classes, class 753.7 (diesel-electric locomotives) and class 189 (electric locomotives). For each class we know the number of locomotives the transport operator owns and the fixed costs per day for keeping the locomotive of the given class in working condition. The relations Ostrava-Domažlice and Teplice-Kladno must be served by the locomotive class 753.7; the other relations can be served by both locomotive classes. In consideration of the train weights we assume that the locomotives of class 753.7 are used in pairs whereas the locomotives of class 189 are used separately. At the beginning of the planning period the own locomotives are allocated to two depots, the depot situated in Ostrava and the depot in Ústí nad Labem. It holds that both depots have sufficient capacity for both locomotive classes.The last type of entry data is the prices that are charged to the transport operator if the connection is served by the external transport operator. The prices for using the external locomotives are in the range of 95% to 120% of the transport operator’s costs if the connection would be served by an own locomotive (or group of locomotives).The solving algorithm is as follows.(1)
Calculate the costs of serving the individual connections under the condition that the connection is served by two locomotives of class 753.7 or one locomotive of class 189.(2)
Compute the costs of deadheading the locomotives from the individual destination railway stations to the individual originating railway stations (such moves occur if the locomotive serves a subsequent connection after serving the previous connection), from the individual depots to the originating railway stations (such moves occur if the locomotive serves its first connection) and from the destination railway stations to the depots (after serving the last connection).(3)
Order the individual connections that must be served according to their departure times from the originating railway stations.(4)
Substitute the values calculated in the previous steps into model (1)–(10).(5)
Run the optimization experiment using suitable software. We used optimization software Xpress-IVE for all the experiments carried out with the proposed model.On the basis of the experiments with the model we can say that the model is fully functional. We used a personal computer with the following parameters: the processor Intel Core 2 Duo E8400 and 3.25 GB of RAM. Using this computer the computation times were close to 0 seconds in the case of our example. After testing the functionality of the model we can proceed to carry out other experiments.In the framework of the second experiment we would like to find out if it is possible to serve all the connections by using only the operator’s own locomotives (it is not possible to hire external locomotives). And the third experiment was focused on the following situation. We know that we do not have enough locomotives. And we want to know what is the minimal number of connections that should be served by external locomotives under the condition that all the connections will be served.Solving these experiments was also successful. After the second experiment we know that there is no admissible solution. That means it is not possible to serve all the connections with only the own locomotives; for some of the connections the transport operator must hire external locomotives. Experiment 3 was carried out in steps—the number of the connections that are served by external locomotives was gradually increased by 1. The third experiment was stopped once we found an optimal solution—the first optimal solution was found for 4 connections. That means at least 4 connections must be served by external locomotives. The computation times were negligible (again close to 0 seconds) for all the experiments.


## 7. Conclusions

The paper focuses on a special type of locomotive scheduling mathematical model. The request for the presented mathematical model was made by the actual transport operator. We think it is very important and advantageous because the model may be used by transport operators in practice. The model enables making decisions about three problems:(i)
allocating the locomotives to the depots,(ii)
locomotive scheduling,(iii)
advantageousness of external locomotive hiring for serving some connections.We think that solving the third problem is novel because we have not encountered it in the available literature. Our mathematical model extends the spectrum of existing mathematical models used for solving the locomotive assignment problem with a new model that has not been published yet.The created model was tested in the conditions of the real transport operator. The model was applied for a situation when the planning period was equal to one day. However, the model can also be used for longer planning periods. It is typical for the longer planning periods that some relations are served several times and it is possible to serve more than one connection with the same locomotive (or group of locomotives) during the planning period. The shorter planning period usually results in a shuttle service—the locomotive returns to the depot after serving one connection. If the planning period is longer, then the locomotive can serve several consecutive connections without going back to the depot.The presented model also solves how the own locomotives should be allocated to the depots and can answer the question of whether it is necessary or advantageous to hire external locomotives for serving some connections. And finally the model is also applicable for situations when some connections cannot be served by some classes of locomotives.The model can be used when a planned timetable is respected. However we can apply the model to estimate the number of locomotives in such cases when respecting the timetable is not assumed—we can consider different variants of the real operation (a pessimistic variant, an optimistic variant, etc.).The results of all the experiments showed that the presented model functions effectively and correctly. Therefore the model can be recommended for use in the conditions of medium-sized railway transport companies.



---

*Source: 583909-2015-03-02.xml*