15
Solving train formation problem using simulated annealing algorithm in a simplex framework Masoud Yaghini*, Mohsen Momeni and Mohammadreza Sarmadi School of Railway Engineering, Iran University of Science and Technology, Tehran, Iran SUMMARY The train formation plan (TFP) determines the train services and their frequencies and assigns the demands. The TFP models are often formulated as a capacitated service network design problem, and the optimal solution is normally difcult to nd. In this paper, a hybrid algorithm of the Simplex method and simulated annealing is proposed for the TFP problem. The basic idea of the proposed algorithm is to use a simulated annealing algorithm to explore the solution space, where the revised Simplex method evaluates, selects, and implements the moves. In the proposed algorithm, the neighborhood structure is based on the pivoting rules of the Simplex method that provides an efcient method to reach the neighbors of the current solution. A state-of-the-art method is applied for parameters tuning by using the design of experiments approach. To evaluate the proposed model and the solution method, 25 test problems have been simulated and solved. The results show the efciency and the effectiveness of the proposed approach. The proposed approach is implemented to develop the TFP in the Iranian railway as a case study. It is possible to save signicant time and cost through solving the TFP problem by using the proposed algorithm and developing the efcient TFP plan in the railway networks. Copyright © 2012 John Wiley & Sons, Ltd. KEY WORDS: rail transportation planning; train formation plan; simulated annealing; Simplex method; capacitated service network design problem; Iranian railway 1. INTRODUCTION In modern societies, with the development of the economy, railway transportation plays an important role. Among different transportation modes, railway has comparative advantages over others on its safety and transportation capacity for long-distance or large-scale freight transportation. In railway network, it is desirable that the transportation plan adjusts to the changing economic and regulatory conditions and offers reliable, high quality, and low cost services to their customers. Thus, making an optimal transportation plan becomes an important issue for railway networks [1]. The train formation plan (TFP) is one of the most important research areas in railway transportation planning. These models are often formulated as a service network design problem (NDP), and the optimal solution is normally difcult to nd. The TFP models relate to the determination of trains that need to be assembled, involving the denition of assignments, frequencies, sizes and proles of shipments, and traction according to the dened objective and the physical as well as operational restrictions of the railway network in order to attend the demand in the specied period. Hierarchically, decomposing large-scale planning problems is classied into two operating approaches: running a scheduled railway versus running a demand-driven railway. The Iranian railway is a demand-driven railway. In demand-driven railways, trains run when the freight is ready, and there is no xed train schedule. Arrival and departure times would be generated at the operational level. Assad [2] divided *Correspondence to: Masoud Yaghini, School of Railway Engineering, Iran University of Science and Technology, Tehran, Iran E-mail: [email protected] Copyright © 2012 John Wiley & Sons, Ltd. JOURNAL OF ADVANCED TRANSPORTATION J. Adv. Transp. (2012) Published online in Wiley Online Library (wileyonlinelibrary.com). DOI: 10.1002/atr.1183

Solving train formation problem using simulated annealing algorithm in a simplex framework

Embed Size (px)

Citation preview

Page 1: Solving train formation problem using simulated annealing algorithm in a simplex framework

Solving train formation problem using simulated annealingalgorithm in a simplex framework

Masoud Yaghini*, Mohsen Momeni and Mohammadreza Sarmadi

School of Railway Engineering, Iran University of Science and Technology, Tehran, Iran

SUMMARY

The train formation plan (TFP) determines the train services and their frequencies and assigns the demands.The TFP models are often formulated as a capacitated service network design problem, and the optimalsolution is normally difficult to find. In this paper, a hybrid algorithm of the Simplex method and simulatedannealing is proposed for the TFP problem. The basic idea of the proposed algorithm is to use a simulatedannealing algorithm to explore the solution space, where the revised Simplex method evaluates, selects, andimplements the moves. In the proposed algorithm, the neighborhood structure is based on the pivoting rulesof the Simplex method that provides an efficient method to reach the neighbors of the current solution. Astate-of-the-art method is applied for parameters tuning by using the design of experiments approach. Toevaluate the proposed model and the solution method, 25 test problems have been simulated and solved.The results show the efficiency and the effectiveness of the proposed approach. The proposed approach isimplemented to develop the TFP in the Iranian railway as a case study. It is possible to save significant timeand cost through solving the TFP problem by using the proposed algorithm and developing the efficient TFPplan in the railway networks. Copyright © 2012 John Wiley & Sons, Ltd.

KEY WORDS: rail transportation planning; train formation plan; simulated annealing; Simplex method;capacitated service network design problem; Iranian railway

1. INTRODUCTION

In modern societies, with the development of the economy, railway transportation plays an importantrole. Among different transportation modes, railway has comparative advantages over others on itssafety and transportation capacity for long-distance or large-scale freight transportation. In railwaynetwork, it is desirable that the transportation plan adjusts to the changing economic and regulatoryconditions and offers reliable, high quality, and low cost services to their customers. Thus, makingan optimal transportation plan becomes an important issue for railway networks [1].The train formation plan (TFP) is one of the most important research areas in railway transportation

planning. These models are often formulated as a service network design problem (NDP), and theoptimal solution is normally difficult to find. The TFP models relate to the determination of trains thatneed to be assembled, involving the definition of assignments, frequencies, sizes and profiles ofshipments, and traction according to the defined objective and the physical as well as operationalrestrictions of the railway network in order to attend the demand in the specified period. Hierarchically,decomposing large-scale planning problems is classified into two operating approaches: running ascheduled railway versus running a demand-driven railway. The Iranian railway is a demand-drivenrailway. In demand-driven railways, trains run when the freight is ready, and there is no fixed trainschedule. Arrival and departure times would be generated at the operational level. Assad [2] divided

*Correspondence to: Masoud Yaghini, School of Railway Engineering, Iran University of Science and Technology,Tehran, Iran E-mail: [email protected]

