Optimizing the Long-Term Operating Plan of Railway Marshalling Station for Capacity Utilization Analysis

Not only is the operating plan the basis of organizing marshalling station's operation, but it is also used to analyze in detail the capacity utilization of each facility in marshalling station. In this paper, a long-term operating plan is optimized mainly for capacity utilization analysis. Firstly, a model is developed to minimize railcars' average staying time with the constraints of minimum time intervals, marshalling track capacity, and so forth. Secondly, an algorithm is designed to solve this model based on genetic algorithm (GA) and simulation method. It divides the plan of whole planning horizon into many subplans, and optimizes them with GA one by one in order to obtain a satisfactory plan with less computing time. Finally, some numeric examples are constructed to analyze (1) the convergence of the algorithm, (2) the effect of some algorithm parameters, and (3) the influence of arrival train flow on the algorithm.


Introduction
Railway marshalling station is the main place for disassembling and assembling trains in railway freight transport networks. Generally it can be divided into train arriving yard, railcar marshalling yard, and train departure yard consisting of many parallel tracks for different uses separately. The train arriving yard connects with the railcar marshalling yard by humps which are used to disassemble trains with gravitational pull, while railcar marshalling yard is connected to train departure yard by some lead tracks which allow for repeatedly assembling railcars. A typical marshalling station layout is shown in Figure 1, and the main operations can be described as follows.
(1) Inbound trains enter the arriving yard and wait for disassembling. (2) Disassembling engine pushes inbound train through the hump after necessary technical inspections, and then the railcars from dissembling run on different marshalling tracks. (3) Assembling engines pull strings of railcars from marshalling tracks to the departure track to make up outbound trains.
(4) Outbound trains depart from the departure yard after necessary technical inspections.
The above operations are entirely carried out according to a predetermined operating plan. It arranges the arrival track, the disassembling starting and ending time, the disassembling engine, and track assignments for each inbound train and the starting time, ending time, and the engine of assembling, the departure time, the component railcars, and storage track for each outbound train. The improvement of operating plan greatly contributes to decreasing railcars' staying time in station and enhancing station's operating performance. Besides, it has another important purpose of comprehensively analyzing the capacity utilization of a marshalling station, which is very beneficial for a railway company as it helps understand the station's limitations. According to a long-term operating plan, the general changing relationship between capacity utilization of each facility and some characteristics of arrival trains (e.g., arrival time distribution) can be obtained by repeatedly optimizing the long-term operating plan with different arrival train flow, which plays a significant role in the capacity-related decision making for a railroad company.  Generally, the operating plan of one day is divided into multiple time periods' plan, called stage operating plan, which arrange the inbound trains' disassembling, outbound trains' assembling, and shunting locomotive work. So far there are abundant studies on the stage operating plan. Li et al. [1] comprehensively reviewed the relative research on stage operating plans at marshalling stations; Gulbrodsen [2] was one among the first who studied the optimization of stage operating plan; Yagar et al. [3] studied the disintegration sequences of all arrival trains during all stages; Assad [4] considered the mutual interaction between different marshalling stations on the freight rail transportation network and presented work on train integration plan; Cicerone et al. [5] mainly worked on the planning of schedules during all stages; Shafia et al. [6] studied the robust of formation method for marshalling plans. In addition, some researchers, such as Hein [7], Petersen [8,9], Turnquist and Daskin [10], and Dimitri [11], also further studied the operations, dwelling times, and delays at marshalling stations.
Compared with the abundant studies on stage plan optimization, there are much fewer studies on long-term operating planning. They are different in planning scale and marshalling purpose. The stage plan usually uses 3 hours as a stage, which is relatively small in scale and aims at providing reference for disassembling, assembling, and shunting locomotives. On the other hand, the long-term marshalling plan is mainly used in analyzing the equipment utilization conditions of hump, arrival yard, marshalling yard, and locomotives under various arrival train flows in order to discover the capacity inefficiency at the marshalling station in time. It covers a variety of arrival train flow densities and its scale is at least ten times even more as big as the stage plan.
However, achieving a fine operating plan is challenging as it covers too many interrelated decisions. It is NP-complete (see [12]). Most of researches struggled to obtain a better stage operating plan for guiding stations' operations, and the main methods they used include simulation optimization and heuristics search.
Simulation optimization is a typical method used to solve the operating plan problem. Gulbrodsen [2] firstly used it to optimize the stage operating plan. Lentink et al. [13] established a mathematical model of stage operating plan with network flow method. However, the simulation optimization method has a low efficiency in solving the operating plan problem due to the large scale.
Heuristics search algorithms have been applied in many fields nowadays as they can obtain a satisfactory solution with shorter computing time, although they also have difficulty in achieving the best solution. Shen et al. [14] designed an adaptive colonial selection algorithm out of the immune algorithm to solve the operating plan of railway marshalling yard. Li et al. [15] used the hybrid heuristic algorithm based on the harmony search strategy to optimize the stage operating plan.
Besides, Hein [7] and Turnquist and Daskin [10] applied the queuing theory to research the operating plan of marshalling yard and railcars staying time and their delays in marshalling yard. Ma et al. [16] designed a self-learning algorithm for conflict detection and adjustment to increase operating plan's fulfillment rates.
Compared to the research of stage operating plan, very few researchers strived to optimize the long-term operating plan for analyzing the capacity utilization of marshalling station. In fact, it can provide time-varying details of capacity utilization while other analysis methods generally support a single utilization rate and so forth. This paper studies the optimization problem of long-term operating plan, as shown in Figure 2, and its main contributions are as follows. An optimization model of long-term operating plan is built firstly, and an efficient solving method is designed based on heuristics search (namely, GA) and simulation optimization. To be specific, in order to reduce the computing time, the The Scientific World Journal 3 long-term operating plan is divided into many subplans and then optimizes them one by one through combining subperiod rolling into GA. This paper is organized as follows. The operating plan optimization problem formulation is firstly built in Section 2, and then its solution framework is given in Section 3. Under this framework, a simulation method of operating plan with a given assembling sequence of railcars is proposed in Section 4, and the optimization method combining subperiod rolling into GA is designed in Section 5. After that, the numerical analysis is provided in Section 6, and at last some conclusions are presented in Section 7.

