# High Performance Computing Simulation of Intelligent Logistics Management Based on Shortest Path Algorithm

Authors: Zongchao Wei
Journal: Computational Intelligence and Neuroscience
 (2022)

---

## Abstract

At present, e-commerce drives the logistics industry to develop greatly, but at the same time, there is a huge demand in this field, such as lower cost and higher efficiency. Facing the needs of logistics management development, it needs the blessing of intelligent technology, which involves countless fields at present. Intelligent logistics management has become a hot spot at present. What needs to be solved in this respect is how to shorten the transportation distance and save costs. To solve this problem, this paper proposes to introduce the shortest path algorithm. This paper compares the Dijkstra algorithm with the A∗ algorithm under the background of logistics management and finds that the latter is more suitable for this field with huge amount of information. In order to improve the performance of the A∗ algorithm, this paper introduces ant colony algorithm, which can better avoid obstacles. Combining these two algorithms, a ∗-ant colony algorithm is obtained. The algorithm absorbs the advantages of the two algorithms, while maintaining high efficiency and good stability. These characteristics are very satisfying in the field of logistics management. Through the performance test and simulation experiment, it is concluded that the algorithm has excellent optimization ability and can reduce the cost for this field.


---

## Body

## 1. Introduction

The awakening of e-commerce also awakens the development of logistics industry. At the same time, China pays great importance to logistics management. It is also the idea that the country wants to innovate and change to collide with the field of intelligent technology and logistics management. With the addition of intelligent technology, it can solve the shortest path problem well, thus reducing the cost. The shortest path algorithm is a good medicine to solve this problem. Under the test of the traditional shortest path algorithm, it is found that it can no longer meet the current problem, so it is necessary to innovate and change the algorithm. And, this is undoubtedly the mutual achievement of the two. The level of logistics management can be improved only when the two develop mutually.In literature [1], the shortest path problem has penetrated into a wide range of fields. The Dijkstra algorithm is not perfect. First, its exit mechanism is not applicable to undirected graphs; second, the problem of adjacent nodes is a great hidden danger; third, the problems of multivertex are not fully considered. In literature [2], the k-shortest path algorithm also has some defects in some aspects, and the alternative path obtained by the algorithm cannot be proved to be substantially different from the original path. In reality, network extension technology is usually used to solve the problems caused by turning restriction, but this method also has defects. Therefore, researchers introduce links to improve and solve this problem. The advantage of this model is to eliminate overlapping paths and find alternative paths, which can finally reduce similarity and only rely on its own nodes and links to complete the operation. In literature [3], distributed algorithm gives the shortest path problem a shot in the arm, the most important component of which is BHC. The related problems can be solved by calculating the time complexity. For example, each node can use multiple processors and how much time complexity can be calculated through these processors, so that this kind of problem can be well solved. In literature [4], the network shortest path problem is relatively simple to solve. The fact is that a single objective function is incapable of describing problems appropriately in real life. While pursuing fast time, it may bring high cost. This is like a seesaw, but it still needs a way to balance the seesaw. The force that can balance the seesaw is Pareto. In literature [5], in the field of genes, this algorithm has also made some achievements. Dijkstra algorithm is like a good medicine to diagnose and treat gene-related problems. And, all genes in this path are candidate genes. Only a few genes were selected in the end. In literature [6], all objects have their own sizes and shapes, and researchers suggest that this algorithm has achieved little in motion planning. The idea of shape decomposition is put forward to solve this problem. Decomposition and iteration are a pair of enemies, and it is their choice to have more you and less me. Then, the geometric algorithm is the judge to judge whether there will be a war between them. If there is no hidden danger, the shortest path can be calculated by grass fire algorithm. In literature [7], researchers combine the graph algorithm with active contour restoration. Finding the global minimum is the trick of graph algorithm. Generally speaking, ordinary active contours cannot be run with three or more pixels in mind. Therefore, the researchers put forward a correct definition of deformable template and use the Dijkstra algorithm to track the contour. In literature [8], in order to study the relationship between user interface and satisfaction, the Dijkstra algorithm is used for experiments. Apple and Android are the two kings of mobile models. Students were recruited to conduct experiments on this. After testing, it was found that IOS was more useful than Android for Dijkstra algorithm. In literature [9], China has summarized all aspects of logistics. After analyzing the logistics demand, the researcher proposed to introduce relevant technical software support. For the problems related to the path, the relevant personnel and institutions decided to adopt logical data structure. In literature [10], the article agrees that intelligent technology is unshakable. Therefore, we can only find another way to change from a strategic perspective. At the same time, it shows that the addition of intelligent technology has brought many qualitative changes to this field. Compared with traditional methods, intelligent logistics application has been recognized as the best management method at present. In literature [11], the Internet of Things and cloud computing have propped up a sky, sheltering intelligent logistics from the wind and rain. In literature [12], in order to keep up with the development trend of intelligent logistics demand, it is necessary to shorten the cycle and cost while designing the system. In the whole process, there must be methods to implement both people and things. A series of technologies such as GPS have also been applied. Therefore, intelligent logistics will provide a good ascending ladder for e-commerce. In literature [13], in medical use, logistics management is also very important. Hospitals will encounter a series of problems when quoting a set of logistics management mode, which researchers need to analyze and popularize in hospitals after using the logistics management mode. At the same time, this model also needs to be improved. In this way, hospital consumables can be reduced, and costs can be reduced. In literature [14], it is recognized by most enterprises that production and transportation become one. Cost and time are important factors in the whole process. If you want to taste the sweetness, you have to give up. This price is the control of information. For logistics management, the ultimate destination must be gradually networked and then set different frameworks according to different needs. In literature [15], Internet of Things has been the backbone of logistics development, which is the development trend of the times. Researchers need to analyze and predict the architecture, which will be a historic change.


