Capacitated Vehicle Routing Problem Solving through Adaptive Sweep based Clustering plus Swarm Intelligence based Route Optimization

Capacitated Vehicle Routing Problem (CVRP) is an optimization task where customers are assigned to vehicles aiming that combined travel distances of all the vehicles as minimum as possible while serving customers. A popular way among various methods of CVRP is solving it in two phases: grouping or clustering customers into feasible routes of individual vehicles and then finding their optimal routes. Sweep is well studied clustering algorithm for grouping customers and different traveling salesman problem (TSP) solving methods are commonly used to generate optimal routes of individual vehicles. This study investigates effective CVRP solving method based on recently developed adaptive Sweep and prominent Swarm Intelligence (SI) based TSP optimization methods. The adaptive Sweep cluster is a heuristic based adaptive method to select appropriate cluster formation starting angle of Sweep. Three prominent SI based TSP optimization methods are investigated which are Ant Colony Optimization, Producer-Scrounger Method and Velocity Tentative Particle Swarm Optimization (VTPSO). Genetic Algorithm is also considered since it is the pioneer and well-known population based method. The experimental results on two suites of benchmark CVRPs identified the effectiveness of adaptive Sweep plus SI methods in solving CVRP. Finally, adaptive Sweep plus the VTPSO is found better than other tested methods in this study as well as several other prominent existing methods. Oriental Journal of Computer Science and technology Journal Website: www.computerscijournal.org ISSN: 0974-6471, Vol. 11, No. (2) 2018, Pg. 88-102

CVRP is a one of the most studied problems which works with predefined demands and locations of customers to serve with fixed number of vehicles.It constructs routes of the vehicles in such a way that: (i) every route starts and ends at the depot; (ii) all the demands are accomplished; (iii) the vehicle's capacity is not exceeded; (iv) a customer is visited by only a single vehicle; (v) the sum of costs is low as possible.The aim of CVRP solving is to minimize the combined traveling distance or time for all vehicles while serving all the customers.
Various CVRP solving methods have been proposed recently.A number of methods optimizes vehicles' customer assignment and vehicles' route generation together 12 .Otherwise, grouping or clustering of customers into feasible routes maintaining given constraints and then finding optimal routes of vehicles is the most effective way of solving CVRP 4 .Sweep algorithm is the most popular clustering method among several ways of grouping customers and is well-studied due to its simplicity.The method creates clusters based on the angular position of the customers calculating polar angles of all their positions 12,13 .Inserting customers into a cluster is done in either clock-wise (i.e., backward Sweep) or anti clock-wise (i.e., forward Sweep) direction until all the customers are visited 14 .On the other hand, Traveling Salesman Problem (TSP) optimization methods are generally used to find optimal route of each individual vehicle 14,15 .
Some studies are available to solve specific CVRP tasks using Sweep clustering and TSP optimization methods.Nurcahyo et al., 14 investigated public transport of Semarang, Indonesia using Sweep based VRP.They considered nearest neighbor algorithm of TSP for route generation.Suthikarnnarunai 16 solved routing problem of a University of Bangkok using Sweep algorithm for clustering and TSP routes were generated through integer programming.Aziz    24 are also considered in CVRP.Pornsing 25 proposed two novel PSO-based algorithms to solve CVRP named Survival Sub-swarms Adaptive PSO (SSS-APSO) and Survival Sub-swarms Adaptive PSO with velocity-line bouncing (SSS-APSO-vb).
The objective of this study is to investigate effective CVRP solving technique through recently developed adaptive Sweep 27 and prominent SI based TSP optimization methods.The adaptive Sweep cluster is a heuristic based adaptive method to select appropriate cluster formation starting angle of Sweep.Three prominent SI based TSP route optimization methods are used in this paper which are Ant Colony Optimization (ACO), Producer-Scrounger Method (PSM) and Velocity Tentative PSO (VTPSO).GA is also considered since it is the pioneer and well-known population based method.The adaptive Sweep is the expansion of standard Sweep selecting cluster formation starting angle adaptively 27 .In conventional Sweep algorithm, grouping customers begins from 0 0 and thusly progresses toward 360 0 to relegate every one of the customers under various vehicles 16 .Because of such unbending beginning from 0 0 total number of clusters may surpasses total number of accessible vehicles for a few examples.Beginning from various angles subsequently accomplished better CVRP result 26  The overview of the paper is as per the followings.Section 2 describes the method of solving CVRP using adaptive Sweep and SI methods (GA, ACO, PSM and VTPSO) briefly.Section 3 reports the experimental results on the benchmark problems considering adaptive Sweep clustering with each of GA, ACO, PSM and VTPSO.Finally, Section 4 concludes the paper with few remarks.