Formulation of Operating Plan
Optimization Problem

Notations and Assumptions.
All symbols for optimizing operating plan are denoted as shown in Notations section. All assumptions are given as follows.
Assumption 1. Each arrival track (departure track) only stores one inbound train (outbound train) at the same time and its length is enough to hold all railcars of any train.
Assumption 2. All railcars' size and shape are the same, and they are all allowed to be pushed to the hump for disassembling.

Optimization Goal.
Minimizing railcars' total staying time from their arrival to departure at the station is the primary goal of operating plan optimization, which has been the focus in many studies on operating plans, for example, Lin and Cheng [17,18]. Once railcars arrive at station with an inbound train, if they will stay in station until the end of plan horizon, railcars' total staying time is from their arrival time to the end of plan horizon; namely, In fact, most railcars will assemble into an outbound train and depart from station at the end of plan horizon. Only a small part will stay in station. So the time from railcars departing from station to the end of plan horizon should be subtracted from , and railcars' actual staying time can be calculated as follows: where L , L , L V are the occupation signs of arrival track , marshalling track , and departure track V, respectively. If > 0, then L = 1; otherwise L = 0. If ̸ = 0, then L = 1; otherwise L = 0. If V > 0, then L V = 1; otherwise L V = 0.

Marshalling Track Capacity
Constraint. The number of railcars on each marshalling track shall not exceed its storage capacity ; namely, And the number of railcars of inbound (outbound) train meets the arrival (departure) track capacity requirement according to Assumption 1.

Task Order
For simplicity, railcars strings' pull time described here only distinguishes first track pull and additional track pulls, regardless of the number of railcars of each track pull.

Outbound Train Size and Railcar Direction Combination
Constraints. The outbound railcars direction combination specifies which railcars can be put together and their order on a departure train. For example, the feasible direction combination "A1, A2" means that outbound trains can be formed with railcars "A1" or "A2" or "A1, A2. " Therefore, all railcars constituting outbound train must belong to a given direction combination; namely, Meanwhile, the number of railcars of each outbound train must meet the minimum and maximum requirements; namely,

Railcars to Track Assignment Constraints.
One marshalling track can be only assigned to railcars of one direction at any time. Railcars of any other direction are allowed to stay in the marshalling track after it is cleared: = , ∀ , ∈ ; = 1, 2, . . . , .