Copyright © 2012 John Wiley & Sons, Ltd.

JOURNAL OF ADVANCED TRANSPORTATIONJ. Adv. Transp. (2012)Published online in Wiley Online Library (wileyonlinelibrary.com). DOI: 10.1002/atr.1183

Page 2: Solving train formation problem using simulated annealing algorithm in a simplex framework

service strategies into three planning levels, namely strategic (long term), tactical (medium term), andoperational (short term). The train formation is classified as a tactical level problem. To illustrate theaspects involved in the rail transportation and to place the TFP problem in that context, Figure 1presents the hierarchical planning in demand-driven railways.In this paper, a hybrid algorithm is proposed for the TFP. The linear programming is used in a

simulated annealing (SA) algorithm. The algorithm utilizes the main structure of the primal Simplexmethod with basis pivot-type move. The design of experiments (DOEs) approach is used to adjustthe parameters of the proposed algorithm. The proposed model and the solution method are tested withseveral simulated test problems. The proposed approach is successfully implemented in the Iranianrailway network.The paper is organized as follows. In Section 2, literature review is conducted. In Section 3, we

present a description of the train formation planning. In Section 4, the mathematical formulation ofthe TFP problem is discussed. In Section 5, we present the proposed Simplex-based SA (SB-SA)algorithm. In Section 6, parameter tuning by using the DOE is presented. In Sections 7 and 8, theexperimental results and the case study on the Iranian railway network are discussed. Conclusionsare presented in Section 9.

2. LITERATURE REVIEW

The TFP is very rich in terms of problems that can be modeled and solved using mathematicaloptimization techniques. The TFP, sometimes called the routing and makeup problem, is a subclassof network routing problems [3]. Furthermore, the blocking policy may either be determinedendogenously or be given as an input (e.g., [4]). The railroad blocking plan (RBP) determines whichblocks to use to deliver each commodity from origin to destination. Mathematically, the RBP is anetwork design, multicommodity, and routing problem [5].One of the first efforts to integrate multiple components of the freight routing problem is made by

Assad [2,6] who proposed a multicommodity network flow model for train routing and makeup thatincorporates some level of interaction between routing and yard activities. Crainic et al. [7] proposeda model and a heuristic method for tactical planning. The model is non-linear, mixed integer program-ming (MIP), which minimizes the operating and delay costs. Keaton [8,9] presented a MIP model anda heuristic method based on Lagrangian relaxation. Lin [10] also presented an implicit enumerationalgorithm with e-optimality to solve the TFP model. As was properly highlighted by Haghani [11],there exist intensive interactions between the routing of trains, their makeup, their frequency, andthe empty car distribution process. However, models that take all these aspects of rail transportation intoconsideration often get extremely complex if not simply intractable. The traditional approach has thusbeen used to separately deal with the train routing, makeup problem, and the empty car distributionproblem. Haghani [12] proposed a formulation and a solution method for a combined train routing

Figure 1. Hierarchical planning in demand-driven railways.

M. YAGHINI ET AL.

Copyright © 2012 John Wiley & Sons, Ltd. J. Adv. Transp. (2012)DOI: 10.1002/atr

Page 3: Solving train formation problem using simulated annealing algorithm in a simplex framework

and makeup, and empty car distribution problem. The model is also dynamic and deals with temporaldemand variability, providing empty car distribution decisions as well as optimal time interval betweenconsecutive train services between pairs of yards. Martinelli and Teng [13] used neural networks to solvea train formation problem. For a given distribution of demand, expressed as the number of cars to bemoved between each origin–destination pair, the problem is to assign each class of demand to a uniqueitinerary chosen from a pre-defined subset. Marín and Salmerόn [14,15] compared local search andbranch-and-bound method and proposed a local search heuristic for the tactical design of rail freightnetworks where the objective was to minimize the operating and time costs. Morlok and Peterson [16]introduced a linear MIP model and applied it to a very small instance where the optimal solutions werefound using the branch-and-bound procedure. Huntley et al. [17] presented a non-linear MIP model withadaptation to SA to locate a near optimal solution. Gorman [18] offered an application of genetic andtabu searches for the same problem. Gorman [19] designed an operating-plan model to minimize theschedule costs of service within the rail-operating capabilities, which had been successfully used inthe Santa Fe Railway. Godwin et al. [20] presented a heuristic approach for this problem. Finally, Shafiaet al. [21] proposed a new mixed integer model for the TFP problem where the input data are subject touncertainty.The TFP problem is a special case of service NDPs. In recent decades, many researchers had

investigated the service NDP and presented many models and solution algorithms. The goal of NDPis to plan services and operations to satisfy demand and ensure the profitability of the firm [22]. Severalhybrid and heuristic methods have been proposed for the NDPs. The branch-and-bound method can beimplemented either as an exact or as an approximate method. The latter is achieved by fixing variablesby using the information given by the Lagrangian heuristic embedded in the branch-and-boundscheme [23]. Crainic et al. [24] described a tabu search heuristic based on a path formulation of theproblem. It exploits the fixed-charge nature of the problem by exploring the space of the continuouspath-flow variables by using pivot-like moves in a column-generation environment. Ghamloucheet al. [25] presented a different cycle-based neighborhood structure, which is obtained by movingflows around cycles. This approach is later improved in another work by Ghamlouche et al. [26] byadding a path-relinking search. Crainic et al. [27] proposed a slope-scaling heuristic that combines aLagrangian perturbation scheme with intensification and diversification mechanisms based onlong-term memory. This method is based on changing flow costs that depend on arc flow volumesand dual variable information. Crainic et al. [28] presented a multilevel cooperative parallel tabusearch for the NDP. The multilevel cooperative search is based on the principles of local interactionsamong cooperating searches, and controlled diffusion of information, within the framework of amultilevel algorithm. Finally, Rodríguez-Martín and Salazar-González [29] presented a heuristic localbranching for the capacitated fixed-charge NDP.The exact algorithm guarantees to find the optimal solution, but for large-scale problems, limited

