A novel heuristic method to solve the capacitated arc routing problem

Article history: Received 18 June 2012 Received in revised format 7 July 2012 Accepted July 31 2012 Available online 7 August 2012 The capacitated arc routing problem is one of the most important routing problems with many applications in real world situations such as snow removing, winter gritting, refuse collection, etc. Since this problem is NP-hard, many of researchers have been developed numerous heuristics and metaheuristics to solve it. In this paper, we propose a new constructive and improvement heuristic in which forming a vehicle’s tour is based on choosing an unserved edge randomly as current partial tour and then extending this partial tour from its both of end nodes base on four effective proposed criteria. When the vehicle load is near its capacity, it should come back to the depot immediately. Finally, the constructed tours are merged into more efficient and cheaper tours. The quality of this new approach was tested on three standard benchmark instances and the results were compared with some known existing heuristics and metaheuristics in the literature. The computational results show an excellent performance of our new method. © 2012 Growing Science Ltd. All rights reserved


Introduction
The capacitated arc routing problem (CARP) is one of the most important routing problems in literature, and attracted interest of many researchers.It has numerous applications in real world situations such as refuse collection (Dijkgraaf & Gradus, 2007), winter gritting (Eglese & Li, 1992), snow removing (Labelle et al., 2002), inspection of gas pipeline (Han et al., 2004), street sweeping (Tobin & Brinkmann, 2002), and electric meter reading (Stern & Dror, 1979).The CARP was first introduced by Golden and Wong (1981) and deals with connected and undirected graph G= (V, E), where V is the set of vertices (nodes) and E is the set of edges.Each edge of E has a definite travel cost and some edges have positive demand, called required edges, which must be serviced by some vehicles with limited capacity.All vehicles are identical and located at a single depot.The aim of CARP is to design a set of vehicle tours of minimum total routing cost such that each tour starts and ends at the depot, each required edge is serviced by exactly one vehicle, and the total demand serviced by any vehicle most not exceed the vehicle's capacity.Some instances (in small size) of CARP can be solved for optimality by implementing exact methods such as branch and bound (Hirabayashi et al., 1992), branch and cut and price algorithm (Aragão et al., 2006), and cutting plane algorithm (Belenguer & Benavent, 2003).Wøhlk (2006) proposed a new lower bound, the Multiple Cuts Node Duplication Lower Bound, for the undirected CARP.However, the CARP is a NP-hard problem (Golden & Wong, 1981) and these exact methods are not able to solve the large-scale instances in polynomial time.Therefore, due to the computational complexity of the problem, there have been remarkable attempts by researchers in developing heuristic and metaheuristics algorithms to solve it.Tabu search is the first metaheuristics proposed by Hertz et al., (2000).Here solutions breaking vehicle capacity are accepted but penalized.Three improvement procedures (Shorten, Drop, Add) initially explained by Hertz et al. (1999) and four new ones (Paste, Cut, Switch, and Postopt) are used.Lacomme et al. (2004a) proposed a memetic algorithm to solve an extended version of the CARP; each required edge is represented by two directions.The chromosomes are encoded as large tours.Each chromosome is evaluated optimally using a splitting procedure, which partitions the large tour into feasible trips.Ant colony system (Lacomme et al., 2004b) is one of the other metaheuristics in which two types of ant are used to work through the problem.These are elitist ants that make the solutions converge towards a minimum cost solution and non-elitist ants that guarantee diversification to prevent being trapped in a local minimum.Beside metaheuristics, heuristics are better with required short CPU time.Furthermore, they are implemented easier and provide a good initial solution to start of many metaheuristics.However, metaheuristics give solutions with more quality.Augment-Merge (Golden & Wong, 1981), Pathscanning (Golden et al., 1983), Double Outer Scan heuristic (Wøhlk, 2005), Ulusoy's heuristic (Ulusoy, 1985), Ellipse Rule based Path-scanning heuristic (Santos et al., 2009), and Construct-Strike (Pearn, 1989) are some of the known heuristics to solve the CARP.For a detailed overview of the main characteristics of the heuristics in the literature, the readers may refer to Wøhlk (2008).Yet, the development of enhanced heuristics is an important research area for the CARP.
It is note that researchers try to develop various models of classical CARP and consequently develop efficient heuristic and metaheuristic methods to solve these models.For example, recently Kirlik et al. (2012) introduced a new model of CARP with deadheading demands and modified the Ulusoy's heuristic (Ulusoy, 1985) to solve it.Grandinetti et al. (2012) by giving an optimization-based heuristic solved CARP with three objectives: the total transportation cost, the longest route cost, and the number of vehicles.In addition, Salazar-Aguilar et al. (2012) proposed an adaptive large neighborhood search heuristic for synchronized arc routing problem.
The main objective of the current research is to propose a new heuristic for classical CARP that employs some ideas of "Double Outer Scan heuristic" and "Path-scanning whit Ellipse Rule heuristic" to solve the problem.This proposed heuristic is based on selecting an unserved edge randomly, then extending it by both of its end points, into a vehicle's tour based on four effective criteria.When the vehicle load is near its capacity or there is no qualified edge to add the current tour, vehicle should return to the depot by using shortest path.Finally, in order to reduce the total cost and efficient usage of vehicle capacity, the constructed tours are merged into shorter tours.The remainder of the paper is structured as follows: A brief review about Double Outer Scan heuristic (DOS) and Ellipse Rule heuristic based on Path-scanning (RSE-ER), is presented in section 2. In section 3, we describe our heuristic method.Section 4 is devoted to computational results and experimental analysis.Finally, some concluding remarks are stated in section 5.

