Constructive and Clustering Methods to Solve Capacitated Vehicle Routing Problem

Vehicle Routing Problem (VRP) is a real life constraint satisfaction problem to find minimal travel distances of vehicles to serve customers. Capacitated VRP (CVRP) is the simplest form of VRP considering vehicle capacity constraint. Constructive and clustering are the two popular approaches to solve CVRP. A constructive approach creates routes and attempts to minimize the cost at the same time. Clarke and Wright’s Savings algorithm is a popular constructive method based on savings heuristic. On the other hand, a clustering based method first assigns nodes into vehicle wise cluster and then generates route for each vehicle. Sweep algorithm and its variants and Fisher and Jaikumar algorithm are popular among clustering methods. Route generation is a traveling salesman problem (TSP) and any TSP optimization method is useful for this purpose. In this study, popular constructive and clustering methods are studied, implemented and compared outcomes in solving a suite of benchmark CVRPs. For route optimization, Genetic Algorithm (GA), Ant Colony Optimization (ACO) and Velocity Tentative Particle Swarm Optimization (VTPSO) are employed in this study which are popular nature inspired optimization techniques for solving TSP. Experimental results revealed that parallel Savings is better than series Savings in constructive method. On the other hand, Sweep Reference Point using every stop (SRE) is the best among clustering based techniques. Article History Received: 21 July 2017 Accepted:17 August 2017

their assigned customers.The delivery or unloading time may or may not be considered.The objective of CVRP is to minimize the total travelling distance for all vehicles.Various ways have been investigated for solving the CVRP.Nearly all of them are heuristics because no exact algorithm can be guaranteed to find optimal tours within reasonable computing time when the problem is large.A heuristic approach does not explore the entire search space rather tries to find an optimal solution based on the available information of the problem.CVRP solving heuristic approaches are categorized as constructive and clustering methods.Constructive methods build a feasible solution gradually while keeping an eye on solution cost, but it may not contain an improvement or optimization phase.Some well-known algorithms of constructive methods are -Clarke and Wright's Savings Algorithm 3,4,5,6,7 , Matching Based Algorithm and Multi-route Improvement Heuristics 8 .On the other hand, clustering methods solve problem in two steps and that is why this approach is also called 2-phase or cluster first, route second method.First phase of this approach uses clustering algorithm to generate clusters of customers and second phase uses optimization technique to find optimum routes for each cluster generated in the first step.Sweep 9,10 and Fisher and Jaikumar 11 are popular clustering algorithms.This study investigates and compares performance of prominent constructive and clustering methods to solve CVRP and hence find out the best suited one.The initial clusters found from clustering methods are subjected to route optimization.For route optimization, Genetic Algorithm (GA) 12 , Ant Colony Optimization (ACO) 13 and Velocity Tentative Particle Swarm Optimization (VTPSO) 14 are employed in this study which are popular nature inspired optimization techniques for solving TSP.Though constructive methods generate optimal routes, route optimization techniques are also applied to Savings algorithm for performance analysis.The outline of the paper is as follows; Section II explains prominent constructive and clustering methods briefly.Section III gives brief description of the optimization techniques.Section IV is for experimental studies in which outcomes of the selected methods are compared on a suite of benchmark CVRPs.At last, Section V gives a brief conclusion of the paper.

Constructive And Clustering Methods To Solve Cvrp
Constructive and clustering methods are popular in solving CVRPs.In this section prominent methods are explained briefly.

Constructive Method
A method in this category constructs routes as well as tries to minimize the travelled distance of the vehicles at the same time.Clarke and Wright's Savings algorithm is the most popular constructive method and which is explained below.