memory and computing time are two fundamental matters that make them unusable. Most researchersuse heuristic and hybrid algorithms to solve the TFP and NDP problems. According to the problemcharacteristics, solving real world TFP problems with these algorithms is impractical.In this paper, the weakness of previous works is dealt using a new mathematical formulation and an

efficient solution method. The proposed model and the solution method are applied to generate thelarge-scale TFP in the Iranian railway network.

3. THE TRAIN FORMATION PLAN

3.1. The train formation costs

There is a fixed cost associated with operating a train, independent of the number of cars assigned tothe train. The fixed cost largely consists of the wages of the train crew plus the cost of a single unit oflocomotive. There is also a variable cost consisting of fuel and additional units of locomotive, whichincreases with train size [8]. Finally, there are physical limits to the number of cars, which can be moved,in a single train. Because of the level of fixed train costs, it is not generally economical to provideall pairs of yards with direct train connections, and thus many cars must change trains in intermediateyards and will usually encounter a considerable amount of delay in the process. There are additional

A HYBRID METHOD FOR TRAIN FORMATION PROBLEM

Copyright © 2012 John Wiley & Sons, Ltd. J. Adv. Transp. (2012)DOI: 10.1002/atr

Page 4: Solving train formation problem using simulated annealing algorithm in a simplex framework

costs associated with the labor, fuel, locomotive, and classification yard facilities required to switchcars form one train to another. The TFP, in essence, is to determine (i) which pairs of yards are to beprovided with directed train connections and (ii) how the individual cars are to be routed through theavailable configuration of trains and intermediate yards. The objective of the TFP is to minimize the totaloperating costs [8].

3.2. The service network

Suppose that the physical network is represented by a directed graph Gph = (N, Aph) where N is the set ofnodes representing yards and junction points and Aph is the set of links representing the track sectionsbetween yards. At the tactical level, only the large yards handling relatively large amount of traffic areconsidered. Moreover, facilities located in the same area are aggregated into a single yard together withtheir traffic data. For each origin–destination pair in the network, traffic demand is assumed to be specifiedin terms of cars (or any other equivalent measure of tonnage) to be moved between the two yards. In theproposed model, “demand” is used to denote “block”. The blocks are determined by solving the RBPproblem, and they input to the TFP problem. Furthermore, because different costs are incurred in handlingdifferent types of goods, traffic demand has to be divided into different classes.On the basis of the physical network G, the service network G = (N, A) specifies the set of feasible

routes on which train services may be operated. Figures 2 and 3 illustrate some train services on verysimple, linear, and physical network. Figure 2 shows eight feasible services on the service network. Inthis example, services 1 and 2 are direct services bypassing all yards between their respective originsand destinations, whereas services 1 and 6 do the same but at a greater speed. Freight trains are severaltypes with different properties. Speed is one of these properties. In Figure 2, the freight trains have twotypes of speed. The first type is “express”, and the second type is “non-express”. Services 5 and 8 stopat all the intermediate yards, whereas services 3 and 4 stop at only some of them, bypassing the others.On the service network, a service is characterized by (i) an origin, (ii) a destination, (iii) a path(sequence of arcs in Aph from origin to destination) in Gph, (iv) a set of intermediate stops, (v) a setof service legs, and (vi) a specification of the type of service in terms of speed and priority.

Figure 2. Physical network and some train services on the service network [7].

M. YAGHINI ET AL.

Copyright © 2012 John Wiley & Sons, Ltd. J. Adv. Transp. (2012)DOI: 10.1002/atr

Page 5: Solving train formation problem using simulated annealing algorithm in a simplex framework

For a given service, a train is formed at its origin and maintains its identity throughout its route untilits destination. On its way, the train stops at the yards in the set of intermediate stops to drop off and/orpick up cars, bypassing all the other yards (located on the service legs set) on its route.Figure 3 illustrates four of the feasible paths for a traffic class from A to C defined on the service

network. Independent of the path, the traffic goes through a classification operation at the origin yardand at the destination yard where the block is broken down. In this example, at origin A, itineraries 1and 4 both classify the traffic into one block (A, C), and the block travels on a single service to thedestination: a direct service for path 1 and one intermediate stop service for path 4. Paths 2 and 3 sharethe same train service sequence: while path 2 forms one block (A, C), which merely changes service atB, path 3 classifies the traffic (possibly with traffic from other traffic classes) into one block (A, B) at Aand then reclassifies it at B into another block (B, C) [7].

4. MATHEMATICAL FORMULATION

Let G= (S, T) be a directed service network with a set of yards S and a set of trains T, and let K be a setof demands (blocks). Each train t2 T has a capacity ut. Each demand k2K is characterized by a givenamount dk of flow to be shipped from an origin node o(k) to a destination node d(k). Each yard has acapacity ls that is the maximum number of trains that can be formed in yard s2 S, and ts is themaximum number of cars that can be assembled in yard s. There are two kinds of costs involved inthe network. Variable cost ckt is the cost of shipping one unit of demand k2K on train t. In themodeling phase, the shunting cost is added to ckt , corresponding to the number of stops for each trainin the middle stations. The fixed cost ft is to be paid if train t carried the demand. Consider a decisioninteger variable yt indicating the number of train for each t2 T. A decision continuous variable xktrepresents the amount of flow of demand k on train t. The node-arc mathematical model for the TFPproblem can be formulated as an MIP problem as follows.

Minimize z x; yð Þ ¼ Pk2K

Pt2T

ckt xkt þ

Pt2T

ftyt

subject to(1)

Pt2Sþ ið Þ

xkt �P

t2S� ið Þxkt ¼