Brief review on DOS and RSE-ER
In this section, we give a brief review of DOS and RSE-ER.Details of these methods can be found in Wøhlk, (2005) and Santos et al. (2009), respectively.Double Outer Scan heuristic was introduced by Wøhlk (2005) and combines the Augment-Merge algorithm and the Path-scanning method.Unlike the Augment-Merge which always selects the edge that has the shortest path from the end points of the current tour, here the neighbor edges is considered.In each iteration the unserved edge that is farthest away from the depot is selected, and from this edge, vehicle scan in the Path-scanning heuristic way to service the other edges, but unlike the Path-scanning heuristic, this done from both ends of the current partial tour.Finally, the obtained tours are merged into shorter tours.Ellipse Rule based on pathscanning heuristic is a modification of the path scanning algorithm in which, when the vehicle is near the end of a route, in other words, when the vehicle load is around its capacity, the ellipse rule impels the vehicle to service only arcs near the shortest path between the last serviced arc and the depot.Furthermore, Path-scanning is based on construction of each tour by adding one edge to the partial tour at a time.In order to choose the next edge, if the tie occurs, the five criteria (Golden et al., 1983) including: 1) Minimize the distance to the depot; 2) Maximize the distance to the depot; 3) Minimize the distance per unit demand ; 4) Maximize the distance per unit demand; 5) Use criterion 1, if the vehicle is more than half-full, otherwise use criterion 2; are used and among the obtained five solutions, the best one is selected as the final solution.Pearn (1989) used a modified path-scanning heuristic based on random selection of the five criteria.Belenguer et al. (2006) suggested another path-scanning based upon random selection of the tied arcs.Recently, Santos et al. (2009) indicate that the solutions achieved by the random selection of tied arcs are similar quality to those identified by the five criteria of Golden et al. (1983) and Pearn (1989).So Santos et al. (2009) used random-add approach in the Path-scanning with Ellipse Rule heuristic.
In this paper, by employing some ideas of DOS and RSE-ER, we propose a new robust heuristic method.At each iteration, this heuristic chooses one arc, randomly.This arc forms the current partial tour.Like DOS, we extend the current partial tour by both of its end points, but here we use four proposed criteria that will be presented in the next section.We choose those required edges that are incident to current partial tour.In RSE-ER, Santos et al. (2009) used ellipse rule, which forces the vehicle to serve only edges near the shortest path between the last serviced edge and the depot, when the vehicle is near the end of a route.However, here if the vehicle load is near its capacity or there is no qualified arc to add the current partial tour, we force the vehicle to return to the depot immediately then the chance of saving cost will be increased in merging phase.

Problem definition and notations
In this section, we introduce the problem definition and notations to facilitate the description of the heuristic algorithm.Let G=(V,E) be a connected and undirected graph, where is the set of nodes and {( , ) , , } is associated with a positive demand ( ) 0 q e  .Node 1 v denotes the depot where a fleet of identical vehicles with limited capacity ( max{ ( ), }) , are located at 1 v .We represent each edge in two directions; positive (from i v to j v ) and negative (from j v to i v ) directions that so called arcs.In order to facilitate, the arcs with positive direction is denoted by p and the arcs with negative direction is denoted by n.Each arc has a tail node t and a head node h.Further, the opposite direction of arc is denoted by inv.Hence, the following features are notable: Let td be the total demand, nre be the number of required edges, rvc be the remaining vehicle capacity, and  be a real parameter.The goal of the problem is to determine a set of least-cost tours of all edges R e E  such that each required edge is served by one vehicle exactly, and the total vehicle load at any time does not exceed the definite capacity Q.

