An Improved Ant Colony Algorithm and Its Application in Vehicle Routing Problem

Optimal path planning is an important issue in vehicle routing problem. This paper proposes a new vehicle routing path planning method which adds path weight matrix and save matrix. The method uses a new transition probability function adding the angle factor function and visibility function, while setting penalty function in a new pheromone updatingmodel to improve the accuracy of the route searching. Finally, after each cycle, we use 3-opt method to update the optimal solution to optimize the path length. The results of comparison also confirm that this method is better than the traditional ant colony algorithm for vehicle routing path planning method.The result of computer simulation confirms that the method can plan a more rational rescue path focused on the real traffic situation.


Introduction
Vehicle routing problem (VRP) is one of combinatorial optimization problems and VRP can be turned into other application problems; for example, Chen and Wang have turned VRP into tour planning problem [1].A typical VRP can be described as follows: a warehouse that offers services to different positions of customers at the lowest cost path planning.It has real economic significance in many fields, such as transportation scheduling, routing, railway transportation, and other practical problems.Currently, heuristic algorithm is the main method for solving vehicle routing problem.Heuristic algorithm can be divided into simple heuristic algorithm, two-phase heuristic algorithm, and artificial intelligence methods.
Vehicle routing problem has successfully applied in many areas, such as Li et al. [2] and Malekly et al. [3].They solve the uncertain and ambiguous problem in vehicle routing problem using fuzzy set theories.Toth and Vigo [4] considered VRP as a significant part in logistic handing and grouped the methods that have been found to solve the problem of VRP.Kim et al. [5] divided the waste collection business into different areas and proposed methods to solve these problems in VRP.Many researchers have proposed heuristics or metaheuristics algorithm for efficiently solving the vehicle routing problem.Semet and Taillard [6] designed the taboo algorithm considering time window and different types of vehicles, which mainly used methods to generate the initial solution, then optimize the initial solution with taboo search algorithm.It is a local neighborhood search for an extension.Cordeau and Laporte [7] studied simulated annealing algorithm for the VRP, they proposed a simulated annealing method which is suitable for solving the vehicle routing problem and shows the advantage of accuracy and the speed of search convergence.Genetic algorithm is good for solving combinatorial optimization problems.Niazy and Badr [8] and Zulvia et al. [9] use genetic algorithm (GA) encoding to solve VRP problem.Niazy and Badr solved the complexity of CVRP with the goal of minimizing the total distances using the cellular genetic algorithm (CGA).Multiple ant colony algorithms are proposed by Gambardella et al. [10] and Bell and McMullen [11] to solve the time window of the multiobjective VRP problem.Ant colony optimization [12][13][14] (ACO) was successfully applied to emergency rescue [15,16], which is an ideal heuristic algorithm and capable of intelligent search and global optimization.
In this paper, we apply ant colony optimization algorithm to the path planning of emergency rescue vehicle.This paper   [17,18] to shorten the length of the rescue path.Use benchmark test [19] to compare the results with the literature [20] in the algorithm to verify the effectiveness of the algorithm.

