Vehicle Routing Problem Based on Particle Swarm Optimization Algorithm with Gauss Mutation

: In order to solve the vehicle routing problem, this paper introduces the Gauss mutation, which is based on the common particle swarm algorithm, to constitute an improved particle swarm algorithm (NPSO). In the process of solving vehicle routing problem, the NPSO is encoded by integer and proposes a new way to adjust the infeasible solutions. The particles are divided into two overlapping subgroups, and join the two-two exchange neighborhood search to iterate. Finally, the simulation experiments show that the proposed algorithm can get the optimal solution faster and better, and it has a certain validity and practicability


Introduction
Routing Problem Vehicle (VRP) is a typical NP-hard problem, and proposed first by Dantzig and Ramser in 1959. Recent years, it has been a hot research field in computer science, operations research and combination optimization. Many problems in our daily life can be abstracted as vehicle routing problem, such as logistics distribution, power dispatch, postal delivery, school bus and routing problem, etc. This problem is full of important theoretical significance and engineering value on improving production efficiency and improving economic efficiency. Those years, many scholars have tried to introduce the general heuristic algorithm, genetic algorithm, ant colony algorithm for VRP problems and have achieved some good results [1][2][3].
Particle swarm optimization (PSO) is a global optimization evolutionary algorithm, which was put forward by Kennedy and Eberhart first in 1995 to solve the optimization problem of continuous domain function [4][5]. PSO is affected by the history optimum and global optimum of the particles, which can quickly converge to the global optimum or the local optimum. Since PSO has the characteristics of easy implementation, simple structure and strong robustness, many scholars have used it to solve the problem of discrete domain in recent years. For example, shop scheduling problems, etc. Based on the quantum particle swarm algorithm, crossover and mutation operation are added in [6] to improve the local search ability of the algorithm. In [7], a two-way vehicle scheduling problem model is established with the basis of the particle swarm algorithm and the mountain climbing operation is introduced, which effectively solves the problem of logistics distribution; In paper [8], a new particle swarm optimization algorithm is designed, which introduces the local neighbor mechanism and can optimize infeasible solutions. The algorithm obtains comparatively satisfactory results in solving the vehicle routing problem with time window. Paper [9] introduces multigroup parallel way and different initial methods are applied for each subgroup, besides the opposite population poor particle will be replaced by memory particle to solve the vehicle routing problem with time windows.
In this paper, based on the basic particle swarm algorithm, a new algorithm (NPSO) with the Gauss mutation is proposed. In the process of solving the vehicle routing problem, we introduce a series measures including the integer encoding (see [6]), how to deal with the infeasible solution and the neighborhood search so as to improve the ability of the particle to jump out of the unfeasible solution region and the local optimal position.

Vehicle Scheduling Problem Description and Mathematical Model
This paper investigates Capacity Vehicle Routing Problem for short vehicle routing problem, which is the most basic problem in all vehicle scheduling problems. Specifically described as follows: There are a central warehouse with No.0 and k vehicles in total with the capacity ) The mathematical model is established as follows: The constraints in the model ensure that the carrying capacity of each vehicle is not over the load, and each customer will receive the service until the last service is finished. Therefore, vehicle routing problem is just the minimum path in these conditions.