Description of the new heuristic algorithm
In this section, we present our new heuristic algorithm.As mentioned before, by employing some features of DOS, and RSE-ER with some differences, we present a new robust heuristic.Like DOS, we extend the current partial tour by its both of ends, but here, we use four new criteria, and like RSE-ER, we force the vehicle back to the depot when its load is near its capacity, but without serving any edge between the last served edge and the depot.Finally, we merge the obtained tours in order to reduce the total cost.Our algorithm can be described as follows: Step 1. Select one unserved arc randomly, and remove its inverse from unserved arc set.This arc forms the current partial tour.Suppose that the selected arc is in positive direction and is shown as sel P , so let sel hp and sel tp be the first and last arcs of the current partial tour, respectively.
Step 2. Set  , add another arc in another set with greater demand to current partial tour, else back to the depot (see fig. 1.b).By this idea, we force the vehicle to services just those unserved edges that are incident to the current partial tour.Consequently, more of the required edges are served by the vehicle in its tour.Note that when one arc is selected to receive a service, its inverse must be deleted from unserved arcs.
If hngb(tngb) set is empty, in other words: there are no unserved edges incident to current partial tour by its head, and the remaining capacity of vehicle rvc is greater than / td nre   , vehicle services the first arc in obtained tngb(hngb) set in step 2, otherwise it should return to the depot.
Step 5. Update hngb set and tngb set, in other words subject to new obtained current partial tour, form the hngb and tngb again.
Step 6. Repeat step 3 to step 5 until vehicle load approaches its capacity or both hngb and tngb, becoming empty.Then connect the ( ) sel h hp and ( ) sel t tp to the depot by using the shortest path.
Step 7. Repeat step 1 to step 6 until all required edges are served.
Step 8. Merge the constructed tours into less cost tours, subject to vehicle capacity.
Step 9. Repeat steps 1 to 8 for maximum iteration (stopping criterion) determined by decision maker; finally the best solution is selected.
This algorithm is same as explained before if the selected arc in step 1 be in negative direction, and just p in all notations is replaced with n (e.g., sel p is replaced with sel n ).Fig. 2 presents the general structure of the proposed heuristic:

