A population-based algorithm for the railroad blocking problem
Abstract
EconStor is a publication server for scholarly economic literature, provided as a non-commercial public service by the ZBW.
Full text
Yaghini, Masoud; Seyedabadi, Masoud; Khoshraftar, Mohamad M Article A population-based algorithm for the railroad blocking problem Journal of Industrial Engineering International Provided in Cooperation with: Islamic Azad University (IAU), Tehran Suggested Citation: Yaghini, Masoud; Seyedabadi, Masoud; Khoshraftar, Mohamad M (2012) : A population-based algorithm for the railroad blocking problem, Journal of Industrial Engineering International, ISSN 2251-712X, Springer, Heidelberg, Vol. 8, pp. 1-11, https://doi.org/10.1186/2251-712X-8-8 This Version is available at: https://hdl.handle.net/10419/78584 Standard-Nutzungsbedingungen: Die Dokumente auf EconStor dürfen zu eigenen wissenschaftlichen Zwecken und zum Privatgebrauch gespeichert und kopiert werden. Sie dürfen die Dokumente nicht für öffentliche oder kommerzielle Zwecke vervielfältigen, öffentlich ausstellen, öffentlich zugänglich machen, vertreiben oder anderweitig nutzen. Sofern die Verfasser die Dokumente unter Open-Content-Lizenzen (insbesondere CC-Lizenzen) zur Verfügung gestellt haben sollten, gelten abweichend von diesen Nutzungsbedingungen die in der dort genannten Lizenz gewährten Nutzungsrechte. Terms of use: Documents in EconStor may be saved and copied for your personal and scholarly purposes. You are not to copy documents for public or commercial purposes, to exhibit the documents publicly, to make them publicly available on the internet, or to distribute or otherwise use the documents in public. If the documents have been made available under an Open Content Licence (especially Creative Commons Licences), you may exercise further usage rights as specified in the indicated licence. http://creativecommons.org/licenses/by/2.0/
ORIGINAL RESEARCH Open Access A population-based algorithm for the railroad blocking problem Masoud Yaghini * , Masoud Seyedabadi and Mohamad M Khoshraftar Abstract Railroad blocking problem (RBP) is one of the problems that need an important decision in freight railroads. The objective of solving this problem is to minimize the costs of delivering all commodities by deciding which inter-terminal blocks to build and by specifying the assignment of commodities to these blocks, while observing limits on the number and cumulative volume of the blocks assembled at each terminal. RBP is an NP-hard combinatorial optimization problem with billions of decision variables. To solve the real-life RBP, developing a metaheuristic algorithm is necessary. In this paper, for the first time, a new genetic algorithm-based solution method, which is a population-based algorithm, is proposed to solve the RBP. To evaluate the efficiency and the quality of solutions of the proposed algorithm, several simulated test problems are used. The quality and computational time of the generated solutions for the test problems with the proposed genetic algorithm are compared with the solutions of the CPLEX software. The results show high efficiency and effectiveness of the proposed algorithm. Keywords: Railroad blocking problem, Genetic algorithm, Budget design problem Background Railroad blocking problem (RBP) is an important subject for freight railroad companies because its solution can reduce some extra costs. To reach a destination, a load on its route may traverse on many classification yards from its origin to its destination. In these places, the arriving load, which is usually composed of different individual shipments, is regrouped to be carried by departing trains. However, because the reclassification process is difficult and capital is intensive, this classification always produces some delay in the movement of these loads. Therefore, to avoid loads from being regrouped at every classification yard they pass through, it is better to group various shipments together to form a block. A block may contain individual shipments whose origin or destination may or may not be the origin or destination of the whole block. These shipments are regrouped only after reaching the final destination of the block. The RBP is a network budget design problem (BDP). In the BDP, the flow cost of a set of commodities through a network is minimized while observing budget constraints on the fixed costs of the links used. BDP is related to several other problems, such as the fixedcharge network design problem and the multicommodity flow problem. The fixed-charge network design problem is different because the fixed costs for the arcs appear in the objective function. This problem is known as nondeterministic polynomial time-hard (NP-hard) combinatorial optimization problem (Magnanti and Wong 1984; Minoux 1989). No polynomial-time optimization techniques are known to solve the NP-hard problem. The multicommodity flow problem is a BDP with fixed binary arc selection variables. The interested reader of the network design problem should consult the surveys by Magnanti and Wong (1984), Minoux (1989), and the annotated bibliography of Balakrishnan et al. (1997), Crainic (2000, 2006, 2009). We can define the RBP as follows. To reduce the intermediate handlings of shipments as they travel over the railroad network, a set of shipments is classified (or grouped together) at a railroad yard to create a group of cars called block. The aim of the RBP is to choose which blocks to put together at each yard and to determine the sequences of blocks that deliver each shipment to minimize the total miles that the shipments travel and * Correspondence: [email protected] School of Railway Engineering, Iran University of Science and Technology, Tehran 16846-13114, Iran © 2012 Yaghini et al.; licensee Springer. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Yaghini et al. Journal of Industrial Engineering International 2012, 8:8 http://www.jiei-tsb.com/content/8/1/8
their intermediate handlings (or reclassifications). In fact, the RBP aims to identify the classification plan for all shipments at all yards in the network to minimize the total shipment cost, i.e., to create a blocking plan which dictates which blocks should be built at each individual yard and which traffic should be assigned to each block as they travel from origins to destinations. The RBP in real-life is a very large-scale problem with billions of decision variables. To solve it, we need to design the underlying blocking network, which is a virtual network that is overlaid on the physical network, and to route different commodities, where each set of railcars with the same origin-destination pair of nodes defines a separate commodity on the blocking network to minimize the system-wide transportation costs. Multicommodity flow and network-design problems are among the most difficult combinatorial problems in research operations. When they comprise a few hundred design variables, we try solving them optimally. However, the real-life RBP often contain over a million design variables and hundreds of billions of flow variables. Modeling and solving them, using commercial software, is nearly impossible. A pioneer effort to place railroad modeling within a hierarchical structure is provided in the work of Assad (1980). The author offers a three-tiered hierarchy of models, including strategic, tactical, and operational levels. Differences in these levels are about planning horizon, required investment, and modeling methods (Assad 1980). RBP is one of the main problems that need a decision in rail transportation planning, which is made in the tactical level of railroad operation. Central to railroad operations is the operating plan that dictates the movement of shipments (railcar loads), crews, and locomotives over the railroad's network. Each railroad company has a service design department that is responsible for creating operating plans to enable efficient movement of shipments (Figure 1; Ahuja et al. 2007). The blocking plan determines how to aggregate a large number of shipments into blocks of shipments as they travel from origins to destinations. Train scheduling consists of designing train routes, days of operation, timings, and routing of blocks on trains to minimize the total system wide cost; this cost includes car hire, crew, and locomotive costs. An operating plan dictates the flow of three important railroad assets: crews, locomotives, and railcars. A well-designed operating plan can reduce the costs of railroads significantly (Ahuja et al. 2007). Greedy heuristic methods produce solutions that are far from optimal and/or cannot handle real-life complexities of the blocking problem. As a result, no railroad company uses any optimization-based approach to determine blocking plans, but they rely on manual decision-making processes to make and change these plans. This manual process is very time intensive and does not save substantially on transportation costs. Consequently, we believe that there are major opportunities for cost saving using an optimization-based approach that can determine nearoptimal blocking plans. In this research, we used a population-based metaheuristic (p-metaheuristics) for solving RBP. The pmetaheuristics share many common concepts. They could be viewed as an iterative improvement in a population of solutions. First, the population is initialized; a new population of solutions is then generated. Finally, this new population is integrated into the current one, using some selection procedures. The search process is stopped when a given condition is satisfied (stopping criterion) (Talbi 2009). We use a mathematical model for RBP wherein its decision variables identify a blocking scheme and a commodity assignment to this block. For the first time, we proposed a new genetic algorithm-based solution method for the model, and several genetic search operators are used to find optimal solutions. To implement the proposed algorithm, we utilized the Java programming language (Oracle Corporation, Redwood City, CA, USA), and to validate the proposed algorithm, we made several blocking problems randomly and compared the proposed algorithm results with the results of the CPLEX software (IBM Corporation, Armonk, NY, USA) for these problems. The evaluating of results revealed the effectiveness and efficiency of the proposed solution method for RBP. The outline of this paper is as follows. In the ‘Literature review’subsection, related work is reviewed. ‘The railroad blocking problem’subsection introduces the railroad blocking problem. Two mathematical models that include nod-arc and path-based formulations are presented in ‘The Mathematical formulation’subsection of the ‘Methods’section. In ‘The proposed algorithm’subsection, the proposed algorithm is described. A small example is solved with the proposed algorithm in the ‘An example’ subsection. The next two sections presented are ‘Results and discussion’and ‘Conclusions’, respectively. Locomotive assignment Crew assignment Blocking plan Train schedule design Operating plan Figure 1 An operating plan consists of a blocking plan and a train schedule. Modified from Ahuja et al. (2007). Yaghini et al. Journal of Industrial Engineering International 2012, 8:8 Page 2 of 11 http://www.jiei-tsb.com/content/8/1/8
Literature review Previous surveys by Cordeau et al. (1998) and Crainic (2000, 2002) reviewed optimization models for rail transportation. One of the first models for blocking belongs to Bodin et al. (1980) who suggested a nonlinear mixed integer programming formulation of the problem. The model is a multicommodity flow problem with additional side constraints that simultaneously determine the optimal blocking strategies for all the classification yards in a railroad system. Assad (1983) proposed a solution approach for a problem defined on a line network. The cars are received at the first yard in arbitrary order and must be separated as they proceed along the line to allow each successive yard to extract the traffic destined for it. Van Dyke (1986, 1988) described an interactive, heuristic approach that attempts to improve an existing blocking plan by solving a series of shortest-path problems on a network whose arcs represent available blocks. Keaton (1989) proposed a nonlinear mixed integer program (MIP) model and a heuristic method based on Lagrangian relaxation for the combined problem of blocking, train routing, and makeup. In a subsequent paper by Keaton (1992), pure strategy constraints for blocking and maximum transit times for each origindestination pair are also considered. Huntley et al. (1995) developed a simulated annealing approach, and Gorman (1998) proposed a hybrid tabu search and genetic algorithm for constructing operating plans including blocking, train connections, and block- to-train assignments. One of the significant researches on RBP has been done by Newton (1996) and Newton et al. (1998). They modeled the RBP as a network design model and formulated it as an MIP. They developed column generation and branch-and-price algorithms to solve it. Barnhart et al. (2000) used the same formulation as Newton et al. (1998) and proposed the Lagrangian relaxation technique to decompose the problem into two subproblems. Their approaches focused on determining a near-optimal solution. However, the running times are not scalable as the problem increases in size; this prohibits their use in practice. Ahuja et al. (2007) developed an algorithm using a technique known as very large-scale neighborhood (VLSN) search that is able to solve the problem to near optimality using 1 to 2 h of computer time on a standard workstation computer. Jha et al. (2008) presented two formulations for the block-to-train assignment problem: an arc-based formulation and a path-based formulation. The latter is generally smaller than the former, and it can better handle practical constraints. They also proposed exact and heuristic algorithms based on the path-based formulation. Zhu et al. (2009) attempted to combine blocking, makeup, and empty car distribution in an integrated dynamic model. To do this, they built a two-layer network, one for block flows and another for car flows. The objective function includes two fixed costs on open service and block, and a variable cost on all blocks. The model has three types of capacity constraints on maximum cars in each train, maximum car on each block, and maximum block being built in each yard at each time. They used a tabu search metaheuristic to solve the proposed model. Yang et al. (2010) proposed a freight transportation model with mixed uncertainty of randomness and fuzziness. Table 1 represents the well-known research in this field. The railroad blocking problem In this section, we describe the RBP and rail operations in general. In the RBP, the physical rail network (the railroad terminals and tracks) is already defined. The blocking network to be constructed is a virtual network that is overlaid on the physical network. The blocks are virtual express arcs which a commodity may take to have uninterrupted service between two terminals that are not necessarily connected by a physical link (Newton 1996). On railroads, a typical general merchandise shipment may pass through many terminals on its route from origin to destination (OD). At these terminals, the incoming traffic is reclassified (sorted and grouped together) to be placed on outgoing trains. On average, each reclassification results in a 1-day delay for the shipment. In addition, the classification process is labor and capital intensive since many workers and large quantities of equipment are needed to sort the traffic, and construction and maintenance of large terminals are necessary to handle the sorting task. To prevent shipments from being reclassified at every terminal they pass through, several shipments may be grouped together to form a block. A block has associated with it an OD pair, which may or may not be the OD pair of any of the individual cars contained in the block. Once a shipment is placed in a block, it is not reclassified until it reaches the destination of that block (Newton 1996).The railroads develop the blocking plans that dictate which blocks should be built at each individual terminal and which traffic should be assigned to each block. The objective of the RBP is to develop a feasible blocking plan which, in conjunction with other operating policies, minimizes the total cost of delivering the commodities. These costs are usually broken down into carhandling costs associated with handling (or blocking) a car and car-mile costs associated with the movement of a car. To solve the RBP, we must decide which blocks to include in the blocking plan and which blocks to use to Yaghini et al. Journal of Industrial Engineering International 2012, 8:8 Page 3 of 11 http://www.jiei-tsb.com/content/8/1/8
deliver each commodity (Newton 1996). An example of a rail system with four terminals is shown in Figure 2. We define commodities as origin-destination pairs of terminals. We assume that the only commodities are A !B with 100 cars, A !C with 80 cars, and A !D with 90 cars. Terminal A has a volume capacity of 270 cars, which is its minimum since 270 cars originate there. Terminals B and C can each block 90 cars. Terminal A can build two blocks, whereas each of the other terminals can only build one block. At each terminal, limited classification resources restrict the number of cars (or car volume), which can be classified, and the number of blocks. In terms of our graph, the car volume constraints would be the upper bounds on the flow through each node, and the number of block constraints would be limits on the out-degree of each node. One performance metric of a blocking plan is the total number of classifications necessary to deliver all commodities. We consider five different blocking plans for this example. With blocking plan 1, at terminal A, all three commodities are sorted to move to terminal B. The resulting string (block) of cars may have the commodities intermingled. At terminal B, commodity A !B has reached its destination and leaves the system. Commodities A !C and A !D are blocked to be move to terminal C. At terminal C, commodity A !C has reached its destination and leaves the system, and commodity A !Disblocked to move to terminal D. Using this blocking plan, the 100 cars for commodity A !B use one block, (A, B), the 80 cars for commodity A !C use two blocks, (A, B) and (B, C), and the 90 cars for commodity A !Duse three blocks, (A, B), (B, C), (C, D). Therefore, for blocking plan 1, there are 530 classifications; however, A DCB A DCB A DCB A DCB A DCB Plan 1: Plan 2: Plan 3: Plan 4: Plan 5: A DCB Physical Network: A DCB Blocking Network: Figure 2 Physical rail system and five blocking plans. Table 1 The prominent railroad car blocking research Authors Problem type Planning horizon Objective function Model structure Solution approach Bodin et al. (1980) Blocking Tactical Minimum operating and delay costs Nonlinear MIP Heuristic Assad (1983) Blocking Operational Minimum total classification Shortest path Dynamic programming Van Dyke (1986) Blocking Tactical Minimum operating costs Shortest path Heuristic Newton (1996) Blocking Tactical Minimum operating costs NDP with node budget Dantzig-Wolfe decomposition Barnhart et al. (2000) Blocking Tactical Minimum operating costs NDP with node budget Lagrangian relaxation Ahuja et al. (2007) Blocking Tactical Minimum operating costs Linear MIP VLSN Yaghini et al. Journal of Industrial Engineering International 2012, 8:8 Page 4 of 11 http://www.jiei-tsb.com/content/8/1/8
this plan is not feasible because it requires blocking 170 cars at terminal B that has a maximum volume of 90 cars. Blocking plan 2 provides a direct block from terminal A to terminal D. Cars which travel in this block will still move along the physical track through terminals B and C, but since they are presorted for terminal D, they do not require classification resources at B or C. To deliver the three commodities using this blocking plan requires 350 classifications, since the 90 cars of commodity A !D now require only one block, (A, D). This blocking plan is feasible since it observes the limits on number and total volume of the blocks built at each terminal. Similar calculations show that blocking plans 3, 4, and 5 require 360, 270, and 360 classifications, respectively. However, blocking plan 4 is infeasible since it requires three blocks for terminal A, which has a maximum capacity of two blocks. Commodities are always carrying directly to their destination, as in blocking plan 4. Therefore, blocking plan 2 with 350 handlings is optimal with respect to the total number of classifications required. However, if the number of cars which could be blocked at B is reduced to less than 80 (or equivalently, the volume of commodity A !C were more than 80), then blocking plan 2 would be infeasible and blocking Plan 3 with 360 handlings would be optimal. Methods The mathematical formulation The RBP can be modeled as a network design problem where the nodes represent the railroad terminals, and the arcs represent potential blocks (Newton 1996). In this section, we present a node-arc MIP for the RBP. The parameters and variables used in this model are as follows: Parameters G=(N, A):the graph with terminal set Nand potential blocks set A. K:the set of all commodities kdesignated by an origin–destination pair of nodes. v k :the volume of commodity k. orig(k):the origin terminal for commodity k. dest(k):the destination terminal for commodity k. orig(a):the origin of potential block a. dest(a):the destination of potential block a. u a :the capacity of potential block a. c a :the per unit cost of flow on arc a. B(i):the number of blocks which may originated at terminal i. V(i):the volume which may be classified at terminal i. Variables xk a¼1if the commodity kis flowing on block a; 0 otherwise. yk a:y a =1 if block ais included in the blocking network; 0 otherwise. Node-arc formulation min X k2KX a2A cavkxk a st: ð1Þ X a2A orig aðÞ¼i xk aX a2A dest aðÞ¼i xk a ¼ 1origkðÞ¼i 1 dest kðÞ¼i 0 otherwise 8i2N;k2K 8 < : ð2Þ X k2K vkxk a≤uaya8a2Að3Þ X a2A orig aðÞ¼i ya≤BðiÞ8i2Nð4Þ X k2KX a2A orig aðÞ¼i vkxk a≤VðiÞ8i2Nð5Þ ya20;1 fg8 a2Að6Þ xk a20;1 fg8 a2A;k2Kð7Þ The objective is to minimize the sum of the costs of delivering each commodity using the blocking network formed by blocks for which y a = 1. For each terminal, constraints (2) are balance equations for the flow of each commodity. For each potential block, constraints (3) prevent flow on blocks, which are not built and enforce the upper bound u a on flow for blocks, which are built. The constraints (4) enforce the terminal limit B(i) for the sum of the blocks which leave the terminal. The constraints (5) model the volume of cars, which may be classified at each terminal. We also present the path-based formulation for the RBP. The parameters and variables used in this model are as follows: ParametersQ(k): the set of legal paths for commodity k. orig(k):the origin node for commodity k. dest(k):the destination node for commodity k. PCk q:the path cost for flowing one unit of commodity kon path q. Yaghini et al. Journal of Industrial Engineering International 2012, 8:8 Page 5 of 11 http://www.jiei-tsb.com/content/8/1/8
δq a:the binary design parameter; δq a=1ifqth path contain arc (block) ath 0 otherwise. Variablesy a : the binary design variable for including arc (block) a:y a = 1 if arc ais selected; 0 otherwise. fk q:the binary flow variable; fk q:= 1 if commodity kflows on path q0 otherwise. The path-based mathematical model for RBP is explained as flowing equations: Path based formulation min P k2QP q2QðkÞPCk qvkfk q st: ð8Þ X k2QX q2QðkÞ fk qvkδq auaya≤08a2Að9Þ X q2QðkÞ fk q¼18a2Að10Þ X a2A orig aðÞ¼i ya≤BðiÞ8a2Að11Þ X k2KX q2QðkÞX a2A orig aðÞ¼i vkfk qδq a≤VðiÞ8i2Nð12Þ fk q20;1fg8q2QkðÞ;k2Kð13Þ ya20;1 fg8 a2Að14Þ Equation 8 is the objective function of this model; it minimizes total costs of delivering each commodity on paths because classification must be done on all commodities at its origin and destination. In this model, classification cost is not considered at that place for each commodity. Constraints (9) ensure that flow is only allowed on arcs (blocks) included in the network. Constraints (10) ensure that all of each commodity is delivered. Constraints (11) limit the number of blocks, which may be built at each node, which is modeled by the node-budget constraints. Constraints (12) limit the volume of cars, which may be classified at each terminal. The proposed algorithm This section introduces the proposed p-metaheuristic algorithm for solving the RBP. The proposed solution method is based on genetic algorithms (GAs). GAs are one of the most famous p-metaheuristic algorithms which have been developed by J. Holland in the 1970s (University of Michigan, USA) to understand the adaptive processes of natural systems; Then, they have been applied to optimization and machine learning in the 1980s. A GA usually applies a crossover operator to two solutions that plays a major role, plus a mutation operator that randomly modifies the individual contents to promote diversity. GA uses a probabilistic selection that is originally the proportional selection. The replacement (survivor selection) is generational, i.e., the parents are replaced systematically by the offsprings. The crossover operator is based on the n-point or uniform crossover while the mutation is bit flipping. A fixed probability p m (p c ) is applied to the mutation (crossover) operator (Talbi 2009). GAs have several advantages. Instead of single solution optimization, GAs use a population of solution simultaneously, so the probability of getting stuck in local minima is prevented; in comparison with other p-metaheuristic methods, GAs have high-quality solutions and good convergence speed. General structure of the proposed algorithm The proposed algorithm has several stages. At the first stage, solutions (feasible and infeasible) are encoded into the chromosome. The idea of this stage is simulation and good representation of all possible solutions for the next stage. Encoding solutions into chromosomes is important to other stages. In the proposed algorithm, to find solutions in a reasonable time, each possible solution is encoded into strings of integer numbers (chromosome). To construct the initial population, each possible solution is created randomly, but at least one feasible solution is added to the initial population. There are two approaches to find a feasible initial solution. If the car blocking problem is implemented for a railway which has a specified blocking plan for each O-D pairs, this blocking plan could be used as initial feasible solution. However, if a car blocking problem is implemented for a railway without a specified blocking plan for each O-D pairs, it needs a heuristic algorithm to initialize feasible solutions. To present a feasible solution, one must consider two problem constraints (i.e., number of block and car volume). Figure 3 represents the process of this heuristic. To do a comparison among chromosomes, we use a fitness function. A fitness value is assigned to each chromosome based on this function. This stage of the proposed algorithm for solving the problem is extremely important. Because it establishes a measure to indicate superiority or inferiority of each possible solution, the measure could attribute a real number to each possible solution; this number represents its degree of dominance, e.g., suppose fis a fitness function, and X 1 and X 2 are two chromosomes of a population and f(X 1 )=3and Yaghini et al. Journal of Industrial Engineering International 2012, 8:8 Page 6 of 11 http://www.jiei-tsb.com/content/8/1/8
f(X 2 )=5, then X 2 is better than X 1 , or it has a greater fitness value. After evaluating the fitness value of each chromosome of the initial population, the proposed GA randomly chooses two chromosomes according to the roulette wheel method; the chromosomes with greater fitness value are selected as the parents. In constructing a new generation of chromosomes, crossover and mutation operators are utilized. The crossover operator first selects two parents by roulette wheel selection method and chooses a place on each parent as crossover point randomly. To make the first (second) child, the algorithm swaps the content of the left (right) side of each parent with another one. The mutation operator selects a chromosome from the population randomly and then selects one point on the chromosome randomly, and the content of its gene is changed according to the mutation probability (p m ); this process is continued for all selected chromosome gene. After producing a new generation of chromosomes, the next generation is identified. In the stage of producing the next generation, the proposed algorithm keeps kas the best feasible solution of the current generation to include in the next generation. If mis the number of initial population, in order to create the next generation, the mand kchromosomes of new generation are initially selected randomly, and then, kis selected as the best feasible solution of the current population. Their union makes the next generation. The algorithm checks two termination conditions simultaneously: (1) if the iteration number does exceed N and (2) if after Literations of the algorithm, the best solution so far does not improve. Figure 4 is a pseudocode for the proposed algorithm. Parameter tuning The metaheuristics are sensitive to the value of their parameters. The parameters are the configurable components of a metaheuristic algorithm. Parameter tuning may allow a larger flexibility and robustness to the algorithm but requires a careful initialization. Those parameters may have a great influence on the efficiency and effectiveness of the search. It is not obvious to define a priori which parameter setting should be used. The optimal values for the parameters depend mainly on the problem, and even the instance to deal with, and on the search time that the user wants to spend in solving the A DCB Figure 6 The blocking network. A DCB Figure 5 Physical rail network with four stations. Algorithm: the GA algorithm for solving RBP Begin Read data; Create paths for all commodities; Create initial population; Identify Kbest feasible solution; Repeat Do parent selection; Do recombination; Do mutation; Replace current population with new population; Evaluate fitness of chromosomes; Find feasible solutions; Update K best feasible solutions based on new population; Replace Kbest feasible solutions in the new population; Until termination condition is met; End Figure 4 The pseudocode for the proposed algorithm. Step 1. O-D Pair Selection: If there are unselected O- D pairs, choose an unselected O-D pairs randomly, otherwise go to Step 7; Step 2. Path Selection: Select one legal path of the O- D pairs, randomly; Step 3. Assignment: Among all possible commodities, assign those which could be delivered through this selected path; Step 4. Update: Update number of block and car volume for the selected O-D pairs and its intermediate station; Step 5. Feasibility: If this path is a feasible path then go to Step 1, if not, go to Step 2 and select another legal path. Otherwise if all path are infeasible go to Step 6; Step 6. Cancellation: Unselect all O-D pair which this origin or destination is a part of it and go to Step 1; Step 7. End: the end of method. Figure 3 The heuristic steps for finding a feasible solution. Yaghini et al. Journal of Industrial Engineering International 2012, 8:8 Page 7 of 11 http://www.jiei-tsb.com/content/8/1/8
problem. A universally optimal parameter value set for a given metaheuristic does not exist. One main step of this research is fine parameter tuning of algorithm. In the proposed algorithm, there are three main parameters which include the number of individuals of a population, crossover, and mutationrate.Weuseatrial-and-errorprocedureto obtain locally optimal values for the parameters. To tune parameters, we generated three instances with different sizes. For tuning, only one parameter changed at that time, while all other parameters didn’t change. Proper values of the parameters were then determined through running the algorithm 10 times over different values of the parameters and through calculating the average of the goal function for these 10 runs. The criteria for modifying parameters are the quality of solutions and time spent to find them. The final value for the parameter is as follows: the population size is 6 × the number of commodity, cross over rate is 0.7, and mutation rate is (1/the number of commodity). An example In the proposed method, each gene represents one commodity, and the value of this gene is the legal Table 2 Comparison results of the proposed algorithm with CPLEX Problem CPLEX GA algorithm Name Number of terminals Number of commodities Objective value CPU time (s) Objective value CPU time (ms) Percentage error SP1 5 3 5640 1000 5640 15 0% SP2 5 5 11400 1000 11400 16 0% SP3 5 10 20880 2000 20880 46 0% SP4 10 5 11100 3000 11100 93 0% SP5 10 10 23940 3000 23940 140 0% SP6 10 31 60720 5000 60720 951 0% SP7 20 105 8586 14000 8656 1,717 1% SP8 20 195 13676 15000 13898 4,041 1.6% SP9 30 133 10298 18000 10672 4,150 3.6% SP10 30 292 21604 23000 22770 16,099 4.9% SP11 50 220 15922 38000 16702 15,803 4.8% SP12 50 521 39700 110000 39804 81,242 0.3% 1 3 6 8 10 11 Number of commodity 123456 Path number, selected for third demand Figure 8 A schematic of the proposed chromosomes. A B A CB A CB A DCB A DCB A DCB A DCB CB DCB DCB DC Path for (A-B) commodity Path for (A-C) commodity Path for (A-D) commodity Path for (B-C) commodity Path for (B-D) commodity Path for (C-D) commodit y Figure 7 Legal path for each demand. Yaghini et al. Journal of Industrial Engineering International 2012, 8:8 Page 8 of 11 http://www.jiei-tsb.com/content/8/1/8