Particle Swarm Optimization
Algorithm with Gauss Mutation The standard particle swarm optimization algorithm is an optimization algorithm based on population, in which the individual is called particle and each particle's trajectory is determined by the Global best position ( Gbest ) and the particles' historical optimal solution ( Pbest ).
Let particle ) , , ( ) ( In the iterative process, the with the next iteration via the following equation: while velocity ) (t V i can be calculated as below: The learning constant 1 c and 2 c are popularly equal to 2. The inertia parameter w is an important parameter, which affects the performance of the algorithm. To make the algorithm better convergence to global optimal solution, we generally set 9 . 0 = w initially and gradually decrease to 0.4 in a linear way with the increase of iteration t , furthermore, it follows the equation as blow: where T is the maximum iteration number. From the particle's position change formula (2) and (3), the update information of each particle is derived from itself and the whole group. The particle can rapidly move to the global optimum and the local optimal in the iterative process. But in the late stage, the group diversity is reduced and particles are easy to fall into local optimum. In order to improve the particle swarm optimization algorithm, this paper, based on the original individual, introduces a Gauss perturbation term. Specific way is: set a mutation probability c P and randomly select individuals about c P NP× from the population with NP in total. Gauss mutation is applied for each individual in the j-th dimension under the mutation formula : where ij X is the j-th dimension of particle i X , j is a random integer, L is the parameter of Gauss mutation; ) 1 , 0 ( N is a random vector of the Gauss distribution, which is subject to a mean of 0 and 1 of the variance. There is something that we have to mention here. (5) is Gauss random perturbation term, which makes full use of the known information of the current such that it does not increase the diversity of the group and has advantageous to jump out of the local optima to carry on the global search, but also improves the search speed.

Improved Algorithm for Vehicle
Routing Problem

Particles of Encoding and Decoding
Using the particle swarm algorithm to solve practical problems, what we need to do first is the particle encoding. In this paper, we use the integer encoding method in [6].
Step1. The central warehouse with No. 0, N customer with No. 1 to N. Each particle is represented by a N dimensional , where i a is an integer from 1 to N, corresponding to the i a -th customer. Step2. Each particle according to the customer loading is not more than the vehicle capacity principle, and ultimately in accordance with the vehicle arrangement of customers to get the solution vector. if In this way, when vehicle passes all the customer point, the customer order is obtained and corresponding solutions vector is ]

Initialization of Particles
Initial particle generation process is: Step1. Generates a particle randomly and calculates its solution vector; Step2. If the final value of the solution vector bk is N, then the particle is a feasible solution. Otherwise adjusts the infeasible solution in accordance with the 4.4 and the particle will be discarded if the result of adjustment is still not feasible.
Step3. Repeat step 1 and step2, generate NP effective particles in total, and construct the initial group.

Standardized Processing of Particles
The particles are iteratived by the formula (2) (3) (5), the component of the particle will appear decimal number and negative number. In order to ensure that every vector of each particle has a corresponding path arrangement, the particle is required to be standardized. Specific method is follows: Step1. The value at each dimension of particle X can be obtained by the formula (2)

Adjustment of Infeasible Solution
Whether in the initial population or the algorithm in the iterative process, particles X may appear a lot of infeasible solution path (if the final value of the solution vector bk is not N). In order to guarantee the validity of the algorithm, this paper proposed a kind of adjustment strategy, which can adjust most of the particles to the feasible solution.Specific methods are divided into three parts: The first part.
Step1. Calculate the residual load of each vehicle ) , for the current infeasible solution and rank the sequence with the order from small to large: , we put customer j s into the vehicle l i . In the l i -th path to find the adjacent two customer points p and q such that the distance q s p j → → is the shortest and insert j s between p and q , modifying il q ∆ at the same time.
Step3. According to the step2, if all of the customers have been arranged, directly into the third part, otherwise enter the second part.
The second part Step1. Since the conduction in this step are similar to the step 1 at first part, so we omit here.
Step2. If , put the customer 1 s into vehicle 1 i directly, otherwise we find out the the minimum customer x of the vehicle 1 i with corresponding customer demand x g such that 1 1 . If 1 s x g g < , place 1 s at the location of x , consequently x becomes a customer point that is not scheduled and update 1 s g with x g . Step3. If the adjustment in step2 does not work for customer 1 s , then consider whether customer 1 s should be put the into the next vehicle, Of course, 2 s can be applied with the same way.
Step4. Repeat step2 and step3 until that we can not find out a vehicle to arrange 1 s or 0 = The third part Particle vector and the corresponding solution will be calculated after the above two parts. If the final value of the solution vector is still not N, then particle is judged infeasible and set the objective function as infinite.

Neighborhood Search
With the iterative process, the group is easy to fall into local optimum, but the global optimal solution is near the local optimum. In this paper, to ensure that the algorithm convergence to the global optimum more quickly, global optimal solution is searched by a two-two exchange neighborhood search per 20 generations.
The specific method is stated as follows. Set a neighborhood search parameter sd first, which represents neighborhood search times. Then randomly we select the th i − and th j − location of Gbest and exchange their position each time. After the adjustment in 4.4 to get the new particle Gbest . If Gbest is better than the previous Gbest , then replace Gbest with Gbest .

