LOCOMOTIVE ASSIGNMENT OPTIMIZATION INCLUDING TRAIN DELAYS

Intention– Cyclic locomotive assignment planning is a specific type of organization of locomotive usage, and in fact, it means putting the complete workload to a closed chain, which is repeated periodically. The concept of cyclic locomotive assignment planning type organization in the area of train traction has proven in practice as the best one, but as it is made for in-advance defined timetable and without considering the stochastic nature of the timetable realization process, it leads to incompatibility in using locomotives. Methodology – Methodology defined in this paper contains: research of train delays on the Serbian Railways and Montenegrin Railways networks, analysis of the real system organization of locomotive usage in conditions of train delays, theoretical thesis of solving the problem of optimal cyclic locomotive assignment planning in conditions of train delays, designing of a model with algorithms, preparing the software package, testing the model and program with results, as well as the conclusions drawn from the complete research project. Results– The optimization model of cyclic locomotive assignment planning during the process of making timetable including train delays has been defined. Conclusion –The obtained results have shown as expected, that the larger delays of trains required a larger number of locomotives. However, by using this model it is possible to optimize the required number of locomotives, taking into account the real time delays of trains.


INTRODUCTION
Given a planned train schedule, the locomotive assignment problem consists of assigning a set of locomotives to the scheduled trains to satisfy the requirements expressed as a number of locomotives or as a measure of the traction power needed.Locomotive scheduling (assignment) problems are among the most important problems in railroad scheduling.Locomotive scheduling problems can be studied at two levels: the planning level (strategic) or the operational level.In strategic planning, the objective followed is usually to minimize the required fleet size.At the tactical and operational levels, the available rolling stock is given and one usually wants to minimize the costs incurred by light running.
Various locomotive scheduling models have appeared in the literature.The paper by Cordeau et al. [1] presents an excellent survey of the existing locomotive planning models and algorithms for the locomotive planning problem.There are two kinds of locomotive planning models: Single and Multiple ones.Single locomotive planning models assume that there is only one type of locomotive available for the assignment.These models can be formulated as minimum cost flow problems with side constraints.Some papers on single locomotive planning models are due to Wright [2], Forbes et al. [3], Booler [4], and Fischetti and Toth [5].Single locomotive planning models are better suited for some European railroads rather than North American railroads since most North American railroads assign multiple locomotive types to trains.Multiple locomotive planning models have been studied by Florian et al. [6], Ramani [7], Smith and Sheffi [8], Cordeau et al. [9], and Ziarati et al. [10].Ziarati et al. [11], solve the locomotive assignment model using train delays.Ziarati et al. [11] propose an evolutionary approach to solve the cyclic locomotive assignment planning problem.The most comprehensive and re-cent multiple locomotive planning models are due to Ahuja et al. [12] and Vaidyanathan et al. [13].Ahuja et al. [12] formulated the locomotive planning problem as a mixed-integer programming problem and solved it using techniques from Very Large Scale Neighbourhood Search (VLSN), linear programming-based relaxation heuristics, and integer programming.Vaidyanathan et al. [13] extended this approach to several dimensions by adding new constraints to the planning problem required by railroads and by developing additional formulations necessary to transfer solutions of the models to practice.
Most models have given a planned train schedule.The developed model presented in this paper enables the optimisation of locomotive assignment during the development of timetables, taking into account train delays.
In this research it is assumed that all trains do not run on time, and a locomotive was assigned to each train to minimize the number of locomotives.It is shown that on the planning level a significant reduction of the number of locomotives is possible.