## 2. Shortest Path Algorithm

As its name implies, the shortest path algorithm is a corresponding algorithm proposed to solve the shortest path problem, and the shortest path is the path with the minimum sum of the weights of edges in the process of starting from one vertex to another in a graph.


### 2.1. Dijkstra Algorithm

Dijkstra algorithm is a classical algorithm for solving the shortest path, and the core of its algorithm is the order of the length of the path. The main purpose of this algorithm is to choose the best route in the logistics transportation nodes.The Dijkstra algorithm flow is shown in Figure1:Figure 1
Flow chart of Dijkstra algorithm.The final shortest path lengthDj is expressed as follows:(1)Dj=minDi|vi∈V.Di: shortest path length from shipment starting point to each receiving point. v: logistics starting point. vi: end point.After the shortest path is obtained, the shortest path length among the remaining paths is as follows:(2)Dj=minDi|vi∈V−S,(3)S=S∪vj.S: the shortest path set obtained. vj: the shortest path end point of the remaining path starting from v.At the same time, modify the shortest path that the remaining paths can reachvk, and the formula is as follows:(4)Dk=Dj+arcsjkifDj+arcsjk<Dk.


### 2.2. A∗ Algorithm

The right-hand man of A∗ algorithm is not only the evaluation function but also the search direction. In the logistics system, in the process of finding the shortest path, there are 8 nodes around the starting point, and these nodes are adjacent to the starting point. With the help of his right-hand man, the node with the lowest value will soon be found out and given the search for the next extended node. Repeat the above operations, and the lowest cost path comes into being.The A∗ algorithm flow is shown in Figure 2:Figure 2
A∗ algorithm flow chart.The formula of heuristic function is as follows:(5)fn=gn+hn,(6)gn=Li+xn−xi2+yn−yi2,(7)hn=Li+xn−xT2+yn−yT2.fn: cost function of node n. gn: actual cost from starting point to node n. hn: estimated cost of node n to the end point. xn′yn: horizontal and ordinate values of node n. xi′yi: horizontal and ordinate values of current node i. xT′yT: horizontal and ordinate values of the end point. Li: actual cost from the starting point to the current node i.


## 2.1. Dijkstra Algorithm

Dijkstra algorithm is a classical algorithm for solving the shortest path, and the core of its algorithm is the order of the length of the path. The main purpose of this algorithm is to choose the best route in the logistics transportation nodes.The Dijkstra algorithm flow is shown in Figure1:Figure 1
Flow chart of Dijkstra algorithm.The final shortest path lengthDj is expressed as follows:(1)Dj=minDi|vi∈V.Di: shortest path length from shipment starting point to each receiving point. v: logistics starting point. vi: end point.After the shortest path is obtained, the shortest path length among the remaining paths is as follows:(2)Dj=minDi|vi∈V−S,(3)S=S∪vj.S: the shortest path set obtained. vj: the shortest path end point of the remaining path starting from v.At the same time, modify the shortest path that the remaining paths can reachvk, and the formula is as follows:(4)Dk=Dj+arcsjkifDj+arcsjk<Dk.


## 2.2. A∗ Algorithm

