gen-Solving the Capacitated Vehicle Routing Problem Based on Improved Ant-clustering Algorithm

: The capacitated vehicle routing problems (CVRP) are NP-hard. Most approaches can solve small-scale case studies to optimality. Furthermore, they are time-consuming. To overcome the limitation, this paper presents a novel three-phase heuristic approach for the capacitated vehicle routing problem. The first phase aims to identify sets of cost-effective feasible clusters through an improved ant-clustering algorithm, in which the adaptive strategy is adopted. The second phase assigns clusters to vehicles and sequences them on each tour. The third phase orders nodes within clusters for every tour and genetic algorithm is used to order nodes within clusters. The simulation indicates the algorithm attains high-quality results in a short time.


INTRODUCTION
Vehicle routing problems (VRPs) have been the subject of intensive research for more than 50 years, due to their great scientific interest as difficult combinatorial optimization problems and their importance in many application fields, including transportation, logistics, communications, manufacturing, military and relief systems, and so on.Hundreds of models and algorithms have been developed to obtain either optimal or heuristic solutions for different versions of VRP, in which the capacitated Vehicle Routing Problem (CVRP) is one of the most famous and widely studied problems.The CVRP was introduced in the seminal article by Dantzig and Ramser (1959) under the name "Truck Dispatching Problem" [1] .The current name (CVRP) [2] of the problem became widespread in the article by Christofides (1976).The majority of current researches on CVRP focus on the problems within a limited size of 100 customers [3] .However, it is common for real-life vehicle routing applications, such as waste collection, courier service, beverage distribution and milk collection and delivery, to involve the daily service of hundred or even thousand customers.
Lenstra and Rinnoy Kan (1981) have analyzed the complexity of the vehicle routing problem and have concluded that practically all vehicle routing problems are NP-hard because they are not solved in polynomial time [4] .The exact algorithms and traditional heuristic algorithms are difficult, even impossible, to solve CVRP.First, the distance in a straight line isn't able to meet problem any longer.Second, calculating the distance matrix is time-consuming.Actually, besides the distance between customers and the distribution center, the distances among adjacent customers are required, whereas customers away from each other usually don't belong to the same distribution route and there is little probability of using them.That's to say some (not all) of the distance matrixes are used in the process of calculating.So calculating all the distances between customers are unnecessary.
In this paper, the solution is attained through three-phase heuristic, which first involves the conversion of CVRP to TSP, using ant-clustering algorithm and then generate tour and improve it.
The rest of this paper is organized as follows.Section 2 introduces the relevant literature.A mathematical programming formulation is developed in Section 3. Section 4 proposes the heuristic algorithm for solving the CVRP.Computational results on Solomon instances are reported in Section 5. Finally, conclusions and future work are presented in Section 6.

LITERATURE REVIEW
Early, constructive heuristics, such as saving method (Clarke and Wright, 1964), sweeping method (Gillet  and Miller,1974), and Mole and Jameson heuristic (Mole and Jameson,1976) were popular for CVRP.In general, they provide solutions at 10-20% above the optimum, in negligible running times.
Tabu search that constituted the most competing algorithms in the 1990s is still present via variants that include sophisticated memory mechanisms.In 1996, Glover [5] presented the advances, applications, and challenges in tabu search and adaptive memory programming.The main idea is to extract a sequence of points (called bones) from a set of solutions and gen- erate a route using adaptive memory.Further, the adaptive large neighborhood search (ALNLS) [6] is presented by Pisinger and Ropke (2007), in which a control layer adaptively chooses among a number of removal and insertion heuristics to intensify and diversify the search.However, the quality of tabu search depends on the quality of initial solution.
Evolutionary algorithms are proved efficient for the CVRP.[7] presents the first hybrid GA for the VRP, which becomes an effective algorithm available for the large-scale instances generated by Golden et al. [8]  presents an improved genetic algorithm for solving the largest existing benchmark instances of CVRP.[9]  presents an Parallel Simulated Annealing for large-scale instances.However, the EA is slower than many TS algorithms.
[10] presents an efficient variable neighborhood search heuristic for the capacitated vehicle routing problem.A strategy of the guided local search metaheuristic is used to help escape local minima.
Proposed by Fisher and Jaikumar [11] , Cluster First-route Second method, is an effective way to deal with CVRP, especially large scale CVRP.The approach, first creates customer clusters, and then optimizes the order of visits for each cluster as a TSP sub-problem.In [12], the customers were firstly divided into districts according to the main road grid system.Then the customer districts were assigned to vehicles using the vehicle flow formulation model.Experiments show that the method can found high-quality solutions.In the method, clustering efficiently is the key of solving problems.