PROBLEM DESCRIPTION
In this section, we present our approach to solve locomotive assignment problem as it is presented in Figure1.
The basic idea of this model is a parallel compilation of a timetable, including train delays, and locomotive assignment by means of a simulation in or-der to achieve maximum harmonisation between the timetable and the locomotive assignment.This can be achieved if we start from the requirement that a timetable, departure and arrival of every train must meet the requirement of train users and the transport operators to use their capacities as much as possible.This model should be used jointly by timetable compilers and traction dispatchers during the development of timetables.Considering the nature of the problem, it is necessary that the model and the program also support expert opinion and decisions of their users, and for this reason, the model could also be characterised as being not fully simulative.
The principle of a parallel development of a timetable and of locomotive assignment in this model implies two cases of train-to-train connection for which it is specified which inbound trains and outbound trains can be connected.The first case is optimal train-totrain connection, for trains whose times of departure and arrival are set in advance and need to be observed.For trains from international passenger traffic, and for international express trains and express freight trains departure times are set in advance at the European conferences on passenger and freight timetables.Since these times have to be adhered to, our model is based on that principle; in other words, the first case, i.e. an optimal connection refers to these trains.The second case implies the matching of trains and then train-to-train connection, for trains whose departure and arrival times are moveable.For trains in national common, train departure times are set based on the technical possibilities and determined business policy of the company.In local passenger traffic, the departure times are subject to a tact timetable, and therefore, they will not be taken into consideration in this model.In that way, departure and arrival times of trains are adjusted with minimum waiting time of locomotives.
The requirements imposed on passenger timetables and those imposed on freight timetables are not the same.This is important for locomotive assignment.If possible, considering the number of passenger and freight trains running on a relation, or different types of locomotives for hauling passenger and freight trains, from the aspect of reliability in maintaining the timetable, i.e. the locomotive assignment, it is preferable to create separate locomotive assignments for passenger transport and for freight transport.This would give higher reliability to the locomotive assignment in passenger transport, and lower reliability in freight transport depending on the number of cancelled, i.e. newly introduced freight trains.This model is primarily intended for developing locomotive assignment in passenger traffic.
The objective of the model is to route locomotive units in cycles in such a way that each unit waits minimum time in turnaround station.The compat- For the purpose of this model, the data on train delays during one year were tested.The research included twenty-six long-distance trains, both in the national and in the international traffic, on ten relations on a part of the Serbian Railways and Montenegrin Railways networks.The statistical analysis covered in this research consists mainly of the identification of appropriate distributions of the studied data, the assessment of parameters in the selected distribution, and the validation of the assumed distribution using the chi-square test.Statistical distributions of train delay times in departure and arrival are studied for every train on all relations, every relation by departure and terminal stations and the departure and terminal stations (station-related train delay time).The results obtained from these computations were used to test the model for the optimisation of locomotive assignment that was developed in this paper.
The model was designed to solve the problem of optimal locomotive assignment for an arbitrary railway network with multiple lines; in other words, the optimisation may be performed on the entire territory of any railways, or on any of its segments (directorates, lines, traction sections).

