This paper describes a variant of the Periodic Capacitated Arc Routing Problem for inspections in a railroad network. Inspections are performed by vehicles over a time horizon on which some stretches need evaluation more frequently than others due to its use. Each car can evaluate one stretch per day without being attached to a depot; at each day, the shift may start and end at different locations. This characterizes the problem as the Periodic Capacitated Arc Routing Problem with Continuous Moves in which firstly the delays on attendances are minimized and, second, the displacement costs. We present a mathematical model and an Ant Colony Optimization algorithm to solve the problem. The use of a local search procedure and some principles of Granular Tabu Search is crucial for the algorithm’s performance. The numerical results are promising, especially for critical situations where the arcs’ needs are close to the total vehicles’ capacity.

1. Introduction

Arc Routing Problems have high applicability and are widely studied; they consist of finding routes that cover streets, roadways, railways, roads in general. The Capacitated Arc Routing Problem (CARP), introduced in [1], is an essential problem of this class on which the creation of routes considers vehicles with a limited capacity that must collect or deliver demands. The CARP assists the decisions at the operational level, planning routes for only one period. If the problem involves a time horizon greater than one day, the complexity of the problem increases, and it becomes the Periodic Capacitated Arc Routing Problem (PCARP), first described in [2]. The PCARP is an upgrade of CARP considering multiple periods, involving tactical and operational decisions.

In this paper, we study a variant of the PCARP in the context of inspection and maintenance of railways. Homogenous vehicles with limited capacity are responsible for ensuring the good state of repair and the flux in the rail network. They travel over the rails making measures that may show any irregularity; this predictive job aims to prevent accidents due to wear and tear. In countries like Brazil, the railroad network is extensive and the workers need to travel with the vehicles during their shifts. At each day, they evaluate one stretch, and the car ends its turn at any city where the worker can rest. This characteristic is the same found in some pick-up and delivery problems [3], for example, in the maritime case where ships perform routes from city to city, or in the production and distribution of argon [4, 5]. In these problems, the moves are continuous because the vehicles do not have the obligation of returning to a depot. Thus, the inspection and maintenance of railroads are named Periodic Capacitated Arc Routing Problem with Continuous Moves (PCARP-CM).

Solving real-life problems is not an easy task even for commercial solvers. In the PCARP, exact algorithms usually prove optimal solutions only for limited and small instances [6, 7]. An alternative to larger instances is to tackle them using heuristic algorithms as Scatter Search [8], Memetic Algorithms [911], Adaptive Large Neighborhood Search [12], and Ant Colony Optimization (ACO) [13, 14]. The ACO has achieved good results for dynamic routing problems on which the costs may modify according to the moves [15]. The PCARP-CM is similar: it has demands updated at each period, which can interfere in the objective function. Provided that, our work presents an ACO Algorithm which achieves competitive results when compared to the result obtained by a commercial solver. It is a new approach of ACO that combines concepts of Granular Tabu Search [16] and Local Search.

The next section shows a brief literature review concerning the PCARP, its applications, and solving methods. The third section presents details concerning the PCARP-CM in the railroad inspection and its mathematical model. In the fourth section, the algorithm procedure of the ACO is described. Last but not least, the computational results demonstrate our algorithm performance. Finally, we show our conclusions.

2. Literature Review

The PCARP is an Operational Research problem that has been developed based on real-world applications. Besides introducing the PCARP as a general problem, earlier studies show applications in snow removal, on inspection of power lines, spreading herbicides in rails, and mainly in garbage collection [7, 9, 17]. The garbage collection is readily associated with some concepts: the streets are the arcs or links, the crossings are the nodes, there is a frequency during the week, the demand is the amount of garbage, and the vehicle’s capacity is the maximum loading of waste allowed. The citizens produce garbage storing it in plastic bags or containers; the collects must be well planned considering that some regions may have higher garbage production than others, requiring more attendances.