The right-hand man of A∗ algorithm is not only the evaluation function but also the search direction. In the logistics system, in the process of finding the shortest path, there are 8 nodes around the starting point, and these nodes are adjacent to the starting point. With the help of his right-hand man, the node with the lowest value will soon be found out and given the search for the next extended node. Repeat the above operations, and the lowest cost path comes into being.The A∗ algorithm flow is shown in Figure 2:Figure 2
A∗ algorithm flow chart.The formula of heuristic function is as follows:(5)fn=gn+hn,(6)gn=Li+xn−xi2+yn−yi2,(7)hn=Li+xn−xT2+yn−yT2.fn: cost function of node n. gn: actual cost from starting point to node n. hn: estimated cost of node n to the end point. xn′yn: horizontal and ordinate values of node n. xi′yi: horizontal and ordinate values of current node i. xT′yT: horizontal and ordinate values of the end point. Li: actual cost from the starting point to the current node i.


## 3. Optimization Algorithm

In logistics management, the above two algorithms can speed up this field. But even in terms of legal skills, there is still a gap between the two. When the digraph using Dijkstra algorithm hasn vertices, the complexity of the algorithm is On2. Obviously, this algorithm is very efficient in solving single source path in directed graphs with all positive weighted edges, but it cannot combine more useful information to search, which is undoubtedly a fatal blow in logistics management with huge amount of information.A∗ algorithm has the characteristics of Dijkstra algorithm mentioned above, and A∗ algorithm can maintain stability; at the same time, it has high-speed operation and accurate results. It can be seen from this that A∗ algorithm is more efficient in logistics management. But the A∗ algorithm still needs to be improved.


### 3.1. Improved A∗ Algorithm

#### 3.1.1. Improved Node

There aren nodes in a single road section, and the search efficiency for n nodes one by one is too low, so this paper proposes to extract only the beginning and end nodes in a single road section, which greatly improves the search efficiency. Specific improvements are shown in Figure 3:Figure 3
Node improvement diagram.


#### 3.1.2. Improved Database

Logistics transportation usually takes each transfer point as a unit, and the amount of data in the network database of each transfer point is huge. General logistics management is to use direct reading means for data, but this is inefficient. Therefore, this paper puts forward the combination of database and memory and stores it in batches according to time. In this way, data can be obtained from the cache, thus greatly improving the efficiency of data query and search.


#### 3.1.3. Improved Heuristic Function

In this paper, the evaluation standard of the evaluation function is travel time, while the heuristic function can be determined by the ratio of the distance between two nodes to the logistics speed. The formula of travel time estimationhn is as follows:(8)hn=dn,ev¯,(9)dn,e=R×arccoscosπxn180−πxe180cosπyn180cosπye180+sinπyn180sinπye180,(10)v¯=1m∑i=1mvi.dn,e: actual distance between node n and target node e. v¯: average vehicle speed. R: radius of the Earth, with the value of. 6.37×106m. vi: speed on road section i. m: the range involved in the formula is the total number of road sections in the logistics area.


### 3.2. Ant Colony Algorithm

The core content of the algorithm, Antk, judges the choice path by pheromones and leaves pheromones for stacking. Finally, we can get the shortest path. The flow chart of ant colony algorithm is shown in Figure 4:Figure 4
Flow chart of the ant colony algorithm.At first, whenτij0=τ0, this means that ants do not understand the environment, and they need to determine the path by the transition probability Pijkt from node i to j. The transition probability Pijkt is expressed as follows:(11)Pijkt=τijtα⋅ηijtβ∑τijtα⋅ηijtβ,j∈ak,0,j∉ak,(12)ηij=1dij.τijt: the pheromone left by ant k on path i, j at time t. ηijt: distance heuristic factor. dij: distance between nodes i and j. α: relatively important factors about ant information trajectory. β: relative importance factor of heuristic function. ak: a set of nodes to which goods k in the logistics are allowed to arrive next.After ants move for a long time, pheromones remaining in the path will volatilize like alcohol. Therefore, the pheromone on the path should be updated after each cycle of ants. The pheromone update formula is as follows:(13)τijt+1=ρτijt+Δτijt,t+1,(14)Δτijt,t+1=∑k=1mΔτijkt,t+1.ρ: pheromone volatilization coefficient. Δτijk: pheromones left by ant k on paths i and j. Δτij: pheromone increment left by ants on paths i and j.The three formulas forΔτij are as follows:(15)Δτijkt,t+1=CLk,(16)Δτijkt,t+1=Cdij,(17)Δτijkt,t+1=C.Lk: path length of ant k once cycle. C: constant.


### 3.3. A∗-Ant Colony Algorithm

A∗-ant colony algorithm for logistics path planning is divided into global and local. The initial global planning is to use A∗ algorithm to calculate, with the passage of time to search for complex environment, the planning problems encountered by ant colony algorithm, which can effectively avoid obstacles and avoid local deadlock. The algorithm flow is shown in Figure 5:Figure 5
A∗-ant colony algorithm diagram.


#### 3.3.1. Node Selection and Information Update