Problem Description and Mathematical Model
Disasters such as earthquakes and floods are sudden and unpredictable, which cause serious sufferings for people.How to find an effective and short rescue path for the affected nodes in the limited time after the disasters become the focus thing?Before making vehicle routing problem path planning, we first establish reasonable free space model.Capacitated vehicle routing problem [21,22] (CVRP) was defined as a transportation and a distribution problem with the constrained of vehicle load, travel time or distance.
Research on this model is the longest, and the results are achieved the most.Meanwhile, there are a large number of heuristic algorithms for solving this problem.Thus, we established CVRP model for disaster emergency response.
Vehicle routing problem can be modeled by describing as the following.There is a rescue center  0 to deliver goods to  disaster areas.We suppose that the th area sent by the rescue center's  vehicle, where each vehicle can carry  ton relief supplies, demands   ( = 1, 2, . . ., ).The goods are sent to each disaster area and finally back to the rescue center.If we know   ≤   , then we look for the shortest length that meet the demand of the affected node.It can be described as an undirected graph  = (, ), where  represents the layout of affected area after the occurrence of disasters,  is the vertices set corresponding with affected spot and rescue center, and  stands for any edge of two nodes.
In this paper we define several constraints as follows: (a) the start and the end of each route are at the rescue center  0 ; (b) the total amount of relief supplies loaded by vehicle must not exceed the maximum affected node of vehicle load; (c) each affected node is visited once by only one vehicle in the limited time.
Figure 1 shows a work environment instance of the vehicle path planning.In this example, a rescue center  0 , the number of vehicles is 5 ( = 5,  means the number of vehicles); and the affected node is 15 (V = 15).Table 1 shows the affected nodes' coordinates and each area's relief supplies demands of Figure 1, and the rescue center coordinates are (0, 0).The units of axes are meters,  represents the -coordinate, and  represents the -coordinate.The numbers 0, 1, 2, . . ., 15 sign each area.
When choosing the right path, the more spacious, smooth road is more likely to be selected; thus, road grade, traffic congestion levels, traffic, and other factors make up how to try to meet various requirements to plan a trip with a more reasonable path problem.When disaster occurs, how timely and reasonable given the rescue path is essential.Then the vehicle path planning is necessary to consider the following aspects: path length, road conditions, traffic smoothness, single time constraint that means each area can withstand the maximum rescue time, and weather conditions.Pheromones substance such as more than one rescue center and total time and length constraints needs to be pointed out in the paper.According to the [16] proposed method to calculate weights matrix based on AHP, as is shown in Table 2, the number 0 node represents rescue center.

Brief Introduction of Ant Colony Optimization Algorithm
3.1.Ant Colony Optimization Algorithm.Ant colony optimization algorithm and the traditional ant colony algorithm are different in these three aspects as follows.That traditional ant colony algorithm is of slow convergence and is easy to fall into local optimum and stagnation in the vehicle path planning applications, while improved ant colony algorithm solves these problems in the following aspects.
(1) State transition probability function: the transfer rules that ants select the next affected node are modified, which is calculated as follows: where   represents pheromones substance on the path edge (, ),  stands for visibility,    is transition probabilities of the th ant from the affected node  to affected node , the user parameters  and  are adjustable parameters that determine the relative influence of the pheromone and the visibility in the transition probabilities,  means the relative importance of the path weights in the transition probability, and allowed  represents the neighbor affected node of affected node  that th ant has not yet visited.Here introducing the path weight value   that stands for the weight value between affected nodes and the rescue center,  = 1/(  +  , 0 ) replaces the traditional visibility function; that is,   = 1/  , where the value   means the distance between  and  and the value  , 0 is the distance between the affected node  and the rescue centre node.To modify visibility function is to enhance the ant's perception of rescue centre node in the current affected node, which will guide the ants to move and therefore avoid falling into local optimum search results and reduce the search time.Where   stands for the save distances between nodes, both the affected nodes and the rescue centre.The save matrix calculated by the formula: After adding this factor, it may avoid out the connection of a direct connection with the affected nodes, without through disaster rescue center node, meanwhile shortening the length of the path.Shown in Figure 2 (2).When  is between [0, /2],   () is a constant 0.00001, which is for escape when an ant is faced with a dead-end street.Consider Ants choose the next affected node  in accordance with (3).
Where  is determined by (1),  is a random variable number between 0 and 1,  0 is an adjustable parameter which is between 0 and 1, and here we define  0 as 0.05.When (3) satisfied the condition  >  0 , it chooses the next access node in accordance with (1).
There are two rules in global update.One is the local optimal iteration and the other is the global optimal iteration.
(2) Update the local pheromone substances in accordance with the following: In the progress of searching paths, according to state transition rules, ants apply (4) to choose route whose pheromone should be updated.After all ants move a step, local pheromones update once.Where   (0) represents the initial value of pheromone of edge (, ), usually a small positive number to prevent ant colony from falling into local optimal solution prematurely,  is a user-defined coefficient, which stands for the degree of global pheromone evaporation.
(3) Update the Global pheromone substances with the following: , if edge (, ) is part of the best ant's route at this iteration, 0, otherwise, (6) where   ( + ) represents pheromone of the best path (, ) from time  to time  +  after all of the ants complete a trip, which is unlike traditional ant colony algorithm.In (6),  represents length of the best moving path corresponding to ants crawling at this iteration.After iteration, update the global pheromone by (5).
Meanwhile, to take advantage of convergence of the algorithm, this paper adds incentive factor  in pheromone global updating.It is calculated by the following: is a positive constant whose value can be up to the same order of magnitude as current working space.In this paper set  = 1000.Thus, it reduced the complexity of the search, and improved the accuracy and convergence speed of the route search. + is the shortest path length for moving till previous cycle.If the path length of optimal solution in this cycle is shorter than optimal solution having been found, then  > 0, otherwise  < 0, which avoids falling into local optimum.

