Mathematical Problems in Engineering

Volume 2017 (2017), Article ID 4703106, 11 pages

https://doi.org/10.1155/2017/4703106

## A Simulated Annealing Approach for the Train Design Optimization Problem

^{1}Universidad Autónoma del Estado de Morelos, 62209 Cuernavaca, MOR, Mexico^{2}Instituto de Matemáticas, Universidad Nacional Autónoma de México, 62210 Cuernavaca, MOR, Mexico

Correspondence should be addressed to Federico Alonso-Pecina

Received 10 March 2017; Revised 20 June 2017; Accepted 9 July 2017; Published 10 August 2017

Academic Editor: Jorge Magalhaes-Mendes

Copyright © 2017 Federico Alonso-Pecina and David Romero. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

The Train Design Optimization Problem regards making optimal decisions on the number and movement of locomotives and crews through a railway network, so as to satisfy requested pick-up and delivery of car blocks at stations. In a mathematical programming formulation, the objective function to minimize is composed of the costs associated with the movement of locomotives and cars, the loading/unloading operations, the number of locomotives, and the crews’ return to their departure stations. The constraints include upper bounds for number of car blocks per locomotive, number of car block swaps, and number of locomotives passing through railroad segments. We propose here a heuristic method to solve this highly combinatorial problem in two steps. The first one finds an initial, feasible solution by means of an ad hoc algorithm. The second step uses the simulated annealing concept to improve the initial solution, followed by a procedure aiming to further reduce the number of needed locomotives. We show that our results are competitive with those found in the literature.

#### 1. Introduction

An ample range of investigations have been undertaken to develop optimization algorithms for various problems encountered in the realm of rail systems, like routing [1], scheduling [2–4], crew assignment [5, 6], and blocking [7, 8], among others [9–12]. However, to our knowledge, the Train Design Optimization Problem as defined below is the only attempt to simultaneously deal with block-to-train assignment, train routing, and crew assignment [13], arising as one of the most fundamental and difficult combinatorial optimization problems formulated in the railroad industry [13–17], with a huge potential to benefit from the application of operations research techniques.

In rail systems, a railroad car, railcar, or train car (*car*, for short), is a vehicle used for the carrying of cargo. Such cars, when coupled together and hauled by one or more locomotives, form a* train*. A car block (*block*, for short) is a semipermanently arranged formation of cars. Trains are then built of one or more blocks coupled together as needed. Also, in the operation of rail systems a* block swap* can occur, namely, when a locomotive delivers a block at a station distinct from the block’s destination, and another locomotive picks up the block afterwards. Each time a train stops en route at a station to pick up and/or to deliver blocks, a* work-event* takes place.

In this paper we address the Train Design Optimization Problem (TDOP) arising in the operation of railroad freight transport as part of the logistics chain. It consists in determining, at minimal total cost, and subject to capacity and operational constraints, the number of locomotives and crews, together with the logistics related to the movement of locomotives, blocks, and crews through a railway network, so as to transport goods from a set of shippers to a set of destinations.

The total cost depends on the number of assigned locomotives, the distance traveled by locomotives and cars, the distance traveled by crews to return to their departure stations, the number of block swaps and work-events, the number of blocks not arriving to destination, and the difference between the number of locomotives arriving to and departing from stations. The constraints include maximum number of blocks per locomotive, maximum number of block swaps, maximum number of work-events per locomotive, maximum length, weight, and number of trains passing through a railroad segment, and crew limitations as to the route to follow.

Only a handful of approaches have been developed for the solution of the TDOP. In [18] a mixed integer programming model is proposed; block routes are first generated together with train routes to cover them, then a matching is sought to minimize the objective function, and finally several greedy and local search rules are iteratively invoked to update the block-paths and train routes so as to improve the solution quality. In [19, 20] the problem is formulated as one of integer programming where the number of variables and constraints is exponential, proposing for its solution a column-row generation heuristic followed by clever tabu search methods. An iterative procedure is suggested in [21] to solve two subproblems of the TDOP: train design and block-to-train assignment, where the former consists in determining train routes to be operated, and the latter deals with the routing decision for blocks; both subproblems are solved by integer programming techniques. In [22, 23] a column-generation approach is designed: first, a set of promising train routes is generated based on the crew segments; then an integer linear programming model is developed for the subsequent decisions including train route selection and block-to-train assignment.

We propose hereafter a method to heuristically solve the TDOP in two steps. By means of an ad hoc procedure the first step aims to produce an initial feasible solution, namely, a solution satisfying all the constraints. The second step uses the simulated annealing method to improve the initial solution, followed by simple, specialized procedures that attempt to reduce the number of needed trains without increasing the overall cost. To test our proposal we solved the only three published instances to date, finding it competitive with other approaches in the literature. Also, we randomly generated 20 synthetic instances as well as (improvable) lower bounds for their corresponding optimal solutions; our heuristic came up with results averaging an error close to 25% on these bounds.