Solution Framework Based on GA and Simulation
In order to minimize railcars' staying time in station, inbound trains should be disassembled immediately once they enter the arrival yard, and railcars should be assembled into new outbound trains once they meet all assembling requirements. In fact, some inbound trains cannot be disassembled in time because of the capacity limitation of disassembling engine. Likewise, some railcars cannot be assembled into outbound trains timely due to the capacity limitation of assembling engine. So the following two problems have to be solved in the first place.
(1) Which inbound train should be disassembled first, which is equal to determining the disassembling sequence of inbound trains?
(2) Which railcars should be first assembled into an outbound train, which means to confirm the assembling sequence of railcars?
If the disassembling sequence of inbound trains is predetermined, it is a priority to assemble railcars whose directions belong to the same combination and maximize the number  of railcars to an outbound train. Similarly, if the assembling sequence of railcars is pregiven, it should firstly disassemble inbound train with the maximum railcars assembled into the next outbound train. Compared with railcars' assembling sequence, it is more difficult to optimize the disassembling sequence of inbound trains as it has more relative constraints, such as inbound trains' arriving sequence and arrival track number. Thus, GA is chosen to optimize railcars' assembling sequence in the paper, and, based on each acquired assembling sequence of railcars, a simulation method is used to determine disassembled trains, starting and ending time of disassembling and assembling, and so forth, as shown in Figure 3.
With a long scale of planning horizon, it is inefficient to search the large-scale solution space of railcars' assembling sequence within the whole planning horizon. Considering that a long-term operating plan could be divided into several short period subplans, railcars' assembling sequence is optimized by combining subperiod rolling into GA in this paper. Firstly, a relative short period (e.g., 1 day) from the starting time of planning horizon is chosen, and its assembling sequence is optimized using GA. Then roll forth a new same-length period, and optimize this period's code of each individual while holding previous periods' code unchanged. The whole operating plan will be obtained by continuously optimizing each subperiod's code, as shown in Figure 4. Specially, there is an overlap code between two adjacent code sections, which contributes to their joining. Moreover, the fitness is to evaluate the quality of code sections which starts from individual subperiod's first code and ends The Scientific World Journal 5 at current period's last code. In other words, it evaluates the operating plan till the end of current period. A more detailed explanation of the optimization method shown in Figure 4 is given as follows. The code sections 1 and 2 of four individuals in Figure 4 represent the codes of the first and second short time periods, respectively. Each gene is an integer between 1 and the combination number of , which represents the index of a direction combination in . For example, code section "25143652641, " which means that outbound trains will be assembled with direction combinations 2 , 5 , 1 , 4 , 3 , 6 , 5 , 2 , . . . successively, represents the code of individual 1 in the first short time period, and code section "64123545621" expresses the code of individual 1 in the second short time period. It is necessary to point out that there is an overlap code "641" between code section 1 and code section 2 of individual 1. The representing way of other individuals' code section is similar to these. When optimizing the operating plan, the code section 1 will be optimized firstly using GA, and then, keeping the code section 1 subtracting the overlap code unchanged, GA is used again to optimize the code section 2. Moreover, while optimizing the code section 1, fitness 1 of each individual is reckoned based on the operating plan of the first short time period, but, while optimizing the code section 2, fitness 2 of each individual is calculated based on the operating plan from the first short time period to the second short time period.

Definitions of Events.
Six events related to operating plan are defined in Table 1. Each event's occurrence depends on the satisfaction of its relative prerequisites, so its occurrence time is the time when all relative prerequisites are satisfied. Each event's occurrence would make some facilities' state changed. According to a station's current state, events' occurrence time is determined as follows.

Inbound Train Entering.
Inbound trains are allowed to enter the marshalling yard with free tracks when they arrive at station. If there are no free tracks at their arriving time, they have to wait outside of there. Denote by the earliest time when at least one free arrival track exists from now on and by a free arrival track. If there is more than one free arrival track at the same time, it represents any one of them. So the occurrence time of inbound train entering event is the largest of * and ; namely, After this event occurs, the time of inbound train * entering arrival yard is * = , and its storage track is * = .
Meanwhile, the state of track transfers from being free to being occupied; that is, = * .

6
The Scientific World Journal