Achieving the tactical decision’s level is a valuable contribution of the PCARP for the scientific and business development because the problem covers a planning horizon composed of as many periods as needed. The periods must be a fraction of time. Conventional approaches worked with days and bound the number of routes that should compound the planning periods. Some developments set a combination of attending days to each arc [8, 9, 11, 13, 17, 18], others use time intervals [7], or just frequencies [6, 14] to generate solutions. Recent approaches have been discretizing the time in a way that the finishing time of one activity is the initial time for the next one [12, 19, 20].

The first proposed mathematical model appeared in [17], on which optimal solutions were reached for small instances with five periods and ten arcs. The resolution approach adopted used three heuristics: two insertion methods and one two-phase algorithm (cluster and routing). Usually, heuristics are the most viable option to solve the problem due to its NP-Hard nature. Some of these solving approaches are Evolutionary algorithms like the Memetic Algorithm [911]; Scatter Search [8]; two-phase methods [6]; Adaptative Large Neighborhood Search [12]; ACO [13, 14].

The context of surveillance, monitoring, and maintenance of roads [21] gave origin to the PCARP with Irregular Services [6], in this case, demand may have more than one pattern of frequency. When dealing with monitoring activities, minimizing the displacement costs may be irrelevant; on the other hand, monitoring as many times as possible may guarantee a safer road network. Other applications can even involve inventory constraints for vehicles responsible for watering open-pit mines [12, 20].

This research differs from previous works in both the modeling approach and the proposed solving method. The decisions consist of planning only a move for each car in each period, different from conventional approaches on which there is a complete route for each car in each period. Also, the frequency of attendances uses the time interval represented by periodicities. The main difference consists in the fact that the cars are not attached to a depot where they must start and finish their routes. Moreover, our ACO algorithm is also distinct from the ones already applied to PCARP: in [13] the ACO optimizes the order of tasks to be inserted into a solution, and in [14] the ACO is applied after the arc routing problem is transformed into a Vehicle Routing Problem.

3. Problem Definition

3.1. Inspecting Railroads

We are concerned by the planning of inspection and maintenance of railways where a set of homogenous vehicles with limited capacity travel over the rails searching for any irregularity. These inspections aim to prevent accidents due to wear and tear, guaranteeing the good state of repair and the flow in the rail network. We model this situation as a Periodic Capacitated Arc Routing Problem with Continuous Moves (PCARP-CM).

The railroad network is extensive in countries with continental dimensions, Brazil, for example, and the sequence of railroad stretches inspections must have proper planning over a time horizon. The vehicles must sweep vast paths daily at a slow velocity to achieve the examination accurately. Consequently, it is impracticable to return to a depot at the end of the working day. In classical problems, like garbage collection and winter gritting, the vehicles depart from a depot and cover a considerable number of streets with a fast-growing demand. Also, in most common cases, the vehicle capacity is related to the quantity of charge; nevertheless in our proposed model, the capacity is implicit in the displacements.

Each vehicle can perform one railroad stretch per day; a stretch is a direct link between two cities that offer the structure for the worker to rest. Work teams take turns of more than one day in this kind of service, and the vehicles never stop unless necessary. The length of each stretch is known a priori and is defined based on the capacity of the cars and on two variables that can differ from place to place: speed and traffic flow. Determining the starting and ending point of these stretches simplifies the modeling process of this problem concerning the vehicles capacity constraint.

A periodicity can represent the frequency of inspection of each stretch. It represents the maximum time interval required between two consecutive passages. This problem is cyclical, repeating from time to time, and occurs in a permanent regime. Thus, the routes must be planned over a limited time horizon that must be greater or equal than the maximum periodicity. On the last planned day, the same quantity of vehicles that had left each starting point must return to it. Consequently, the plan can be repeated as many times as necessary.

3.2. Mathematical Model

The formulation is based on an undirected graph composed of nodes representing the cities where the drivers could finish their daily turn and stay overnight, thus . The stretches are represented by edges, where , which must be served by cars, Each edge is composed by a pair of nodes or ; it may be traversed in two possible directions from to or from to and it has a cost related to the distance. The capacity of each car is to traverse one arc per day; this simplifies the model and fulfills the objectives of the problem.