Clarke and Wright's Savings Algorithm
The algorithm is based on savings distance 3 which is obtained by joining two routes into one route as illustrated in Fig. 1 where point 0 represents the depot.Denoting the transportation cost between two given points i and j, total transportation costs for separate (Fig. 1 For all pair of nodes i,j (i≠j) calculate savings distance using Eq. ( 3).• Sor t the node pairs according to the decreasing order of savings distance.

Merge Routes
• First or last node of two routes matches (0-ij-0 and 0-k-j-0) and the total demand of the combined route satisfy vehicle capacity, then merge the routes (0-i-j-k-0), delete one of the routes.Update k.

•
Repeat Steps 2-3 until all the node pairs have been processed.

•
If all the pairs are processed but the node list is not empty, go to Step 1(b).Else stop.

Clustering Method
In clustering method, the solution of the problem is divided into two phases.All the nodes are grouped into several clusters using clustering algorithms and then the routes are optimized using any optimization technique.That's why this approach is also known as 2-phase or cluster first, route second algorithm.

Sweep Algorithm
Sweep algorithm is the simplest clustering method for solving CVRP 9,10 .Cluster formation starts from 00 and consequently advance towards 360 0 to assign all the nodes under different vehicles while maintaining vehicle capacity.This type of sweeping is called forward sweep.And in backward sweep, clustering direction is clockwise which means though clustering starts from 0 0 , then it advances algorithm from 360 0 to 0 0 .The general formula for calculating polar angle of the customers with respect to depot is, where θ = Angle of a node (depot/customer).
x,y= X, Y co-ordinates of customer.
was proposed named Sweep Nearest algorithm (SN) 15 , which combines the classical Sweep and the Nearest Neighbor algorithm.SN first assigns a vehicle to the customer with the smallest polar angle among the remaining customers and then finds the nearest stop to those already assigned and then inserts that customer.

Sweep nearest Algorithm
The Sweep algorithm clusters the nodes solely by polar angle.If the nodes are widely separated but have less angular difference, they may be grouped in the same cluster.This reduces the optimality of the solution cluster.To resolve this problem, an algorithm

Sweep Reference Point Algorithm
In the Sweep and Sweep Nearest, the depot is used as a reference point for calculating the polar angle.
Changing the reference point alters the polar angle of nodes and the insertion sequence of nodes and causes different routes to be generated.Based on these observations, the authors of 15 proposed two different kinds of reference points rather than the depot: every node and distant point.

Every node as Reference Point
Polar angle of the customers is calculated with respect to the other customers except depot.The formula is, θ= tan -1 {(y i -y r ) / (x i -x r )} ...( 5) where x i ,y i = X, Y co-ordinates of customer i.
x r ,y r = X, Y co-ordinates of the reference node.

distant Point as Reference Point
The distant reference points are denoted as x + , x -, y + , y -.They are calculated using the following formula,

Fisher and Jaikumar Algorithm
This algorithm 11 solves a Generalized Assignment Problem (GAP) to form the clusters.In GAP, there are a number of agents and a number of tasks.This problem is a generalization of the assignment problem in which both tasks and agents have a size.Moreover, the size of each task might vary from one agent to the other.Any agent can be assigned to perform any task, incurring some cost and profit that may vary depending on the agent-task assignment.Moreover, each agent has a budget and the sum of the costs of tasks assigned to it cannot exceed this budget.It is required to find an assignment in which all agents do not exceed their budget and total profit of the assignment is maximized.When GAP is applied for CVRP, the vehicles are considered as agents, vehicle capacity is agent's budget, tasks are customers and profit is the optimal route cost.The assignment of customers to vehicles is done in such a way that vehicle capacity is not violated and the travelled distance is as less as possible.At first, in Fihser and Jaikumar algorithm, the customers are divided into K cones where K is the number of total vehicles.Seed customers are selected from the cones, based on some criteria such as customers with maximum demand or most distant customer from origin.Fig. 4 shows that the customers (N = 15) are divided into four cones (K = 4).If the smallest angle is 200 and the largest angle is 3400 then each cone is of 800.From each cone, the farthest node from the origin is chosen as the seed customer.After seed selection, insertion cost is calculated which is the cost of Substituting Eq. ( 6) from Eq. ( 7), insertion cost of customer i is The authors of 11 pointed some attractive attributes of the algorithm.First, the heuristic is always find a feasible solution if one exists due to the characteristics of GAP.Second, when the GAP is solved, the algorithm is considering the impact of a customer assigned to a vehicle on every other possible assignment.This avoids a problem faced by sequential assignment or limited adjustment heuristics that is unknowingly making initial assignment which may lead to expensive route generation.Third, the method can be easily adapted to accommodate the constraints of CVRP.Finally, it lets to select seed customer and thus it helps in generating different route set.The procedure of Fisher and Jaikumar algorithm is shown in Algorithm 5. insertion Cost Calculation Calculate insertion cost of each customer with respect to each seed using Eq. ( 8).

Assignment of Customers
The customers are assigned to the vehicles according to their increasing order of insertion cost while maintaining vehicle capacity constraint.

optimum Route Generation
The route generation stage is aimed to optimize searching method to find the optimal solution that represents the shortest path between all nodes in each cluster generated by the clustering algorithm.In this stage each cluster is an individual inserting customer within the route going back and forth between seed customer and depot.Then the customers are assigned to vehicles according to the increasing order of insertion cost.Figure 5 demonstrates visiting seed and a customer where 0 denotes the depot, S is seed customer and i is the customer being considered for insertion.traveling salesman problem (TSP).In this study, three prominent methods are considered for route optimization: Genetic Algorithm (GA), Ant Colony Optimization (ACO) and Velocity Tentative Particle Swarm Optimization (VTPSO).GA is a prominent and pioneer optimization method.ACO is the prominent Swarm Intelligence (SI) based method and is pioneer in solving TSP.On the other hand, Velocity Tentative Particle Swarm Optimization (VTPSO) is recently developed method extending PSO of continuous optimization.Brief description of the methods to optimize route (i.e., to solve TSP) are given to make the paper self-contained.

Genetic Algorithm (GA)
GA 12 is inspired by biological systems' fitness improvement through evolution and is the pioneer and widely used to solve many scientific and engineering problems.Common features of GA are: populations of chromosomes (i.e., solutions), selection according to fitness, crossover to produce new offspring, and random mutation of new offspring.To produce new tour from existing tours, Enhanced Edge Recombination cross over method is used in this study.The positions of two nodes are interchanged for mutation operation.

Ant Colony optimization (ACo)
ACO is inspired from ants' foraging behavior and is the prominent method for solving TSP 13,16 .ACO is the first algorithm aiming to search for an optimal path in a graph, based on the behavior of ants seeking a path between their colony and a source of food.It considers population size as the number cities in a given problem and starts placing different ants in different cities.A particular ant consider next city to visit based on the visibility heuristic (i.e., inverse of distance) and intensity of the pheromone on the path.
After the completion of a tour, each ant lays some pheromone on the path.Before pheromone deposit, pheromone evaporation of real ant is adopted by reducing pheromone of all the links by a fixed percentage.This behavior allows the artificial ants to forget bad choices made in the past.Finally, all the ants follow the same route after certain iteration.The detail description of ACO is available in 19 .

Velocity Tentative PSo (VTPSo)
VTPSO 14 is the most recent SI based method extending Particle Swarm Optimization (PSO) to solve TSP.In PSO, a particle represents a feasible solution in multi-dimensional search space.In each iteration, each particle measure its velocity considering its own past best position and the best position encountered by the whole swarm.VTPSO calculates velocity as Swap Sequence (SS) to alter a TSP solution to new one but apply the SS in a different and optimal way.A SS is a collection of Swap Operators (SOs) and each SO is a pair of indexes to alter.On the other hand, VTPSO considers the calculated velocity SS as tentative velocity and conceives a measure called partial search (PS) to apply calculated SS to update particle's position (i.e., TSP tour).VTPSO measures tours with portions of SS and conceives comparatively better new tour with a portion or full tentative SS.The algorithm is described in 14 .

Experimental Studies
This section first describes the benchmark problems and experimental setup for conducting the experiment.
Then it compares outcomes of different methods.

Benchmark data and Experimental Setup
In this study, a suite of benchmark problem named Augerat et al. (A-VRP) has been chosen 17 .Each data set includes the number of customers, number of vehicles available and each vehicle capacity.A customer is represented as a two dimensional coordinate and individual customer demand is also given.In A-VRP, number of customer varies from 32 to 80, total demand varies from 407 to 932, and number of vehicle varies from 5 to 10.The capacity of individual vehicle is 100 for all the problems.The original data set is modified here to make the coordinate of the depot as (0, 0).We strongly relied on an experimental methodology for configuring the route optimization algorithms.
For the fair comparison, the number of iteration was set to 100 for the algorithms.The population size was 50 for GA and VTPSO.The number of ants in ACO was equal to the number of nodes in a cluster as it desired.In ACO, alpha and beta were set to 1 and 3, respectively.The selected parameters are not optimal values, but considered for simplicity as well as for fairness in observation.From the tables, it can be observed that for the same instances and using same optimization technique, the route costs are different due to different approach of cluster/route generation.The best route found for each instance is shown as bold.On the other hand, in few cases a method requires an additional vehicle to cover all the nodes which are marked with a along with CVRP cost.It is observed from Table 1 that SVP is better than SVS.Without optimization, SVP is shown better CVRP cost than SVP for all the cases except n53-k7.
In few cases outperformance of SVP is significant.For n33-k5 problem, as an example, SVS achieved CVRP cost 957 and SVP achieved 842.However, SVP involves more computation than SVS; SVP includes customer insertion and route merging.From the Table 2 it is observed that Fisher and Jaikumar (FJ) with GA is shown to achieve best CVRP solutions for three cases n37-k5, n45-k7 and n61-k9.FJ selects distant customers as seed.Therefore, it considers farthest customers from depot for insertion at first and nearest ones later.The distant customers influences the cost of the clusters more than the nearest.Because the customers closer to depot can be inserted into any clusters and it will have less impact on the cost than the distant customers' insertion.It performs better when the customers are evenly distributed around the depot.It creates all the clusters in parallel, considers the insertion of a customer in all the cluster and inserts into the best suitable one.But customer density may vary in different regions; thus seed selection influences optimality of the routes.In some angular area customers may not even exists.When the customers are densely located in a particular area, more seeds get selected from that area comparing with the other areas.SW and SN outperform FJ for most of the instances.But FJ also produces feasible clusters (where cluster number does not exceed the vehicles provided) and involves less computation time.
Considering results of Table 1 and Table 2, after implementing different optimization techniques, the CVRP costs do not vary for constructive algorithm as much as for clustering algorithm.Also Savings algorithm (Table 1) is giving same result for different optimization algorithms.On the other hand, for clustering algorithm GA is performing better than ACO; and VTPSO is outperforming both GA and ACO.Among 27 instances, VTPSO is giving best result for 22 cases.Figure 8 shows the CVRP solution for SW+GA.
There is no intersection in clusters in the route.SW clustering starts from a particular angle and advances only either forward or backward; thus there is no scope of intersection.Although routes of individual looks nice but CVRP cost is relatively high and is 791.There is an effect of population size on performance in any population based method.For better understanding, the effect of population size is investigated for GA and VTPSO varying population size from 5 to 200.The population size in ACO was the number nodes in a particular cluster.While varying population, the number of generation was fixed at 100.Fig. 12 shows CVRP route costs on SW based clusters of n62-k8 problem.From the figure it is observed that performance of GA is highly dependent on population size.It showed very bad CVRP cost for very small population (e.g., 5) and became steady for population with 50 or more.VTPSO also found population dependent but performed relatively better for small population.At a glance, VTPSO outperformed both GA and ACO.

Conclusion
CVRP is a popular combinatorial optimization problem and interest grows in recent years to solve it new ways.Two popular ways of solving CVRP are constructive and clustering methods.Constructive method based algorithms create routes and minimize the cost at the same time.On the other hand, clustering algorithms require two phase to get an optimal solution.Constructive algorithms do not consider alternate solutions.Also constructive method performs better than clustering in most of the instances.Finally, GA, ACO and VTPSO are applied to generate optimal route with the both constructive and clustering algorithms' outcome.Although optimization technique generally not consider constructive approach, this study revealed that there is a scope to improve Savings solution through TSP optimization methods.Among the three route optimization methods, VTPSO is shown the best and performed well with SVP and SRE.
disclosure Statement Authors declared that there is no conflict of interest.

Figure 3 compares
Sweep and Sweep Nearest clustering.Fig. 3(a) shows the clustering of Sweep algorithm where distant nodes are inserted into the same cluster due to their polar angle.On the other hand, closest nodes belong to the same cluster in Sweep Nearest as shown in Fig. 3(b) and produces better cluster.The procedure of Sweep Nearest algorithm is shown in Algorithm 4.

Fig. 2 :
Fig. 2: Sweep clustering Algorithm 3: Sweep initialization •Compute the polar angle of each customer using Eq.(4).• Sort the customer according to their increasing order of polar angles.

Figure 2
Figure 2 shows forward sweep cluster creation starts from 0 0 and goes in anti clockwise direction.Algorithm 3 shows the sweep steps.

Fig. 3 :
Fig. 3: Comparison between Sweep and Sweep nearest clustering reference x + = (C x ,C y ) + (K*d x , 0) = (C x +K*d x ,C y reference x -= (C x ,C y ) -(K*d x ), 0) = (C x -K*d x ,C y ) reference y + = (C x ,C y ) + (0, K*d y ) = (C x ,C y +K*d x ) reference y -= (C x ,C y ) -(0, K*d y ) = (C x ,C y -K*d x ) Here, is the maximum value of X coordinate of all the clusters and is for the minimum value.and are for the Y co-ordinate.The clustering of nodes is same as Sweep or Sweep Nearest.K is a constant defined by the authors and it's called distant level parameter and in this study it is K = 5.Clustering in Sweep Reference Point algorithm is as same as Sweep or Sweep Nearest algorithm.

Algorithm 5 :
Fisher and Jaikumar Seed Selection • Divide the total angular planes by the number of vehicle and obtain cones equal to the number of vehicles.• Choose a customer from each cone with maximum demand or farthest from the origin and make that seed customer.• Assign a vehicle to each of the seed customer.

Fig. 5 :
demonstration of visiting seed alone and with a customer (a) Visitng seed (b) Visiting customer with Seed

Table 1
also presents effect of vehicle route optimization on both SVS and SVP.In general, optimization does not incur with Savings since it looks on overall CVRP cost while generating solutions.For better understanding, '-' indicates optimization is not found effective for the instances.From the table it is found that ACO is unable to improve CVRP solution for any cases of SVP and SVS.GA is found to improve solutions 22 and 16 cases for SVS and SVP, respectively.On the other hand, VTPSO improved all 27 cases for SVS and 18 cases for SVP.22 and all 27 cases.At a glance, solving CVRP with Savings, SVP + VTPSO is the best method.Finally, the interesting observation from the table is that there is a scope to improve Savings solution through TSP optimization methods.

Table 2 . CVRP cost for different clustering and optimization methods for A-VRP benchmark problems. a with cost indicates an additional vehicle was required to solve the problem Sl Problem GA ACo VTPSo SW Sn SRE SRd FJ SW Sn SRE SRd FJ SW Sn SRE SRd FJ
Results presented in Table2for SW is for both forward and backward where anti-clockwise and clockwise sweep have been applied to form clusters.In SW, clusters are created based on solely customer's angular position.One problem with polar angle clustering is customers separated widely may be inserted into the same cluster due to less angle difference.For this reason, Sweep Nearest (SN) was introduced which considers both angle and distance between customers to generate routes and thus produces better solution than SW.But in SN, for each insertion, distance between the clustered customers and remaining customers are computed for finding the nearest customer to insert.Also SN considers each customer as starting node and creates cluster set equal to the number of customers.As an example of n33-k5 problem, SN generates 33 clusters sets and selects the clusters set with the least CVRP cost.Thus SN requires more computation and iteration than SW and quite inefficient for large problem.Results in Table2for Sweep Reference Point considered two different kind of reference points rather than depot; every stop (SRE) and distant points (SRD).It is notable that reference point is depot in SW and SN.For a particular optimization method (e.g., GA) the difference in outcome among SW, SN, SRE and SRD are due to reference point alteration.For instance n33-k5 problem, when the reference point is depot the CVRP costs after optimization with GA are 791 and 709 for SW and SN, respectively.But, when reference point changes, the cost reduced to 712 and 700 for GA for SRE and SRD, respectively.Similar effect for ACO and VTPSO are also observed.Various reference node increases the optimality of the clusters for many instances.SRD works with 4 reference points where SRE considers every node except customers.Therefore, SRE is shown better performance than SW, SN and SRD.With VTPSO optimization, SRE+VTPSO is shown best CVRP cost for 13 cases out of 27 cases.