dk if i ¼ o kð Þ�dk if i ¼ d kð Þ0 otherwise

for all k 2 K; s 2 S

8<: (2)

Figure 3. Four paths for the traffic from yard A to yard C [7].

A HYBRID METHOD FOR TRAIN FORMATION PROBLEM

Copyright © 2012 John Wiley & Sons, Ltd. J. Adv. Transp. (2012)DOI: 10.1002/atr

Page 6: Solving train formation problem using simulated annealing algorithm in a simplex framework

Pk2K

xkt≤utyt for all t 2 T (3)

Pt2T:o tð Þ¼s

yt≤ls for all s 2 S (4)

Pk 2 K

Pt2T :

xkt

d kð Þ6¼d tð Þ; d tð Þ¼s

≤ts for all s 2 S (5)

xkt≥0;yt : integer for all t 2 T ; k 2 K (6)

Where S+(i) / S�(i) denotes the set of trains that outward from/inward to yard i. The objectivefunction (1) calculates the total cost, computed as the sum of the fixed costs of the trains included inthe railway network plus the cost of routing the demands from their origins to destinations. Constraints(2) are the flow conservation equations for each yard and each demand. Constraints (3) state that thetotal flow of demand on a train cannot exceed its capacity. They also ensure that no demand is allowedon a train unless the fixed cost is paid. Constraints (4) limit the number of trains that can be formed ineach yard. Constraints (5) ensure that the number of cars, which can be assembled in each yard, doesnot exceed yard capacity. In the proposed mathematical formulation, the set of variables yt is builtusing the integer variables, but in previous works, these are binary variables. The advantage of theproposed mathematical formulation is the decrease in the number of potential trains.

5. THE PROPOSED SIMPLEX-BASED SIMULATED ANNEALING ALGORITHM FOR THETRAIN FORMATION PLAN

Kirkpatrick et al. [30] introduced the SA algorithm in 1983. This memory-less metaheuristic is basedon the Metropolis algorithm and prevents it to remain in the local optima with the transition towardslow quality solution. This algorithm does not guarantee to converge on global optima although itcan achieve a high quality solution in a reasonable computing time. The SA algorithm, which is asingle-solution-based metaheuristic, has very high ability to be combined with heuristic and exactalgorithms. Thus, in the proposed algorithm, the neighborhood structure is based on the pivoting rulesof the Simplex method that provide an efficient way to reach the neighbors of the current solution.The basic idea of the proposed algorithm for solving the TFP is to use the SA algorithm to explorethe solution space, where the revised Simplex method is used to evaluate, select, and implement themoves. In order to implement the revised Simplex method to generate the neighborhood solution,the following formulation (Equations (7)–(11)) is applied.

Minimize z xð Þ ¼ Pk2K

Pt2T

ckt xkt

subject to(7)

Pt2Sþ ið Þ

xkt �P

t2S� ið Þxkt ¼

dk if i ¼ o kð Þ�dk if i ¼ d kð Þ0 otherwise

for all k 2 K; s 2 S

8<: (8)

Pk2K

Pt2T :o tð Þ¼s

xkt =ut� �

≤ls for all s 2 S (9)

Pk 2 K

Pt2T:

xkt

d kð Þ6¼d tð Þ; d tð Þ¼s

≤ts for all s 2 S (10)

xkt≥0 for all t 2 T ; k 2 K (11)

Indeed, this formulation is a linear programming problem that can be solved easily by any LPoptimizer software. After solving this problem with the use of an LP solver, the value of the objective

M. YAGHINI ET AL.

Copyright © 2012 John Wiley & Sons, Ltd. J. Adv. Transp. (2012)DOI: 10.1002/atr

Page 7: Solving train formation problem using simulated annealing algorithm in a simplex framework

function of this problem is added to the fixed cost of trains, and the obtained value is passed to the SAalgorithm. In the SA algorithm, acceptance of the solution and moving to a new neighborhood solutionis conditional on the calculation of the TFP model objective value including variable and fixed costs.The overall structure of the SB-SA algorithm pseudocode is shown in Figure 4. In this pseudocode,

currentSolution and initialSolution are the current and initial solutions, respectively, and currentSolutionObjand bestObj are the current and best solution objective values. In the main loop, a move procedure isexecuted, and if diversification condition is met, then it is run. Five diversification strategies are studied(these strategies are described in Section 5.4).At the end of the main loop, the cooling function is used to decrease temperature. It is terminated

when the temperature is sufficiently decreased. In the following sections, the components of thispseudocode are described.

5.1. Generating an initial solution

The initial feasible solution is achieved using formulations (7)–(11). Then, the number of trainsrequired to carry the demands is calculated, and the fixed cost of trains is added to the variable cost.In this procedure, the combined cost is unit fixed cost added to the variable cost (unit fixed cost iscalculated by dividing the fixed cost of a train by its capacity).Then, the initial revised Simplex table is extracted from this solution, and redundant constraints are

found and removed. If there is any artificial variable in the basic solution, then it is replaced by themain or slack variable, and the original problem objective value is calculated by considering variableand fixed costs. Figure 5 illustrates the procedure for generating an initial solution.

5.2. Moving to a neighborhood solution

After generating an initial solution, a move must be performed for searching the solution space. In themove procedure, the neighborhood of the current solution is defined as the subset of all extreme

Figure 4. Pseudocode for the proposed Simplex-based SA algorithm.

Figure 5. Pseudocode for generating an initial feasible solution.

A HYBRID METHOD FOR TRAIN FORMATION PROBLEM

Copyright © 2012 John Wiley & Sons, Ltd. J. Adv. Transp. (2012)DOI: 10.1002/atr

Page 8: Solving train formation problem using simulated annealing algorithm in a simplex framework