However, ant colony algorithm also has some defects, such as the global search ability is not strong, convergence speed is not high, and a series of problems. This will make the whole algorithm appear a series of cases such as local optimum. Therefore, it is necessary to further improve the ant colony algorithm before it can be merged with A∗ algorithm to obtain A∗-ant colony hybrid algorithm.Assuming that there arem goods to be transported by logistics in this area, the formula for m is as follows:(18)m=∑i=1nbit,n: total number of target nodes in this area. bit: quantity of logistics goods at node i at time t.The formula for the probability of goodsk transported by logistics moving from node i to node j is as follows:(19)j=maxτiSαtηiSβt,S∈ak,r>ρ0,choosejaccording topijkt,otherwise,(20)Pijkt=τijαtηijβt∑S∈akτijαtηijβt,j∈ak,0,others,maxτiSαtηiSβt: the node of the path with the largest amount of information in the path set related to the node i.When the whole iteration is completed, the best path, that is, the shortest path, will be selected, and the pheromones of each node on this path will be updated. The updated formula is as follows:(21)τijt+1=1−ρτijt+ρΔτijt,t+1,(22)Δτijt,t+1=1Ll.Ll: the optimal path length of the whole search in this iteration.


## 3.1. Improved A∗ Algorithm

### 3.1.1. Improved Node

There aren nodes in a single road section, and the search efficiency for n nodes one by one is too low, so this paper proposes to extract only the beginning and end nodes in a single road section, which greatly improves the search efficiency. Specific improvements are shown in Figure 3:Figure 3
Node improvement diagram.


### 3.1.2. Improved Database

Logistics transportation usually takes each transfer point as a unit, and the amount of data in the network database of each transfer point is huge. General logistics management is to use direct reading means for data, but this is inefficient. Therefore, this paper puts forward the combination of database and memory and stores it in batches according to time. In this way, data can be obtained from the cache, thus greatly improving the efficiency of data query and search.


### 3.1.3. Improved Heuristic Function

In this paper, the evaluation standard of the evaluation function is travel time, while the heuristic function can be determined by the ratio of the distance between two nodes to the logistics speed. The formula of travel time estimationhn is as follows:(8)hn=dn,ev¯,(9)dn,e=R×arccoscosπxn180−πxe180cosπyn180cosπye180+sinπyn180sinπye180,(10)v¯=1m∑i=1mvi.dn,e: actual distance between node n and target node e. v¯: average vehicle speed. R: radius of the Earth, with the value of. 6.37×106m. vi: speed on road section i. m: the range involved in the formula is the total number of road sections in the logistics area.


## 3.1.1. Improved Node

There aren nodes in a single road section, and the search efficiency for n nodes one by one is too low, so this paper proposes to extract only the beginning and end nodes in a single road section, which greatly improves the search efficiency. Specific improvements are shown in Figure 3:Figure 3
Node improvement diagram.


## 3.1.2. Improved Database

Logistics transportation usually takes each transfer point as a unit, and the amount of data in the network database of each transfer point is huge. General logistics management is to use direct reading means for data, but this is inefficient. Therefore, this paper puts forward the combination of database and memory and stores it in batches according to time. In this way, data can be obtained from the cache, thus greatly improving the efficiency of data query and search.


## 3.1.3. Improved Heuristic Function

In this paper, the evaluation standard of the evaluation function is travel time, while the heuristic function can be determined by the ratio of the distance between two nodes to the logistics speed. The formula of travel time estimationhn is as follows:(8)hn=dn,ev¯,(9)dn,e=R×arccoscosπxn180−πxe180cosπyn180cosπye180+sinπyn180sinπye180,(10)v¯=1m∑i=1mvi.dn,e: actual distance between node n and target node e. v¯: average vehicle speed. R: radius of the Earth, with the value of. 6.37×106m. vi: speed on road section i. m: the range involved in the formula is the total number of road sections in the logistics area.


## 3.2. Ant Colony Algorithm