The Steps of Path Optimization
Step 1. Initialize phase.: the number of ants, NC max: the maximum number of iterations, the number of iterations NC = 0, best len: the current optimum path length, and set concentration of pheromones on each node at initial time (0.001), all the ants at the rescue centre  0 ,  indicates the vehicle load, and weigh[ ] stands for the demand of affected nodes.Set each ant a tabu list array tabu[ ] to store the city that the ants have already visited; that is to say, the cities will not be visited in the next choice, the path length passed ant.[𝑘].pathlength, array ROUTES[][] stored the th ant's route where the path has already been visited in the th iteration, and add  0 to each ant's tabu list ( = 1, . . ., ,  = 1, . . ., NC max).
Step 3. Calculate the next affected node the ant can choose and exclude the affected node in tabu list or the obstacle affected node.Array to visit[ ] and Len to visit recorded separately the affected node's mark the ants can visit and the number of the affected node, while Len to visit ≥ 1 and  ≥ weigh[ ] go to Step 4, otherwise go to Step 7. Step 5. Perform a local updating rule according to (4).
Step 6. Record the current iteration of the shortest route, update best length with the best ant's path and record the optimal path G best route[ ], while update the optimal solution in accordance with 3-opt method.Step 8. Update global concentration of pheromones of each node by optimal ant in accordance with ( 5), (6), and (7).
Step 9. Set NC ← NC + 1.If NC < NC max and the entire ant colony has not converged to take the same path, then set all the ants at the rescue node  0 again and go to Step 3. If NC < NC max and the entire ant colony has converged to take the same path, or NC = NC max, then finish the cycle and output the best route.