points that can be reached from the current solution by one Simplex pivot. Consequently, in linearprogramming terms, a local move corresponds to a transition from one basis of the system to anadjacent one. However, not all the variables are evaluated at each iteration. To explore neighborhood,xkt is partitioned into basic and non-basic variables.A candidate pivot move is a pair of variables: one of which exits from basic, and the other one is

replaced. The candidate list is the set of all such pairs of variables. Five strategies are investigatedto create a candidate list that will be described later in Section 5.3.The candidate list is evaluated by the amount of changes in the original problem (the TFP model)

objective value. Finally, the best pair of variables is selected to reach neighborhood. If the originalproblem objective value improves, the SA algorithm accepts the solution; otherwise, the acceptancefunction is checked. In the early iterations, for better searching in the solution space, the initialtemperature is high, and the probability of accepting low quality solution is more than that at theend of the algorithm. If the best-so-far solution is not improved for some pre-defined iterations, themove procedure is terminated (Figure 6).

5.3. Creating a candidate list for input variables

To generate a candidate list in the proposed algorithm, five different strategies are evaluated, and thebest one is selected. The goal of these strategies is to decrease the total costs. The strategies are asfollows.

IS1: A number of variables are checked randomly, and the one with maximum unused train capacityis added to the candidate list.

IS2: A number of variables are checked randomly, and the one with minimum unused train capacityis added to the candidate list.

IS3: A number of variables are checked randomly, and the one whose train has a higher demandvolume is selected for the candidate list.

IS4: A number of variables are checked randomly, and the one whose train has a lower demandvolume is selected for the candidate list.

IS5: A number of variables are selected randomly for the candidate list.

For instance, Figure 7 displays a pseudocode for strategy IS1. In this method, trainUnusedCapacityArrayis an array that stores unused capacity of trains, andmaxUnusedCapacity is the maximum amount of unused

Figure 6. Pseudocode for the move procedure.

M. YAGHINI ET AL.

Copyright © 2012 John Wiley & Sons, Ltd. J. Adv. Transp. (2012)DOI: 10.1002/atr

Page 9: Solving train formation problem using simulated annealing algorithm in a simplex framework

capacity. The while loop is repeated until counter becomes smaller than numberOfCandidateVariable.In this loop, a number of variables are checked, and the one with maximum unused capacity is selectedfor the candidate list. tournamentSize is the number of variables. The output of this method is the list ofcandidate variables to enter the basis solution. Finally, the candidate list is evaluated by the amount ofchanges in the objective value of the original TFP problem (by considering the sum of variable and fixedcosts), and the best variable is chosen to enter basis.

5.4. Diversification

The diversification step aims to take the search out of an apparent local optimum and towards somepromising region. The effect of the following diversification strategies is investigated here.

DS1: A number of variables are checked randomly, and the one whose train is formed more thanthe others that are in whole iterations and whose Simplex minimum test guaranties its feasi-bility is selected to enter basis.

DS2: A number of variables are checked randomly, and the one whose train is formed less than theothers that are in whole iterations and whose Simplex minimum test guaranties its feasibilityis selected to enter basis.

DS3: A number of variables are checked randomly, and the one whose train has a higher demandvolume and whose Simplex minimum test guaranties its feasibility is selected to enter basis.

DS4: A number of variables are checked randomly, and the one whose train has a lower demandvolume and whose Simplex minimum test guaranties its feasibility is selected to enter basis.

DS5: A number of variables are selected randomly to enter basis if Simplex minimum testguaranties its feasibility.

6. PARAMETER TUNING BY USING THE DESIGN OF EXPERIMENTS APPROACH

In the proposed algorithm, several main parameters should be tuned. The parameters may have a greatinfluence on the efficiency and the effectiveness of the algorithm. The metaheuristic designers usually

Figure 7. Pseudocode for strategy IS1 to create an input candidate list.

A HYBRID METHOD FOR TRAIN FORMATION PROBLEM

Copyright © 2012 John Wiley & Sons, Ltd. J. Adv. Transp. (2012)DOI: 10.1002/atr

Page 10: Solving train formation problem using simulated annealing algorithm in a simplex framework

tune one parameter at a time, and they empirically determine the appropriate values. Here, the interac-tion between parameters is not considered. This sequential optimization method does not ensurefinding the optimal setting [31]. To overcome this problem, the algorithm parameters are adjustedusing statistical DOEs and the Design-Expert software [32].The DOE is concerned with the procedure of planning the experiment in such a way that suitable

data capable of being analyzed by statistical methods are collected, resulting in valid and objectiveconclusions [33].Several studies on parameter tuning by using the DOE have been presented [34–38].In this paper, a three-step method for parameter tuning has been developed, namely (i) parameter

screening, (ii) response surface modeling, and (iii) optimization of parameters. In the first step, para-meters that may affect the proposed algorithm are screened. The parameter screening step provides areduced set of the most important tuning parameters. The response surface modeling step gives themathematical functions related to the tuning parameters to each of the responses of interest. In the laststep, parameters based on the importance of each response are optimized.Experiments are conducted on five problems with different sizes. In the proposed algorithm, the

solution quality and the CPU time are considered as the response variables. The factors, the levels,and the final parameters for solving the problems are shown in Table I. These parameters are fixedto solve the TFP problems in the next section.

7. EXPERIMENTAL RESULTS

7.1. A numerical example

A sample railway network with four yards is considered (Figure 2). In the real railway network, thereare a number of physical routes available to demands. On a certain route, there are a high number ofpotential trains that can be formed. The demands are defined as the origin–destination pairs ofyards. The demands origin–destination and the number of cars for each demand are A–B: 60, A–C:130, A–D: 200, B–C: 90, B–D: 100, and C–D: 40.In each yard, the number of trains that can be formed is eight, and the maximum number of cars that

can be moved from one train to another is 50. The cost of moving a car from one train to another isconsidered two units per car. The potential trains and their characteristics such as origin–destination,variable cost, capacity, and fixed cost are shown in Table II.