CVRP Solving through Adaptive Sweep based Clustering plus SI based Route Optimization
This section first gives description of adaptive Sweep with deficiency of standard Sweep and then describes considered TSP methods to make the paper selfcontained as well as better understanding.

Adaptive Sweep Clustering
Gillett and Miller 13 coined the name "the sweep algorithm" as a heuristic algorithm.Initial routes or clusters are formed by sweeping the nodes according to their polar angle (increasing or decreasing order).Sweeping halts when vehicle capacity constraint is violated, finishes a single vehicle route and resumes for another vehicle.Cluster formation starts in standard Sweep with an arbitrary customer (from 0 0 ) and then sequentially assigns the remaining customers (moving toward 360 0 ) to assign all the customers under available vehicles 12,15,16,28 .In several cases such type of clustering produces total number of clusters more than total number of vehicles.To overcome the problem, adaptive Sweep 27 heuristically identifies the appropriate starting angle (Ɵs) of cluster formation for any given instance.The method first computes polar angle of customers and order those to a list (say ONL) according to polar angle.The approach considers angle difference of consecutive nodes in ONL; and distance between the nodes and distances from the depot.Then preference value (pƟ) of each consecutive nodes is calculated and cluster formation starts from maximum pƟ value.For example the depot and other two consecutive customers are D, C1 and C2, respectively.Polar angles of the customers are Ɵ1 and Ɵ2.The distances of the customers from the depot is dC1 and dC2; and distance between the customers is dC12.Preference value (pƟ) for the starting angle between the customers C1 and C2 means to place the customers in two different clusters and is calculated using Eq.(1).pƟ= α*(Ɵ2-Ɵ1)+β*{dC12 + Min(dC1, dC2)} ... (1)   In the equation, α and β are the arbitrary constants to emphasis angle difference and node distances, respectively.
Algorithm 1 shows the steps of adaptive Sweep algorithm.First three steps of the initialization section are same as standard Sweep: update nodes' coordinates considering depot location as (0,0), compute polar angle of each customer and order the nodes according to polar angle to a list ONL.The main significance of adaptive Sweep is that it starts cluster formation from the maximum preference values.First the method calculates starting angle of cluster formation (pƟ) according to Eq. ( 1) (Step 1.e).As like standard Sweep, the method assigns nodes into a cluster while vehicle capacity does not exceed (Steps 2.b and 2.d) otherwise new cluster forms for unassigned nodes (Step 2.e).Since the adaptive Sweep may starts any location of ONL, Step 2.e transforms node assignment from bottom of ONL to the beginning of ONL.It is notable that for Ɵs = 0 0 the proposed method will be standard Sweep.

•
Calculate the polar angle of each customer.

Outcome
All the customers are relegated into total C clusters