Experiment of Computer Simulation and Analysis of Results
In this part, we use the established model shown in Part 2 to do the simulation experiment of the optimal algorithm.The experiment runs on Windows XP Professional SP3 (symmetric multiprocessor system) and the compiler environment is MATLAB R2009a.Each parameter is set to NC max = 5,  = 0.85,  = 1.0,  = 1.0,  = 17,  = 100.0,and  = 20.
All of the parameters are under the optimal experiment in the literature [15].The results of the simulation are shown in Figures 3-8.
In order to illustrate the superiority of the proposed method, we use the example above to compare the results of three methods, including traditional ant colony algorithm, the literature [15], and improved ant colony algorithm.Figures 3, 4, and 5 shows the results that each polygon means one route.From Figure 3, we can see the path planning of traditional ant colony algorithm, the best length is 58.52 m, the route is When using the weight matrix, we define that if the two roads are not connected, the weight value is 0, then the higher the weight value the better the clearer road.The search result is shown as Figure 4, the best length is 48.49m and the optimal path is 0 This paper introduced angle factor in the transfer rule, because in an emergency we need to avoid obstacles to the road to gain more time.Thus, we choose the next node where the offset angle is small and closer to the direction of the transfer, which is more likely to avoid obstacles in the roads.The save matrix is to compensate for the optimal path length increasing brought by a perspective to factors.Meanwhile, after each cycle, update pheromone by reward function and use 3-opt algorithm to the optimal solution method to update the global optimal path length.Results shown in Figure 5, the best length is 41.61 m and the optimal path is 0 In this instance, the literature [15] and this paper's proposed algorithm's optimal path length are best among the three methods.After adding the angle, the vehicle's route is more concise and clear, while the new transfer rules and pheromone update rule, this algorithm only sent four rescue vehicles to meet relief needs which is more reasonable.
Convergence property, where Figures 6, 7, and 8 show their convergence property.Blue line shows the optimal solution of the traditional ant colony algorithm convergence process, the black line is the literature [15] in the convergence process, and the red line is this paper's improved ant colony algorithm convergence process.As can be seen from the figure, in the same five iterations, the curve of traditional ant colony algorithm fluctuates, the optimal solution is 58.52 m, the literature [15] proposed optimization algorithm and the algorithm this paper proposed converges within 5 iterations.From the view of convergence, improved ant colony algorithm overcomes the shortcomings of slow convergence, and the optimal solution (41.61 m) that is superior to the literature [15] algorithm is the optimal solution (48.49m).
In this part, the simulation instances from benchmark [10] were tested by the above algorithms.We labeled the example of examples that data points were non-decreasing order as I1, I2, . . .,I14, where the conditions for instances I1-I5 are similar to the instances I9-I14, while instances I6-I10 and I11-I12 involve limited routing path length and service time.We conducted five experiments, the first group was the traditional GA, the second group was the traditional ACS, the third group was the literature [15], the fourth group was the literature [20], and the last group was for this paper proposed optimization algorithm.All parameters were under experimental environment of the optimum algorithm, shown in Table 3.Here parameters   and   are for Crossover probability and mutation probability in the GA algorithm respectively.Each experiment was performed 20 times, respectively, and compared with each optimal and  Figure 11 shows the average running time of the five algorithms in various numerical examples from I1 to I14.To compare against GA and ACS, our proposed algorithm has higher overhead time.However, it can still be able to obtain good solutions in a short time, and all the solving time is within 100 seconds.At the same time, our proposed algorithm performs better than [15] and [20].From Figure 11, we can see that from I1 to I8, [15,20] and our proposed algorithm have the almost same computation speed; however, from I9   to I14, our proposed algorithm takes less time than [15,20] significantly.
As is seen from the experimental results, the optimal and the average results of the paper proposed algorithm are superior to other four methods clearly, comparison in terms of simulation time, our proposed algorithm also has advantage of average running time, as the problem size increases, that is to say, from I1 to I14 the size of examples increase; this advantage has become increasingly apparent.Taken all together, our proposed algorithm draws the best performance and in the future it can be applied in much more complex environments as well.

Conclusions
In this paper, we established a new model of disaster emergency response, which adopts new transfer rules, adds the path weight matrix, save matrix, angle factor functions, and new visibility functions, at the same time, updates pheromone model with reward function, overcoming the shortcomings that are of slow convergence and are easy to fall into local optimum and stagnation of ant colony algorithm in the vehicle applications, thus reducing the complexity of the search process.We use 3-opt method to update the optimal solution to shorten the length of rescue route.Finally, the computer simulation experiments confirm the correctness and validity of this method, and due to considering the actual road conditions and other factors such as the angle, which is more reasonable when applies to solve real emergency rescue.

Figure 1 :
Figure 1: A real example of CVRP.

Step 4 .
Use (3) and roulette method to select an affected node to visit for each ant  ( = 1 to ).And move ant  to this node.Meanwhile, update the ant k's length of path, route: ROUTES[][] = add[ROUTES[][], to visit], the ant moves the next affected node to visit, put to visit in ant k's tabu list array tabu[ ], and  =  − weigh [to visit].

Figure 2 :Figure 3 :
Figure 2: A view of added angle factor.

Figure 6 :Figure 7 :
Figure 6: The convergence curve of ant colony algorithm path planning.

Figure 8 :
Figure 8: The convergence curve of improved ant colony algorithm path planning in this paper.

Figure 9 :
Figure 9: The simulation results of best length.

Figure 10 :
Figure 10: The simulation results of average length.

Figure 11 :
Figure 11: The simulation results of average time.

Table 1 :
Distance map and delivery of CVRP example.
,   () is an angle factor, which is the angle between the vector [   → Node  1 Node  ,   → Node  Node  ]; Node  1 stands for the previous node before visited affected node , the value Node  that the black point represents the current visiting affected node , Node  represents the next visiting affected node , red arrow direction equals with the Node  , and   () is calculated as

Table 2 :
The path weight matrix.