Computational results
In this section, we show our computational results.The aforementioned algorithm has been coded in C# language and run on a laptop computer with CPU clock frequency 2.66 GHz and 4Gbyte of RAM.In order to evaluate the performance of our heuristic method, we have implemented it on three standard CARP benchmark test sets.7-27 nodes and 11-55 edges, all of which is required.This set contains 25 instances but gdb8 and gdb9 contain inconsistencies, and they have never been used in the literature.The second set consists of 34 val problems proposed by Benavent et al. (1992) whose ranges are from 24 to 50 nodes and fro 34 to 97 edges.The last set is bigger which is based on a winter gritting problem (Eglese, 1994) proposed by Belenguer and Benavent (2003) and includes 24 egl instances with 77-140 nodes and 98-190 edges and in some instances not all edges are required.All these set of benchmark are available at http://www.uv.es/~belengue/carp.html.In our implementation, we have followed the practice of Santos et al. (2009).Hence, the parameter  is set at 1.5.
The results of our algorithm for three sets of benchmark (gdb, val, egl files) are given in table 1 to 3, respectively.In all these tables, the row named "our algorithm" shows the obtained results by proposed algorithm, over 10 runs for 1000, 10000 and 20000 iterations.Note that due to the large size instances in egl files, the row in Table 3 is divided to 10000, 20000 and 25000 iterations.We have compared our computational results with four known heuristics; Path-scanning heuristic (PS) (Golden et al., 1983), Augment-Merge heuristic (AM) (Golden & Wong, 1981), Double Outer Scan heuristic (DOS) (Wøhlk, 2005), and Ellipse Rule based Path Scanning heuristic (with 10000 iteration) (RSE-ER ( 10000)) (Santos et al. 2009) and also three of the well known metaheuristics including Tabu Search algorithm (CARPET) (Hertz et al., 2000), Memetic algorithm (MA) (Lacomme et al., 2004a) and Ant Colony Optimization algorithm (BACO) (Lacomme et al., 2004b).The columns headed "Ave", "#Opt", "Dev (%)", and "Time" (en second) provide, for each row, average value, number of optimal results, average percentage deviation above lower bound, and running time, respectively.(i.e., deviation above lower bound is equal to ( (cos ) / 100 t LB LB   ).The details of results can be found in Appendix A.

Analysis of experiments
As it can be seen from Table 1, our proposed heuristic algorithm outperforms all Path-Scanning, Augment-Merge, and Double Outer Scan heuristics.In all 1000, 10000, and 20000 iterations for the 16 problem instances, our algorithm reached the optimal solution, whereas PS and AM reached the 3 and 2 optimal solutions respectively, and DOS reached to no optimal solution.In addition, our proposed heuristic algorithm with 10000 and 20000 iterations performs better than ERS-ER (10000) with the routing cost.It is obvious the metaheuristics give the solutions with higher quality rather than heuristics.For example, the ratio of average percentage deviation to LBs of our algorithm (20000) to CARPET, MA and BACO are 1.8, 5.8 and 3.1 respectively, and prove that our approach has significant advantages than other heuristic algorithms with quality of solutions.Table 2 shows the similar results for val files.The best lower bound is obtained in 7 problem instances while the number of optimal solution obtained by PS, AM and DOS is zero.Furthermore, average percentage deviation above the LBs for our heuristic is less and is compatible with RSE-ER.Compared to CARPET, MA and BACO, the quality of solutions with our heuristic (20000 iterations) is 1.68, 5.25 and 3.6 times better, respectively.In Table 3, the computational results for egl files are reported.The egl files are much harder than the previous files (gdb and val files), and lower bounds are never reached.Hence, we have removed the column headed "#opt" from Table 3. Concerning the average percentage deviation to LBs, one can see that our heuristic algorithm is superior to PS, AM, DOS and RSP-ER.Also, the solutions obtained by our method are near to those obtained from CARPET, MA and BACO with total routing cost and average results.

Conclusion
CARP is a NP-hard problem (Golden & Wong, 1981); consequently many of researchers attempt to develop heuristics and metaheuristics to solve it.In this paper we attempt to incorporate ideas of both, Double Outer Scan heuristic (Wøhlk, 2005) and Ellipse Rule based Path scanning heuristic (Santos et al., 2009), to provide a new heuristic for the CARP that can be effective to generate an initial solution in many kinds of metaheuristics.Our heuristic chooses an unserved edge randomly, and then extends it by both its end points based on four criteria that stated in section 3.2.If the remaining capacity of vehicle is less than predefined value or there is no qualified edge to add the current tour, the vehicle should return to the depot and a new tour is started.We implemented the new heuristic algorithm on three set of standard instances (gdb, val and egl files) and compared our computational results with some known heuristics (Path-scanning, Augment-Merge, Double Outer Scan and Ellipse Rule based Path-Scanning) and metaheuristics(Tabu Search, Memetic Algorithm and Ant Colony Optimization algorithm) that have been presented in the literature.In addition, we compared the results with best lower bounds designed by Belenguer and Benavent (2003).Although the solution times of our heuristic algorithm are rarely long, but subject to the quality of obtained solutions, one can disregards the solution time.Our research is emblematic of that this new approach to solve the CARP is excellent, and when the solution time is important, even it can be replaced metaheuristics methods.The results indicate our approach can be used and developed to solve the other types of CARP in real-world applications.
the set of edges.Required edges are those with positive demand and can be shown as R E E  .Each edge E e  has a nonnegative travel cost ( ) 0 c e  , and each edge R e E 

Fig. 1 Fig. 2 .
Fig. 1.a.Presentation of forming the hngb set and tngb set Fig. 1.b.Presentation of determining the ( ) sel hp and ( ) sel tp Randomly choose one of following four criteria with equal probability.Then based on the result, sort the arcs in tngb and hngb sets.
Choose one of four proposed criteria and sort hngb and tngb based on Between the first required arcs of two sets hngb and tngb, serve that with less demand The first set contains 23 gdb instances introduced by DeArmon (1981) with sel tp

Table 1
Computational results for gdb files

Table 2
Computational results for val files "*" unknown values

Table 3
Lacomme et al. (2004b)for egl files Note that in order to have a fair comparison, the running times are scaled for the 2.66 GHz computer used in this paper, in other words we normalize the running times by multiplying with a CPU speed ratio.Since MA ofLacomme et al. (2004a)and RSE-ER (10000) ofSantos et al. (2009)was implemented on 1 GHz Pentium III PC, the running times were multiplied by 0.4, and the running times for CARPET scaled to 1 GHz Pentium III PC byLacomme et al. (2004a); so they were multiplied by 0.4 too.BACO ofLacomme et al. (2004b)was executed on an 800 MHz Pentium III PC; so here the execution times are multiplied by 0.3.All running times are in seconds.The "*" symbol indicate the values that we do not have any information about them, unfortunately.