The first stage
In the first stage of work with the model and the program, it is necessary to enter inputs into the model (for the part of the network that is being optimised), and these inputs are the data on stations, relations, preliminary timetable, and sequence of sections.
Stations taken into consideration are departure and terminal stations of traction sections or relations, as well as those stations where locomotives will be changed.Some of the relations can be equal to traction sections.For trains in international traffic, these are departure and terminal stations of traction sections.
All stations entered into the model are considered as stations where locomotive operations will be optimised until their cyclic locomotive assignment has been fully defined.The model and program are so designed that after fully defining the cyclic locomotive assignment, they give, as an output, the station of origin of a locomotive, and its turnaround stations.No optimal waiting time is given for the station of origin.The optimisation of locomotive operations will be carried out only in turnaround stations.
Such an assumption was made because in the stations of origin, as a rule, locomotives go to the depot for daily or other maintenance of locomotives, and cannot be immediately used to pull other trains, because they depend on the time of exit from the depot.
The necessary input on stations includes the station name, defined technical layover time for locomotives in the station, distribution (with parameters) of delays of a train departing from a selected station, distribution (with parameters) of delays of a train arriving at a selected station.These data are stored in a database.The model enables adding new stations and editing the existing ones.
After having entered the data on stations to be optimised, the relations are to be entered.The relations are formed by train category for the selected departure and terminal stations.The necessary input on relations includes the train category, the departure and terminal stations of relation, the running time of trains of specific categories between the departure and terminal stations under consideration, the distribution (with parameters) of delays of a train of the selected category departing from a selected departure station, the distribution (with parameters) of delays of a train of the selected category arriving at a selected terminal station.
For the selected departure and terminal stations, and the train category, depending on the number of trains of the selected category specified in the timetable, the same number of relations shall be defined.According to the same analogy, the same shall be done for all selected departure and terminal stations, and all selected train categories.The model enables adding new relations and editing the existing ones.
After having entered all relations by train category, it is necessary to form a preliminary timetable.This timetable is generated automatically based on the previously selected relations and the number of trains by category.When the timetable is generated, the following data are entered: train number, preliminary train departure times (PDT) and preliminary train arrival times (PAT).
The data entry stage is finished by entering the sequence of traction sections.For relations with several traction sections, it is necessary to define their precise sequence.The necessary input on the sequence of sections includes the train number, sequence of sections, departure and terminal stations of traction sections.

The second stage
The second stage of work with the model and program is computing of the actual departure times (ADT) and actual arrival times (AAT) where train delays are included.Based on PDT and PAT, in the function of de-lays of these trains in departure and arrival, ADT and AAT for these trains are calculated.
The input for this part of the model and program covers train numbers, train categories, relations (departure and terminal stations), PDT, PAT, sequence of sections, and distribution of train delays in departure and arrival with parameters by relations and stations.
The effect of international train delays on the implementation of the timetable and on the organization of locomotives for trains cannot be neglected.
At the very beginning of the work, first the probability of the train delays is selected.It means, if the probability of the train delays is 50%, the train will arrive on the calculated time at the destination with probability of 50%.Then the international passenger trains are set by train number, and they are then followed from the beginning to the end of their relations.Based on the pre-defined train delay distribution functions with pertaining parameters, and a selected delay probability, it is necessary to compute the delay time for every train, both in departure and in arrival.
ADT and AAT for trains are calculated "through a period of time".The time range is 00:00-24:00, where each step represents one minute.The first train and its departure or arrival are taken first.For the first train I found on p p i j -relation, the first traction section is selected, and the actual time of its departure from the first station, and the actual time of its arrival at the second station on the traction section are computed.The actual train departure time is in the function of time delay in departure t 1

ADT f td
AAT f td a = ^h (2) Furthermore, for this train, the calculated time delay in departure td d is added to the preliminary departure time, thus adjusting the actual departure time (3).
(3) Further on, the time delay in arrival is calculated for that train td a and added to the preliminary arrival time, thus obtaining the actual arrival time of the train in the terminal station of the traction section under consideration (4).
) When computing the actual time of departure on the second traction section, as well as on all other traction sections, the actual time of arrival is increased by the previously defined length of stop of the train in the station where the locomotive is changed, and by the station-related train delay time in departure for the given station (5).
In relation (5) ts t is pre-defined length of stop of the train (according to the timetable) in the given station, and t d d s ^h is the computed station-related train delay time in departure for the given station.
The actual time of arrival at stationj, AAT j is computed according to (4).This train is then followed to the end of its relation.The next train is taken, and similarly, all passenger trains are processed.The same methodology is applied to compute the actual departure and arrival times in all other train categories.
ADT and AAT obtained and determined in this phase of the model and program are entered into the preliminary timetable.For international passenger trains the preliminary timetable will not be changed.