PROBLEM DESCRIPTION AND FORMULA-TION
Let ( , ) G V E be a complete undirected graph with |V|=n+1 nodes.The node v 0 V represents a depot, where a fleet of identical vehicles is based, and where the product to be distributed is stored.The other nodes v i V\{ v 0 }, for i{1, ..., n}, represent the customers, characterized by demands for non-negative amounts of product q i .Edges {i,j}E represent the possibility of traveling directly from a node (customer or depot) v i V to a different node v j V for a transportation cost of c ij .The CVRP aims to find m or less vehicle routes, that is, sequences of deliveries to customers, to visit each customer one time exactly while minimizing the total travel distance.The sum of demands should not exceed on any route of value Q assimilated to the vehicle capacity.
The decision variables of the model are: 1, if customer j is supplied after customer i by a vehicle of type k 0, {0,1} , , ; 1, 2, m Constraints (1) and ( 2) state that each vehicle leaves the depot, after arriving at a customer, the vehicle leaves again, and finally returns to the depot.Constraint (3) guarantees that the vehicle capacity will not be exceeded.Constraint (4) and ( 5) ensure that each client's demand is fulfilled by exactly one vehicle.

Improved Ant-Clustering Algorithm
The improved Ant-Clustering Algorithm is based on [13].Initially, the nodes are scattered randomly on a discrete 2D board.The board can be considered as a matrix of m×m cells, where m 2 = 4n, and n is the total number of nodes to be clustered.
At first, K-means is used to cluster the objects (nodes) to form heaps, which include 2 or more objects in a single cell.Given heap H with n H objects, the parameters are defined as follows: The maximum distance between two objects in the heap: max , ( ) max (o , ) The center of heap: 1 ( ) The average distance between the objects and the center of heap: 1 ( ) ( , ( )) H is the object farthest from the center of heap.
At second, Ant-Clustering Algorithm is used as follows: The ants are randomly scattered throughout the board.
( , )  ( , ) 1, The normalizing term s 2 equals the total number of sites in the local area, and introduces similarity density function f(o i ), which is a local estimation of the density of nodes and their similarity to o i .
Where the constant α scales the similarities.If α is too large, it becomes difficult that ants pick up the object, but it is easy to put down.Thus, objects, which are dissimilar, are clustered in the same cluster.Otherwise, α is too small, objects, which are similar, are not clustered in the same cluster.In this paper, the adaptive strategy is adopted to determine the value of α to improve the clustering Quality.It is shown as follows.
The initial value of α is set to 0.1.During the continuous n times iteration, times of ant's failure to lay down the object is N f , and the ratio of N f and N is k.α is given by +0.01 0.99 = -0.010.99 In the process of clustering, parameters are maintained adaptive changes, which make clustering process more robust.
When the ant is not carrying any objects, it looks for possible objects to pick up by looking at the eight neighboring cells around its current position.The algorithm for picking up is shown as follows.
Consider the next unexplored cell around the ant.If the cell is empty, then the object carried by the ant, o i is dropped with a probability.If the cell is not empty, and the cell contains a single object o i , then the object o i is picked up with probability, Where k 1 and k 2 are threshold constants.
If the cell contains a heap of two objects, then the heap is destroyed by picking up a random object with a probability P destr.
If the cell contains a heap H of more than 2 objects, then the most dissimilar object of H is removed only if ( ( ), ( )) ( ) Label the cell as "explored".
(3) Until all the neighboring cells have been explored.
When the ant is carrying an object, then it examines the 8 cells surrounding its current location.The algorithm for dropping the object is shown as follows.
Consider the next unexplored cell around the ant.If the cell is empty then the object carried by the ant, o i is dropped with a probability, If the cell contains a single object o j , then a heap of two objects is created by dropping o i on o j only if max ( , ) If the cell contains a heap H then o i is dropped on H only if ( , ( )) ( ( ), ( )) Label the cell as "explored" (3) Until all the neighboring cells have been explored.
Meanwhile, the total load of cluster cannot exceed the vehicle capacity.Otherwise, the nodes will merge in another cluster.

