AGV optimal path planning based on improved ant colony algorithm

. Using the traditional Ant Colony Algorithm for AGV path planning is easy to fall into the local optimal solution and lacking the capability of obstacle avoidance in the complex storage environment. In this paper,by constructing the MAKLINK undirected network routes and the heuristic function is optimized in the Ant Colony Algorithm, then the AGV path reaches the global optimal path and has the ability to avoid obstacles. According to research, the improved Ant Colony Algorithm proposed in this paper is superior to the traditional Ant Colony Algorithm in terms of convergence speed and the distance of optimal path planning.


Introduction
AGV is now an important transportation equipment for modern logistics plants. This paper studies how to plan the optimal path for a single AGV in a complex logistics workshop.
The traditional optimal path planning method is based on A* algorithm [1] and Dijkstra algorithm [2], but both have large computational complexity, slow convergence rate and no real-time performance. With the development of artificial intelligence, neural networks [7] , ant colony algorithm [4] and genetic algorithm [3] have emerged. Among these methods, the neural network has the adaptive and learning optimization ability, and the optimized path of the AGV can be obtained by training and setting different numbers of network layers multiple times, but its generalization ability is weak and has no universality. The genetic algorithm has strong search ability, improves the genetic operator, introduces the applicability weight coefficient [5], and crosses and mutates to find the global optimal solution, but the efficiency is low. Due to Ant Colony Algorithm's heuristics and stabilization, many scholars have an in-depth understanding of Ant Colony Algorithms. Other scholars use the Dijkstra algorithm to plan the initial path of the AGV, introducing the node random selection mechanism, and finally uses the Ant Colony Algorithm to obtain the optimal path [6]. Or by changing the heuristic function, the global information is introduced into the algorithm to obtain the global optimal solution [7]. This paper, based on the improved the heuristic function of ant colony algorithm and pheromone volatilization coefficient, the global information factor and obstacle avoidance function are introduced to make the optimal path of planning more suitable for complex factory environment.

Constructing AGV working space
In the AGV path planning, the AGV transportation environment model needs to be established first. There are generally viewable methods, grid methods and undirected network diagrams. According to the real logistics workshop transportation, we apply the MAKLINK undirected network diagram and construct the AGV movable path according to the following rules.
(1) Not taking the height information of the space into account.
(2) The AGV is considered as a mass point.
The obstacles are expanded in all directions and abstracted into a convex polygon.Even an AGV is planned walking along the edge of a convex polygon, it will not be considered to make a touch with a real obstacle.
Under the above assumptions,we have constructed a set of AGV free moving spaces, as shown in Figure. To facilitate the path planning of AGV in the free space,we continue to construct groups of the connection lines in free space,as defined below: (1)Each connection line is not allowed to pass through the obstacles.
(2)The end points of the connecting line are allowed to be the vertex of the convex polygon of the obstacle or (3)Take the midpoint of each connecting line as the node that the AGV can drive.
The connection lines and nodes are constructed in the free space according to the above method, as shown in Fig.2 below.it works as the undirected network diagram

Ant colony algorithm improvement
In order to improve the AGV path planning,the shortest path in the case of obstacle avoidance is obtained. In this paper,we study the release of ant colony from the starting point S to the target point T. According to the density of pheromone left by the ant colony on its path, the safely global optimal short-distance route will be found and the AGV does not collide with the obstacle.