The maximum number of periods in a row on which an arc must be attended at least once expresses the periodicity of each arc. For example, if an arc has a periodicity of 15 days, it must be attended at least once between the first and the fifteenth day, once between the second and the sixteenth, and so forth. Therefore, the time horizon to be planned must be greater or equal to the highest periodicity and it is composed by periods , . The set contains every edge that has a periodicity lower than and the set the edges with periodicity equals , thus . As this is a cyclical problem and the solution represents a permanent regime of work, after the last planned day the next moves must be the same as the ones from the first period. In general, for a period greater than , the move performed must be equivalent to the one from the day . No starting point is known a priori but the number of cars arriving in the last planned day at some point must be equal to the number of cars leaving this point in the first day.

To give more flexibility to the problem, a periodicity may be delayed increasing the objective function by a penalty cost of per day of delay in the arc . To avoid unnecessary moves and guarantee feasibility, the cars may stop at some scheduled point during how long necessary. After all, if the solution shows that it is necessary to stop at some point, it may be possible to perform the activities in less time than the time horizon. The following variables are used in the model: The mathematical programming formulation isSubject toThe objective function (2) minimizes the displacement costs and tries to avoid as many possible delays as possible during the time horizon, so . Constraints (3) assure the network flow conservation; in addition, there is the possibility for a vehicle to remain still at a node during a day. Equations (4) and (5) ensure that the number of cars leaving a node at the beginning of the first period is the same arriving at the end of the last one, respectively. Constraints (6) establish that a car must perform a move or remain still at some point for each planned day. Constraints (7) and (8) control the periodicity of each arc. In (7) all arcs that do not have the periodicity equal to the number of days in the time horizon have the possibility of delays reacting with a penalty in the objective function. It is important to notice that the index in the variable cannot exceed the value of , being converted by a correspondent value inside the time horizon; for example, at the day the edges evaluated on the first period are performed again. Constraints (8) do not allow arcs with a periodicity equal to to suffer delays, because these arcs would not be served. Finally, equations (9) define the domain of all the variables.

4. The Ant Colony Optimization

Construction algorithms generate feasible solutions to problems by iteratively adding components until achieving a complete solution. Usually, there is no backtracking in this kind of process, e.g., at each step of the Greedy Construction Heuristics the component that gives a maximum myopic benefit is added to the solution. Greedy algorithms frequently generate solutions with better quality than a random solution but have the disadvantage of generating a limited number of solutions; also, the early choices effect in the latter ones, causing poor moves near the final phase. ACO is an alternative to create diversified solutions.

The behavior of real ants looking for food inspires the Ant Colony Optimization (ACO) algorithm. The ants spread pheromone during their search, creating a trail which influences the path choice of other ants. The algorithm uses numerical information to represent the pheromone trails and keeps information about the search experience. Each ant takes randomized decisions iteratively until achieving a complete solution; these decisions follow a probability that considers all information available at the moment.

Each artificial ant in ACO constructs a stochastic solution, conducting to a wide variety of different routes. The construction uses the information available at the moment and also the experience obtained with other solutions to add components, one by one, in the solution. If it is possible to create a procedure that generates a solution for a discrete optimization problem, then, in principle, it is possible to apply the ACO.

To increase the quality of the solutions produced by the ACO algorithm, it is possible to design hybrid ACO-local search algorithms. Local search algorithm improves a solution iteratively by looking on a defined neighborhood. During the search, if it finds a better solution, it replaces the current solution and the exploration moves to the new solution’s neighborhood. The replacement can be done with the best solution found after exploring the whole neighborhood (best-improvement rule) or as soon as solution improving the best one so far is found (first-improvement rule). Needless to say, the choice of a good neighborhood is crucial for the algorithm’s performance. The hybridization of a local search algorithm within the ACO scheme will be described in the subsection Improvement Phase.

4.1. The Problem Representation

In this paper, a solution is represented by a sequence of cities determining the starting and the ending city of each day’s trip, so that the last city is the departure point for the next travel. Solutions with the same sequence of visits are symmetric and result at an equal value of the objective function, independently of the days and the direction on which the cities are visited. Generating reasonable solutions is not trivial for the PCARP-CM because of the continuity of the moves and the lack of a depot as a reference. Also, the cyclicity of the problem increases the number of symmetric solutions.