Table I. Factorial design for the proposed algorithm.

Factor

LevelFinal

parameterLow High

Initial temperature 30 500 50Cooling rate 0.5 0.99 0.9Number of candidate variables 2 7 3Selection of variable strategy IS1–IS5 IS1Number of candidate variables for diversification 20 50 30Diversification condition 200 500 300Diversification strategy DS1–DS5 DS2Number of iterations without improvement 100 300 150Final temperature 1 7 5

Table II. Characteristics of the potential trains.

Origin–destination Variable cost Capacity Fixed cost

A–B 15 50 350A–C 18 50 200A–D 63 50 650B–C 21 50 180B–D 55 50 650C–D 14 50 290

M. YAGHINI ET AL.

Copyright © 2012 John Wiley & Sons, Ltd. J. Adv. Transp. (2012)DOI: 10.1002/atr

Page 11: Solving train formation problem using simulated annealing algorithm in a simplex framework

The optimum plan of train formation and the assignment of cars to trains are achieved using theCPLEX software (IBM ILOG, Sunnyvale, California, USA). The CPLEX software is developed toquickly solve large, difficult problems with minimum user intervention. The CPLEX is provided withsolution algorithms for linear, quadratically constrained, and MIP problems. Although various solvingoptions are available, CPLEX can automatically adjust most options at the best values for each prob-lem. One of the CPLEX software characteristics is its ability to solve very large, real world optimiza-tion problems, as well as the speed required for today’s interactive analytical decision supportapplications. The CPLEX branch-and-bound algorithm for solving MIP uses modern features suchas cutting planes and heuristics to find integer solutions. Combined with the state-of-the-art pre-solver,it makes CPLEX a very powerful tool for solving large and difficult MIP problemsm [39].In Figure 8, the arrows show the routes that are passed by the trains. Moreover, the demands and the

number of cars carried by the trains are shown above the arrows. The 15 trains must be formed totransport all demands. The total cost of this TFP is 28 610 units.

7.2. The simulated test problems

The main objectives of the experimentation phase are to (i) characterize the behavior of the proposedalgorithm for the TFP problem, (ii) establish how well the proposed algorithm solves the differenttypes of problems, and (iii) evaluate the effectiveness and the efficiency of the proposed algorithm.Twenty five test problems with different dimensions are generated to evaluate the proposed algo-

rithm. The number of yard, the distance between yards, the capacity of each train and yard, the max-imum number of cars that can be moved from one train to another, the fixed and variable costs, and thedemand volume are considered for the generated test problem. Despite the process, the main issue is tocreate test problems similar to the Iranian railway characteristics as possible so that the physicalnetwork of the test problems is of a star shape. To evaluate the performance of the proposed algorithm,the solutions are compared with the optimal solution obtained using the CPLEX software. The bestsolution and CPU time of each generated problem is obtained using the CPLEX 11 software.The Java programming language is used to implement the proposed algorithm. The program was run

on a personal computer with a Core 2 CPU at 2.66GHz, with 4GB of RAM, and operating underMicrosoft Windows Vista. The results are summarized in Table III. The PROB column indicates thecharacteristics of the test problems such as the name, the number of yards, and the number of demands.The CPLEX column corresponds to the solution and the solution time. For large-scale problems,including real world problems, a great amount of computing time is needed to achieve the optimumsolution. Therefore, it is necessary to limit the computing time. As such, a limit of 5 h (18 000 s)was imposed. The SB-SA column refers to the solution found using the proposed SB-SA algorithmand the execution time for finding the solution in seconds. Finally, the GAP (%) column refers tothe relative gap between the proposed algorithm and the CPLEX solutions. The solution quality foreach test problem is the relative gap, which is calculated using Equation (12).

Figure 8. The optimum of the TFP of a sample network.

A HYBRID METHOD FOR TRAIN FORMATION PROBLEM

Copyright © 2012 John Wiley & Sons, Ltd. J. Adv. Transp. (2012)DOI: 10.1002/atr

Page 12: Solving train formation problem using simulated annealing algorithm in a simplex framework

Relative gap ¼ obtained solution� CPLEX solutionð Þ= CPLEX solution (12)

The performance of the algorithm is evaluated by the quality of solution and the CPU time. Theaverage of relative gaps and the CPU time for the proposed algorithm are 0.62% and 1488 s,respectively. The results show the efficiency and the effectiveness of the proposed algorithm.

8. CASE STUDY: THE IRANIAN RAILWAY

The railway network of Iran is shown in Figure 9. The Iranian railway network is star type, whereTehran is located in the central area of the network as a hub and other regions are connected to thehub directly. This network is divided into nine regions. The SB-SA algorithm is developed to solvethe TFP problem in the Iranian railway network.The Iranian railway network comprises 170 yards with 200 origin–destination pair demands. About

1500 freight cars should be transferred through the railway network daily as origin–destinationdemands. Some origin yards have the facilities of classifying incoming traffic, and some of them onlyare employed for classifying origin traffic. In addition, there are some destination yards that onlyreceive terminating traffic. There are a number of yards with huge facilities of block classification thatare often utilized as origin, classification, and destination yards simultaneously. The fixed and variablecosts are calculated on the basis of the demand characteristics in the Iranian railway. The input data forthe TFP problem are classified into four groups:

(1) Service network components include the number of yards, demands, and potential trains.(2) Possible trains set include origin, destination, variable cost, capacity, and fix cost of trains.(3) Demands set includes origin, destination, and volume of demands.(4) Yards set includes the maximum number of trains that can be formed, the maximum number of

cars that can be assembled, and the cost of car assembling in the yards.

Table III. Computational results.

PROB CPLEX SB-SA

GAP (%)Name No. of yard No. of demand Obj. value CPU time (s) Obj. value CPU time (s)