The core content of the algorithm, Antk, judges the choice path by pheromones and leaves pheromones for stacking. Finally, we can get the shortest path. The flow chart of ant colony algorithm is shown in Figure 4:Figure 4
Flow chart of the ant colony algorithm.At first, whenτij0=τ0, this means that ants do not understand the environment, and they need to determine the path by the transition probability Pijkt from node i to j. The transition probability Pijkt is expressed as follows:(11)Pijkt=τijtα⋅ηijtβ∑τijtα⋅ηijtβ,j∈ak,0,j∉ak,(12)ηij=1dij.τijt: the pheromone left by ant k on path i, j at time t. ηijt: distance heuristic factor. dij: distance between nodes i and j. α: relatively important factors about ant information trajectory. β: relative importance factor of heuristic function. ak: a set of nodes to which goods k in the logistics are allowed to arrive next.After ants move for a long time, pheromones remaining in the path will volatilize like alcohol. Therefore, the pheromone on the path should be updated after each cycle of ants. The pheromone update formula is as follows:(13)τijt+1=ρτijt+Δτijt,t+1,(14)Δτijt,t+1=∑k=1mΔτijkt,t+1.ρ: pheromone volatilization coefficient. Δτijk: pheromones left by ant k on paths i and j. Δτij: pheromone increment left by ants on paths i and j.The three formulas forΔτij are as follows:(15)Δτijkt,t+1=CLk,(16)Δτijkt,t+1=Cdij,(17)Δτijkt,t+1=C.Lk: path length of ant k once cycle. C: constant.


## 3.3. A∗-Ant Colony Algorithm

A∗-ant colony algorithm for logistics path planning is divided into global and local. The initial global planning is to use A∗ algorithm to calculate, with the passage of time to search for complex environment, the planning problems encountered by ant colony algorithm, which can effectively avoid obstacles and avoid local deadlock. The algorithm flow is shown in Figure 5:Figure 5
A∗-ant colony algorithm diagram.


### 3.3.1. Node Selection and Information Update

However, ant colony algorithm also has some defects, such as the global search ability is not strong, convergence speed is not high, and a series of problems. This will make the whole algorithm appear a series of cases such as local optimum. Therefore, it is necessary to further improve the ant colony algorithm before it can be merged with A∗ algorithm to obtain A∗-ant colony hybrid algorithm.Assuming that there arem goods to be transported by logistics in this area, the formula for m is as follows:(18)m=∑i=1nbit,n: total number of target nodes in this area. bit: quantity of logistics goods at node i at time t.The formula for the probability of goodsk transported by logistics moving from node i to node j is as follows:(19)j=maxτiSαtηiSβt,S∈ak,r>ρ0,choosejaccording topijkt,otherwise,(20)Pijkt=τijαtηijβt∑S∈akτijαtηijβt,j∈ak,0,others,maxτiSαtηiSβt: the node of the path with the largest amount of information in the path set related to the node i.When the whole iteration is completed, the best path, that is, the shortest path, will be selected, and the pheromones of each node on this path will be updated. The updated formula is as follows:(21)τijt+1=1−ρτijt+ρΔτijt,t+1,(22)Δτijt,t+1=1Ll.Ll: the optimal path length of the whole search in this iteration.


## 3.3.1. Node Selection and Information Update

However, ant colony algorithm also has some defects, such as the global search ability is not strong, convergence speed is not high, and a series of problems. This will make the whole algorithm appear a series of cases such as local optimum. Therefore, it is necessary to further improve the ant colony algorithm before it can be merged with A∗ algorithm to obtain A∗-ant colony hybrid algorithm.Assuming that there arem goods to be transported by logistics in this area, the formula for m is as follows:(18)m=∑i=1nbit,n: total number of target nodes in this area. bit: quantity of logistics goods at node i at time t.The formula for the probability of goodsk transported by logistics moving from node i to node j is as follows:(19)j=maxτiSαtηiSβt,S∈ak,r>ρ0,choosejaccording topijkt,otherwise,(20)Pijkt=τijαtηijβt∑S∈akτijαtηijβt,j∈ak,0,others,maxτiSαtηiSβt: the node of the path with the largest amount of information in the path set related to the node i.When the whole iteration is completed, the best path, that is, the shortest path, will be selected, and the pheromones of each node on this path will be updated. The updated formula is as follows:(21)τijt+1=1−ρτijt+ρΔτijt,t+1,(22)Δτijt,t+1=1Ll.Ll: the optimal path length of the whole search in this iteration.


## 4. Simulation Experiment

### 4.1. Algorithm Testing

#### 4.1.1. Parameters and Environment Settings