Optimal Route Generation of Vehicles
Optimal route generation of each individual vehicle is a crucial part of CVRP solving while any clustering method is used to cluster customers.In general, a clustering method divides total CVRP nodes into clusters 29 , whereby number of clusters is equal to the number of vehicles.The aim of route generation is the optimal path finding of each vehicle starting from the depot and returning to depot after serving all of its assigned nodes.Therefore, route generation of individual-vehicle is simply a small sized TSP considering the depot as a common city point; and any TSP optimization method may be used for this purpose.To generate route for a vehicle, a TSP cost matrix considering nodes for a particular vehicle is prepared and then a TSP optimization is employed to work with the cost matrix as an independent TSP.Following sub-sections briefly describes TSP methods considered in this study which are GA, ACO, PSM and VTPSO.A crossover operator is used in GA to recombine two solutions to get a better solution.Crossover in biological terms refers to the blending of chromosomes from the parents to produce new chromosomes for the offspring.Two strings are picked from the mating pool at random to crossover 30 .Among several crossover techniques, Enhanced Edge Recombination (EER) method is used to solve TSP.In EER, an adjacency table 30 (called Edge Table ) is prepared that lists links into and out of a city found in the two parent sequences.Element of a sequence with a common edge is marked as inverting sign to emphasis in selection.The description of EER is available in 30 .

Genetic
Mutation 30 is the process by which offsprings are generated with a single parent.Position swap of two randomly selected nodes is the common way of mutation operation for TSP.
Elitism saves the best chromosome to the new offspring population before crossover and mutation to eliminate lose of best chromosome.Elitism keeps the best solutions to a stack and helps to improve performance of GA.

Ant Colony Optimization (ACO)
ACO was inspired by behaviors of real ants 31 while searching food.Initially, ants choose different paths if there exists several paths between ant colony and the food source.After sometimes all of them follow the shortest path; it is because of pheromone.
Pheromone is a chemical that ants lay in their path.
More pheromone means more ants travelled the path and also means the path is comparatively shorter.The general ACO is relatively simple and based on a set of ants, each making one of the possible roundtrips along the cities.If an ant in city i, the probability to go city j can be calculated by the following equation and parameters: J i k is the set of cities the ant still has to visit.η i,j = 1/d i,j is the reciprocal of the distance from i to j. τ i,j is the amount of pheromone on the arc from i to j. a is the importance of the intensity in the probabilistic transition.b is the importance of the visibility of the trail segment.
After the completion of a tour, each ant lays some pheromone on the path.The pheromone is updated by the following equations.r is the trail persistence or evaporation rate.The detail description of ACO available in 31 .

Producer Scrounger Method (PSM)
PSM 32 is a TSP solving method which is inspired from the collective behavior of animal group.It models roles and cooperation of three classes of animal group members: producer, scrounger and dispersed.Here producers have the best tour, few dispersed members have worse tours and they randomly checks new tours.At each step of PSM, the producer searches better tour, scroungers traverse new tours while moving toward producer's tour; and dispersed members arbitrarily examines new tours.In case of making producer's tour, PSM arbitrarily selects a city from the producer's tour and exchanges its connection with other closest cities for better tours.Parameter rate of near cities (RNC) defines the number of cities to be checked by the producer for better tour.A scrounger updates position towards the producer through Swap operator and swap sequence.A Swap Operator demonstrates two cities in a tour those positions will be exchanged.Suppose, a TSP problem has five cities and a solution is A-B-C-D-E.A Swap Operator SO (1,2) gives the new solution S'.
A swap sequence is formed from one or more swap operators.Finally, producer is considered as the solution of a given problem.The method performs well when tested on a suite of benchmark TSPs.The detailed description of this method is available in 32 .

Velocity tentative PSO (VtPSO)
VTPSO 33 is the most recent SI based method extending PSO to solve TSP.It considers Swap Sequence (SS) as velocity and calculates as like conventional standard SS based PSO method 34 but apply the SS in a different way.In traditional PSO, the new tour is calculated implementing all the SOs of a SS without considering no intermediate tours.
But VTPSO conceives a measure (called partial search) to apply such velocity to change particles position.VTPSO measures tours with portions of SS and conceive comparatively better new tour with a portion or full tentative SS.It calculates velocity SS using Eq. ( 6) considering (i) last applied velocity (v (t-1) ), (ii) previous best solution of the particle (P i ) and (iii) global best solution of the swarm (G). .

