Distance based Sweep Nearest Algorithm to Solve Capacitated Vehicle Routing Problem

The Capacitated Vehicle Routing Problem (CVRP) is an optimization problem owing to find minimal travel distances to serve customers with homogeneous fleet of vehicles. Clustering customers and then assign individual vehicles is a widely-studied way, called cluster first and route second (CFRS) method, for solving CVRP. Cluster formation is important between two phases of CFRS for better CVRP solution. Sweep (SW) clustering is the pioneer one in CFRS method which solely depends on customers’ polar angle: sort the customers according to polar angle; and a cluster starts with customer having smallest polar angle and completes it considering others according to polar angle. On the other hand, Sweep Nearest (SN) algorithm, an extension of Sweep, also considers smallest polar angle customer to initialize a cluster but inserts other customer(s) based on the nearest neighbor approach. This study investigates a different way of clustering based on nearest neighbor approach. The proposed Distance based Sweep Nearest (DSN) method starts clustering from the farthest customer point and continues for a cluster based on nearest neighbor concept. The proposed method does not rely on polar angle of the customers like SW and SN. To identify the effectiveness of the proposed approach, SW, SN and DSN have been implemented in this study for solving benchmark CVRPs. For route optimization of individual vehicles, Genetic Algorithm, Ant Colony Optimization and Particle Swarm Optimization are considered for clusters formation with SW, SN and DSN. The experimental results identified that proposed DSN outperformed SN and SW in most of the cases and DSN with PSO was the best suited method for CVRP. Keywords—Capacitated vehicle routing problem; sweep algorithm; sweep nearest algorithm; genetic algorithm; ant colony optimization; particle swarm optimization


I. INTRODUCTION
The Vehicle Routing Problem (VRP) can be depicted as the issue of structuring ideal conveyance routes from one or a few warehouses to various geologically dissipated urban areas or clients while keeping up certain imperatives [1].Capacitated VRP (CVRP) is one of the most studied variations of VRP with an extra limitation of fixed vehicle conveying limit [2].In CVRP, all customers have predefined requests and fixed areas for the conveyance.The target of CVRP is to attenuate the overall traveling distance for all vehicles.Various ways are projected for solving CVRP; nearly all of them are heuristics.A heuristic approach doesn't explore the complete search area rather tries to search out associate in nursing optimum answer supported the accessible data of the matter.In solving CVRP, constructive and clustering methods are commonly used in the heuristic approaches to construct the routes.Constructive approach keeps the travelled distance optimum at the same time of route construction.There is no route improvement or optimization phase.Savings Algorithm [3], Matching Based Algorithm and Multi-route Improvement Heuristics [4] are the most popular constructive algorithms.On the other hand, the solution of a problem is divided into two phases in clustering methods.All the customers are gathered into different groups using a clustering algorithm and after that an optimization algorithm used to make route of individual clusters.Such 2-stage method is called cluster first and route second (CFRS) method.The well-known CFRS algorithms are Sweep [7], Fisher and Jaikumar [14], Petal [15] and Taillard's [16].It is notable that appropriate clustering is important for optimal CVRP solution in any CFRS method.
Sweep is the pioneer one among CFRS algorithms and it creates clusters based on customers' angular position.The idea of the sweep was originated by Wren [5] and Wren and Holliday [6].But Gillett and Miller [7] coined the name "the sweep algorithm."In the method, a cluster is made by sweeping the customers as per their polar angle (expanding or diminishing request).Sweeping stops when vehicle capacity is going to exceed and resumes grouping for another vehicle if customers remain.The algorithm was used in solving the CVRP for public vehicle [8].Venkatesan et al. [9] solved Augerat benchmark CVRPs using Sweep algorithm.A number of studies also incorporated different techniques to improve Sweep clustering.K. Shin [10] introduced cluster adjustment approach in Sweep and route generated with Lin-Kernighan heuristic method.In [12], CVRP has been solved using Sweep algorithm jointly with Clark and Wright savings algorithm.Recently, Peya et al. [11] investigated an adaptive version of sweep algorithm for clustering customers.