The third stage
The third stage of work with the model and program serves to make optimal train-to-train connection between the inbound and outbound trains (for trains in international traffic).These are: optimisation of arrival times for locomotives in turnaround stations and optimisation of departure times for locomotives from turnaround stations.
As the first way of connecting trains we may take the connection of trains by category, i.e. first international passenger trains are connected (only those that meet the minimum length of the stay condition), international freight trains, and non-connected international passenger trains, then passenger trains in the national traffic with non-connected international passenger and international freight trains.After that, freight trains in the national traffic are connected, as well as all non-connected trains regardless of their category.The second way to connect trains is to connect all trains regardless of their categories.
The input for this part of the model and program covers train numbers, departure and terminal stations, ADT and AAT.
In order to simplify the presentation and explanation, the following terms will be used from there on: the inbound train (IT) and the outbound train (OT).Technically speaking, IT is the train that arrives at the turnaround station, and OT is the one that is served with the locomotive that hauled IT.
The time range is 00:00-24:00, where each step represents one minute.The first train and its arrival or departure is taken first.
The first case: If the arrival of IT in the turnaround station is in question, all trains departing from that station are listed out, if their departures are not connected, with pertaining times of waiting for locomotives tw l .Namely, the actual arrival time of IT is increased by the technical layover time for locomotives in that station ttec , thus giving the preferable departure time tp d of another train in the opposite direction or to another line (6) The variation from the preferable departure time of another train is the time of waiting for locomotives.Thus, a set of waiting times for locomotives is formed tw l " ,.If an adequate optimal time is found in the set of waiting times tw l " ,, that train is connected with IT.In technical terms, this means that OT will be served with the locomotive that hauled the IT to the turnaround station.
In order to follow the interconnection of trains, the records of connected trains are kept, both for ITs, and for OTs.For a train that arrived (IT), the fact that its arrival is connected with OT train (OT number) is noted, and for a train that departs (OT), the connection between its departure and IT (IT number) is noted.The connection number "i" is attributed to these trains.Technically speaking, this means that they are attributed to the same locomotive.Then the Cyclic Locomotives Assignment sub-program is called, and the work proceeds with the results that have been returned by the sub-program.How the Cyclic Locomotives Assignment sub-program works is shown in Figure 2. It creates the Cyclic Locomotives Assignments for four cases that could be taken into consideration.
The second case: If the departure of OT from the turnaround station is in question, all trains arriving at that station are listed out, if their arrivals are not connected with the pertaining waiting times of locomo- = -^h (7) If an adequate time is found in the set tw l , that train OT is connected with the IT train.OT is the train departing from the observed turnaround station which is assigned the locomotive that hauled IT to the given turnaround station.Equally as in the first case, the records of connected trains are kept both for OT and for IT.
For the train that arrived (IT), the fact that its arrival is connected with OT (OT number) is noted, and for the IT, the fact that its departure is connected with OT (OT number) is recorded.The Connection Number "i" is attributed to these trains.Technically speaking, this means that they are assigned the same locomotive.Then the Cyclic Locomotives Assignment sub-program is called, and the work proceeds with the results provided by the sub-program (Figure 2).Cyclic Locomotives Assignment sub-program creates locomotives assignment for four cases that could be taken into consideration.
Case 1: When none of the observed trains that are to be connected is in any connection (locomotives assignment), they are connected and attributed a new Connection Number "i".
Case 2: When OT is in a connection, it is connected with IT to which OT′s Connection Number is attributed.
Case 3: When IT is in a connection, it is connected with OT which is then attributed IT Connection Number.

The fourth stage
The fourth stage of work serves to make optimal train-to-train connection for trains in national common whose times of departure and arrival are moveable (for trains in national common).
The time range is 00:00-24:00, where each step represents one minute.The first train and its departure or arrival is taken first.If the departure has come up, a preferable arrival time tp a is calculated according to the relation (7).Then, the two lists are simultaneously shown.The first list contains all trains that arrive at the observed turnaround station whose arrivals are not matched (connected) and on the second list shows the pertaining times of waiting for locomotives tw l (8).
A train IT is selected, so that its arrival matches the departure of the outbound train OT (9).