TFP01 30 50 743 309 61 743 309 50 0.00TFP02 35 60 950 020 90 950 020 75 0.00TFP03 40 50 1 220 136 881 1 220 136 557 0.00TFP04 45 60 1 302 921 15 770 1 303 003 950 0.01TFP05 50 50 704 056 776 704 056 609 0.00TFP06 50 60 600 995 18 000 605 301 387 0.72TFP07 50 70 1 515 511 18 000 1 524 860 543 0.62TFP08 50 85 1 088 742 18 000 1 099 370 706 0.98TFP09 50 100 1 259 248 18 000 1 264 109 776 0.39TFP10 100 120 1 982 782 18 000 1 993 423 975 0.54TFP11 100 140 1 806 724 18 000 1 820 220 1015 0.75TFP12 100 170 2 428 049 18 000 2 437 121 1074 0.37TFP13 100 200 3 078 661 18 000 3 090 317 995 0.38TFP14 150 180 4 594 548 18 000 4 613 270 1135 0.41TFP15 150 210 3 828 864 18 000 3 849 922 1205 0.55TFP16 150 250 7 262 423 18 000 7 334 232 1335 0.99TFP17 150 300 5 893 397 18 000 5 993 414 1132 1.70TFP18 200 240 7 208 630 18 000 7 377 781 1564 2.35TFP19 200 285 5 661 532 18 000 5 691 448 1742 0.53TFP20 200 340 7 678 434 18 000 7 685 493 1942 0.09TFP21 200 410 12 435 498 18 000 12 503 855 2462 0.55TFP22 250 300 12 063 200 18 000 12 229 300 3153 1.38TFP23 250 360 14 271 621 18 000 14 337 900 3260 0.46TFP24 250 430 12 768 800 18 000 12 816 400 4211 0.37TFP25 250 520 15 296 100 18 000 15 499 000 5362 1.33

M. YAGHINI ET AL.

Copyright © 2012 John Wiley & Sons, Ltd. J. Adv. Transp. (2012)DOI: 10.1002/atr

Page 13: Solving train formation problem using simulated annealing algorithm in a simplex framework

Figure 9. The physical network of the Iranian railway.

Table IV. The SB-SA versus CPLEX results for the TFP in the Iranian railway.

CPLEX solutions SB-SA solutions

Obj. value(US$) CPU time (s)

Obj. value(US$) CPU time (s)

Obj. valuegap (%)

CPU timeGap (%)

1 310 233 18 000 1 314 208 1900 0.30 �89.441 310 233 18 000 1 311 423 3500 0.09 �80.551 310 233 18 000 1 308 753 9000 �0.11 �50.00

Figure 10. Convergence of the SB-SA best objective value for the TFP in the Iranian railway.

A HYBRID METHOD FOR TRAIN FORMATION PROBLEM

Copyright © 2012 John Wiley & Sons, Ltd. J. Adv. Transp. (2012)DOI: 10.1002/atr

Page 14: Solving train formation problem using simulated annealing algorithm in a simplex framework

Table IV shows the solutions for the TFP problem in the Iranian railway network. The proposed SB-SAalgorithm is run for 1900, 3500, and 9000 s. The relative gaps between the SB-SA and the CPLEXsolution are 0.30%, 0.09%, and �0.11%. The SB-SA solution is obtained in a very low computationaltime. The relative gaps of the CPU time are�89.44%,�80.55%, and�50.00%. Figures 10 and 11 showthe best objective value and the relative gaps of the proposed algorithm during the solving time for theIranian railway TFP problem. The proposed algorithm is able to solve not only the generated test problemsbut also the real world TFP problem with high quality of solution and short computational time. In theIranian railway, the TFP is developed only on the basis of experience, and there is a great deal of timewastage for train formation operations. It is possible to save significant time and cost throughsolving the TFP problem by using the proposed algorithm and developing the efficient TFP plan inrailway network.

9. CONCLUSIONS

In this paper, a Simplex algorithm is hybridized with an SA metaheuristic algorithm for solving theTFP in the Iranian railway. To adjust the best parameter values in the proposed algorithm, the DOEmethod is used. The validity and the efficiency of the proposed method are put into test over a seriesof computational experiments on 25 generated test problems. The experimental results show theefficiency and the effectiveness of the proposed algorithm. The objective value relative gaps of theproposed algorithm are compared with CPLEX solutions: 0.62% in the generated test problems and�0.11% in the Iranian railway for the best case. The CPU time relative gaps were �79.71% for thetest problems and �50% for the case study. The outcome is that the proposed method clearly outper-forms CPLEX results for solving the TFP problem. A research direction can be concerned with themechanisms to learn and guide various phases of the algorithm such as local search, diversification,and variable selection. It is possible to save significant time and cost through solving the TFP problemby using the proposed algorithm and developing the efficient TFP plan in the railway networks.

REFERENCES

1. Yang L, Gao Z, Li K. Railway freight transportation planning with mixed uncertainty of randomness and fuzziness.Applied Soft Computing 2011; 11:778–792.

2. Assad AA. Models for rail transportation. Transportation Research 1980a; 14A:205–220.3. Cordeau J, Toth P, Vigo D. A survey of optimization models for train routing and scheduling. Transportation

Science 1998; 32:380–404.4. Thomet A. A user-oriented freight railroad operating policy, IEEE Transactions on Systems, Man, and Cybernetics

1971; 1:349–356.5. Ahuja RK, Jha KC, Liu J. Solving real-life railroad blocking problems. Interfaces 2007; 37:404–419.

Figure 11. Convergence of the SB-SA relative gap for the TFP in the Iranian railway.

M. YAGHINI ET AL.

Copyright © 2012 John Wiley & Sons, Ltd. J. Adv. Transp. (2012)DOI: 10.1002/atr

Page 15: Solving train formation problem using simulated annealing algorithm in a simplex framework