The ACO constructive algorithm proposed in this paper consists of finding a route into a directed graph. To this end, first an initial vertex is selected randomly but, in doing so, higher probability is given to the vertex having a higher degree (number of edges connected). By choosing the initial vertex randomly, the constructive algorithm can generate a wider variety of solutions. Then, a graph is generated for each car based on layers; the initial layer contains just the possible vertex; the following layer includes all the adjacent vertices to the previous one, including itself. The process follows from layer to layer comprising all the possible connections with the past layer until achieving the final one. Not all the adjacent nodes are possible connections in all layers because of the cyclicity; the last layer will contain just the possible ending vertices based on the time distance. If only one car is available in the problem, the ending vertex must be the initial. If the problem comprises more than one car, it is necessary to evaluate the possibilities that respect the cycles during the time horizon. There will be layers for each car. Figure 1 shows a toy problem and its associated graph.

Leaving a layer and going to the next one represents a move. The graph may give a false impression that the problem is simple, but after each move, the costs change dynamically because it may occur one delay. In periodical problems, the demands suffer influence by the period and the car’s route. In our ACO algorithm, the ants start at the initial vertex and will probabilistically move until making a complete route for all the cars which, in other words, means going through all the layers. If in Figure 1, an ant moves from A in layer 0 to D in layer 1, which represents the car movement on the first day.

Defining the starting vertex helps the search in avoiding many symmetric solutions. To increase the ACO effectiveness, we enhanced it with some ideas of the Granular Tabu Search (GTS) [16]. The GTS is applied to optimization and graph-theoretic problems, and it uses what is named granular neighborhoods in a local search algorithm to reduce the computing time. In each iteration, the search is less myopic because it occurs among neighbors with desirable characteristics. For example, for the Vehicle Routing Problem, a sparse graph can be created to guide the search, it will contain just relevant arcs, e.g., with short distances.

For our ACO, we created two sparse graphs that avoid poor moves. The first one removes the arcs that maintain the car in the same node, for example, equivalent to removing the arcs A-A in Figure 1. The second will be modified at each move by eliminating some possibilities in specific days, the same as adding some arcs to a tabu list as follows. If an ant traverses an arc whose periodicity equals the time horizon, it will not be necessary to do it twice. Also, once an arc has been served, it does not seem reasonable to return to it soon, so we do not consider it for some time. Indeed, the arc is not considered for some periods corresponding to the arc periodicity divided by constant (we set in our numerical experiments). Notice that although the arc should ideally be revisited precisely at the end of its periodicity, the constraints of the problem might force us to do it before. This process may block all the moves at some point, and when this happens, the algorithm will use just the first sparse graph, and if the problem continues, none are used.

4.2. The Ants Moves

All ants start in the initial node at the first layer and complete a sequence of decisions allowing them to go forward until the last node in the last layer, generating thus a complete solution. Each ant’s move represents a car movement from one node to another on a given day. The process of choosing a move considers data of the actual status of every arc and the pheromone trails left by previous ants; each move option has a probability that uses this information. Iteratively, the addition of movements composes the solution.

Some possibilities may be more attractive in this process. For example, let us assume that at the end of the 7th planned day an ant is at city A and must decide to go to either city B or city C. The following information is also known: the arc A-C was traversed 6 days before and it has a periodicity of 30 days; the arc A-B did not receive attendance yet, what should occur in every 15 days. Based on this information, it seems more promising to go to city B. Therefore, it is possible to influence the ant’s random choice by giving a higher probability to city B as the next visit. Such heuristic information is handled by a visibility factor which is computed for every move option by looking at the past moves. It quantifies how good the arc choice is by reseting the periodicity of the one traversed and approaching the other arcs to the deadline. This calculus considers the last day when the edge received attendance, the day when the move is happening, and an auxiliary function that will help in the calculus:The higher the value of in (10), the more attractive becomes going from to . A negative value means that some periodicity, given by , is being violated. The visibility must be greater than zero in the algorithm. Therefore, some intervals were defined as in (11). This computation is required for all options that respect the two sparse graphs created and it must occur in every decision (for each day and car). The heuristic information brings specific knowledge for the problem. Also, the computation at runtime is important in dynamic problems [15].