..(7)
The method is shown to perform well when tested on a suite of benchmark TSPs.The detailed description of this method is available in 34 .

experimental Results
This section checks adequacy of Adaptive Sweep algorithm and SI methods in solving benchmark CVRPs.Description of the benchmark problems and experimental setting are explained first.

Bench Mark datasets and experimental Settings
Two different sets of Augerat benchmark problems This section shows the detailed results for the selected benchmark problems A: n53-k7 and P: n65-k10 of A-VRP and P-VRP.For GA, PSM and VTPSO population size was 100; whereas, number of ants in ACO equals the number of customers assigned to a vehicle as it desire.The iteration number is set at 200 for the algorithms.that CVRP cost is invariant for ACO because population variation was not employed for it.On the other hand, GA is most sensitive with population size: CVRP cost through GA was very bad with respect to others at small population size (e.g., 5) and was competitive at larger population size.From the figure it is also observed that recent SI methods PSM and VTPSO are better than ACO and GA in population variation.At a glance, VTPSO is shown to outperform any other method for any population size and PSM is competitive to VTPSO.

Conclusions
A popular way of solving CVRP is to cluster the nodes according to vehicles using Sweep algorithm first and then generate route for each vehicle with TSP algorithm.In this study adaptive Sweep method is considered for appropriate cluster formation.Finally, GA, ACO, PSM and VTPSO are applied to generate optimal route with the clusters.The experimental results on the benchmark problems revealed that heuristically selected starting angles have positive effect on Sweep clustering and adaptive Sweep plus SI methods is an effective CVRP solving method when compared with several related existing methods.
Algorithm (GA) GA is one of the most popular search and optimization techniques based on the natural evolution through genetic inheritance.It works with populations of chromosomes, selection according to fitness, crossover to produce new offspring, and random mutation of new offspring.Selection operation selects good solutions in a population and forms a mating pool.A number of selection techniques are used in GAs.Roulette Wheel Selection, Random Selection, Rank Selection and Tournament Selection are mainly used to select the parents in GA.

Fig. 1 :Fig. 2 :
Fig. 1: Pictorial view of solutions with standard Sweep clustering (i.e., Ɵs=0 0 ) for A: n53-k7 problem Figure 2 shows the graphical representation of adaptive sweep clustering for A: n53-k7 problem with adaptively selected Ɵs = 220.6 0 .In this case total demands are fulfilled by seven clusters that is equal to number of vehicles.Among the four route optimization methods, CVRP cost with ACO is the worst and the value is 1131.Similar to standard Sweep, it achieved worse solution for Cluster 4 and Cluster 6.The best CVRP solution for the problem is achieved by PSM and VTPSO and achieved CVRP cost is 1090.On the other hand, GA is showed competitive result with PSM/VTPSO showing different result only for Cluster 6 and CVRP cost 1091.Finally, the comparative description with graphical representation of Figs. 1 and 2 clearly identified the proficiency of adaptive Sweep over standard Sweep.

Fig. 3 :
Fig. 3: CVRP cost (i.e., total travel cost) for population variation (b) P :n65-k10 problem et al., 10 investigated a hybrid algorithm of Sweep and nearest neighbor algorithm to solve CVRP.They tested the method on Augerat's Euclidean benchmark dataset and in solving the dairy products delivery problem of Tiba Company for Trade and Distribution in Egypt.
Na et al., 17 introduced nearest neighbor in Sweep and optimized route using 2-opt edge exchange method.Author made several extensions of sweep algorithm but an extra operation increases the computation cost.Sweep algorithm and 3-opt local search for solving CVRP.Reed et al., 12 demonstrated gathering of reusing waste from family units using ACO.Tan et al., 20 used several heuristics combined with ACO to solve CVRP and showed it a viable alternative to solve CVRP.Kao et al., 21 proposed a new hybrid algorithm based on ACO and Particle Swarm Optimization (PSO) for solving CVRP.Kanthavel and Prasad 22 investigated Nested PSO (NPSO) for route generation.Tavakoli and Sami 23 and Venkatesan et al., . The outcome of adaptive PEyA et al., Orient.J. Comp.Sci.& Technol., Vol.11(2) 88-102 (2018)