Disassembling Start.
Denote by the earliest time when at least one inbound train satisfies the disassembling requirements and by ℎ the earliest time when one disassembling engine is free. Then the calculation of disassembling starting time should consider the following two situations according to the relationship between and ℎ .
(1) When ≥ ℎ . In this case, disassembling starting time ℎ is the time when inbound train satisfies the disassembling requirement; namely, Suppose train satisfies disassembling requirements on track .
(2) While < ℎ . In this situation, disassembling starting time ℎ is the time of disassembling engine being free; namely, As there may be more than one inbound train which satisfies disassembling requirements until the time ℎ , denote by Ω ℎ the set of these trains. In order to assemble more railcars into the next outbound train, choose train containing maximum railcars, whose directions belong to the next assembling combination * . It satisfies * where * is the number of railcars, whose directions belong to combination * , on train .
When starting disassembling train at ℎ = ℎ , the disassembling engine's state would be transferred from free to busy, and the state of track would be transferred from occupied to free; that is, When train ℎ ends disassembling at ℎ ℎ = ℎ , its railcars staying tracks are determined as follows. If one track has stored railcars and the car number is less than its maximum storage capacity, then the railcar would be humped into this track, or else any empty track would get this railcar. Disassembling engine's state would be transferred from busy to free, and the number of storage railcars on some marshalling tracks would increase; that is, 4.1.4. Assembling Start. Denote by the time when the departure yard has free tracks, by the free assembling engine, and by = min{ } its earliest free time. The number of railcars, whose directions belong to combinations * , reaches the minimum size of outbound train at time . Then the starting time of assembling is Therefore, the next outbound train * will be assembled with component railcars by engine * = at * = . Component railcars of train * are determined as follows. Firstly, choose one direction in combination * in a given sequence. Then choose an occupied marshalling track whose storage railcars' direction is the same as the selected one. If its railcars number does not exceed the maximum size of outbound train, then add them into ; otherwise, choose a part of them just reaching the maximum size.
The corresponding state changes include the free assembling engine turning into busy and some marshalling tracks turning into empty or their storage railcars number decreases; that is,

Assembling End.
The event of assembling end should only occur after starting assembling train. If all assembling engines do not work now, the assembling ending time is +∞; otherwise, it is the time at which one assembling engine completes assembling the current train ; namely, Therefore, the assembling ending time is When train ends assembling at = , assembling engine turns into free, and departure track V storing train turns into occupied; namely, The Scientific World Journal  (1) If ≤ , then the train departure time is = , and suppose train V completes the technical inspection firstly.
(2) If > , then the train departure time is = . As there may be more than one outbound train that completed the technical inspection at that time, choose train V with the maximum number of railcars so as to make more railcars depart from station.
After train V departing from station at V = , the occupied departure track V turns into free; namely,

The Simulation Framework and
Steps. As railcars whose directions belong to the same combination could be assembled into the same outbound train, railcars' assembling sequence is described with a sequence of direction combinations. For a given combinations sequence , determine each event occurrence time according to facilities' usage states from the starting times of planning horizon. Then choose the earliest event, and update its relevant equipment's states. This process is repeated to obtain (1) entering time, arrival track for staying, and disassembling plans of each inbound train and (2) assembling plan, storage departure tracks, and departure times of each outbound train until the end time of the planning horizon. The simulation framework for optimizing the operating plan with a given direction combination sequence is shown in Figure 5.
Based on the simulation framework shown in Figure 5 and events definition in Section 4.1, the simulation steps for operating plan with a given combination sequence are designed as shown in Algorithm 1. Set the first inbound train * as the earliest arrival train, and * = 1.
Choose the first combination * from . Calculate the occurrence time , ℎ , ℎ , , , of each event. Determined the earliest event , and its occurrence time = min { , ℎ , ℎ , , , }. While ≤ If event is inbound train entering, then * = * + 1. If event is assembling end, then Assemble railcars into outbound train * according to combination * . * = * + 1. Choose the next combination * from . Update the state ( ) related to event . Update the occurrence time , ℎ , ℎ , , , of each event. Update the earliest event , and its occurrence time . End While End Algorithm 1

An Optimization Method of Long-Term Operating Plan Combining Subperiod Rolling into GA
In the following, the optimization steps of this method are presented after some key technologies of GA are being explained.

