Optimization of Capacitated Vehicle Routing Problem by Nested Particle Swarm Optimization

: Problem statement: Vehicle routing problem determines the optimum route for each vehicle as a sequence of visiting cities. The problem has been defined as NP-hard and exact solution is relatively difficult to achieve for real time large scale models. Though several attempts to solve the problem were made in the literature, new approaches may be tried to solve the problem to further reduce computational efforts. Approach: In this context this study focuses on maximum utilization of loading capacity and determines the optimum set of vehicle routes for Capacitated Vehicle Routing Problem (CVRP) by a Nested Particle Swarm Optimization (NPSO) technique. The algorithm is implemented as Master PSO and slave PSO for the identification of candidate list and route sequence in nested form to optimize the model. Results: Benchmarking data set of capacitated vehicle routing is considered for the evaluations. The total distance of set vehicle route obtained by the new approach is compared with the best known solution and other existing techniques. Conclusions/Recommendations: The NPSO produces significant results and computational performance than the existing PSO algorithms. This newly proposed NPSO algorithm develops the vehicle schedule without any local optimization technique.


INTRODUCTION
The Capacitated Vehicle Routing Problem (CVRP) exists in various real-time cases with constraints of vehicle capacity, number of visits, time windows for the customers and route length. The CVRP problem (Dantzig and Ramser, 1959) was first formulated as a NP-hard problem and it attracted several researchers' attention to propose exact, heuristic and metaheuristic techniques. A constructive heuristics was proposed (Clarke and Wright, 1964), which integrates cities on maximum saving theory to determine the minimum travel distance of a vehicle in the model. The CVRP attracted further attention from the researchers (Cordeau et al., 2002;Lysgaard et al., 2004), the model was formulated and well defined.
In real time logistics transportation is the key operation, model building and developing solution techniques for CVRP is the basic step to solve complex models. In enumeration CVRP requires very high computational operations and time to find the optimal solution hence it is declared as NP-hard problem (Haimovich et al., 1988) and solved by various metaheuristics. Metaheuristics are originally defined as solution methods that orchestrate an interaction between local improvement procedure and higher level strategies to create a process capable of escaping from local optima and performing a robust search for a solution space (Glover and Kochenberger, 2003), which produces result more close to the optimum value with less time. The CVRP model was solved by simulated annealing (Alfa et al., 1991), Tabu Search (Thaillard, 1993;Gendreau et al., 1994), Genetic Algorithms (Potvin and Bengio, 1996;Baker and Ayechew, 2003;Sarabian and Lee, 2010;Nazif and Lee, 2010 ), Ant Colony Optimization (Bullnheimer et al., 1999) and recently by discrete and classical version of Particle swarm optimization (Chen et al., 2006;Ai and Kachitvichyanukul, 2007) techniques. These metaheuristic techniques implemented along with local optimization to obtain the results, but as a further improvement, exclusive classical PSO without local optimization is implemented in this study. CVRP model: Capacitated Vehicle Routing Problem (CVRP) was defined (Cordeau et al., 2002;Lysgaard et al., 2004) as a Set of n customers served from the common depot or warehouse of 0 , for a non negative q i customer demand by N number of vehicles of having capacity of Q and distance or cost of C ij between two nodes of i and j by vehicle k. The objective of CVRP is to determine optimum route schedule which minimizes the distance or cost with the following constraints: • Each customer is served exactly once by exactly one vehicle • Each vehicle starts and ends its route at the warehouse • The total length of each route must not exceed the constraint • The total demand of any route must not exceed the capacity of the vehicle