The probability is also influenced by the experience accumulated with past routes using the pheromone trails left by ants. At the beginning, , the quantity of pheromones is low and the same for every arc. Running the algorithm, the ants spread pheromones in the used path, so each arc traversed receives an amount of it. As time goes, the pheromone also evaporates. is the numerical information that represents the quantity of pheromone in the arc using the car in the day in the iteration . The more used an arc is, the more attractive it becomes for an ant. There are different ways to compute the probability of traversing the arc. The most widely used rule is the Ant Systems (AS) [22]. The following is based on it.The probability that an ant goes from a node to another using a car during the day in an iteration , , results from the pheromones and the heuristic information (visibility). It shows how attractive an arc is. Moreover, parameters and represent the relative importance given to the pheromones and to the heuristic information, respectively. A random draw decides the moves of each ant respecting the probabilities. In this process, the ant moves from layer to layer until completing the route for each car. If there are two or more cars, the algorithm generates a new graph for each one, with a new starting point when necessary, and the same quantity of layers to represent the moves on each day. If a vehicle initiates its route in a specific node and finishes it in the same node, the following car can select a new point to start. This selection evaluates the possibilities in the sparse graphs, where nodes with more possible adjacencies have more probability to be chosen. On the other hand, if a car finishes its route in a node different than the initial, the next car must start at this last node to guarantee the cyclicity of the problem.

4.3. Improvement Phase

It is common to hybridize the ACO with other heuristics aiming better performance. Once a complete solution is obtained, a Local Search (LS) algorithm can improve it. The two approaches are complementary: the ACO explores the solution space in a coarse-grained way and the LS refines the solution found. This combination may be crucial to achieving state-of-the-art performance. We developed a simple local search algorithm, which evaluates two neighborhoods and iteratively improves the solution with the best neighbor found among them, using a best-improvement rule.

The first neighborhood is the well-known 2-opt algorithm. It removes each pair of nonconsecutive arcs from the solution so that a reconstruction procedure is able to create a different route. Two new arcs link the free stretch inverting its sense. In this problem, this also means changing the days of attendance. This is replicated to each car. It is possible to mix two routes, but it increases the search space and implies an extra difficulty that may change the length of the routes, violating the capacity.

The second neighborhood consists of removing every three consecutive arcs and evaluating a better way to reconstruct the route. Removing it means to cease to cross two following cities in the solution, so the reconstruction determines the replacement of it by a different pair. It allows the elimination of unnecessary moves and the inclusion of an arc not attended. It also respects the starting and ending point of every route. If the ending point for the first car is the next car’s starting one, then this point can be modified.

4.4. The Complete Algorithm

Let be the total number of ants, each one will move from node to node with a probability measured by (12) respecting the sparse graphs when possible. When obtaining a complete solution, the local search algorithm improves it. All the visited arcs will receive an amount of pheromone laid by the ant. Furthermore, some part of the pheromones evaporates with a given rate. Thus, for the next iterations, the pheromones in each arc must be updated.

Each completed and improved ant’s solution quantifies the amount of pheromone to be spread between the iterations and . The objective function value is composed of penalties for delays and the displacement costs. As the delays must be avoided and are the priority in the model, we used the number of delays in the solution as criteria to define this quantity. The displacement costs do not interfere in the decisions because they are secondary objectives.Equation (13) computes the variation of pheromones between iterations caused by the th solution. A desirable solution does not contain penalties; if there are delays, fewer pheromones are laid. On the other hand, more pheromones will attract more ants in the future. When no delays happen, we set but could be of any value in . Supposing a solution for a problem where an arc should had received one attendance every 15 days and at some moment it had stayed 18 days without it, it had 3 days of delay . It is necessary to compute the delays of all arcs and accumulate it in the variable to decide how much pheromones to spread. The maximum amount happens when there are no delays.