Table 3
Ɵs=0 0 (i.e., in standard Sweep) is 8 that is more than available vehicles.Total clusters are also 8 for Ɵs= 270 0 .On the other hand, number of clusters equal to total vehicles (i.e., 7) for Ɵs= 90 0 and 180 0 .It is also remarkable that CVRP cost (i.e., total travel distance) for 7 clusters is lower than the cases of 8 clusters after route optimization.It is interesting from the table that total clusters are also 7 for adaptively selected angle 220.6 0 .The best CVRP cost for an algorithm among different Ɵs is marked as bold-faced type.For the problem the best CVRP cost achieved after optimizing for with GA, ACO, PSM and VTPSO are 1091, 1131, 1190 and 1090, respectively.The best values are found for adaptively selected Ɵs = 220.6 0 and fixed Ɵs=180 0 .

Table 4
shows the total clusters for different fixed as well as adaptively selected starting angles (Ɵs) and optimized route cost with different methods for P: n65-k10 problem of P-VRP.The problem has 65 nodes and total 1219 demand to be served with ten vehicle having capacity 130.From the table it is observed that total number of clusters for Ɵs=0 0 (i.e., in standard Sweep) is 11 that is more than available vehicles.Total clusters are also 11 for Ɵs=90 0 .On the other hand, number of clusters equal to total vehicles (i.e., 10) for Ɵs=180 0 and 270 0 .It is also remarkable that final CVRP cost for 10 clusters is lower than the cases of11.For the problem the best CVRP cost achieved (i.e., 837) for Ɵs=180 0 with GA, PSM and VTPSO.On the other hand, the heuristic approach selected starting angle is Ɵs = 278.43 0and outcome is same for fixed Ɵs = 270 0 with 10 clusters.Although the outcome is inferior to best outcome with Ɵs = 180 0 , the outcome is better than standard Sweep with Ɵs = 0 0 .

Table 5
The results of route optimization with GA, ACO, PSM and VTPSO on adaptive Sweep cluster are compared with other existing methods.In most of the cases adaptive sweep based methods outperformed corresponding standard Sweep based methods.For example adaptive sweep + PSM wins in 27, 9, 4 and 16 out of 27 cases, respectively.Only a few cases, standard Sweep based methods are found better than adaptive Sweep.For example Centroid based 3-phase and Sweep + Cluster Adjust outperforms Adaptive sweep for some problems.Adaptive Sweep is outperformed over other methods on the basis of average CVRP cost over 27 problems.The average CVRP cost for standard Sweep based methods are 1310.11,1134.67, and 1181.44,respectively.On the other hand, achieved average CVRP cost for adaptive Sweep with GA, ACO, PSM and VTPSO are 1169.48,1195.33,1169.19 and 1168.63,respectively.Among adaptive Sweep based methods, PSM and VTPSO outperformed GA and ACO.Finally, CVRP cost with VTPSO are found best among the methods and it showed best (i.e., minimum) CVRP costs for all 27 problems.

Table 6
Examination on the data revealed that such problems have similar type of node coordinates.Adaptive Sweep is outperformed over existing optimization method on the basis of average PEyA et al., Orient.J. Comp.Sci.& Technol., Vol.11(2) 88-102 (2018) CVRP cost over 24 problems.The average CVRP cost for the methods are 708.33,639.00, and 640.33 respectively.On the other hand, achieved average CVRP cost for adaptive Sweep with GA, ACO, PSM and VTPSO are 645.54,655.71, 643.42 and 637.17, respectively.The routes obtained with GA, ACO, PSM and VTPSO on adaptive Sweep cluster outperformed corresponding other methods in 23, 12, 13, 6, 24 and 3 out of 24 cases, respectively.