In this test, the grid method is adopted, and 10∗10 grids are divided, in which the white grid represents the logistics transportation area and the black grid represents the obstacles. Set the ant size to 50 and the maximum iteration number to 100.α=1,β=5,ρ=0.7,τ0=4,andQ=2000 for Dijkstra algorithm, A∗ algorithm, and A∗-ant colony algorithm for path planning and experiment. The experimental results of Dijkstra algorithm are shown in Figure 6:Figure 6
Dijkstra algorithm simulation path diagram.The experimental results of A∗ algorithm are shown in Figure 7:Figure 7
A∗ algorithm simulation path diagram.The experimental results of A∗-ant colony algorithm are shown in Figure 8:Figure 8
A∗-ant colony algorithm simulation path diagram.The length and running time data of the path are shown in Table1:Table 1
Path length and running time data table.
AlgorithmPath lengthRunning timeDijkstra16.247.89A∗13.991.32A∗-ant colony algorithm13.313.79As can be seen from the above chart, for these three algorithms, in terms of time, A∗ algorithm has the shortest running time and the fastest search speed. But from the shortest path point of view, the shortest path found by the algorithm proposed in this paper is better. From the combination of these two aspects, it can be concluded that the advantages of the A∗-ant colony algorithm are not particularly prominent in the simulation environment, but the overall performance is still due to the other two. For the logistics management environment, the A∗-ant colony algorithm can better play its advantages. For such a large environment as logistics management, there are much more nodes to search than tests. With iterative updating, the A∗-ant colony algorithm can give full play to its advantages, while the first two algorithms are not suitable for such a large amount of data operations.


### 4.2. Simulation Experiment

#### 4.2.1. Establishment of an Objective Function

This experiment will compare the three algorithms from the path length, cost, and speed.The formula of the minimum cost is as follows:(23)Fi=∑j∈JCijXij+fkii∈I,(24)minF′=∑k=1q∑j=1nCkjXkj,(25)∑j=1nXkj≤dk,(26)∑k=1qXkj≥bj.Fi: cost of transportation from node i. Cij: management fee of goods transported from node i required by user j. Xij: the quantity of goods transported from the node i required by the user j. Ckj: management fee of goods at outlet k required by user j. Xij: the quantity of goods from the outlet k required by the user j. fki: the cost of setting the dot k in the experimental delimited area. dk`bj: maximum setting size of outlets and demand of users j.


#### 4.2.2. Simulation Results and Experimental Analysis

Set a certain area as logistics transportation area and transform it into a 50∗50 grid range. Suppose it needs to be delivered to 10 users for 10 times, and there are 8 outlets in total. Three algorithms are used to predict the shortest path length, find the shortest path time and transportation cost of these 10 times, and compare with the actual values.The shortest path length data obtained through experiments are shown in Table2:Table 2
Shortest path length data table.
Serial numberDijkstraA∗A∗-ant colony algorithmActual value124.521.315.314.1230.725.920.221.1316.913.211.410.2422.520.413.913.9527.922.417.816.9610.58.95.16.4721.115.610.211.3811.68.24.34.6915.49.34.85.11020.413.910.310.5The experimental data of finding the shortest path time are shown in Table3.Table 3
Data table for finding the shortest path time.
Serial numberDijkstraA∗A∗-ant colony algorithmActual value132102011233151613342203023441530125392021226311513137322316178361917169352118191046251919The transportation cost data obtained through experiments are shown in Table4.Table 4
Data sheet of transportation cost.
Serial numberDijkstraA∗A∗-ant colony algorithmActual value12.52.11.51.323.12.62.12.231.51.91.82.042.32.51.71.952.82.92.52.261.21.10.50.972.01.71.51.681.41.20.80.791.92.21.21.3102.22.41.91.5The algorithm for the shortest path pair is shown in Figure9.Figure 9
Comparison diagram of the algorithm against shortest path.The algorithm pair finds the shortest path time pair as shown in Figure10.Figure 10
Comparison diagram of the algorithm to find the shortest path time.The algorithm for transportation cost pairs is shown in Figure11.Figure 11
Comparison of algorithm and transportation cost.It can be seen from the above icon that, in terms of finding the shortest path and transportation cost, it is obvious that the algorithm proposed in this paper can better calculate and find the shortest path, which shows that the algorithm has been improved and greatly improved the optimization ability. In terms of running time, we can see that, in the early stage of running, the speed of the A∗ algorithm is still relatively fast, but with the increase of iteration times, the increasing number of nodes, and the continuous accumulation of information, the speed of A∗ algorithm cannot be well maintained, while the algorithm proposed in this paper is more consistent with the data in the later stage.


## 4.1. Algorithm Testing

### 4.1.1. Parameters and Environment Settings

In this test, the grid method is adopted, and 10∗10 grids are divided, in which the white grid represents the logistics transportation area and the black grid represents the obstacles. Set the ant size to 50 and the maximum iteration number to 100.α=1,β=5,ρ=0.7,τ0=4,andQ=2000 for Dijkstra algorithm, A∗ algorithm, and A∗-ant colony algorithm for path planning and experiment. The experimental results of Dijkstra algorithm are shown in Figure 6:Figure 6
Dijkstra algorithm simulation path diagram.The experimental results of A∗ algorithm are shown in Figure 7:Figure 7
A∗ algorithm simulation path diagram.The experimental results of A∗-ant colony algorithm are shown in Figure 8:Figure 8
A∗-ant colony algorithm simulation path diagram.The length and running time data of the path are shown in Table1:Table 1
Path length and running time data table.
AlgorithmPath lengthRunning timeDijkstra16.247.89A∗13.991.32A∗-ant colony algorithm13.313.79As can be seen from the above chart, for these three algorithms, in terms of time, A∗ algorithm has the shortest running time and the fastest search speed. But from the shortest path point of view, the shortest path found by the algorithm proposed in this paper is better. From the combination of these two aspects, it can be concluded that the advantages of the A∗-ant colony algorithm are not particularly prominent in the simulation environment, but the overall performance is still due to the other two. For the logistics management environment, the A∗-ant colony algorithm can better play its advantages. For such a large environment as logistics management, there are much more nodes to search than tests. With iterative updating, the A∗-ant colony algorithm can give full play to its advantages, while the first two algorithms are not suitable for such a large amount of data operations.


## 4.1.1. Parameters and Environment Settings

In this test, the grid method is adopted, and 10∗10 grids are divided, in which the white grid represents the logistics transportation area and the black grid represents the obstacles. Set the ant size to 50 and the maximum iteration number to 100.α=1,β=5,ρ=0.7,τ0=4,andQ=2000 for Dijkstra algorithm, A∗ algorithm, and A∗-ant colony algorithm for path planning and experiment. The experimental results of Dijkstra algorithm are shown in Figure 6:Figure 6
Dijkstra algorithm simulation path diagram.The experimental results of A∗ algorithm are shown in Figure 7:Figure 7
A∗ algorithm simulation path diagram.The experimental results of A∗-ant colony algorithm are shown in Figure 8:Figure 8
A∗-ant colony algorithm simulation path diagram.The length and running time data of the path are shown in Table1:Table 1
Path length and running time data table.
AlgorithmPath lengthRunning timeDijkstra16.247.89A∗13.991.32A∗-ant colony algorithm13.313.79As can be seen from the above chart, for these three algorithms, in terms of time, A∗ algorithm has the shortest running time and the fastest search speed. But from the shortest path point of view, the shortest path found by the algorithm proposed in this paper is better. From the combination of these two aspects, it can be concluded that the advantages of the A∗-ant colony algorithm are not particularly prominent in the simulation environment, but the overall performance is still due to the other two. For the logistics management environment, the A∗-ant colony algorithm can better play its advantages. For such a large environment as logistics management, there are much more nodes to search than tests. With iterative updating, the A∗-ant colony algorithm can give full play to its advantages, while the first two algorithms are not suitable for such a large amount of data operations.


## 4.2. Simulation Experiment

### 4.2.1. Establishment of an Objective Function

This experiment will compare the three algorithms from the path length, cost, and speed.The formula of the minimum cost is as follows:(23)Fi=∑j∈JCijXij+fkii∈I,(24)minF′=∑k=1q∑j=1nCkjXkj,(25)∑j=1nXkj≤dk,(26)∑k=1qXkj≥bj.Fi: cost of transportation from node i. Cij: management fee of goods transported from node i required by user j. Xij: the quantity of goods transported from the node i required by the user j. Ckj: management fee of goods at outlet k required by user j. Xij: the quantity of goods from the outlet k required by the user j. fki: the cost of setting the dot k in the experimental delimited area. dk`bj: maximum setting size of outlets and demand of users j.