An extension of Sweep (SW) algorithm, called Sweep
Nearest algorithm, has been investigated and found to perform better than standard one.Sweep Nearest (SN) [13] combines the idea of Sweep and Nearest Neighbor concept.Like SW, SN also considers sorted polar angle of the customers and starts a cluster with the customer having smallest polar angle.But SN considers other customers to complete the cluster which are nearer to the already assigned customer(s).This www.ijacsa.thesai.orgprocess repeats until all the customers are inserted into feasible clusters.
This study investigates a different way of clustering based on nearest neighbor approach.The proposed Distance based Sweep Nearest (DSN) method starts clustering from the farthest customer point and continue for a cluster based on nearest neighbor concept.The proposed method does not rely on polar angle of the customers like SW and SN.To identify the effectiveness of the proposed approach, SW, SN and DSN have been implemented in this investigation.For route optimization of individual vehicles, Genetic Algorithm, Ant Colony Optimization and Particle Swarm Optimization are considered for clusters formation with SW, SN and DSN.The test contemplates on a large number of benchmark CVRPs distinguished that proposed DSN outperformed SN and SW in most of the cases.
The rest of the paper is organized as follows.Section II explains proposed DSN method in detail.For better understanding it also explains SW and SN concisely.Section III briefly explains the optimization methods.Section IV is for exploratory examinations which presents trial results as well as compares the results of the techniques on benchmark CVRPs.Finally, Section V provides a concise conclusion of the paper.

II. SWEEP NEAREST AND DISTANCE BASED SWEEP NEAREST
The aim of this investigation is to present a distance-based sweep nearest algorithm that yields better solution than the existing ones.This portion first gives depiction of SW and SN for better understanding of DSN.

A. Sweep (SW) Algorithm
Sweep algorithm is least complex grouping strategy for CVRP.Cluster formation begins from 0 0 and therefore propels toward 360 0 to allot every one of the customers under various vehicles while keeping up capacity of a vehicle.This kind of sweeping is named as forward sweep.Clustering direction is clockwise which means however grouping begins 0 0 in backward sweep, at that point it progresses calculation from 360 0 to 0 0 .The common recipe for computing polar angle of the customers with respect to warehouse is.
(1) where depot/customer, i.e., angle of a node; Co-ordinates of customers.Algorithm 1 shows the steps of SW.

B. Sweep Nearest (SN) Algorithm
SN [13] combines the Nearest Neighbor algorithm with the classical SW.SW groups the customers exclusively by polar angle.On the off chance that the customers are generally isolated yet have less precise distinction, they might be assembled in a similar group.This diminishes the optimality of the solution cluster.To determine this issue, SN initially appoints to a vehicle the customer with the littlest polar angle among the rest of the customers and afterward finds the closest stop to those officially relegated and after that embeds that customer.Fig. 1 shows graphical representation of the clustering with SW and SN for a sample scenario of CVRP customer points [13].In SW (Fig. 1(a)), points with relatively large distances are inserted into the same cluster due to closer polar angle.On the other hand, nearest customers have a place with a similar group in SN as shown in Fig. 1(b).For such case SN will give better CVRP solution than SW.
2) Sort the customer according to their increasing order of polar angles. Clustering: 2) Begin sweeping customers by expanding polar angle and allocate the customers to the present cluster.3) Stop the sweep when including the following client would abuse the most extreme vehicle limit.4) Set C = C + 1.

5) Repeat
Steps 2-4 until every one of the customers have been allotted.Algorithm 2 shows the steps of SN.The initialization of SN is same as SW.It also starts a cluster formation with the smallest polar angle customer from the unassigned customers like SW.Then the nearest customers with respect to the clustered customers are inserted.After a cluster finishes, the smallest angle customer among the remaining customers is chosen as starting for the next cluster.

Initialization:
As of Sweep algorithm, i.e., Algorithm 1. Clustering: 2) Select the smallest angle customer and assign to a cluster.3) Select a customer which is nearest to the already inserted customers and insert it into the cluster.Continue clustering until vehicle capacity is not violated.

C. Distance based Sweep Nearest (DSN) Algorithm
This section describes proposed DSN clustering method mentioning difference from SW and SN.SW starts clustering with the customer having smallest polar angle.SN also starts clustering with the smallest angle customer but grow a cluster selecting its nearest ones.In both SW and SN, the distant customers from the origin may be inserted later.In such a case a cluster (i.e., new route) with remaining one or few far distance customer(s) incur relatively large CVRP cost.On the hand cluster formation starts from far distance customer is the alternate and better option.In such case, customer closer to depot may remain for new cluster.A new cluster with closer customers is cost effective.Moreover, remaining closer customers may be inserted into the existing clusters without increasing cost.On these motivations, the proposed DSN starts a cluster formation with the farthest customer from the depot and complete it as like nearest neighbor approach.When a cluster finishes, next cluster starts with the farthest among the remaining ones.DSN does not consider polar angles of the customers at all; it concerns only with Euclidean distance of the customers.Algorithm 3 shows the steps of DSN.