MATERIALS AND METHODS
The CVRP mathematical model was formulated based on previous study (Bodin et al., 1983) to explain the objective function, vehicle schedule with constraints. The objective function is expressed in Eq. 1, which aims to minimize the sum of set the of routes visiting by the vehicles in the model. The customer is exactly visited only once by a vehicle and it is ensured by the Eq. 2 and 3, the vehicle visit between two customers is assigned as k ij X =1 otherwise "0" to obtain the objective function. The vehicle tour starts at warehouse, visit customers on sequence and finish with the warehouse. In this tour, the vehicle needs to visit the cities continuously and Eq. 4 ensures the continuity visit among the cities in the route: Nested particle swarm optimization: Particle swarm optimization: Particle swarm optimization is a metaheuristic introduced (Kennedy and Eberhart, 1995) based on the simulation of the social behavior of birds within a flock. The advantages of PSO are ease in implementation compared to other evolutionary methods and only few parameters need to be adjusted in the algorithm. Similar to other evolutionary algorithms, PSO also has a fitness function that takes the particle's position and assigns to it a fitness value. The position with the minimum fitness value in the entire run is called as social or global best. Each particle keeps track of its minimum fitness value, called its cognitive or local best. Each particle is initialized with a random position and random velocity. The velocity of the particle, each of dimensions, is accelerated towards the global best and its own local best. The inertia weight has a well balanced mechanism with flexibility to enhance and adapt to both global and local exploration abilities. The detailed study of applications, technique and models are presented (Kennedy et al., 2001;Clerc, 2006) to further enlightened the scope of PSO. The CVRP benchmarking problem was solved by hybrid discrete PSO (Chen et al., 2006) with Simulated Annealing (SA) algorithm. A classical version of PSO (Ai and Kachitvichyanukul, 2007) was introduced to solve CVRP and further (Ai and Kachitvichyanukul, 2009) proposed PSO based on GLNPSO to solve CVRP by two different solution representations namely; SR-1 and SR-2 and also local optimization is incorporated on PSO solutions. In another PSO study, Chen demonstrated the power of PSO by getting exact solution for up to 67 cities and inexact solution for above 67 cities cases and however these methods consumes more computational time. Further in PSO (Ai and Kachitvichyanukul, 2009) the SR-1 and SR-2 was proposed with local improvement technique, SR-2 produced relatively better result and it attained moderate consistency in producing exact result for the data set.
NPSO algorithm: The present study proposes two stage implementations of PSO to solve the given CVRP problem. Initially feasible individual clusters are formed using sweep algorithm and the clusters are analyzed for arriving of optimal vehicles routes. Since the clusters and the corresponding routes formed found to be not optimal, route optimization is carried out by merging multiple successive clusters. PSO is implemented to reorganize the clusters (Master PSO) as well as optimize each cluster for optimum route (Slave PSO) in nested form called as nested PSO (NPSO).
This NPSO algorithm is functioning in first stage as Master PSO and in second stage as slave PSO to feed candidate list and to formulate vehicle routes within the candidate list respectively. NPSO pseudo code is shown in Fig. 1. Initially cities are clustered by sweep algorithm to the individual route and multiple clusters are merged to form a candidate list. While clustering, the sweep algorithm prefers cities on polar coordinate order to fill maximum capacity of vehicle and during cluster formation last prioritized city may cause violation of loading constraint, however subsequent city preferred to ensure maximum filling condition of the vehicle. The multiple clusters formed by sweep algorithm are merged to form the candidate list as mentioned in the Fig. 2. Master PSO in initialization process selects candidate list and assigns random number to each city to form a particle as given in Table 1. In subsequent process random numbers are arranged in the ascending order on rank basis along with the corresponding particle as shown in Table 2 and in the candidate list particle are grouped for each vehicle based on the capacity say vehicle set 1, vehicle set 2. Slave PSO receives the each set information and solve as Travelling Salesman Problem (Srichandum and Rujirayanyong, 2010) to determine shortest distance of each route separately as listed in Table 3. As mentioned in Table 3, Step-1 and Step-2 particles are arranged on rank basis by slave PSO to calculate the required fitness value of shortest route of each vehicle.
The shortest distance of each route calculated by slave PSO subsequently forwarded to the master PSO as a nested function. Master PSO updates the route distance and calculates overall fitness function, set of vehicle routes for each population by the Eq. 1. In each iteration local best and global best value are updated to achieve the optimum solution. Updating Particle velocity is governed by Eq. 5 and the new position of the particle is controlled by Eq. 6 in both master PSO and slave PSO. The optimum sets of vehicle route are only possible to obtain in the merged condition of clusters or with the best candidate list. In Fig. 2 formation of cluster, candidate list and route formation are illustrated.

RESULTS
Benchmarking capacitated vehicle routing problem data set has been considered for performance evaluation of the algorithm. The algorithm is implemented through advanced Java language in NetBeans IDE 6.5 environment in PC with Intel P4, 3.4 GHz, 2 GB RAM. Each instance data set has run for five replications and the best results are tabulated.
The PSO Parameters are chosen based on the available literature (Kennedy et al., 2001) and NPSO algorithm performance. The following parameters implemented for Master PSO: number of iterations = 5000, acceleration coefficients c 1 and c 2 = 2, inertia weight = 0.41, population=20 and Slave PSO: number of iterations = 2000, acceleration coefficients c 1 and c 2 = 2, inertia weight = 0.41, population= 20.
In this benchmarking data set Euclidian distance of the cities are calculated with two decimal accuracy and same accuracy maintained for individual vehicle route. The total distance covered by all the vehicles is calculated and decimal value ignored for tabulation. The sixteen benchmarking data set of experimental (Chen et al., 2006;Ai and Kachitvichyanukul, 2009) results are listed in the Table 4 along with the computational time.

DISCUSSION
The results are compared with the Best Known Solution (BKS) of the data set. In this data the number of cities varies from minimum of 32 to maximum of 134 and number of vehicle varies from minimum of 3 to maximum 10. The comparison shows, Chen et al. (2006) results are matching with exact solution for seven instances and in remaining instances, a maximum deviation of 53 units in Fn135k7 instance is observed. Whereas Ai and Kachitvichyanukul (2009) study produced exact result for ten instances with maximum deviation of 11 units in An60k9 instance and NPSO produced exact result for all instances.
The computational performance analysis of algorithm is shown in the Table 5 in terms of minimum time, maximum time, mean and standard deviation. Chen et al. (2006) has consumed maximum time of 1743 second for Mn121k7 instance, Ai and Kachitvichyanukul (2009) has consumed maximum time of 258 second for Fn135k7 instance, NPSO consumed maximum of 165 second for Fn135k7 and in only 4 second extra time consumed for Pn101k4 instance. The existing PSO (Chen et al., 2006;Ai and Kachitvichyanukul, 2009) algorithm result shows the deviation of few instance with best Know solution and more (Chen et al., 2006) and moderate (Ai and Kachitvichyanukul, 2009) time consumption with the new proposed NPSO. The performance analysis indicated in Table 5, reveal the minimum range, minimum mean and minimum standard deviation is falling with NPSO among the other technique. The proposed nested operation of PSO is superior, eliminates local improvement technique while comparing to other exiting PSO algorithm.

CONCLUSION
The study focused on implementation of Nested Particle Swarm Optimization (NPSO) algorithm at two levels as master PSO and slave PSO for solving capacitated vehicle routing problem. The new NPSO algorithm was tested in terms of solution quality and computational performance by comparing with other published data. The NPSO solution quality and computational performance were found to better than the existing PSO algorithms which determined exact result with less computational time. As an extension, NPSO can be introduced to other variants of VRP models with suitable modification.