The Implementation of the Improved Algorithm for VRP
Particle swarm algorithm is applied to continuous space, while the VRP is a discrete integer programming problem, so we need to modify the algorithm for the specific application.The specific process is as follows: Step1. Particles initialization (1)Within the initialization method in 4.2, about NP particles in total are randomly generated and divided into two overlapping adjacent subgroups. The number of overlapping particles is , cd and the number of particles in each subgroup is 2 cd NP + .
(2)Calculate the initial value of each particle, the historical optimal solution ( Pbest ) and the global best position ( Gbest ).
Step2. Repeat the following steps until the maximum number of iterations.
(1) In each subgroup, every particle is updated by formula (2) (3), randomly select ) 2 ( c P cd NP floor ⋅ + particles to participate in the Gauss mutation by formula (5). Then we employ a standardize process for particle via the method in 4.3, and adjust unfeasible solution according to 4.4, calculate the fitness value.
(2) Replace overlap particles with optimal location in two groups.
(3) If current iteration number is a multiple of 20, then global optimal solution is searched by a two-two exchange neighborhood search with 4.5.
Step3. Finally, global best position is taken as the final optimal path, and the corresponding path length is the optimal path length.

Experimental Results and Analysis
In the present work, to compare results conveniently, we use Matlab 7.0 to write the program of particle swarm optimization (PSO) and the improved algorithm(NPSO) to solve the vehicle routing problem with the computer operating system 3.3GHz, 8.00GB, Win7.

Experiment 1
We take the data of paper [9] in our experiment 1. The vehicle routing problem has a central warehouse, 2 vehicles in total with the capacity of 8, and 8 customer points . The following table gives the distance and the demand of the customers. Now it is required to arrange a suitable driving route so that the total mileage of the vehicle route is minimized. This paper tells us that the optimal solution path length is 67.5 and the path is arranged as follows: Path 1: 0→4→7→6→0; path2: 0→1→3→5→8→2→0.  . PSO, NPSO runs each 20 times and compares with the results of the algorithm proposed by [9]. The test results are showed in table 2. From table 2, the algorithm in the paper [9] has 6 times without finding the optimal solution, and PSO has not found the optimal solution about 10 times, while the NPSO has only 3 times that the global optimal solution is not reached.The probability of NPSO finding the optimal solution is 85%. Table 3 gives a more comparison results of the NPSO and PSO, including the achieve times, the not achieve times, average running time, the best value(best), average value(avg), worst value(worst). Experimental results shows that the search success probability of the algorithm in paper [9] is 70% and PSO only 50%, however NPSO can reach as high as 85% and the search success probability increased significantly. Because of the existence of subgroup exchanges, neighborhood search, Gauss mutation, not feasible solution, the calculation time becomes relatively longer, but not so much. Consequently, we can get that the improved algorithm NPSO has a higher search efficiency and better stability. It is an ideal method for the VRP problem with fewer number of customers.

Experiment 2
In order to verify the effectiveness of NPSO in the process of dealing with more customers, this paper uses NPSO and PSO to run 10   With the increase of the number of customers, the search of the optimal solution is more difficult, and the effect of PSO and NPSO will have a certain effect. But from table 4, it can be seen that the results of NPSO have obvious advantages. We have to admit that there are many operations in NPSO and takes much time, but they are always in an acceptable range. Therefore, the experiment proves that the improved algorithm NPSO is effective and feasible to solve the problem of VRP.

Conclusion
In this paper, a particle swarm optimization algorithm with Gauss mutation (NPSO) and neighborhood search is designed to solve the vehicle routing problem. In the process of solving vehicle routing problem, NPSO uses the integer encoding divided into two subgroups respectively iteration and enhances the search ability of the group. Finally, the simulation experiments show that the proposed algorithm can get the optimal solution faster and better. However, when solving the VRP with a larger scale, the algorithm in this paper will be more difficult with the customers increasing and the searching ability of the algorithm still needs to be improved.