Initialization:
1) Compute Euclidean distance of each customer from the depot.2) Sort the customers according to the descending order of their distances. Clustering: 2) Start formation for the cluster assigning farthest customer from the depot.3) Select a customer which is nearest to the already inserted customers and insert it into the cluster.Continue clustering until vehicle capacity is not violated.4) Set C = C + 1.

5) Repeat
Steps 2-4 until all the customers have been assigned.

III. ROUTE GENERATION OF INDIVIDUAL VEHICLES
Individual vehicles' route generation is the final step of any clustering based CFRS algorithm.Optimal route finding of a vehicle considering the nodes of a cluster is a traveling salesman problem (TSP); and any TSP method may use for this purpose.In this study, three prominent TSP methods have been considered which are Genetic Algorithm (GA), Ant Colony Optimization (ACO) and Particle Swarm Optimization (PSO).Short descriptions of the methods are as follows to make the paper self-contained.
GA is a pioneer optimization method based on Darwin's natural selection.The basic highlights of it for solving TSP are: permutation encoding to present solution cluster, tournament selection, and Enhanced Edge recombination crossover and swap mutation [17].
ACO is a well-known technique for TSP based on the behavior of ants seeking a path between their colony and a source of food.It starts placing different ants in different cities.Visibility heuristic (i.e., inverse of distance) and intensity of the pheromone on the path are considered by a particular ant to move one city to another one.Every ant lays some pheromone on the way based on the quality of the constructed tour.Pheromone evaporation of natural ant colony system is adopted by decreasing pheromone of all the links by a fixed rate; it allows artificial ants to forget links of bad choices.At long last, every one of the ants pursue the similar tour after certain cycles.Moderated description of ACO is available in [18].PSO is the most popular optimization method mimicking social behavior of schools of fishes or flocks of birds.In PSO, each particle maintains a potential solution position and moves to a new position with the calculated velocity considering its previous best solution and the best one among all.The process continues for all the particles until the stopping criteria is meet.For solving TSP with PSO, each particle holds a complete tour and velocity is a measure to improve the tour.Velocity tentative PSO (VTPSO) [19], an improved PSO for TSP, is considered in this study.VTPSO introduced a measure, called partial search, to get better tour with the calculated velocity.The description of VTPSO is available in [19].

IV. EXPERIMENTAL STUDIES
This section first depicts the benchmark issues and exploratory arrangement for directing the investigation.Then it describes experimental results and analysis.

A. Benchmark Data and Experimental Setup
A suite of 27 benchmark problems from Augerat et al. (A-VRP) has been considered in this study.A problem incorporates number of customers, available vehicles and vehicle capacity.Coordinates and demand of individual customers are given in the datasets.Total vehicles are from 5 to 10 and capacity of each individual vehicle is 100.The number of customers differs from 32 to 80 and demand fluctuates from 407 to 932.The original data set is modified making the coordinate of the depot as (0, 0).We considered a fair experimental methodology for the routine optimization with GA, ACO and PSO.The number of iterations was set at 100 for the algorithms.Same population size of 50 is considered for GA and PSO; whereas ants in ACO was equivalent to the of nodes in a cluster as it desired.The methods have been implemented using Visual C++ of Visual Studio 2013 on Windows 7 OS.A PC with Intel Core i5-3470 CPU @ 3.20 GHz CPU and 4GB RAM has been used to conduct the experiments.