Ant colony algorithm transition probability improvement
According to the traditional ant colony algorithm,the k-th ant moves from node i to the next node j. The probability of transition is: allow-a set of nodes j which node i to all other nodes ; ij τ -the density of pheromone left by ants on path node i to node j. ij η -the transfer expectation value from node i to node j is a heuristic function of node j; α -Impact factor of pheromone density ij τ ; β -The impact factor of the expected value of node i to node j on the transition probability.
Heuristic function ij η is calculated as follows: (2) ij d -The distance value between node i and node j.
If the distance between node i and node j is shorter,the value of the heuristic function will be larger,then the transition probability of node i to node j becomes larger.
From the above analysis,the colony algorithm only consider the distance between adjacent nodes and nodes,and does not have globality, and whether there are obstacles between nodes is not considered in the algorithm. But the obstacle avoidance is the top priority of AGV path planning.First of all, the safe routes that AGV operates must be ensured,then the shortest-distance routes are allowed to discussed.
In order to add obstacle avoidance parameters to the ant colony algorithm,becoming a condition that affects the transition probability. Assume that there is an obstacle G between the nodes i(x i ,y i ) and the node j(x j ,y j ).Mark up the node i and node j connection line segments: l ij ;mark up the straight line of obstacle edges: l g ; also mark up the point of intersection of the line segment l ij and l g : A(x a ,y a );Both ends of the edge line of the obstacle G are marked up G 1 (x g1 ,y g2 ),G 2 (x g2 ,y g2 ) (x g2 >x g1 )respectively.
There is an obstacle G between the node i and the node j, when there are intersection points between the two straight segments.
In other words, if x g2 >x a >x g1 and x i >x a >x j . There are obstacles on the connection line of node i and node j.
Calculating The intersection A(x a ,y a ) created by the above two lines,then we can get:  greatly reduced by the heuristic factor amplification.At that time, the algorithm will select neighboring other accessibility nodes as the next path point.
In the above formula(10), jT d -the straight distance from the next node to the end point T.

Pheromone update strategy
After the ant colony algorithm starts,it is similar to the actual ant groups activity. While the ant leaves a pheromone at one node, the pheromone density on the connection path between the nodes also volatilizes until disappear.
In the original ant colony algorithm, by constructing a functional relationship between pheromone density and time. The calculation formula of the pheromone density at the next moment is as follows: In the above formula( In (16), Initial information density; N current -current iterations; N max -Algorithm maximum number of iterations.
After introducing the obstacle avoidance function, the improved pheromone volatilization coefficient ) (t ρ greatly increases the volatilization rate on the obstructed path, which makes the pheromone residual of the wrong node less,and reduces the transition probability of the wrong node. If there is no obstacle between the path selection,at the beginning of the algorithm, because the number of nodes passing through is small,and the ) (t ρ validation coefficient is small,the pheromone residual density oon the each nodes is large,which can be searched for more optimized path. Reducing the probability that the algorithm falls into the local minimum; as the algorithm reaches the later stage, the number of nodes in the path increases, and the pheromone volatilization coefficient increases which makes the algorithm converges faster. Substituting equation (16) into equation (13), the improved time-varying pheromone update method is: The improved ant colony algorithm flow chart is shown in Figure4.

Results
In order to verify the effectiveness of the improved ant colony algorithm in AGV global path planning, this paper constructs a 40m×50m logistics factory environment model, the starting point of AGV is S (5,35) and the target point of AGV is T(45,5). There are four convex polygons in the free space as obstacles.
In the initialization of the ant colony algorithm,the pheromone concentration is set=10, Initial value of the pheromone volatilization coefficient 0.1, and the initial value of the pheromone 0.004. The number of ants in the ant colony is 20, the number of heuristic factors of the heuristic function is 5, the pheromone influence factor is 1, and the maximum number of iterations is 100.
Based on the above-mentioned initial parameter settings, the traditional ant colony algorithm and the improved ant colony algorithm are tested respectively.  The above figures have shown only the results of one experiment. In order to eliminate the accidental factors, 50 simulation experiments were performed on the above two cases with the same initialization parameter settings. The experimental results are obtained in the following Figure9 and Figure10 respectively, the optimal path and convergence speed of the two are compared.
Calculating the average optimal path of each of the two algorithms and the number of iterations to reach the optimal path, as shown in Tab.1 below.
By the calculation, the average optimal path of the improved ant colony algorithm is 60.31m, and the traditional ant colony algorithm is 68.24m. The improved algorithm is shorter than the traditional ant colony algorithm in the average optimal path; the average number of iterations of the improved ant colony algorithm to reach the optimal path is 46 times. It has already converged. The traditional ant colony algorithm converges after 75 iterations. The improved algorithm has fewer iterations than the traditional ant colony algorithm does to achieve the optimal path. Table1.Average optimal path and optimal path iterations Average optimal path distance (m)

Conclusion
This paper has mainly proposed a method to improve the heuristic function in ant colony algorithm to deal with the optimal path for AGV in the turn of complex factory environment,avoiding obstacles, and to ensure safety and save transportation time. Through experimental simulation, it is verified that the improved algorithm can not only avoid obstacles directly, but also the optimal path and iteration times of the algorithm are better than the traditional ant colony algorithm.