### 4.2.2. Simulation Results and Experimental Analysis

Set a certain area as logistics transportation area and transform it into a 50∗50 grid range. Suppose it needs to be delivered to 10 users for 10 times, and there are 8 outlets in total. Three algorithms are used to predict the shortest path length, find the shortest path time and transportation cost of these 10 times, and compare with the actual values.The shortest path length data obtained through experiments are shown in Table2:Table 2
Shortest path length data table.
Serial numberDijkstraA∗A∗-ant colony algorithmActual value124.521.315.314.1230.725.920.221.1316.913.211.410.2422.520.413.913.9527.922.417.816.9610.58.95.16.4721.115.610.211.3811.68.24.34.6915.49.34.85.11020.413.910.310.5The experimental data of finding the shortest path time are shown in Table3.Table 3
Data table for finding the shortest path time.
Serial numberDijkstraA∗A∗-ant colony algorithmActual value132102011233151613342203023441530125392021226311513137322316178361917169352118191046251919The transportation cost data obtained through experiments are shown in Table4.Table 4
Data sheet of transportation cost.
Serial numberDijkstraA∗A∗-ant colony algorithmActual value12.52.11.51.323.12.62.12.231.51.91.82.042.32.51.71.952.82.92.52.261.21.10.50.972.01.71.51.681.41.20.80.791.92.21.21.3102.22.41.91.5The algorithm for the shortest path pair is shown in Figure9.Figure 9
Comparison diagram of the algorithm against shortest path.The algorithm pair finds the shortest path time pair as shown in Figure10.Figure 10
Comparison diagram of the algorithm to find the shortest path time.The algorithm for transportation cost pairs is shown in Figure11.Figure 11
Comparison of algorithm and transportation cost.It can be seen from the above icon that, in terms of finding the shortest path and transportation cost, it is obvious that the algorithm proposed in this paper can better calculate and find the shortest path, which shows that the algorithm has been improved and greatly improved the optimization ability. In terms of running time, we can see that, in the early stage of running, the speed of the A∗ algorithm is still relatively fast, but with the increase of iteration times, the increasing number of nodes, and the continuous accumulation of information, the speed of A∗ algorithm cannot be well maintained, while the algorithm proposed in this paper is more consistent with the data in the later stage.