ALGORITHM FLOW
Phase I is intended to reduce the computational burden of the subsequent solution phase.By establishing the mathematical model in terms of a few clusters rather than a huge number of customers, the CVRP size can be decreased evidently.
Phase II and III are not different from other twophase method, which is shown in [14].That is, Phase II aims to assign clusters to vehicles and then sequence them on the same tour by solving a compact version of CVRP.Replacing the customer nodes, the clusters generated in Phase I make problem size shrink sharply.Phase III orders nodes within clusters for every tour, and the nodes will be visited in sequence.To reach the goal, a low-size CVRP will be solved as many times as the number of tours found in Phase II.Actually, each single-tour scheduling problem is tackled as TSP, which includes the same nodes in the clusters.
The main ant-based clustering algorithm is presented as follows.
1) Initially, randomly place the ants on the board.Randomly place nodes on the board at most one per cell.
2) K-means is used to cluster the objects (nodes) to form heaps.
For each ant Do (a) Move the ant; (b) If the ant does not carry any object then: If there is an object in the 8 neighboring cells of the ant, the ant possibly picks up the object; Else, The ant possibly drops a carried object, by looking at the 8 neighboring cells around it.
End if, updated α according to (8);Until stopping criteria.4) Assign clusters to vehicles and then sequence them on the same tour.
5) Genetic algorithm (GA) [15] is implemented within each cluster to order nodes.

EXPERIMENTS
In this section, we report our computational results and compare them with those from the existing literature.The proposed algorithm has been executed on an Intel Pentium 4 machine with 2GB of memory, running windows.Our computational experiment is based on the Solomon instances developed by Solomon et al.  (1987).The improved ant-clustering algorithm has a good performance in clustering nodes, as denoted in Table 1 (a-c).It makes full preparations for Phase II and Phase III. Figure 1 (a-c) shows the truly problem optimum is already found through the exact approach.The method is very successful for clustered instances, such as C-class problems, and the optimum for many of them is retained.See Figure1 (a).It is also effective for RC-class problems, which is shown in Figure 1 (c), but not succeed in R-class problems.See Figure 1 (b).

CONCLUSION AND FUTURE WORK
This paper introduces a new ant-clustering algorithm for the capacitated Vehicle Routing Problem.The method aims to integrate a heuristic clustering algorithm into an optimization framework.The introduction of preprocessing phase to gather nodes into a few clusters makes the CVRP size decreased sharply.The proposed method can retain optimum in a reasonable time, especially doing well in solving large-scale CVRP with more than 100 nodes.It is robust as the optimization method.Experiments show that ant-clustering algorithm can succeed in solving a variety of Solomon problems.Real-life vehicle routing application is more complicated.For example, the requirement of customers is often uncertain.The extension of the method to these more difficult problems is worth further research.

DOI: 10
.1051/ C Owned by the authors, published by EDP Sciences, 2015 cost of a vehicle of type k traversing the pair (i, j) is denoted by k ij c .The objective function can be written as follows:

Figure 1 .
Figure 1.Best solution found for problem