B. Experimental Results and Analysis
This segment presents test results for the benchmark CVRPs utilizing SW, SN and DSN with route improvement with GA, ACO and PSO.Table I shows CVRP solution (i.e., optimized route cost) of individual benchmark problem.It also shows average for GA, ACO and PSO.The best (i.e., minimal CVRP cost) achieved among GA, ACO and PSO for a particular clustering is underlined and best one among the nine is showed in bold-face.In general, PSO is shown to www.ijacsa.thesai.orgoutperform GA and ACO.The latest version of PSO (i.e., VTPSO) has been employed in this study which is identified as a better TSP optimization technique.For SN and DSN, PSO is shown better than GA and ACO for all 27 cases and for SW, PSO is found worse than GA for only one case (i.e., A-n37-k5).The average CVRP costs with GA, ACO and PSO for SW are 1204.041227.67 and 1200.67,respectively.And the average with best among GA, ACO and PSO for SW is 1200.56 which is used compare with results of SN and DSN.cases, respectively, out of 27; and DSN was found inferior to SW and SN for rest several cases only.Between, SW and SN, SW outperformed SN for 17 cases and rest 10 case SN was found better than SW.It is notable that both anti-clockwise and clockwise (i.e., forward and backward) forms sweep have been considered in SW.On the other hand, SN is implemented for a smallest polar angle; SN with different angles outperformed SW but increased huge computational cost [13].Finally, DSN + PSO (i.e., DSN with PSO) is revealed as a good CVRP solving method.
For better understanding, Fig. 2 shows graphical representation of the routes generated by the SW, SN and DSN algorithm with PSO for instance A-n33-k5.The figure also includes each individual cluster route cost and total CVRP cost.It is interesting to observe from the figure that routes for SN (i.e., Fig. 2(b)) and DSN (i.e., Fig. 2(c)) intersected but not for SW (i.e., Fig. 2(a))).Because formation advances in SW on the basis of customers' angle only either forward or backward.For SN, cluster 1 started with node 28 like SW and some nodes were common with SW.It is also remarkable for SN that earlier clusters are smaller in size and later ones are bigger.This is due to the fact that SN started clustering with the customer having smallest polar angle.On the other hand, clusters sizes for DSN are opposite of SN.DSN considered farthest point 7 in formation of first cluster and considered total seven nodes.For second cluster it started from node 17 which was the farthest among the remaining nodes after cluster 1.Therefore, earlier clusters are bigger in size as it starts clustering from the farthest customer from origin.The CVRP cost achieved for SW and SN were 788 and 751, respectively.For this case, achieved cost of DSN is 720 which is better than SN and SW.
The experimental results presented in Table I and Fig. 2 were for fixed population and iteration in GA, ACO and PSO for route optimization with SW, SN and proposed DSN.The effects varying population and iteration in the route optimizing have also been investigated for proposed DSN based method.The population size was kept fixed while the generation numbered was varied and vice-versa.For fixed iteration 100, population changed from 5 to 100.On the other hand, for fixed population size 50, generation changed from 10 to 200.Fig. 3 presents CVRP cost of A-n80-k7 problem with proposed DSN clustering and varying population and iteration in PSO.It is observed from the figure that CVRP cost decreases rapidly for GA with the change of population and iteration.Changing population from 5 to 100, cost reduced from 2024 to 1902.GA also found sensitive to iteration variation.For ACO, population variation does not effective since it used total number of cities as population but cost changed slightly (from 1929 to 1927) for iteration variation.PSO also found mostly invariant with population and iteration variation.This result indicates that PSO is cost effective since it gives better outcome with small population and iteration.V. CONCLUSIONS CVRP is a popular optimization problem and different clustering-based methods are studied in recent years.Sweep algorithm is the simplest clustering algorithm to solve CVRP and Sweep Nearest is an extension of Sweep aiming to improve its performance.In this study, Distance based Sweep Nearest has been investigated.It started clustering from farthest distance node and conceived nearest neighbor method to consider nodes in the cluster.Experimental results reveal that the proposed method yields better solution than the existing ones for most of the cases.A potential future direction of the presentation study is to apply the idea for other real-life applications like metropolitan bus scheduling.

Fig. 2 .
Fig. 2. Solution with Graphical Representation for A-n33-k5 using SW, SN and DSN Clustering and Route Optimizing with PSO.

Fig. 3 .
Fig. 3. CVRP Cost of A-n80-k10 Problem with DSN Clustering and Varying Population and Iteration in GA, ACO and PSO.

TABLE . I
. BENCHMARK CVRP SOLUTIONS THROUGH CLUSTERING WITH SWEEP (SW), SWEEP NEAREST (SN) AND PROPOSED DISTANCE BASED SWEEP NEAREST (DSN) AND ROUTE OPTIMIZATION WITH GA, ACO AND PSO It is revealed from Table I that proposed DSN is better than SW and SN.SW is found best for 8 instances, SN for 2 instances and DSN for 17 instances out of 27.Pair wise Win / Draw / Loss summary is presented below the table for better understanding.DSN outperformed SW and SN for 19 and 21