Individual Encoding and Decoding.
Denote by | | the combination number of candidate set , and take the integer between 1 and | | as a gene of individual code, as shown in Figure 6, where 1 , 2 , . . . , M are the direction combinations, and only railcars whose directions belong to the same combination can be assembled into the same outbound train. Thus the indexes of each combination in set are 1, 2, . . . , , respectively, which will be used to form individual code. For example, the code "24315365. . ." represents the outbound trains assembled with direction combinations 2 , 4 , 3 , 1 , 5 , 3 , 6 , 5 , . . . successively. Different code positions may have the same gene value. Each gene value represents the direction combination of its number. Each code can be divided into many small sections according to the subperiods. Each section's length may differ because of the difference on assembled trains' number in each subperiod. Denote by , the starting and ending position of section in individual , respectively.
Each cross and variation operation only handles the code section of current subperiod, and the code sections of previous subperiods would remain unchanged. As shown in Figure 7, the code section 1 of individuals 1 , 2 , 3 is attained after optimizing the operating plan of subperiod 1. When optimizing the operating plan of subperiod 2, only code section 2 of individuals 1 , 2 , 3 is optimized while code section 1 of them remains unchanged.
For the convenience of individuals cross operation, if the current subperiod's code section length of each individual varies after each genetic iteration, at this point, some new genes will be randomly generated and appended to the shorter code sections in order to keep the same length as other individual code sections. As shown in Figure 7, code section "31421" is the code section of individual 1 after previous genetic iterations. Its length is 5 while the maximum length of the code section 2 of individual 3 is 7. At the moment, two genes "31" are randomly generated and appended to the code section 2 of individual 1 , which will not affect fitness's reckon of individual 1 , and are simply used for keeping the same code section length as others.
Input station's initial state 0 , planning horizon [0, ], sub-period length , overlap length Δ population size , maximum generation count for the best individual continually keeping unchanged, maximum and minimum crossover probability 1 , 2 , maximum and minimum mutation probability where is the generation time, is a parameter relating to scale transformation, and its value is 150 generally.

Genetic Operators.
The basic genetic operators of GA are selection, crossover, and mutation, which are given as follows and more details about the genetic operators can be obtained in Dimitri's book of Omega: A Competent Genetic Algorithm for Solving Permutation and Scheduling Problems.

Selection
Operator. New population's individuals are selected from the current population by roulette method based on their fitness. Firstly, the selection probability and cumulative probability range of each individual are reckoned according to their fitness. After that, a random number between 0 and 1 is generated, and the individual, whose cumulative probability range covers this number, is selected.

Crossover
Operator. The single-point crossover is selected as the crossover operator here. Firstly, an intersection of the individual strings is elected randomly. Then the following part of the individual string at the intersection are exchanged to generate two new individuals. A simple example is given as shown in Figure 8. Individuals 1 and 2 are selected for crossover, the position is the intersection, and individuals 1 and 2 are the new individuals after singlepoint crossover operator.

Mutation
Operator. The combination of uniform mutation and basic bit mutation is adopted as the mutation operator in order to search freely over the whole search space in the initial stage and only search in the local scope in the later algorithm. In other words, uniform mutation, which makes each gene value mutated with a larger probability, is adopted in the early stage, while basic bit mutation is employed in the later stage and each gene value is mutated with a smaller probability in this stage.

Optimization Steps of GA Combined with Subperiod
Rolling. Based on the above key technologies of GA and the simulation method in Section 4, the optimization steps for optimizing the long-term operating plan are designed as shown in Algorithm 2.

Numeric Examples
In this section, based on the optimization results about operating plan of the marshalling station shown in Figure 1, (1) the convergence of the designed algorithm, (2) the effect of some algorithm parameters, and (3) the influence of arrival train flow on the algorithm will be analyzed. The algorithm is developed with computer language C# on the platform of Microsoft Visual Studio.net and runs on the computer with the system of Microsoft Windows XP (Home Edition), RAM configuration of Pentium(R) Dual-Core CPU E5800 @ 3.20 GHZ, 3.19 GHz, 2.96 GB. For GA, its population size is = 100, its maximum and minimum crossover probability are 1 = 0.9 and 2 = 0.5, respectively, its maximum and minimum mutation probability are 1 = 0.05 and 2 = 0.005 separately, and its maximum generation count for the best individual continually keeping unchanged is = 50.
Some parameters' values of arrival yard, marshalling yard, and departure yard are shown in Table 2. In addition, railcars' maximum and minimum number of arrival trains are 50 and 100, respectively, railcars directions include "AD, " "AF, " "AW, " "AY, " "AH, " "AK, " "AN, " "AP, " "AJ, " "BG, " "AR, " "AX, " and "AV, " and the arrival times of inbound trains distribute in the whole day and their fluctuation is described by their variance. According to those parameters' values, the railcars' number, direction, and arrival time of arrival trains are generated randomly. Moreover, railcars with directions belonging to the same direction combination can be assigned to the same outbound train as shown in Table 3.
6.1. Algorithm Convergence. The variation relation of railcars average staying time along with the computing time is drawn as shown in Figure 9 when optimizing the 5-day operating plan with subperiod length of 18 h and overlap length of 2 h. In this example, the average number of arrival trains per day is 30, and the variance of their arrival time is 1. A N , A P , A J , a n d B G