6. Assad AA. Modelling of rail networks, toward a routing/makeup model. Transportation Research 1980b; 14B:101–114.7. Crainic TG, Ferland JA, Rousseau JM. A tactical planning model for rail freight transportation. Transportation

Science 1984; 18:165–184.8. Keaton MH. Designing optimal railroad operating plans: Lagrangian relaxation and heuristic approaches.

Transportation Research 1989; 23B:415–431.9. Keaton MH. Designing railroad operating plans: a dual adjustment method for implementing Lagrangian relaxation.

Transportation Science 1992; 26:263–279.10. Lin CC. The freight routing problem of time-definite freight delivery common carriers. Transportation Research

2001; 35B:525–547.11. Haghani AE. Rail freight transportation: a review of recent optimization models for train routing and empty car

distribution. Journal of Advanced Transportation 1987; 21:147–172.12. Haghani AE. Formulation and solution of a combined train routing and makeup, and empty car distribution model.

Transportation Research 1989; 23B:433–452.13. Martinelli DR, Teng H. Optimization of railway operations using neural networks. Transportation Research 1996;

4C:33–49.14. Marín A, Salmerόn J. Tactical design of rail freight networks. Part 1: exact and heuristic methods. European Journal

of Operational Research 1996a; 90:26–44.15. Marín A, Salmerόn J. Tactical design of rail freight networks. Part 2: local search method with statistical analysis.

European Journal of Operational Research 1996b; 94:43–53.16. Morlok EK, Peterson RB. Final report on a development of a geographic transportation network generation and

evaluation model. Transportation Research Forum 1970; 11:71–105.17. Huntley CL, Brown DE, Sappington DE, Markowicz BP. Freight routing and scheduling at CSX transportation.

Interfaces 1995; 25:58–71.18. Gorman MF. An application of genetic and tabu searches to the freight railroad operating plan problem. Annals of

Operations Research 1998a; 78:51–69.19. Gorman MF. Santa Fe Railway uses an operating-plan model to improve its service design. Interfaces 1998b; 28:1–12.20. Godwin T, Gopalan R, Narendrant TT. Freight train routing and scheduling in a passenger rail network:

computational complexity and the stepwise dispatching heuristic. Asia-Pacific Journal of Operational Research.2007; 24:499–533.

21. Shafia MA, Sadjadi SJ, Jamili A. Robust train formation planning. Proceedings of the IMechE Part F: Journal ofRail and Rapid Transit 2010; 224:75–90.

22. Crainic TG. Service network design in freight transportation. European Journal of Operational Research 2000;122:272–288.

23. Holmberg K, Yuan D. A Lagrangian heuristic based branch-and-bound approach for the capacitated network designproblem. Operations Research 2000; 48:461–481.

24. Crainic TG, Gendreau M, Farvolden JM. A Simplex-based tabu search method for capacitated network design.INFORMS Journal on Computing 2000; 12:223–236.

25. Ghamlouche I, Crainic TG, Gendreau M. Cycle-based neighbourhoods for fixed-charge capacitated multicommoditynetwork design. Operations Research. 2003; 51:655–667.

26. Ghamlouche I, Crainic TG, Gendreau M. Path relinking, cycle-based neighborhoods and capacitated multicommod-ity network design. Annals of Operations Research 2004; 131:109–133.

27. Crainic TG, Gendreau M, Hernu G. A slope scaling/Lagrangian perturbation heuristic with long-term memory formulticommodity capacitated fixed-charge network design. Journal of Heuristics 2004; 10:525–545.

28. Crainic TG, Li Y, Toulouse M. A first multilevel cooperative algorithm for capacitated multicommodity networkdesign. Computers & Operations Research 2006; 33:2602–2622.

29. Rodríguez-Martín I, Salazar-González JJ. A local branching heuristic for the capacitated fixed-charge networkdesign problem. Computers & Operations Research 2010; 37:575–581.

30. Kirkpatrick S, Gelatt C, Vecchi M. Optimization by simulated annealing. Science 1983; 220:671–680.31. Talbi E. Metaheuristics: from Design to Implementation. John Wiley and Sons: New York, 2009.32. Stat-Ease. User Guide to Design-ExpertW Software, Minneapolis, MN, USA, 2010.33. Montgomery DC. Design and Analysis of Experiments. John Wiley and Sons: New York, 2009.34. Adenso-Díaz B, Laguna M. Fine tuning of algorithms using fractional experimental designs and local search.

Operations Research 2006; 54:99–114.35. Coy SP, Golden BL, Runger GC, Wasil EA. Using experimental design to find effective parameter settings for

heuristics. Journal of Heuristics 2001; 7:77–97.36. Fığlalı N, Özkale C, Engin O, Fığlalı A. Investigation of ant system parameter interactions by using design of

experiments for job-shop scheduling problems. Computers & Industrial Engineering 2009; 56:538–559.37. Ridge E, Kudenko D. Tuning the performance of the MMAS heuristic. In Proc. the first International Workshop on

Engineering Stochastic Local Search Algorithms (SLS 2007), Stützle T, Birattari M, Hoos H (Eds). Volume 4638 ofLecture Notes in Computer Science, Springer: Heidelberg, 2007; 46–60.

38. Ridge E, Kudenko D. Tuning an algorithm using design of experiments. In Experimental Methods for the Analysis ofOptimization Algorithms, Bartz-Beielstein T, Chiarandini M, Paquete L, Preuss M (Eds). Natural Computing Series,Springer: Berlin, 2010; 265–286.

39. IBM ILOG. User’s Guide CPLEX 11.0, Sunnyvale, California, USA, 2008.

A HYBRID METHOD FOR TRAIN FORMATION PROBLEM

Copyright © 2012 John Wiley & Sons, Ltd. J. Adv. Transp. (2012)DOI: 10.1002/atr