The final amount of pheromone for the next iteration results from all solutions and , where represents the evaporation coefficient, as shown in (14). It means that the next ants will probabilistically choose to move in an arc based on the contribution of every ant and in the historic of use.Algorithm 1 provides a pseudocode of the complete algorithm. Firstly, the procedure receives all the information concerning the problem. The same initial point is for all ants; this might help in the convergence because it eliminates many symmetric solutions. Each ant performs its route, selecting moves for every car each day. The Local Search Algorithm improves the solution; if it finds the best objective value, then the Best Solution is updated. It is computed the quantity of pheromone to be spread; and after every ant completes its route, the pheromones are updated. The process repeats until achieving the stopping criteria, which may be a time limit or a determined number of iterations.

Algorithm: ACO for the PCARP-CM
1:  procedure ACO(cars, arcs, cities)
2:  Select an initial point
  Spread pheromones for the first iteration
3:  Do until reaching the Stopping Criteria
4:     For each ant // ()
5:       For each car // ()
6:         If car 1 then evaluate the initial point end if
7:         Load possible ending points in the last day for car
8:         Generate the graph for the problem
9:         For each day // ()
10:           Computes the visibility for each possible move
11:           Draw the next city to be visited considering
            the probabilities from the equation (12)
12:           Update the sparse graphs
13:         Next day
14:       Nest car
15:       Apply the Local Search Procedure
16:       Save the solution if it is the best one
17:       Computes the quantity of pheromones to be spread by the ant in each
        arc, car and day using the equation (13)
18:     Next ant
19:     Update the pheromones using the variation and for in the
      equation (14)
20:  Loop
21:  Return the best solution found

5. Computational Results

No benchmark instances are available for this problem, so we generated new ones based on the 23 for the capacitated arc routing problem proposed by Golden [1]. These instances were also transformed in [8, 9, 12, 17, 20, 23], originating the instances. They have been modified to suit the PCARP-CM features, and they are labeled . Since the PCARP-CM is quite different from the others, we just kept the graph structure, the number of nodes, and the edges with its costs from the original instances. The number of different periodicities could variate from two to four; the number of cars oscillates from one to six. Each arc received a coherent periodicity considering: the graph, frequencies, and the number of vehicles. The time horizon was defined as the greatest periodicity. After all those transformations, we duplicated the instances in which the greatest periodicity was not equal to the least common multiple among the periodicities. This last process changed some periodicities and the time horizon to values that were multiple, resulting in the instances from to . It allowed us to have a more significant diversity of problems, resulting in 16 new instances. The time horizon being a multiple of all periodicities is recurrent in the real context but not mandatory.

We compared our algorithm to sub-optimal or optimal results produced by the linear programming model. The solver Gurobi 7.0.1 64 bits, with a time limit of one hour and the default parameters, was used for this comparison. All algorithms were implemented in Visual Basic.NET. Table 1 lists all the 39 instances with their respective characteristics and the results. The first column shows the name of the problem, and the next ones present the number of nodes, arcs, periodicities, cars, requirements, and time horizon. The number of requirements represents the smallest number of needed passages over the graph during the time horizon. The last three columns show the answer obtained with the solver after the time limit. Firstly, there is the incumbent solution, then the lower bound, and, finally, the gap between the incumbent solution and the lower bound.

The scalability of penalties in the objective function leads a single delay to provoke large gaps. The value of each penalty is of 1000 while the displacement costs are of an average of 7.1 with 6.49 of standard deviation for each edge. Three problems, , , and , have the optimal value proved, and the others were stopped after 3600 seconds. For problem , this time limit was not enough to find a feasible solution. So, we used the same time limit for our ACO algorithm.

5.1. Parameter Tunning