Effect of Algorithm Parameter on the Algorithm.
When the average number of arrival trains per day is 30 and the variance of their arrival times is 1, railcars' average staying times and the computing times of 5-day operating plans are optimized with different subperiod and overlap lengths, as shown in Figures 10 and 11, respectively.
When the overlap length is 2 h, railcars average staying time stays in a narrow range of 250∼255 min, but the computing time changes largely from 21.8 min to 12.7 min along with the increasing of subperiod's length from 6 h to 12 h. Then, with the continuous increase from 12 h to 30 h, not   only does railcars average staying time promote faster from 253 min to 276 min, but also the computing time increases quickly from 12.7 min to 27.6 min. The same trend exists while the overlap length is 3 h. So it has a moderate subperiod length, such as 12 h in this example, with which a satisfied plan can be obtained with less computing time.
In addition, two variation curves of railcars average staying time are mainly consistent when the overlap lengths are 2 h and 3 h, respectively, but the computing time of the former is slightly less than that of the latter. Hence, it is suggested to adopt a shorter overlap to optimize the plan.

Influence of Inbound Train Flow on the Algorithm.
The optimization results of different planning horizons and inbound train flows are shown in Table 4. In these examples, there are two planning horizons, 5 days and 10 days, three inbound trains numbers, 20 railcars, 30 railcars, and 40 railcars per day, and two variances of their arrival time, 0.5 and 1. It is found that the computing time increases obviously along with inbound trains' number increase from 20 railcars  to 40 railcars per day and that railcars average staying time is optimal when inbound trains' number is 30. Besides, the arrival time variances change from 0.5 to 1 of inbound trains resulting in a slight increase in railcars' average staying time and producing a little effect on the computing time.

Conclusion
In order to provide more detailed data for analyzing the capacity utilization of marshalling station from the long-term operating plan, a model of long-term operating plan is built to minimize railcars' average staying time under the constraints of minimum time intervals, marshalling track capacities, and so forth. Its solving algorithm is designed based on GA and simulation method, in which railcars' assembling sequences are optimized by GA and then the operation plans are obtained based on the previously achieved assembling sequences through the simulation method. In order to reduce the computing time, the whole planning horizon is divided into many subperiods, which are optimized sequentially. As the optimization of each subplan converges in a short time, the whole algorithm can converge to a satisfied plan with an acceptable computing time. Moreover, an appropriate length, of subperiods helps decrease the computing time. In addition, the growing of arrival trains number leads to the fast increase in computing time, while the change of arrival time variances has a slight effect on computing time.
This paper specifically optimizes the operating plan of one type of marshalling station, in which trains of up and down directions do not interfere with each other, but in reality they may interfere at some other type of marshalling stations. Therefore, further study on optimizing the operating plans of those stations can be conducted in the future. In addition, some ignored constraints should be taken into account in the optimization of marshalling stations' operating plans in the future study, such as some railcars forbidden to disassemble through a hump.

Notations
Parameters : Track number of train arrival yard : = 1, 2, . . . , arrival track : Track number of railcar marshalling yard : = 1, 2, . . . , marshalling track : The maximum railcars number that can be held in each marshalling track : Track number of train departure yard V: V = 1, 2, . . . , departure track : Inbound train number within planning horizon | |: Disassembling engine's count : = 1, 2, . . . , | | disassembling engine | |: Assembling engine's count : = 1, 2, . . . , | | assembling engine : Railcar direction combination: railcars whose directions belong to the same combination could be assembled into the same outbound train : = Railcars set stored in marshalling track now | |: Number of railcars stored in marshalling track now V : Outbound train stored in departure track V now; if V = 0, it shows that no train occupies this track at this time : The earliest time when the disassembling engine can work from now on : The earliest time when the assembling engine can work from now on * : The next inbound train which will arrive at station * : The number of trains which has been assembled or is being processed now * : Direction combination chosen for assembling next outbound train : Train for which disassembling engine works now; if = 0, it shows the engine is free : Train for which assembling engine works now; if = 0, it shows engine is free.