Iranian Journal of Science & Technology, Transaction B, Engineering, Vol. 29, No. B1 Printed in The Islamic Republic of Iran, 2005 © Shiraz University
LOCOMOTIVE OPTIMIZATION USING ARTIFICIAL * INTELLIGENCE APPROACH K. ZIARATI**, H. CHIZARI AND A. MOHAMMADI NEZHAD School of Engineering, Shiraz University, Shiraz, I. R. of Iran Email:
[email protected] Abstract– The problem of assigning locomotives to trains consists of determining the number of locomotives of different types that provide sufficient power to pull trains on fixed schedules. The objective is to minimize the fixed and operational locomotive costs. The locomotive assignment problem is defined for cyclic and non cyclic problems. In this paper, an approach using a genetic algorithm and a neural network algorithm is presented to find a cyclic solution on a one-week horizon, while satisfying the power demands of all trains. This system was tested using realistic data from the Canadian National (C.N.) North America Company with about 1600 trains and 1300 locomotives. Keywords– Railway, network flows, transportation, genetic algorithms, locomotive assignment, artificial intelligence
1. INTRODUCTION High capacity and low cost are among the factors that make rail transport especially attractive. Certainly problems such as increasing freight and passenger capacity and also decreasing transportation costs are problems in the optimization field. Due to large amounts of data available at a transportation company, these problems are considered large scale optimization problems. Some of these major problems include: train timetable problems, railway crew scheduling, locomotive assignment problems and so on. In this paper we focus on the locomotive assignment problem. Railway companies usually have to deal with two types of problems: the planning problem and the operational problem. The planning problem is defined on a representative week of the planning horizon, and consists of determining an optimal cyclic schedule of locomotives. The locomotive assignment problem in operational form is one of the most important problems in the railway domain. The simplest form of this problem is when only one type of locomotive is available and each train needs one and only one locomotive. For this single engine, single type locomotive assignment problem, Booler [1] proposed a heuristic algorithm that starts with a feasible allocation of locomotive types to the trains and iteratively updates this allocation using the dual information gathered when solving the resulting assignment problems. The heterogeneous version of the problem, which may require several locomotives of various types on train segments, can be formulated as a multi-commodity flow model with additional constraint. Florian et al. [2] were among the first to make use of such a formulation and to propose a solution based on a Benders decomposition method. Unfortunately their implementation does not converge rapidly, even for small problems. Ziarati et al. [3] split a very large scale strategic problem into smaller overlapping problems solved over a rolling horizon. Each small problem is in turn solved using a Dantzig-Wolfe decomposition method, where sub problems are formulated as constrained or unconstrained shortest path problems depending on the locomotive type. They obtained a 6% improvement in terms of the number of locomotives utilized as compared to a solution provided by the CN North America Company. ∗
Received by the editors August 18, 2003 and in final revised form August 31, 2004 Corresponding author
∗∗
94
K. Ziarati / et al.
Ziarati et al. [4] also introduce additional cuts based on the enumeration of a feasible assignment of locomotive combinations to trains, which strengthen the L.P. relaxation lower bound and improve solution quality. A day-to-day operational model was also proposed by Ziarati [5]. In actual operation, when there are an insufficient number of locomotives, some companies rent additional units, while others prefer to postpone train departures. Ziarati et al. [6] proposed a method that finds a feasible solution by delaying the departure of some trains according to their types. Recently Ahuja et al. [7] proposed a mathematical approach using problem decomposition, integer program and a very large scale neighborhood which was tested for the CSX American Rail company. The required CPU time is very interesting (about 30 minutes) and the locomotive saving is about 400 locomotives compared to the actual solution used by the company, which is an important cost saving contribution. Because of the limitations of an exact mathematical method of solving such a very large scale problem, many people have tried to model and solve these optimization problems by evolutionary methods. These models use tools and techniques right from simple heuristics to complex simulations and evolutionary algorithms. Several heuristic algorithms were developed to solve the bus route network design and scheduling problems. Lampkin and Saalmans [8] developed a heuristic algorithm to design the transit network, optimizing the passenger-kilometer criteria. Over the years Baaj and Mahmassani [9] have developed a route generation algorithm that generates different sets of routes corresponding to different tradeoffs between user and operator cost. Xiong and Schneider [10] used a cumulative genetic algorithm (GA) and an Artificial Neural Network (ANN) for the route network design problem. Patnaik et al. [11] and Kidwai [12] used GA to solve the bus transit network design problem. These approaches consisted of three major components: route design model, transit assignment model and bus frequency allocation model. Genetic algorithms are used to find the optimum routes and frequencies. In the context of passenger transportation and cyclical solution in general, very little research has been accomplished. Recently, an optimization model for the assignment of both locomotives and passenger cars was proposed by Cordeau et al. [13]. The cyclic problem is formulated as an integer programming problem based on a time-space network and Bender decomposition. Numerical experiments performed on real-life data indicated that the method finds optimal solutions within a shorter computation time. Their optimization package has been tested and is actually used by the passenger railway company VIA in Canada. However the largest instance solved contained 348 trains and 24 locomotives. In view of this algorithm and the problem of convergence, this algorithm does not provide a general method for large scale locomotive assignment problems (more than 2000 trains and 1000 locomotives). In the cyclic solution, the number of engine (locomotive) types at the beginning of the horizon must be the same in each station. So, a solution in this case is more complicated than the acyclic case. The planning problem is generally sub-divided into seasonal, weekly and daily problems. A seasonal problem is defined on a 3 month period and allows companies to estimate the number of locomotives that they have to operate or to rent in this 3-month period. The weekly problem is defined on a one week horizon, generating the cyclic route for locomotives with respect to engine types. In this problem, the regular maintenance of locomotives is considered as a percentage of each locomotive type that must be at each shop every day. The daily problem is the problem of dispatching the individual locomotive to a train. The regular and irregular maintenance must be considered at the same time for each individual locomotive. It is not easy to propose a general method to solve all of these operational problems. A heuristic is defined by Ziarati [14] in two steps; in the first step, an initial cyclical solution is obtained by sequentially solving the shortest path problems on a weighted network. The weights of the arcs are changed from one problem to another by considering the power assigned to trains at each sequence. The second step re-optimizes this cyclical solution while maintaining this cyclic characteristic by adding target constrains on the mathematical formulation for the operational-acyclic problem proposed by [5]. Although the results are very interesting, they are not compared with other results. In this paper, we propose an evolutionary approach to solve the cyclic locomotive assignment planning problem and is organized as follows: The next section describes the problem definition. In section 2, the Iranian Journal of Science & Technology, Volume 29, Number B1
February 2005
Locomotive optimization using artificial…
95
main strategy based on an evolutionary approach is explained. Numerical experiments conducted on a oneweek problem using data provided by the C.N. company appears in section 3. Finally, the last section presents some conclusions. 2. PROBLEM DESCRIPTION In contrast to acyclic cases, in the cyclic locomotive assignment, the number of each engine type for each station at the beginning and end of a horizon must be the same in each station. This constraint makes the solution of this case more complicated than the acyclic case. However, when the cyclic solution is found once, it can be applied to the problem in the next period if the train schedule is not changed. First, we introduce some terminology frequently used in this paper. A station is a location where a train can switch power during a trip. A train is defined between two stations where the departure and arrival times, as well as the origin and destination stations, are fixed. Locomotives must be assigned to all trains. It consists of a block of locomotives assembled to pull a train. Power requirements for a train can be expressed in terms of the minimum number of locomotives or horsepower. There are different types of locomotives in the rail network. Each locomotive type is defined by manufacturer, number of axles, horsepower, capacity, etc. As a result of the routing and scheduling process, a locomotive can be active (i.e., pulling a train), deadheading or dead hauling. Deadheading locomotives operate under their own power, but do not pull trains. Dead hauling locomotives are not pulling tonnage and their engines are not operating. Typically, such a locomotive is being pre-assigned to specific trains and hauled to a shop for repair or maintenance. Dead hauling locomotives are not considered in the solution process described in this paper. Input, output and principal constraints for the operational strategic problem can be summarized as follows: Input − Number of available locomotives, − Locomotive's type and maintenance state, − Train timetable. Output − Routing of all locomotives, − Consistant composition by locomotive type for each train, − Power positioning at the beginning and end of the horizon by station and locomotive type. Main constraints − Sufficient power must be supplied to each train in keeping with established train schedules; − Cyclic solution (cyclic route for locomotives). To test the proposed algorithm a benchmark is extracted from the real data provided by Canadian National Railway Company (C.N.). Originally these data present a real non cyclic problem. However some modifications are applied to this data in order to transform the problem into a cyclic one. The number of trains is 1629 and they should all be covered by locomotives. The number of stations is 93 and the number of available locomotives 1300, which are divided into 7 different types. The main objective of this problem is to assign a sufficient number of locomotives to pull all the trains using a minimum number of available locomotives. The solution of this problem must be cyclic and can be used every week. In this step of problem solving, we can not consider the non regular maintenance (of which 10% of the available locomotives of each type are considered due for regular maintenance) which are omitted from the locomotive fleet. a) Network model This model can be understood better if we consider it in a graph network structure whose nodes represent stations and whose arcs represent lines of track on which trains carry passengers or freight. Figure 1 illustrates such a graph as a time-space network for the activities of the railway. February 2005
Iranian Journal of Science & Technology, Volume 29, Number B1
96
K. Ziarati / et al.
In fact, the network is cyclic, but at a certain specific time (12:00 Sunday) we cut it and duplicate all trains running at this time. These trains finish artificially at 12:00 PM Sunday in the destination station. But other arcs from the destination station to the same destination station are added to the network at the beginning of the horizon. Of course, this is the same for the deadhead arcs. So one origin and one destination station are added to the network. In Fig. 1 for each station ( A, B,..., Z ) one horizontal line is considered. The first node in each line represents the origin station node (Sunday 12:00) and the last node in each line represents the destination station node (next Sunday 12:00). For example o A and d A are the origin and destination node for station A. Two artificial nodes o and d represent the network origin and destination nodes. Solid diagonal arcs represent the train between two stations; two nodes at the head and tail of such an arc represent the departure and arrival times of the corresponding train at the origin and destination stations, respectively. Dashed diagonal lines represent deadheading locomotives. Horizontal waiting arcs represent waiting times at a station. One scheduled train departs from a source station and arrives in a destination station, such a path between two stations is called “train”.
Fig. 1. Time space network
One typical cyclic route for a locomotive x , for example is the cycle station B , t12 (active), d14 (deadhead), t 23 (active), t 40 (active)). The interpretation of this cycle is given as follows: − Locomotive x at the beginning of the week is in station B ; − Locomotive x pulls train t12 (Monday 6:30-Tuesday 00:05) as active locomotive from station B to station Z ; − Locomotive x is connected to train t14 (Tuesday 12:30-Wednesday 01:30) as deadhead locomotive d14 , from station Z to station C ; − Locomotive x push train t 23 (Wednesday 10:05-Wednesday 21:25) as active locomotive from station C to station Z ; − Locomotive x pulls train t 40 (Friday 12:30-Saturday 06:30) as active locomotive from station Z to station B ; − Locomotive x at the end of the week is in station B .
To present the problem formally, let G = (V , A k ) be its associated network, comprised of the node set V and the arc set A k . k ∈ K represent the locomotive type k in the set of locomotive K . Between two connected nodes there is one arc per type of locomotive. Each station s ∈ S (where S is a subset of V ) is represented by one horizontal time axe, one station-source node o s at the beginning, and one end stationsink node d s at the end of week horizon. Locomotives of type k depart from the network source node o . After traversing the network from the subset arcs A k , this locomotive finishes the cycle on the network destination node d at the end of each week. There are n k available locomotives at o at the beginning of week. Iranian Journal of Science & Technology, Volume 29, Number B1
February 2005
97
Locomotive optimization using artificial…
The following notation is needed for the problem parameters. For each train leg covered by active locomotives, pull power requirements are expressed in terms of the horsepower. Binary coefficient a wk ,ij is set to 1 if arc (i, j ) ∈ A k covers train leg w and 0 otherwise. The quantity p k is the operating power of locomotive type k , p w the requested power for w ∈ W . The travel time from node i to node j for locomotive type k ∈ K is represented by t ijk . Decisions are represented by integer flow variables X ijk and Yijk . The former indicate the number of active locomotives of type k covering arc ( i , j ) . The latter count the number of deadheading locomotives in the consist. The cost of an active locomotive of type k on arc (i, j ) is cijk , while d ijk is the deadheading cost for each locomotive of type k . These costs are weighted to account for practical issues such as the relation between the speed of a train and that of the pull locomotives. We can now formally introduce the integer programming model as:
min ∑
∑
k
k∈K (i , j )∈A
(c
k k ij X ij
+ d ijk Yijk
)
(1)
subject to
∑
∑
aωk ,ij p k X ijk ≥ Pw , k
∀ω ∈ W
k∈K (i , j )∈A
X ok,o s = X dk s ,d , ∑
j:(i , j )∈Ak
(X
k ij
)
+ Yijk −
∑
j:( j ,i )∈Ak
(X
k ji
)
+ Y jik = 0 ,
∀k ∈ K , ∀s ∈ S
∀k ∈ K , ∀i ∈ V − {o, d }
X ok, o s ≤ n k , X ijk ≥ 0, Yijk ≥ 0 and integer,
(2) (3) (4)
∀k ∈ K
(5)
∀k ∈ K , ∀(i, j ) ∈ A k
(6)
The objective function (1) minimizes the total locomotives cost to cover all trains. Constraint (2) represents train power coverage requirements expressed in horsepower. In this constraint binary coefficient, aωk ,ij takes value 1 if arc (i, j ) ∈ A k covers train w , otherwise 0 . Constraint set (3) guarantees the cyclical solution. It means that the number of the locomotives of each type at the beginning and at the end of the week must be the same in each station. X ok,o s represent the number of active locomotives of type k on arc (o, o s ) between the network origin node and station origin node o s . This number must be equal to X k s , d ,d which is the number of active locomotives from the destination node of station s to the network destination node. Constraint set (4) establishes flow conservation at each node. Note that locomotives can change status at any node, e.g., a deadheading locomotive could become active. Constraint set (5) limits the utilization of the locomotive of each type. The integrity of the solution is assured in constraint (6). 3. GENETIC ALGORITHM
Because of the important number of decision variables, a mathematical approach to solve this problem is very difficult. In this section we will describe the proposed genetic algorithm to find a solution for the locomotive assignment problem. The population for this genetic algorithm depends on the cyclic locomotive routes. Each locomotive route is denoted by χ s , where s is start (beginning) and sink (destination) station. This approach tries to select from a set of population, a subset which satisfies all operational constrains and minimizes the cost. This is a difficult type of set covering problem. This approach is based on the fact that if each route is a cycle, the solution is automatically cyclic. It is necessary to mention that a cyclic solution could be found without cyclical routes, but in this paper, cyclic routes automatically create a cyclic solution. On each February 2005
Iranian Journal of Science & Technology, Volume 29, Number B1
98
K. Ziarati / et al.
iteration, we try to select better subset routes from the population and move them to the next generation. The final results for the locomotive assignment problem are a subset of locomotive routes from the last population. At the beginning, a pool of chromosomes (population) is generated. A chromosome is a locomotive route χ s . The first population is generated by a random cycle generator function using the shortest path problem algorithm. The diagram block of this genetic algorithm is shown in Fig. 2. A recombination method is necessary to activate the population and make new chromosomes. We use a single point cross over operator. A special mutation algorithm is used to help the algorithm converge. This method tries to escape from local solutions and add some new chromosomes to the population. To generate these chromosomes, an intelligent cycle generator is designed and implemented in the mutation box. In this step, the new cycles are generated by solving the shortest path problem on the network. The weights on the arcs are chosen in such a way that the cycle containing the trains which are not completely covered in the last solution are generated. After making the population we use a selection method to choose some of the subsets of the chromosomes for the next generation of the genetic algorithm. A neural network algorithm is used to design and implement the selection method. In the next iteration recombination is done on the chromosomes coming from the last generation, and the new ones coming from the cycle generator and cycles coming from the mutation box. The chromosomes coming from the cycle generator are all random, but the chromosomes coming from the mutation box are generated in order to cover all trains not covered by the locomotives. This loop will run again and again until a good solution for the locomotive assignment problem is developed.
Fig. 2. Genetic algorithm model
a) Chromosome
A chromosome is defined as a route of one locomotive connecting (pulling or deadheading) to the trains from a source station until its sink station. A chromosome is related to a station and is defined mathematically as follows:
{
}
χ s = a (i1 , j1 ),..., a (im , jm ) (i, j ) ∈ A k , s ∈ S
(7)
An arc between node ik and j k is defined by a (ik , j k ) . To create this chromosome, certain conditions have to be satisfied. Constraints (8) and (9) show that the departure station of the first train in the chromosome set should be the same as that of the arrival station of the last train. This constraint will be useful for satisfying (3). (8) a(i1 , j1 ) = a(o s , j1 )
a (im , j m ) = a (im , d s )
(9)
Constraint (10) shows that the start station for a member of the set must be the same as the previous stop station. Iranian Journal of Science & Technology, Volume 29, Number B1
February 2005
Locomotive optimization using artificial…
a (ik , jk ), a(ik +1 , jk +1 ) ∈ χ s ⇒ s j k = sik +1
99
(10)
where s jk is the destination station for arc a (ik , jk ) and s ik +1 is the origin station for arc a (i k +1 , j k +1 ) . In constraint (11) we see that the start time for a train in the set must be greater or equal than the previous stop time. a(ik , jk ), a (ik +1 , jk +1 ) ∈ χ s ⇒ t j k ≤ ti k +1 (11)
where t jk is the arrival time of the destination station of arc a (ik , j k ) and t ik +1 is the start time of the origin station of arc a (ik +1 , j k +1 ) . b) Cycle generator
Finding a number of cycles from a big network is not easy. This problem is modeled as a shortest path problem (SPP), for which very efficient algorithms been proposed. We focus on the single-source shortestpath problem: given a network G = (V , A k ) , we want to find the shortest path from a given source node o s ∈ A k to a sink node d s ∈ A k . This shortest path creates a cyclic route for a locomotive type k ∈ K . A random generator function computes weights for all the network's arcs. To solve SPP we use the Dijkstra algorithm. Every time we select a source station and run the generator, it gives us a cycle χ s . This cycle is a path which begins from the source station and ends on the same station. Now a population is a set of cycles or chromosomes as follows:
{
χ = χ 1s ,..., χ sn
}
(12)
Where in (12) s ∈ S and is a random station. The cycles are generated for all station s ∈ S and all k ∈ K . The size of population ( n ) is a large number. c) Re-combination
Recombination is a matrimony operator between two chromosomes to generate a new child from them. This operator can boost population to a good solution for the problem. Recombination in this prototype is like a crossover method between two parents to generate two children. These two parents must meet certain conditions to be selected for crossover. Let χ p1 and χ p 2 be two parents as shown below:
χ p1 = {a(i1 , j1 ),..., a(i x , j x ), a(i x+1 , j x+1 ),..., a(in , j n )}, ∀a(i, j ) ∈ A
χ p 2 = {a(l1 , k1 ),..., a(l y , k y ), a(l y +1 , k y +1 ),..., a(lm , k m )}, ∀a(l , k ) ∈ A
(13) (14)
The first condition verifies that both of the two cycles start from the same station at the beginning of the period. The second condition states that two parents must meet each other in at least one station. Figure 3 is an example for selecting two locomotives for crossover. The results after doing crossover operator are shown in Fig. 3. d) Mutation
As is shown in Fig. 2, at each iteration of this algorithm the population grows and a global search, which is explained in the next section, tries to find a good solution for this problem. A solution for this problem is a set of locomotive routes that cover all trains ( a (i, j ) ∈ A ). The mutation operation is generally a tool to include the new cycles in the system which changes or shakes the trend of evolution of the system. An intelligent mutation operator could help to find the global optimum. This is done by generating the cycles that contain the trains which are not covered in the last solution. After applying the recombination algorithm, we search all chromosomes to find missing arcs on them. Then, on the network flow model in the cycle generator module we choose low weights for these arcs and a February 2005
Iranian Journal of Science & Technology, Volume 29, Number B1
100
K. Ziarati / et al.
random number for other arcs and run the Dijkstra algorithm for each station. So missed arcs have a higher chance to be selected and new cycles could be added to the population for the next iteration.
Fig. 3. Shows two locomotive routes before and after crossover
e) Selection
After running crossover and mutation operators, chromosomes (cycles) must be selected for the next population. The function of this module is to select a good solution for the locomotive assignment problem. All selected chromosomes are moved to the next population and then another solution is selected from remaining chromosomes in the population. The selection process is repeated t times, where t can be set according to the population size. The rest of the chromosomes will be deleted. The random cycles are added to these selected chromosomes to assure the propriety of the genetic algorithm. Finding a good solution from a pool of cycles is not an easy problem and a neural network module that will be described in the next section is designed to solve this problem. Neural network module: Over the last decades the artificial neural network has become a powerful tool for pattern recognition and classification in the area of feed-forward neural networks. Also another architecture of neural networks, that is feedback net on the basis of the Hopfield network, has shown good results for finding solutions to the combinatorial optimization problems [15-18]. A constrained optimization problem can be solved by a Hopfield-based neural network if the net is presented with an energy function of a problem such as: a 1 E = − ∑ ωij si s j + ∑ si 2 ij 2 i
2
(15)
Network is defined such a way that each binary neuron s j stands for one node which si = +1 means the node is in right position and si = −1 means the node is in left position. For each node two neurons i and j define weight ω ij , which is equal to one if two nodes are connected and equal to zero if they are not connected. Parameter a governs the relative strength between the cut-size and constraint term. The energy function must be minimized with an update method such as the sign function. The energy function has two Iranian Journal of Science & Technology, Volume 29, Number B1
February 2005
101
Locomotive optimization using artificial…
terms that are competing with each other and so there are a few local minima in the solution space that may get stuck in them which are not desired. One method that had been proposed to eliminate this problem is the ising mean field method [15] and [19]. Ising mean field equations: An alternative method for obtaining global minima of an energy function is to use a stochastic algorithm that allows for uphill moves. One such method is simulated annealing in which a sequence of configurations is generated with the neighborhood search method, emulating the Boltzmann distribution: P[ s ] =
1 − E [ s ]T e Z
Z = ∑e
− E[ s ]
(16) (17)
T
[s]
Generating configurations at successively lower T lead to a global minima rather than getting stuck in a local minima. But there is a shortcoming for this method; it is very CPU time consuming, so instead the mean field method is used. The mean field approach approximates the stochastic SA method with a deterministic process, resulting in the mean field equations as: ui = −
1 ∂E[v ] T ∂vi
vi = tanh(ui ) = tanh( −
(18) ∂E[v] ) ∂vi T
(19)
Now the MF equations are solved by iteratively updating the network using Eqs. (18) and (19) with annealing temperature parameter T . The first step is to map the problem to a neural network with a problem specific energy function which minimizes movement waste. The solution should satisfy the following constraints: 1. Solution must be cyclic. 2. Available number of each locomotive type is limited. 3. Number of locomotives that can be assigned to each train is limited. 4. Power requirement for each train-segment must be provided (train must be covered). Here, the neural network is presented with a pool of all possible cycles of locomotives from which the network must find a good solution. Encoding: Although there is not a specific way for encoding the problem, an encoding can be chosen in which one locomotive type l is assigned to one cycle c via an Ising spin as: 1 if Vlc = 0
locomotive type l is assigned otherwise
to cycle
c
(20)
That is, index l stands for locomotive type and index c stands for cycle number. Having this encoding, if locomotive type l is assigned to cycle c , it means that the one locomotive of type l travels through path c in one cycle. So it may be either deadhead or active for each train which is included in cycle c , depending on whether power requirement for that train is sufficient or not, respectively. The node Vlc denotes neuron in row l , and column c of the neuron array in neural network topology. Now an energy function is defined in which each constraint is included as a penalty term. The first constraint in the problem is provided automatically, because here it is assumed that the solution is picked up from a pool of many possible cycles. The second constraint is implemented on all locomotive types using a penalty term as follows: Enum = ∑ φ ∑ Vlc − Al l c February 2005
(21)
Iranian Journal of Science & Technology, Volume 29, Number B1
102
K. Ziarati / et al.
where Al denotes the available number of type l locomotives. For problems with equality constraints, an appropriate choice of function φ ( X ) is φ ( X ) = X 2 , but here there is an inequality constraint and this penalty function is not a good choice. So a function must be used that only penalizes typical situations in which X > 0 . One choice is a linear function that gives a proportional penalty to the degree of violation [20]. The third constraint is implemented using a penalty term as: EConsist = ∑ φ ∑ ∑Vlc − C t c∈C y l
(22)
where C denotes the maximum number of locomotives allowed to be assigned to a typical train, and Ct is the set of all cycles including train t . Finally, the last constraint can be implemented as: E Power = ∑ φl Pt − ∑ ∑ (Vlc * Pl ) t l c∈C t
(23)
where constant Pl denotes the active power of locomotive type l . Here, a penalty function φl ( X ) is needed so that it not only penalizes configurations for which X > 0 , but also penalizes configuration for which X < 0 . So if L is defined as an acceptable value for the power request of one train, this penalty function φl ( X ) can be defined as shown in Fig. 4, which uses different coefficients for these two different penalty conditions.
Fig. 4. New penalty function
Now the problem is finding a configuration that minimizes the total energy function as follows: E = αE Power + βE Num + γEConsist
(24)
where coefficient α , β , γ serve as relative strength between three penalties. Mean field equations for locomotive assignment problem: In problems with equality constraints implemented by quadratic penalty terms, computing mean field equations is trivial. But in this case of nonlinear constraints, another way is used [20] by replacing ∂E with the difference in E computed at ∂Vlc Vlc = 1 and Vlc = 0 as:
η 1 = φ1 Pt − ∑ ∑ (Vlc * Pl )
l c∈C
(25)
t
η 2 = φ ∑ ∑ (VLC − C ) t c∈C
c
(26)
l
η 3 = φ ∑ (VLC − Al )
(27)
(
)
(28)
(
)
(29)
∂E Power = ∑ η (1VLC =1) − η (1VLC =0) ∂Vlc t
∂EConsist = ∑ η (2VLC =1) − η (2VLC =0) ∂Vlc t
(
∂E Num = ∑ η (3VLC =1) − η (3VLC =0) ∂Vlc t Iranian Journal of Science & Technology, Volume 29, Number B1
)
(30) February 2005
103
Locomotive optimization using artificial…
4. NUMERICAL TESTS
In this section we showed the evolutionary algorithm results. All of the above algorithms run on C.N. railway company data for a cycle of a week. Selection method also uses fixed parameters that are listed in Table 1. Genetic algorithm runs for 50 iterations. Of course all of these parameters are heuristic and could be changed from one problem to another. As we mentioned in the problem description, about 10% of the available locomotives of each type are removed from the locomotive's fleet. For this test, 118 locomotives of 7 types are removed for regular maintenance in a typical week. The most important results are presented in Table 2. The first column in Table 2 shows the power of each type of locomotive. The second column gives the number of locomotives available for each type. The third column gives the number of locomotives used per type in the final solution. The three last columns show the productivity of the solution. This productivity is expressed in terms of percentage of time in a week that the locomotives of each type pull the trains (locomotive active time), and deadhead on trains or waiting in the stations. The last row of the active column shows that 39.43% of the time, the locomotives pull the trains, which is a very good operational result. Actually the companies operate with about 30% active time productivity. The majority of the locomotive's time spent in the stations depends on the train time table, which is not in our control. Table 3 gives an idea about the covering of the trains by these locomotive cycles. Table 1. Selection parameters Running loop
20 on each iteration
Strength factor1 Strength factor2 Strength factor3 Annealing
50000 2000 1000 0.65
Table 2. Evolutionary algorithm results (Locomotive usage) Power
Number
Used
Active
Deadhead
Wait
4400
22
22
34.57
25.42
40.01
4300
102
102
32.00
21.75
46.25
4000
70
70
41.87
18.24
39.89
3800
61
59
43.04
16.36
40.60
3600
56
56
42.97
14.97
42.06
3000
719
279
41.14
16.70
42.16
2000
152
150
38.15
18.97
42.88
ALL
1182
738
39.43
18.11
42.46
For the majority of the railway companies, the train, for which more than 90% of power-need is satisfied by the locomotives, could be operational. They can start on time and probably arrive at the arrival station with only a short delay. The covering percentage of the trains below 90% and above 120%, and percentages between these values are presented in Table 3. As you can see, the algorithm covers all of the trains successfully. Table 3. Evolutionary algorithm results (Trains covering) Covering Number Percent February 2005