Train selection f train category and tw l
= ^h (9) The new actual arrival time (NAAT) of IT is inserted, which practically means that the arrival of IT is moved in order to meet the departure of OT.All changes are recorded in the timetable creating the final timetable.
Here two cases are distinguished, depending on whether AAT of IT is moved forward or backward.In the former case, IT's AAT moves backward (10), with the condition that NAAT tp a $ .
The t D is time by which IT's AAT and IT's ADT are moved backward.Then the new actual departure time (NADT) of IT is computed according to (11).
The optimal match would be achieved when NADT and NAAT would match preferable departure, i.e. arrival times.However, since the model is designed for a parallel development of a timetable and locomotives assignment, t D is in the function of the requirements that are related to the construction of the timetable graph.
In the latter case IT's AAT moves forward (12), with the condition that NAAT tp a # .
Then the NADT of IT is computed (13), where t D is time by which AAT and ADT of IT are moved forward.
Since this is about the departure of OT, the fact that the departure of OT (OT number) is connected with the arrival of IT (IT number) is noted, and so is the fact that the arrival of IT (IT number) is connected with the departure of OT (OT number).Then the Cyclic Locomotives Assignment sub-program is called and the work proceeds with the output obtained from the subprogram (Figure 2).
If the other branch of this algorithm is in question, i.e. if a non-matched train arrival is encountered, the preferable departure time tp d is calculated according to relation (6).Again, two lists are simultaneously shown.The first is the list of all trains that depart from the observed turnaround station whose departures are not matched, and the second is the list with pertaining times of waiting for locomotives tw l (14).
A train is selected IT, so that its departure matches the arrival of OT according to relation (9).The NADT of IT is entered, which practically means that the departure of IT is moved in order to match the arrival of OT.Here, two cases are distinguished, depending on whether IT's ADT is moved forward or backward.In the former case IT's ADT moves backward, with the condition that NADT tp d $ , and NADT is calculated according to (11).
Then the NAAT of IT, where t D is time by which IT's ADT and IT's AAT are moved backward, is computed according to (10).
In the latter case IT's ADT moves forward, with the condition that NADT tp d # .NADT is calculated according to (13).
Then the NAAT of IT, where t D is time by which IT's ADT and IT's AAT are moved forward, is computed according to (12).
Since this is about the arrival of OT, the fact that the arrival of OT (OT number) is connected with the departure of IT (IT number) is noted, and so is the fact that the departure of IT (IT number) is connected with the arrival of OT (OT number).Then the Cyclic Locomotives Assignment sub-program is called and the work proceeds with the results obtained from the sub-program (Figure 2).

The final stage
The outputs obtained from the model and programs are Cyclic Locomotives Assignment and Final Timetable.The model and program are so designed that after fully defining, the locomotives assignment they give, as an output, the station of origin of a locomotive, and its turnaround stations.

NUMERICAL TEST
In this section the model and program result are presented.The real-life timetable was used as the static input for testing the model, with a total of 72 trains taken into consideration.The model was tested on parts of the Serbian Railways and Montenegrin Railways networks that cover three railway routes Bel-grade-Subotica, Belgrade-Bar, and Belgrade-Niš.The traffic relations of the observed trains are Subotica-Belgrade-Subotica, Belgrade-Niš-Belgrade, Belgrade-Bar-Belgrade, and Subotica-Bar-Subotica.
The dynamic inputs for testing the model were train delay probability distributions, and the way of connecting trains into locomotives assignment.As the first way of connecting trains into locomotives assignment, the connection of trains may be taken by category.The second way to connect trains is to connect all trains regardless of their categories.
The model was tested with the train delay probabilities of 20%, 50%, and 90%, with the comparative performance indicators as shown in Table 1.
As output basic parameters are obtained, such as the total time of locomotive work, the total waiting time and the number of days in locomotive assignments as well as achieved parameters such as the necessary number of locomotives and the coefficient of time utilisation of locomotives.
The test results are given in Tables 2 and 3, with the train delay probabilities of 20%.A total of 72 trains has been taken into consideration and 13 Cyclic Locomotives Assignments were obtained.As an example, Table 2 shows recapitulated results of testing the model and Table 3 presents the results of one typical Cyclic Locomotives Assignment.
As an output result the station of origin (Subotica) and the turnaround stations (Belgrade and Niš) for a locomotive were obtained.In the last column No optimal waiting time of a locomotive including technical layover time (WT+TLT) is given for the station of origin, which is visible from the empty place of the last row and the last column in Table 3.
The final result of this model is Final Timetable which in our opinion does not need to be presented.