The ACO uses parameters that concern the relative importance given to the pheromone trails , and to the visibility or heuristic information combined with the coefficient which determines the evaporation. To determine them, we ran 29250 tests combining some promising values used in [22, 24] that were , , and . A large number of ants allow the exploration of more solutions and more information to update the pheromones, so we decide to use ants. Furthermore, for these tests, we used the stopping criteria, on which the number of iterations is equal to 100. The Local Search procedure may take a long time improving the solution when the initial result is poor. So, we removed it from the algorithm aiming to find one combination of parameters that brings more productive solutions. The results of these tests are available in Table 2, which brings the average and the standard deviation value for all tests.

The results presented in Table 2 are the average value of the objective function for all instances tested ten times for each particular combination of parameters with the standard deviation. It means that each combination of parameters was tested 390 times, and each instance was solved 750 times. Each test took an average of 32 seconds to be completed. Hence, we could evaluate proper parameters considering the variability inherent to the algorithm. The , , and parameters resulting from the test were 1, 1, and 0.5, respectively.

5.2. Algorithm Results

Table 3 shows the results obtained compared with the ones from the solver. The first column shows the problem name and the three following ones, the results from the solver. The fourth column starts the results of the ACO Algorithm presenting first the objective value achieved, followed by the number of iterations, time spent, and the gap relative to the lower bound obtained in the solver. Finally, the last column shows the best result found so far, also in bold, and the last row some average values.

We set a time limit of 3600 seconds to have a fair comparison; this time is more than the necessary to have many iterations when the Local Search procedure is not present. Unfortunately, not all problems have good solutions before starting the local search and, as was said, the improvements might take a long time. To have a better idea of the algorithm performance, we let the algorithm free to finish its current iteration after reaching the time limit. By doing so, it may happen that some problems run only for one iteration.

On average, the objective values of the ACO Algorithm were better than the ones obtained by the solver, but the average gap calculated is a little worst. The lower bounds calculated do not include any delay until they reach the time limit; it means that just displacement costs have been considered. In most cases, one delay causes gaps over than 70%, and more than four delays result in values greater than 90%, so this proportion does not reflect how good the solution that has priority to reduce delays is. Analyzing the relation of requirements and the number of moves available, computed by the number of cars times time horizon, 20 instances need to occupy at least more than 80% of the vehicles’ capacity. These instances are some tight cases of difficult resolution. In these situations, the cars do not have much freedom to stop, and a single decision of move can make the difference between a good or a poor solution. Table 4 shows the results considering these cases. In 80% of them, our algorithm was better or equal than the solver. In the other situation, Gurobi was unbeatable, but the ACO achieved close results.

To evaluate other aspects of the ACO, we tested other strategies or parameters as follows: (1) we used 1000 ants, (2) the ants did not have the same initial node, or (3) the local search was done at the end of the algorithm in a pool of best solutions and randomly selected solutions instead of doing it for every ant. Those changes sped up the algorithm and increased the diversification. The behavior of the algorithm was similar to the first one proposed, having the best performance in 13 instances and tying in 3 when compared to the solver. The average value improved to 3053,64, but the GAP worsened to 45,4% on average. The ACO variability is high, so when comparing both algorithms we find that this alteration had an improvement of values in a few instances and less better solutions.

6. Conclusions and Future Work

In this paper, we proposed a mathematical model for the PCARP with continuous moves applied to the inspection of railroads. For this purpose, the foremost objective is to minimize the number of delays on each stretch. Another secondary aim is to reduce the displacement costs. Finding a feasible solution may be a difficult task depending on the problem characteristics.

The problem was tacked by an exact method using the mathematical model in a solver and a new Ant Colony Optimization Algorithm. Commercial solvers combine heuristics with exact methods and have shown an excellent performance for many problems, including the PCARP-CM. Our algorithm showed itself to be competitive, achieving better results in some cases. In summary, the ACO Algorithm showed advantages in critical situations where the demands are close to the vehicle’s capacity. The Local Search is crucial for the algorithm’s performance but can take an extended computational time depending on the solution obtained.

As the ACO and the solver produced good results in different situations, in the future, we will intend to hybridize them within a matheuristic scheme. This process may allow us to improve the final results and increase the software’s efficiency.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.


This work was supported by CAPES, Coordination for the Improvement of Higher Education Personnel, Brazil.