The rest of the paper is organized as follows: Section 2 provides the necessary terminology and makes a detailed description of constraints and objective function of the TDOP; a toy example is also furnished to help understand the problem. In Section 3 the TDOP is formulated in mathematical programming terms. Our solution approach—basically combining an ad hoc algorithm to find an initial feasible solution followed by the metaheuristic known as simulated annealing—is explained in Section 4. Further, Section 5 is devoted to the computational experiments that we conducted to test our procedures; for this experimentation we used the three available known instances as well as a new set of 20 randomly generated ones. Finally, Section 6 presents our conclusions and a proposal for future work.

#### 2. Problem Description

This section is aimed to describe the TDOP, borrowing some terminology from [20]. An alternative description can be found in [13]. The TDOP terminology, constraints, and objective function are provided in Section 2.1. To help in grasping our description, an instance of the TDOP is presented in Example 1 by means of a toy example, followed by one of its feasible solutions in Section 2.2.

##### 2.1. Terminology, Constraints, and Objective Function

*Terminology*(i)A* block* is a formation of cars sharing origin and destination. Trains are built of one or more blocks coupled together as needed.(ii)A* train* is a locomotive carrying or not carrying blocks.(iii)A* block swap* occurs when a block is moved from one train to another.(iv)A* block-path* is a sequence of railroad segments through which a block can be feasibly routed from its origin to its destination.(v)A* work-event* occurs each time a train stops en route at a station to pick up and/or deliver blocks. The train stop at its destination (or origin) station is not considered as a work-event.(vi)A* crew segment* is a minimal length route between two stations, called* end points*, on which crews operate trains in either direction.(vii)The* crew imbalance* on a crew segment, defined by say end points and , is the absolute difference between the number of crews going from to , and the number of crews going from to .(viii)The* train imbalance* on a station, say , is the absolute difference between the number of trains originating in and the number of trains terminating in .(ix)A car is* missed* if it is not transported from its origin to its destination.

*Constraints*(i)*Blocks per train*: trains are constrained by an upper bound on the number of blocks they carry.(ii)*Swaps per block*: each block is constrained by an upper bound on the number of times it can be swapped.(iii)*End points*: crews must start and end traveling at end points.(iv)*Crew-to-train assignment*: every train has to be assigned to a crew on each crew segment, and it must originate and terminate at the end points of a crew segment, even if the train has to move part of the way along a crew segment not carrying any blocks (the entire train routes should be decomposed in crew segments).(v)*Upper bounds on segments*: railroad segments are constrained by upper bounds on the number, length, and weight of trains traversing them in either direction.

The objective of the TDOP is to minimize the sum of eight components:(1)*Locomotive cost*: product of the number of scheduled locomotives and the unit locomotive cost .(2)*Locomotive travel cost*: product of the total traveled miles by all scheduled locomotives, and the per mile locomotive travel cost .(3)*Work-event cost*: product of the total number of work-events of all scheduled trains, and the unit work-event cost .(4)*Car travel cost*: product of the total traveled miles by all cars, and the per mile car travel cost .(5)*Block swap cost*: let be the unit block swap cost in station . For a given block , denote the set of stations where block is swapped; then its (total) block swap cost is .(6)*Crew imbalance cost*: product of the number of all crew imbalances and the unit crew imbalance cost .(7)*Train imbalance cost*: product of the number of all train imbalances and the unit train imbalance cost .(8)*Missed car cost*: product of the total number of missed cars and the cost per missed car .

*Example 1. *Consider a railroad network with five stations A, B, C, D, and E and six railroad segments as schematically depicted in Figure 1, where distances (in miles) are assumed symmetrical and all segments are bidirectional. Seven blocks must be delivered. Table 1 furnishes the relevant data.

The only nonadjacent end points defining a crew segment are B and D. The corresponding crew segment is BCD because its length is minimal among all possible paths connecting B and D. Clearly, the other crew segments are trivially found. Thus, if the route of some train is, say, D C B A, then at D a crew from crew segment BCD could be assigned to this train in the subroute D C B, and subsequently at B a crew from crew segment BA could be assigned to the train in the subroute B A. When a train crosses over from one crew segment to another, the onboard crew gets off the train and a new crew gets onboard. Further, crew segments are bidirectional. Hence, crews in crew segment BA can take a train from A to B or vice versa. It is assumed that crews always travel along the shortest path between any pair of stations.