DISCUSSION
Due to the limited number of available locomotives at the Serbian Railways, their insufficient utilization and inadequate timetable, the main purpose of this research is to point out a possibility of better utilization of the available locomotives in order to achieve significant financial benefit along with timetable improvements.
According to the official records of the Serbian Railways, the locomotive utilisation is not satisfactory [14].They show that for passenger and freight trains locomotives spent 30% and 33% of total time, respectively, waiting for operation, which is quite high.One of the reasons for inadequate locomotive utilization is certainly train delay on the Serbian Railways network.
The result of this simulation showed that starting from the same preliminary timetable, but with different train delay probabilities, the needs for locomotives are different.In other words, the greater the train delays, the more locomotives need to be deployed to implement the final timetable.In case of raising train delay probabilities from 20% to 90%, the number of locomotives needed for service on a given part of the railway network rises by 7.14%, while the coefficient of time utilization of locomotives decreases by 3.14% (Table 1).
However, the result of this research showed that it is possible to achieve significant locomotive usage with timetable improvement.

CONCLUSION
Based on the conducted studies and the obtained results in this paper, the conclusion has been reached that the set model enables optimisation of locomotive assignment during the development of a timetable.This enables identification and minimisation of discrepancies in the use of locomotives.
The key characteristic of this model and program is that the uncertainty about the actual times of train departure and arrival at stations where locomotives are changed is explicitly taken into consideration.By varying the input parameter of the train delay coverage probability, the model enables experiments that can offer support in the development of locomotive assignments and timetables.
The software package for the optimisation of locomotive assignments was developed in Microsoft Visual Basic, ver.6.0, supported by Microsoft Access.The program works by respecting hierarchy-related requirements of certain train categories, and the time chronology in the traffic of trains on the railway network on which it is used.
The connection of trains into a locomotive assignment is not carried out automatically, but in interaction between the user (timetable compiler) and the computer, in order to enable separate optimisation in case when certain train categories and their locomotives need to be separated.The significance of the model and software package is reflected in the possibilities for its application to any railway network, with certain modifications.
Perhaps in the future it will be possible to additionally incorporate locomotive refuelling and maintenance needs in the model.It may also be concluded that numerous causes lead to disruptions in the implementation of timetables, which is not considered in this paper.However, one of the basic tasks in the era of fighting for quality is to test and search for real causes of train delays in the Serbian Railways network which could be considered for further research.
d d ^h,and the actual train arrival time is in the function of time delay in arrival t 2 d a ^h.

Case 4 :
When both trains are in connection.Here we have two different sub-cases.First sub-case is when OT′s Connection Number ≠ IT′s Connection Number.This means that for all traction sections where Connection Number = Connection Number (IT), the Connection Number IT becomes = Connection Number (OT).Second sub-case is when OT′s Connection Number = IT′s Connection Number.In this case, the Cyclic Locomotives Assignment of the locomotive unit is closed.
(7)lic Locomotives Assignment sub-program algorithmtives tw l .The waiting time is practically a variation from the preferable arrival time of some OT train tp a(7).

Table 1 -
Results obtained from testing the model and program

Table 2 -
Recapitulation of testing the model with the train delay probability of 20%