## 4.2.1. Establishment of an Objective Function

This experiment will compare the three algorithms from the path length, cost, and speed.The formula of the minimum cost is as follows:(23)Fi=∑j∈JCijXij+fkii∈I,(24)minF′=∑k=1q∑j=1nCkjXkj,(25)∑j=1nXkj≤dk,(26)∑k=1qXkj≥bj.Fi: cost of transportation from node i. Cij: management fee of goods transported from node i required by user j. Xij: the quantity of goods transported from the node i required by the user j. Ckj: management fee of goods at outlet k required by user j. Xij: the quantity of goods from the outlet k required by the user j. fki: the cost of setting the dot k in the experimental delimited area. dk`bj: maximum setting size of outlets and demand of users j.


## 4.2.2. Simulation Results and Experimental Analysis

Set a certain area as logistics transportation area and transform it into a 50∗50 grid range. Suppose it needs to be delivered to 10 users for 10 times, and there are 8 outlets in total. Three algorithms are used to predict the shortest path length, find the shortest path time and transportation cost of these 10 times, and compare with the actual values.The shortest path length data obtained through experiments are shown in Table2:Table 2
Shortest path length data table.
Serial numberDijkstraA∗A∗-ant colony algorithmActual value124.521.315.314.1230.725.920.221.1316.913.211.410.2422.520.413.913.9527.922.417.816.9610.58.95.16.4721.115.610.211.3811.68.24.34.6915.49.34.85.11020.413.910.310.5The experimental data of finding the shortest path time are shown in Table3.Table 3
Data table for finding the shortest path time.
Serial numberDijkstraA∗A∗-ant colony algorithmActual value132102011233151613342203023441530125392021226311513137322316178361917169352118191046251919The transportation cost data obtained through experiments are shown in Table4.Table 4
Data sheet of transportation cost.
Serial numberDijkstraA∗A∗-ant colony algorithmActual value12.52.11.51.323.12.62.12.231.51.91.82.042.32.51.71.952.82.92.52.261.21.10.50.972.01.71.51.681.41.20.80.791.92.21.21.3102.22.41.91.5The algorithm for the shortest path pair is shown in Figure9.Figure 9
Comparison diagram of the algorithm against shortest path.The algorithm pair finds the shortest path time pair as shown in Figure10.Figure 10
Comparison diagram of the algorithm to find the shortest path time.The algorithm for transportation cost pairs is shown in Figure11.Figure 11
Comparison of algorithm and transportation cost.It can be seen from the above icon that, in terms of finding the shortest path and transportation cost, it is obvious that the algorithm proposed in this paper can better calculate and find the shortest path, which shows that the algorithm has been improved and greatly improved the optimization ability. In terms of running time, we can see that, in the early stage of running, the speed of the A∗ algorithm is still relatively fast, but with the increase of iteration times, the increasing number of nodes, and the continuous accumulation of information, the speed of A∗ algorithm cannot be well maintained, while the algorithm proposed in this paper is more consistent with the data in the later stage.


## 5. Conclusion

For the Dijkstra algorithm, facing a large amount of information, it does not have the ability to use it reasonably, which makes it and A∗ algorithm have a gap in logistics and transportation. This is also one of the reasons for choosing the A∗ algorithm in this paper. A∗ algorithm is really excellent in terms of running speed, but in terms of logistics and transportation, the algorithm proposed in this paper can provide stable development for later operation. At the same time, it can be found from the experiment that the performance of the algorithm is stable, and the high stability and accuracy can be combined with logistics and transportation. The logistics management in the future tends to be more intelligent, and the intelligent technology is constantly developing, which is a further excavation assistant for intelligent logistics management.



---

*Source: 7930553-2022-06-08.xml*