# Design and Application of Improved Ant Colony Algorithm in E-Commerce System

Authors: Ning Li; Yanliang Yu
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

Since the 21st century, artificial intelligence and e-commerce have taken the lead. The two are close to life. Data show that, in the digital economy era, the two have developed rapidly and are widely used; however, they also have some problems. E-commerce logistics system has always been the first problem mentioned by relevant personnel and users. The continuous increase in transaction volume is worth celebrating, but the logistics efficiency continues to be flat or even declining, which has become a serious problem. This shows that, for the e-commerce platform, the investment in science and technology is not comprehensive and in depth, and the artificial intelligence technology has not been deeply applied for the logistics industry. Understanding needs, finding problems, and solving them in time are the way to develop this industry. Pareto is chosen by most logistics systems, but in fact, its efficiency is not as high as imagined. In view of this, this paper proposes an innovative algorithm, based on ant colony algorithm, with optimization mechanism to strengthen the shortcomings, thus improving the premature problem of ant colony algorithm, and at the same time, a series of performances such as convergence speed, accuracy, and stability have been strengthened because of this improvement. Experiments show that the optimization ability of this algorithm is better than the other two.


---

## Body

## 1. Introduction

At present, the application of artificial intelligence touches on various industries and life. It improves the efficiency of industrial operation and the quality of life, including almost all the most cutting-edge technologies, and brings mankind into the intelligent era. Similarly, e-commerce is like artificial intelligence. Both have been recognized by the public, even the industry and the country. The establishment of China Artificial Intelligence Society and various newspapers and periodicals undoubtedly support this discipline and further promote the development of artificial intelligence. As far as e-commerce is concerned, the state directly and clearly puts forward the development trend and tasks during the “14th Five-Year Plan” period, and there are millions of e-businesses selling online in China. The combination of the two can be described as a strong alliance and complement each other. Artificial intelligence will develop technology in the frontier production line of e-commerce, and e-commerce will continue to develop with technical support.There was a time when more and more researchers thought that the research center of artificial intelligence was argumentation [1]. In this context, many related topics have emerged. It is precisely because of these themes that the view that the research center of artificial intelligence is demonstration is recognized by more and more people. Although many literatures related to artificial intelligence have been put forward, in recent years, many new model topics have been put forward for others to refer to. Artificial intelligence [2] and theory have bred a brand-new cross-cutting field together, and this newborn has won many awards, which is helpful for researchers to build their ideas and strengthen their technology. It is a process that researchers need to go through from theory to demonstration and then to program generation. The demonstration model will lay a good foundation for artificial intelligence and its subsequent development, but there will also be much professional knowledge, such as algorithm solving and strategic problems. It is undeniable that artificial intelligence has a large number of applications both in real life and in argumentation. Literature [3] has the same status as theory, and the status of logic is not easy to underestimate. Similarly, related applications have been further investigated and studied in the present era. As a result, many related manuals have been created. The contents of the manual are mainly artificial intelligence and logic, which are unified. The authors are highly famous people in the industry, and the manual has been professionally recognized. At the same time, using manuals, surveys, and explorations as the basis of research, researchers and those who are interested in it can participate in it. Those experts prefer the background with highly professional mathematical materials as the content. Literacy [4] in today’s scientific research field, a new discipline combines uncertainty with artificial intelligence, which gathers a series of cutting-edge scientific and technological disciplines such as computer and physics. Uncertainty is based on randomness and fuzziness, and this state of uncertainty and a series of changes in the future are related to entropy. For this reason, uncertainty can be combined with artificial intelligence, and a series of models related to uncertainty can be deeply studied so that uncertainty information can be further automatically knowledgeable. Literacy [5] generally speaking, the reason why artificial intelligence is accepted by the public is that it can solve problems that are not simple and clear. On the premise that the data is not perfect, it can also run the answers to professional mathematical problems. After training, the operation efficiency of artificial intelligence can be improved. For this reason, it has been used in all aspects of life, especially in system modeling. Artificial intelligence contains a field of combination of various technologies. For example, in combustion engineering, artificial intelligence presents two aspects in thematic order: one is combustion system and stove modeling and emission prediction; the second is internal combustion engine and engine modeling and control. In literature [6] and in teaching, there is participation of artificial intelligence, resulting in a computer-assisted instruction system. The algorithm program is complex. In the system with specific architecture, the input data of teachers constitutes a database, while in the system with information architecture the desired data can be obtained by relying entirely on the information network. At the same time, both of them can also answer students’ questions. Literature [7] in the classical search problem, the solution is closely related to whether you know the relevant professional domain knowledge. In the field of artificial intelligence, the scheme has nothing to do with knowledge reserve, that is, in some cases, even if the operator has no relevant knowledge, he can operate. The last step of this operation process is heuristic search, and the whole process needs matrix technology to bless. In literature [8] in today, the hottest sectors always have a place for artificial intelligence and e-commerce. Joining the blessing of the server makes the logistics operation more effective and the logistics information more electronic and networked. Web service technology based on XML and Soap is its network security management, which improves the openness and conversion level of e-commerce logistics. The International Conference [9] on E-Commerce was founded to gather people who are interested in and have professional knowledge of current e-commerce, and the designed technologies are low-level technologies and high-level issues. Similarly, e-commerce has gained a lot of attention in IT majors, which shows the importance of e-commerce in today’s era. E-commerce is the booster of the world economy [10]. For this reason, e-commerce has driven the logistics market, making a series of emerging industries such as electronic information, Internet, and artificial intelligence participate in it. Nevertheless, the foundation of logistics industry building in China is too late, which leads to the slow construction of the building. Therefore, it is necessary to improve logistics management and solve problems in all aspects. But to a great extent [11], the e-commerce industry presents a situation that pays attention to transactions and despises logistics. Because of this, the gap between transaction and logistics is too large to match each other. This undoubtedly prevents the future development of e-commerce. Therefore, in order to meet the relevant needs, we must deeply understand the root of these needs and deeply discuss how to build a logistics system to achieve the same proportion of transactions and logistics. Literature [12] in e-commerce, the order information needs to match the packaging size so that the problem of high packaging cost can be solved. With regard to the packing problem, the traditional solution is to put goods with a set of long width and height data into a fixed container. However, the traditional methods are too conformist and need constant innovation and revision to further improve efficiency. Literature [13] similarly, the above problems will also bring about the phenomenon of high cost and low quality, which has become a stumbling block to the development of e-commerce. Now, on the basis of the existing distribution model, there have been successful solutions. It is necessary to classify a series of indicators such as customer safety, society, geography, economy, and requirements into four categories and distribute goods under the guidance of categories. This not only meets the needs of different customers but also optimizes the configuration and reduces the cost. For example, according to statistics, thousands of agricultural product enterprises have been established in China. In such a fierce market competition [14], logistics problems become more and more serious, and distribution needs emerge one after another. Therefore, the traditional logistics distribution system cannot meet the current market at all. Because of the entry of this market, the development form of electronic system presents a phenomenon of contending with a hundred schools of thought, but the old problem of low efficiency has not been improved. For example, agricultural products in a certain area can only be dispersed, which leads to a great increase in transportation costs and makes it difficult to meet market demand. E-commerce combines business and science to give relevant people a certain influence [15]. Most e-commerce enterprises pay attention to improving logistics efficiency, but the measurement of logistics efficiency has not been deeply explored. In terms of strategy and operation, we can put forward efficient suggestions for e-commerce logistics. Putting forward the AHF method can help operators understand the logistics performance; operators and the development of e-commerce have a constructive role. Compared with other logistics modes mentioned in this paper, the efficiency is increasing incrementally. Combined with artificial intelligence, a hot project at present, the ordinary logistics mode is far behind. Therefore, the model of this paper is more in line with the growing e-commerce industry in China.


## 2. Artificial Intelligence Analysis

### 2.1. Basic Concepts

The means of artificial intelligence is computer, and template is human intelligent behavior. The ultimate goal of artificial intelligence is to combine various disciplines such as computer and language and make computers learn and judge independently to form an intelligent mechanical system to complete activities. Artificial intelligence, as a super comprehensive discipline, is a hot spot in contemporary society and a future development trend, and it is also full of all walks of life. The artificial intelligence definition diagram is shown in Figure1.Figure 1
Artificial intelligence definition diagram.


### 2.2. Ant Colony Algorithm

#### 2.2.1. ACA Algorithm

Set the number of individuals in the ant colony asm, each ant as k (k=1,2,3,⋯,m), and the number of cities as n. At first, the pheromone intensity between city i and city j is consistent. Gradually, ant k begins to move between cities, and the pheromone intensity begins to change. Ant k will have more pheromone intensity between cities to choose the next city to move to and then constantly update the pheromone intensity. When the iteration times reach the maximum, the algorithm ends. The ACA algorithm flowchart is shown in Figure 2.Figure 2
Flowchart of ACA algorithm.The probability of antk from city i to j after t iterations Pijkt is as follows:
(1)Pijk=τijtα⋅ηijtβs∈allowk,0s∉allowk.τijt: the pheromone concentration of the path between cities i and j is updated in t iteration, and the pheromone concentration among cities is the same at the initial stage of search, that is, τij0=τ0.ηijt: the expected degree after the t-th iteration update from city i to j is the heuristic function, and its value is 1/dij (dij is the distance between cities i and j).allowk is a collection of cities to be visited by ant k.α is the importance factor of pheromone.β is the importance factor of heuristic function.The update formula of pheromone concentration in intercity path is as follows:(2)τijt+1=1−ρ∗τijt+Δτij+eΔτijbs,0<ρ<1,(3)Δτij=∑k=1nΔτijk,(4)Δτijbs=1Lbscityiandcityjbelongtotheoptimalpath,0others.ρ is the volatilization degree of pheromone. ρ is the pheromone evaporation rate, ranging from 0 to 1, usually 0.5.Δτijk is the increment of pheromone concentration released by the k-th ant on the path between i and j.Δτij is the total increment of pheromone concentration released by all ants on the path between i and j.e strengthens the weight coefficient of pheromone concentration on the optimal path.Δτijbs is the increment of pheromone concentration on the optimal path.Lbs is the total length of optimal path.Among them, there are three models for releasing pheromones.The formula forΔτijk in ant cycle system is as follows:
(5)Δτijk=QLkthek‐thantvisitsfromcityitocityj,0others.Q is a constant, the total amount of pheromones released by ants in one cycle.Lk is the length of the path taken by ant k.The formula forΔτijk in ant quantity system is as follows:
(6)Δτijk=Qdijthek‐thantvisitsfromcityitocityj,0others.The formula forΔτijk in ant density system is as follows:
(7)Δτijk=Qthek‐thantvisitsfromcityitocityj,0others.The three models (Formulas (5)–(7)) represent different characteristics of pheromone release from ant colony. The total release amount of model 1 and model 2 is certain. The former depends on the overall path, while the latter depends on the local path, while the release amount of each path in model 3 is certain.


### 2.3. Pareto

Pareto is a classical and commonly used method in e-commerce logistics system. When multiple goals appear, there will be a series of problems such as conflicts. The solutions corresponding to each goal are different, and the effects of a solution on each goal are also different. The solution of the overall objective function is in equilibrium state, that is, the change of one objective function will inevitably lead to the change of the solution of other functions. The formula corresponding to the multiobjective programming problem is as follows:(8)minfx=f1x,⋯,fpxTgix≥0i∈Ihjx=0j∈Efix is an objective function.gix,hjx is a constraint function.x is an N-dimensional design variable.When Pareto is optimal, it means that exchange, production, and the conditions of exchange and production are optimal. Only when these three optimums are satisfied can Pareto optimality be guaranteed.


## 2.1. Basic Concepts

The means of artificial intelligence is computer, and template is human intelligent behavior. The ultimate goal of artificial intelligence is to combine various disciplines such as computer and language and make computers learn and judge independently to form an intelligent mechanical system to complete activities. Artificial intelligence, as a super comprehensive discipline, is a hot spot in contemporary society and a future development trend, and it is also full of all walks of life. The artificial intelligence definition diagram is shown in Figure1.Figure 1
Artificial intelligence definition diagram.


## 2.2. Ant Colony Algorithm

### 2.2.1. ACA Algorithm

Set the number of individuals in the ant colony asm, each ant as k (k=1,2,3,⋯,m), and the number of cities as n. At first, the pheromone intensity between city i and city j is consistent. Gradually, ant k begins to move between cities, and the pheromone intensity begins to change. Ant k will have more pheromone intensity between cities to choose the next city to move to and then constantly update the pheromone intensity. When the iteration times reach the maximum, the algorithm ends. The ACA algorithm flowchart is shown in Figure 2.Figure 2
Flowchart of ACA algorithm.The probability of antk from city i to j after t iterations Pijkt is as follows:
(1)Pijk=τijtα⋅ηijtβs∈allowk,0s∉allowk.τijt: the pheromone concentration of the path between cities i and j is updated in t iteration, and the pheromone concentration among cities is the same at the initial stage of search, that is, τij0=τ0.ηijt: the expected degree after the t-th iteration update from city i to j is the heuristic function, and its value is 1/dij (dij is the distance between cities i and j).allowk is a collection of cities to be visited by ant k.α is the importance factor of pheromone.β is the importance factor of heuristic function.The update formula of pheromone concentration in intercity path is as follows:(2)τijt+1=1−ρ∗τijt+Δτij+eΔτijbs,0<ρ<1,(3)Δτij=∑k=1nΔτijk,(4)Δτijbs=1Lbscityiandcityjbelongtotheoptimalpath,0others.ρ is the volatilization degree of pheromone. ρ is the pheromone evaporation rate, ranging from 0 to 1, usually 0.5.Δτijk is the increment of pheromone concentration released by the k-th ant on the path between i and j.Δτij is the total increment of pheromone concentration released by all ants on the path between i and j.e strengthens the weight coefficient of pheromone concentration on the optimal path.Δτijbs is the increment of pheromone concentration on the optimal path.Lbs is the total length of optimal path.Among them, there are three models for releasing pheromones.The formula forΔτijk in ant cycle system is as follows:
(5)Δτijk=QLkthek‐thantvisitsfromcityitocityj,0others.Q is a constant, the total amount of pheromones released by ants in one cycle.Lk is the length of the path taken by ant k.The formula forΔτijk in ant quantity system is as follows:
(6)Δτijk=Qdijthek‐thantvisitsfromcityitocityj,0others.The formula forΔτijk in ant density system is as follows:
(7)Δτijk=Qthek‐thantvisitsfromcityitocityj,0others.The three models (Formulas (5)–(7)) represent different characteristics of pheromone release from ant colony. The total release amount of model 1 and model 2 is certain. The former depends on the overall path, while the latter depends on the local path, while the release amount of each path in model 3 is certain.


## 2.2.1. ACA Algorithm

Set the number of individuals in the ant colony asm, each ant as k (k=1,2,3,⋯,m), and the number of cities as n. At first, the pheromone intensity between city i and city j is consistent. Gradually, ant k begins to move between cities, and the pheromone intensity begins to change. Ant k will have more pheromone intensity between cities to choose the next city to move to and then constantly update the pheromone intensity. When the iteration times reach the maximum, the algorithm ends. The ACA algorithm flowchart is shown in Figure 2.Figure 2
Flowchart of ACA algorithm.The probability of antk from city i to j after t iterations Pijkt is as follows:
(1)Pijk=τijtα⋅ηijtβs∈allowk,0s∉allowk.τijt: the pheromone concentration of the path between cities i and j is updated in t iteration, and the pheromone concentration among cities is the same at the initial stage of search, that is, τij0=τ0.ηijt: the expected degree after the t-th iteration update from city i to j is the heuristic function, and its value is 1/dij (dij is the distance between cities i and j).allowk is a collection of cities to be visited by ant k.α is the importance factor of pheromone.β is the importance factor of heuristic function.The update formula of pheromone concentration in intercity path is as follows:(2)τijt+1=1−ρ∗τijt+Δτij+eΔτijbs,0<ρ<1,(3)Δτij=∑k=1nΔτijk,(4)Δτijbs=1Lbscityiandcityjbelongtotheoptimalpath,0others.ρ is the volatilization degree of pheromone. ρ is the pheromone evaporation rate, ranging from 0 to 1, usually 0.5.Δτijk is the increment of pheromone concentration released by the k-th ant on the path between i and j.Δτij is the total increment of pheromone concentration released by all ants on the path between i and j.e strengthens the weight coefficient of pheromone concentration on the optimal path.Δτijbs is the increment of pheromone concentration on the optimal path.Lbs is the total length of optimal path.Among them, there are three models for releasing pheromones.The formula forΔτijk in ant cycle system is as follows:
(5)Δτijk=QLkthek‐thantvisitsfromcityitocityj,0others.Q is a constant, the total amount of pheromones released by ants in one cycle.Lk is the length of the path taken by ant k.The formula forΔτijk in ant quantity system is as follows:
(6)Δτijk=Qdijthek‐thantvisitsfromcityitocityj,0others.The formula forΔτijk in ant density system is as follows:
(7)Δτijk=Qthek‐thantvisitsfromcityitocityj,0others.The three models (Formulas (5)–(7)) represent different characteristics of pheromone release from ant colony. The total release amount of model 1 and model 2 is certain. The former depends on the overall path, while the latter depends on the local path, while the release amount of each path in model 3 is certain.


## 2.3. Pareto

Pareto is a classical and commonly used method in e-commerce logistics system. When multiple goals appear, there will be a series of problems such as conflicts. The solutions corresponding to each goal are different, and the effects of a solution on each goal are also different. The solution of the overall objective function is in equilibrium state, that is, the change of one objective function will inevitably lead to the change of the solution of other functions. The formula corresponding to the multiobjective programming problem is as follows:(8)minfx=f1x,⋯,fpxTgix≥0i∈Ihjx=0j∈Efix is an objective function.gix,hjx is a constraint function.x is an N-dimensional design variable.When Pareto is optimal, it means that exchange, production, and the conditions of exchange and production are optimal. Only when these three optimums are satisfied can Pareto optimality be guaranteed.


## 3. Optimization Algorithm

### 3.1. Improved Ant Colony Algorithm Design

In general ant colony algorithm,ηijt is the only basis for ant colony transfer at the beginning, because the initial information of the algorithm adopts uniform distribution strategy. This will make Pijkt of all cities in ant k’s access space have a small difference, which leads to the time-consuming access to cities in low cost-effective areas in the initial stage of ant search, resulting in a series of problems such as blindness and slow convergence speed in the initial stage of search. Therefore, this paper proposes an improved ant colony algorithm, and the algorithm flow is shown in Figure 3.Figure 3
Flowchart of improved ant colony algorithm.


#### 3.1.1. Construct the Target Point Guidance Area

Based on the problems of ant colony algorithm in the initial stage of search, we can set guidance to help ants explore, that is, set guidance area around the target and give this area certain pheromones in the initial stage, so as to guide ants to improve search efficiency. A circle with the target pointE as its center and R as its radius, and the overlapping part between the circle and the total area is the target guide area. The pheromones in this region are higher than those in other regions, forming pheromone differences. Assuming that the area of 10∗10 is divided into blocks, taking the side length S=5 of the rectangular divided area and black as an obstacle, the schematic diagram of target guidance is shown in Figure 4.Figure 4
Schematic diagram of goal orientation.The formula of pheromone differentiation distribution rule is as follows:(9)τij0=λ⋅τ0dj,E≤R,τ0dj,E>R,(10)R=S⋅DMaxm,nξ+0.3,(11)ξ=OV.dj,E is the Euclidean distance from j to E.λ strengthens the weight of initial pheromone concentration, and the value range is 1,2.D is the Euclidean distance between starting point and target point.m is the length of total area.n is the width of total area.ξ is the proportion of obstacles in the rectangular block area proportional to the size of the guiding area of the target point.O is the number of obstacles in rectangular block area.V is the number of feasible nodes in rectangular block area.


#### 3.1.2. Block Optimization of Local Path

Because ant colony algorithm generally refers to the global path length, redundant folds in local areas will be ignored. Optimize the local path block of the total area, and then, use the cross-product operation to detect the relationship between the break point and obstacles. If there is redundancy, add the redundant break point to the forbidden set, and let the ants return to the starting point of the break line and search again to solve this problem. The formula of redundant break point set is as follows:(12)U=ix,yix−ix′iy″−iy′≠ix″−ix′iy−iy′∩iox−ix′iy″−iy′≠ix″−ix′ioy−iy′.i is the intermediate point.i′,i″ is the endpoint.io is the obstacle point.


#### 3.1.3. Optimize the Pheromone Concentration Update Mechanism

Elite ants are closely related to whether pheromones and algorithms will fall into local optimum in advance. When the current population grows continuously, this problem will appear in the latter. The intervention of augmenter is undoubtedly a timely rain, which calms the interaction between elite ants and pheromones. The optimized pheromone concentration update formula is as follows:(13)τijt+1=1−ρ∗τijt+Δτij,(14)Δτij=1−ϕ∑k=1nΔτijk+etΔτijbs,(15)et=1expωt−1.ϕ is the proportion of obstacles in adjacent node sets between i and j.et is the adaptive enhancement factor, iteration number is t.


#### 3.1.4. Stochastic State Transition Mechanism

The concentration of pheromones will no longer rise in the later period. Combined with Formula (1), it can be seen that this situation will lead to a smaller probability Pijkt, and this phenomenon undoubtedly declares that the path with low concentration cannot be searched because of the small Pijkt, and then, the whole algorithm stagnates, so it is necessary to add a random conversion mechanism, which makes the algorithm choose the path node according to Pijkt more random. The stochastic state transition formula is as follows:
(16)x⟶t+1=Lx⟶τl−x⟶t,(17)L=2−ttmax.x⟶t is the current position.x⟶t+1 is the next position.x⟶τl is the node with the lowest pheromone concentration in the current neighboring node set.L is the step value.The objective function formula of path evaluation is as follows:(18)Fit=minp∩minRi∩min∑i=1nRi.p is the number of break points.Ri is the local path length.∑i=1nRi is the global path length.


## 3.1. Improved Ant Colony Algorithm Design

In general ant colony algorithm,ηijt is the only basis for ant colony transfer at the beginning, because the initial information of the algorithm adopts uniform distribution strategy. This will make Pijkt of all cities in ant k’s access space have a small difference, which leads to the time-consuming access to cities in low cost-effective areas in the initial stage of ant search, resulting in a series of problems such as blindness and slow convergence speed in the initial stage of search. Therefore, this paper proposes an improved ant colony algorithm, and the algorithm flow is shown in Figure 3.Figure 3
Flowchart of improved ant colony algorithm.


### 3.1.1. Construct the Target Point Guidance Area

Based on the problems of ant colony algorithm in the initial stage of search, we can set guidance to help ants explore, that is, set guidance area around the target and give this area certain pheromones in the initial stage, so as to guide ants to improve search efficiency. A circle with the target pointE as its center and R as its radius, and the overlapping part between the circle and the total area is the target guide area. The pheromones in this region are higher than those in other regions, forming pheromone differences. Assuming that the area of 10∗10 is divided into blocks, taking the side length S=5 of the rectangular divided area and black as an obstacle, the schematic diagram of target guidance is shown in Figure 4.Figure 4
Schematic diagram of goal orientation.The formula of pheromone differentiation distribution rule is as follows:(9)τij0=λ⋅τ0dj,E≤R,τ0dj,E>R,(10)R=S⋅DMaxm,nξ+0.3,(11)ξ=OV.dj,E is the Euclidean distance from j to E.λ strengthens the weight of initial pheromone concentration, and the value range is 1,2.D is the Euclidean distance between starting point and target point.m is the length of total area.n is the width of total area.ξ is the proportion of obstacles in the rectangular block area proportional to the size of the guiding area of the target point.O is the number of obstacles in rectangular block area.V is the number of feasible nodes in rectangular block area.


### 3.1.2. Block Optimization of Local Path

Because ant colony algorithm generally refers to the global path length, redundant folds in local areas will be ignored. Optimize the local path block of the total area, and then, use the cross-product operation to detect the relationship between the break point and obstacles. If there is redundancy, add the redundant break point to the forbidden set, and let the ants return to the starting point of the break line and search again to solve this problem. The formula of redundant break point set is as follows:(12)U=ix,yix−ix′iy″−iy′≠ix″−ix′iy−iy′∩iox−ix′iy″−iy′≠ix″−ix′ioy−iy′.i is the intermediate point.i′,i″ is the endpoint.io is the obstacle point.


### 3.1.3. Optimize the Pheromone Concentration Update Mechanism

Elite ants are closely related to whether pheromones and algorithms will fall into local optimum in advance. When the current population grows continuously, this problem will appear in the latter. The intervention of augmenter is undoubtedly a timely rain, which calms the interaction between elite ants and pheromones. The optimized pheromone concentration update formula is as follows:(13)τijt+1=1−ρ∗τijt+Δτij,(14)Δτij=1−ϕ∑k=1nΔτijk+etΔτijbs,(15)et=1expωt−1.ϕ is the proportion of obstacles in adjacent node sets between i and j.et is the adaptive enhancement factor, iteration number is t.


### 3.1.4. Stochastic State Transition Mechanism

The concentration of pheromones will no longer rise in the later period. Combined with Formula (1), it can be seen that this situation will lead to a smaller probability Pijkt, and this phenomenon undoubtedly declares that the path with low concentration cannot be searched because of the small Pijkt, and then, the whole algorithm stagnates, so it is necessary to add a random conversion mechanism, which makes the algorithm choose the path node according to Pijkt more random. The stochastic state transition formula is as follows:
(16)x⟶t+1=Lx⟶τl−x⟶t,(17)L=2−ttmax.x⟶t is the current position.x⟶t+1 is the next position.x⟶τl is the node with the lowest pheromone concentration in the current neighboring node set.L is the step value.The objective function formula of path evaluation is as follows:(18)Fit=minp∩minRi∩min∑i=1nRi.p is the number of break points.Ri is the local path length.∑i=1nRi is the global path length.


## 3.1.1. Construct the Target Point Guidance Area

Based on the problems of ant colony algorithm in the initial stage of search, we can set guidance to help ants explore, that is, set guidance area around the target and give this area certain pheromones in the initial stage, so as to guide ants to improve search efficiency. A circle with the target pointE as its center and R as its radius, and the overlapping part between the circle and the total area is the target guide area. The pheromones in this region are higher than those in other regions, forming pheromone differences. Assuming that the area of 10∗10 is divided into blocks, taking the side length S=5 of the rectangular divided area and black as an obstacle, the schematic diagram of target guidance is shown in Figure 4.Figure 4
Schematic diagram of goal orientation.The formula of pheromone differentiation distribution rule is as follows:(9)τij0=λ⋅τ0dj,E≤R,τ0dj,E>R,(10)R=S⋅DMaxm,nξ+0.3,(11)ξ=OV.dj,E is the Euclidean distance from j to E.λ strengthens the weight of initial pheromone concentration, and the value range is 1,2.D is the Euclidean distance between starting point and target point.m is the length of total area.n is the width of total area.ξ is the proportion of obstacles in the rectangular block area proportional to the size of the guiding area of the target point.O is the number of obstacles in rectangular block area.V is the number of feasible nodes in rectangular block area.


## 3.1.2. Block Optimization of Local Path

Because ant colony algorithm generally refers to the global path length, redundant folds in local areas will be ignored. Optimize the local path block of the total area, and then, use the cross-product operation to detect the relationship between the break point and obstacles. If there is redundancy, add the redundant break point to the forbidden set, and let the ants return to the starting point of the break line and search again to solve this problem. The formula of redundant break point set is as follows:(12)U=ix,yix−ix′iy″−iy′≠ix″−ix′iy−iy′∩iox−ix′iy″−iy′≠ix″−ix′ioy−iy′.i is the intermediate point.i′,i″ is the endpoint.io is the obstacle point.


## 3.1.3. Optimize the Pheromone Concentration Update Mechanism

Elite ants are closely related to whether pheromones and algorithms will fall into local optimum in advance. When the current population grows continuously, this problem will appear in the latter. The intervention of augmenter is undoubtedly a timely rain, which calms the interaction between elite ants and pheromones. The optimized pheromone concentration update formula is as follows:(13)τijt+1=1−ρ∗τijt+Δτij,(14)Δτij=1−ϕ∑k=1nΔτijk+etΔτijbs,(15)et=1expωt−1.ϕ is the proportion of obstacles in adjacent node sets between i and j.et is the adaptive enhancement factor, iteration number is t.


## 3.1.4. Stochastic State Transition Mechanism

The concentration of pheromones will no longer rise in the later period. Combined with Formula (1), it can be seen that this situation will lead to a smaller probability Pijkt, and this phenomenon undoubtedly declares that the path with low concentration cannot be searched because of the small Pijkt, and then, the whole algorithm stagnates, so it is necessary to add a random conversion mechanism, which makes the algorithm choose the path node according to Pijkt more random. The stochastic state transition formula is as follows:
(16)x⟶t+1=Lx⟶τl−x⟶t,(17)L=2−ttmax.x⟶t is the current position.x⟶t+1 is the next position.x⟶τl is the node with the lowest pheromone concentration in the current neighboring node set.L is the step value.The objective function formula of path evaluation is as follows:(18)Fit=minp∩minRi∩min∑i=1nRi.p is the number of break points.Ri is the local path length.∑i=1nRi is the global path length.


## 4. Simulation Experiment

### 4.1. Algorithm Testing

#### 4.1.1. Parameter Setting and Experimental Comparison

Set the total area size to20∗20 cells, the starting point coordinates to 0.5,0.5, the ending point coordinates to 19.5,19.5, the total amount of ants n=50, and the maximum iteration times to 100. Take τ0=4, λ=1.3, S=10, α=2, β=7, ρ=0.6, and ω=0.1. After experimental comparison, the data comparison results are shown in Table 1.Table 1
Data comparison table.
Number of iterationsOptimal pathAverage value of optimal pathLost ant numberAnt colonyParetoImproved ant colonyAnt colonyParetoImproved ant colonyAnt colonyParetoImproved ant colony073.565.055.780.080.084.050.032.040.01055.346.544.585.053.149.235.015.03.02048.044.544.573.447.044.729.00.00.03047.344.544.565.644.744.728.00.00.04047.044.544.563.044.744.727.00.00.05047.044.544.555.644.744.716.00.00.06047.044.544.553.044.744.712.00.00.07047.044.544.550.344.744.711.00.00.08047.044.544.546.744.744.76.00.00.09047.044.544.546.744.744.75.00.00.010047.044.544.546.744.744.74.00.00.0The change curve of the optimal path is shown in Figure5.Figure 5
Optimal path change graph.The change curve of the average value of the optimal path is shown in Figure6.Figure 6
Variation curve of average value of optimal path.The change curve of the number of lost ants is shown in Figure7.Figure 7
Change curve of lost ant number.It can be seen from the above chart that under the premise of iterative update 100 times, ant colony algorithm needs to consume roughly half of iterative times to get the optimal solution, its convergence speed is far lower than expected, and too many ants are lost stably, which shows that its stability is not high. The optimal path found by Pareto and the algorithm in this paper is roughly equal, but comparing them, it can be seen that the iteration times experienced by Pareto in finding the optimal path are obviously higher than those of the algorithm in this paper, that is, the optimization ability of Pareto is lower than that of the algorithm in this paper, so the algorithm proposed in this paper solves the problem of low efficiency in the initial stage of search well. Compared with Pareto, the convergence speed of this algorithm is further improved, and the number of ants lost is obviously reduced. It can be seen from the above that the optimization ability of the algorithm has been greatly improved, and the addition of weight factors is undoubtedly the icing on the cake, which makes the convergence speed of the algorithm and the ability to prevent ants from losing greatly improved. From the above three line charts, it can be seen that the algorithm in this paper is far superior to others in all aspects of experiments. This shows that the strategies and mechanisms proposed above are really efficient. The algorithm in this paper is closer to this experimental project, which can bring greater benefits and experimental results.


### 4.2. Simulation Experiment

#### 4.2.1. Establishment of an Objective Function

This experiment will test the cargo packing module and vehicle routing module in e-commerce logistics system.The objective function formula of the cargo packing optimization model is as follows:(19)max:∑i=1nPi⋅xi−Cf.Its objective function represents the maximum profit of transporting goods that are not more than the limited capacity and limited load of trucks.Pi is the transportation cost of goods I obtained.xi: goods not transported are equal to 0 and goods transported are equal to 1.Cf is the transportation costs required.Constraints:(20)∑i=1nWi⋅xi≤Lmax,(21)Vmax≥∑i=1nliwihi⋅xi,(22)li≤Pi,wi≤Pw,hi≤Ph.Wi is the weight of goods i.Lmax is the load limit of freight car.Vmax is the maximum capacity of freight car.li,w,ihi are the length, width, and height of goods i.Pl,Pw,Ph are the length, width, and height of truck compartment.The objective function formula of the vehicle routing optimization model is as follows:(23)min:∑i∈V∑j∈Vcijxij.Its objective function represents the minimum distance of all user points in the city within the range.cij is the distance between i and j.xij: if arci,j∈A is not an optimal solution, its value is equal to 0; otherwise, it is equal to 1.Constraints:(24)∑i∈Vxij=1,∀j∈V0,(25)∑j∈Vxij=1,∀i∈V0,(26)xij∈0,1,∀i,j∈V.


#### 4.2.2. Simulation Experiment and Result Analysis

In an e-commerce logistics center, there are 15 goods, which are matched with 2 trucks of different models. A total of 10 goods are selected to match with 2 trucks at a time. After picking, the same goods are replenished to the logistics center in time. The total logistics distribution area with the logistics center as the starting point is set as50∗50 cells, the coordinates of the starting point are set as 0.5,0.5, 1000 obstacles such as buildings are randomly distributed, and the side length of rectangular block area is S=1250. Make trucks deliver goods to designated places in the simulation area, and test them repeatedly for 10 times. Compare the time to find the best path and the transportation cost obtained by delivering goods, so as to compare the accuracy of each algorithm and the superiority of improved ant colony algorithm. The basic information of the goods is shown in Table 2.Table 2
Basic information of goods.
GoodsWeight limit (t)Length (m)Width (m)Height (m)Transportation fee (yuan)10.502.800.700.85300020.301.200.600.78150030.201.000.502.00100040.602.400.750.85350050.702.000.501.50400060.281.000.551.00120070.652.500.201.80365080.631.800.500.90360090.100.900.500.80600100.712.600.401.604200110.421.500.301.802200120.361.400.800.402000130.471.700.561.203100140.512.100.600.983200150.290.980.771.301800The basic information of trucks is shown in Table3.Table 3
Basic information table of freight cars.
TruckWeight limit (t)Capacity (cubic meter)Length (m)Width (m)Height (m)12.512.04.21.91.825.030.06.22.02.0The results of finding the optimal route time for 10 random goods distribution are shown in Table4.Table 4
Time comparison table for finding the best path (min).
Serial numberAnt colony algorithmParetoImproved ant colonyActual value132201025233161515342302024441305265392021226311513207321516158361917189352118231046251926The maximum transportation cost results obtained from 10 random cargo distributions are shown in Table5.Table 5
Comparison of maximum transportation expenses (10,000 yuan).
Serial numberAnt colony algorithmParetoImproved ant colony algorithmActual value11.72.02.42.322.01.82.12.231.81.91.92.142.53.03.23.253.02.93.13.262.82.93.02.972.12.32.72.682.72.52.93.091.92.22.32.4102.32.42.92.7The three algorithms calculate the alignment between the time to find the optimal path and the actual predicted value, as shown in Figure8.Figure 8
Time comparison diagram for finding the best path.The comparison between the maximum transportation cost obtained by the three algorithms and the actual predicted value is shown in Figure9.Figure 9
Comparison diagram of obtaining maximum transportation cost.Therefore, in the aspect of finding the optimal path, the gap between the predicted value and the actual value of ant algorithm is too large. Compared with the former, the predicted value of Pareto is obviously closer to the actual value, but the fact is that its value is unstable, and most of them are higher than the actual value. The improved algorithm mentioned in this paper is closer to the actual value curve than the former two, which shows that its accuracy is higher. In the aspect of revenue, the conclusion is roughly the same as that of the former. After the improvement of optimization mechanism, the performance of this algorithm has been greatly enhanced far beyond both. In the practical application of e-commerce logistics, it can also be seen that compared with the actual value, the improved ant colony algorithm is more suitable for the actual value, and even some predicted values are better than the actual value. Therefore, the improved ant colony algorithm proposed in this paper is more suitable for the performance of e-commerce logistics system. In this experiment, a series of irrelevant factors such as truck model, total area, and obstacle position are obviously controlled. In the experiment of optimization time, the change of optimization time with the change of target location is observed. In the maximum transportation cost experiment, the change of transportation cost with the random change of 10 goods was observed.


## 4.1. Algorithm Testing

### 4.1.1. Parameter Setting and Experimental Comparison

Set the total area size to20∗20 cells, the starting point coordinates to 0.5,0.5, the ending point coordinates to 19.5,19.5, the total amount of ants n=50, and the maximum iteration times to 100. Take τ0=4, λ=1.3, S=10, α=2, β=7, ρ=0.6, and ω=0.1. After experimental comparison, the data comparison results are shown in Table 1.Table 1
Data comparison table.
Number of iterationsOptimal pathAverage value of optimal pathLost ant numberAnt colonyParetoImproved ant colonyAnt colonyParetoImproved ant colonyAnt colonyParetoImproved ant colony073.565.055.780.080.084.050.032.040.01055.346.544.585.053.149.235.015.03.02048.044.544.573.447.044.729.00.00.03047.344.544.565.644.744.728.00.00.04047.044.544.563.044.744.727.00.00.05047.044.544.555.644.744.716.00.00.06047.044.544.553.044.744.712.00.00.07047.044.544.550.344.744.711.00.00.08047.044.544.546.744.744.76.00.00.09047.044.544.546.744.744.75.00.00.010047.044.544.546.744.744.74.00.00.0The change curve of the optimal path is shown in Figure5.Figure 5
Optimal path change graph.The change curve of the average value of the optimal path is shown in Figure6.Figure 6
Variation curve of average value of optimal path.The change curve of the number of lost ants is shown in Figure7.Figure 7
Change curve of lost ant number.It can be seen from the above chart that under the premise of iterative update 100 times, ant colony algorithm needs to consume roughly half of iterative times to get the optimal solution, its convergence speed is far lower than expected, and too many ants are lost stably, which shows that its stability is not high. The optimal path found by Pareto and the algorithm in this paper is roughly equal, but comparing them, it can be seen that the iteration times experienced by Pareto in finding the optimal path are obviously higher than those of the algorithm in this paper, that is, the optimization ability of Pareto is lower than that of the algorithm in this paper, so the algorithm proposed in this paper solves the problem of low efficiency in the initial stage of search well. Compared with Pareto, the convergence speed of this algorithm is further improved, and the number of ants lost is obviously reduced. It can be seen from the above that the optimization ability of the algorithm has been greatly improved, and the addition of weight factors is undoubtedly the icing on the cake, which makes the convergence speed of the algorithm and the ability to prevent ants from losing greatly improved. From the above three line charts, it can be seen that the algorithm in this paper is far superior to others in all aspects of experiments. This shows that the strategies and mechanisms proposed above are really efficient. The algorithm in this paper is closer to this experimental project, which can bring greater benefits and experimental results.


## 4.1.1. Parameter Setting and Experimental Comparison

Set the total area size to20∗20 cells, the starting point coordinates to 0.5,0.5, the ending point coordinates to 19.5,19.5, the total amount of ants n=50, and the maximum iteration times to 100. Take τ0=4, λ=1.3, S=10, α=2, β=7, ρ=0.6, and ω=0.1. After experimental comparison, the data comparison results are shown in Table 1.Table 1
Data comparison table.
Number of iterationsOptimal pathAverage value of optimal pathLost ant numberAnt colonyParetoImproved ant colonyAnt colonyParetoImproved ant colonyAnt colonyParetoImproved ant colony073.565.055.780.080.084.050.032.040.01055.346.544.585.053.149.235.015.03.02048.044.544.573.447.044.729.00.00.03047.344.544.565.644.744.728.00.00.04047.044.544.563.044.744.727.00.00.05047.044.544.555.644.744.716.00.00.06047.044.544.553.044.744.712.00.00.07047.044.544.550.344.744.711.00.00.08047.044.544.546.744.744.76.00.00.09047.044.544.546.744.744.75.00.00.010047.044.544.546.744.744.74.00.00.0The change curve of the optimal path is shown in Figure5.Figure 5
Optimal path change graph.The change curve of the average value of the optimal path is shown in Figure6.Figure 6
Variation curve of average value of optimal path.The change curve of the number of lost ants is shown in Figure7.Figure 7
Change curve of lost ant number.It can be seen from the above chart that under the premise of iterative update 100 times, ant colony algorithm needs to consume roughly half of iterative times to get the optimal solution, its convergence speed is far lower than expected, and too many ants are lost stably, which shows that its stability is not high. The optimal path found by Pareto and the algorithm in this paper is roughly equal, but comparing them, it can be seen that the iteration times experienced by Pareto in finding the optimal path are obviously higher than those of the algorithm in this paper, that is, the optimization ability of Pareto is lower than that of the algorithm in this paper, so the algorithm proposed in this paper solves the problem of low efficiency in the initial stage of search well. Compared with Pareto, the convergence speed of this algorithm is further improved, and the number of ants lost is obviously reduced. It can be seen from the above that the optimization ability of the algorithm has been greatly improved, and the addition of weight factors is undoubtedly the icing on the cake, which makes the convergence speed of the algorithm and the ability to prevent ants from losing greatly improved. From the above three line charts, it can be seen that the algorithm in this paper is far superior to others in all aspects of experiments. This shows that the strategies and mechanisms proposed above are really efficient. The algorithm in this paper is closer to this experimental project, which can bring greater benefits and experimental results.


## 4.2. Simulation Experiment

### 4.2.1. Establishment of an Objective Function

This experiment will test the cargo packing module and vehicle routing module in e-commerce logistics system.The objective function formula of the cargo packing optimization model is as follows:(19)max:∑i=1nPi⋅xi−Cf.Its objective function represents the maximum profit of transporting goods that are not more than the limited capacity and limited load of trucks.Pi is the transportation cost of goods I obtained.xi: goods not transported are equal to 0 and goods transported are equal to 1.Cf is the transportation costs required.Constraints:(20)∑i=1nWi⋅xi≤Lmax,(21)Vmax≥∑i=1nliwihi⋅xi,(22)li≤Pi,wi≤Pw,hi≤Ph.Wi is the weight of goods i.Lmax is the load limit of freight car.Vmax is the maximum capacity of freight car.li,w,ihi are the length, width, and height of goods i.Pl,Pw,Ph are the length, width, and height of truck compartment.The objective function formula of the vehicle routing optimization model is as follows:(23)min:∑i∈V∑j∈Vcijxij.Its objective function represents the minimum distance of all user points in the city within the range.cij is the distance between i and j.xij: if arci,j∈A is not an optimal solution, its value is equal to 0; otherwise, it is equal to 1.Constraints:(24)∑i∈Vxij=1,∀j∈V0,(25)∑j∈Vxij=1,∀i∈V0,(26)xij∈0,1,∀i,j∈V.


### 4.2.2. Simulation Experiment and Result Analysis

In an e-commerce logistics center, there are 15 goods, which are matched with 2 trucks of different models. A total of 10 goods are selected to match with 2 trucks at a time. After picking, the same goods are replenished to the logistics center in time. The total logistics distribution area with the logistics center as the starting point is set as50∗50 cells, the coordinates of the starting point are set as 0.5,0.5, 1000 obstacles such as buildings are randomly distributed, and the side length of rectangular block area is S=1250. Make trucks deliver goods to designated places in the simulation area, and test them repeatedly for 10 times. Compare the time to find the best path and the transportation cost obtained by delivering goods, so as to compare the accuracy of each algorithm and the superiority of improved ant colony algorithm. The basic information of the goods is shown in Table 2.Table 2
Basic information of goods.
GoodsWeight limit (t)Length (m)Width (m)Height (m)Transportation fee (yuan)10.502.800.700.85300020.301.200.600.78150030.201.000.502.00100040.602.400.750.85350050.702.000.501.50400060.281.000.551.00120070.652.500.201.80365080.631.800.500.90360090.100.900.500.80600100.712.600.401.604200110.421.500.301.802200120.361.400.800.402000130.471.700.561.203100140.512.100.600.983200150.290.980.771.301800The basic information of trucks is shown in Table3.Table 3
Basic information table of freight cars.
TruckWeight limit (t)Capacity (cubic meter)Length (m)Width (m)Height (m)12.512.04.21.91.825.030.06.22.02.0The results of finding the optimal route time for 10 random goods distribution are shown in Table4.Table 4
Time comparison table for finding the best path (min).
Serial numberAnt colony algorithmParetoImproved ant colonyActual value132201025233161515342302024441305265392021226311513207321516158361917189352118231046251926The maximum transportation cost results obtained from 10 random cargo distributions are shown in Table5.Table 5
Comparison of maximum transportation expenses (10,000 yuan).
Serial numberAnt colony algorithmParetoImproved ant colony algorithmActual value11.72.02.42.322.01.82.12.231.81.91.92.142.53.03.23.253.02.93.13.262.82.93.02.972.12.32.72.682.72.52.93.091.92.22.32.4102.32.42.92.7The three algorithms calculate the alignment between the time to find the optimal path and the actual predicted value, as shown in Figure8.Figure 8
Time comparison diagram for finding the best path.The comparison between the maximum transportation cost obtained by the three algorithms and the actual predicted value is shown in Figure9.Figure 9
Comparison diagram of obtaining maximum transportation cost.Therefore, in the aspect of finding the optimal path, the gap between the predicted value and the actual value of ant algorithm is too large. Compared with the former, the predicted value of Pareto is obviously closer to the actual value, but the fact is that its value is unstable, and most of them are higher than the actual value. The improved algorithm mentioned in this paper is closer to the actual value curve than the former two, which shows that its accuracy is higher. In the aspect of revenue, the conclusion is roughly the same as that of the former. After the improvement of optimization mechanism, the performance of this algorithm has been greatly enhanced far beyond both. In the practical application of e-commerce logistics, it can also be seen that compared with the actual value, the improved ant colony algorithm is more suitable for the actual value, and even some predicted values are better than the actual value. Therefore, the improved ant colony algorithm proposed in this paper is more suitable for the performance of e-commerce logistics system. In this experiment, a series of irrelevant factors such as truck model, total area, and obstacle position are obviously controlled. In the experiment of optimization time, the change of optimization time with the change of target location is observed. In the maximum transportation cost experiment, the change of transportation cost with the random change of 10 goods was observed.


## 4.2.1. Establishment of an Objective Function

This experiment will test the cargo packing module and vehicle routing module in e-commerce logistics system.The objective function formula of the cargo packing optimization model is as follows:(19)max:∑i=1nPi⋅xi−Cf.Its objective function represents the maximum profit of transporting goods that are not more than the limited capacity and limited load of trucks.Pi is the transportation cost of goods I obtained.xi: goods not transported are equal to 0 and goods transported are equal to 1.Cf is the transportation costs required.Constraints:(20)∑i=1nWi⋅xi≤Lmax,(21)Vmax≥∑i=1nliwihi⋅xi,(22)li≤Pi,wi≤Pw,hi≤Ph.Wi is the weight of goods i.Lmax is the load limit of freight car.Vmax is the maximum capacity of freight car.li,w,ihi are the length, width, and height of goods i.Pl,Pw,Ph are the length, width, and height of truck compartment.The objective function formula of the vehicle routing optimization model is as follows:(23)min:∑i∈V∑j∈Vcijxij.Its objective function represents the minimum distance of all user points in the city within the range.cij is the distance between i and j.xij: if arci,j∈A is not an optimal solution, its value is equal to 0; otherwise, it is equal to 1.Constraints:(24)∑i∈Vxij=1,∀j∈V0,(25)∑j∈Vxij=1,∀i∈V0,(26)xij∈0,1,∀i,j∈V.


## 4.2.2. Simulation Experiment and Result Analysis

In an e-commerce logistics center, there are 15 goods, which are matched with 2 trucks of different models. A total of 10 goods are selected to match with 2 trucks at a time. After picking, the same goods are replenished to the logistics center in time. The total logistics distribution area with the logistics center as the starting point is set as50∗50 cells, the coordinates of the starting point are set as 0.5,0.5, 1000 obstacles such as buildings are randomly distributed, and the side length of rectangular block area is S=1250. Make trucks deliver goods to designated places in the simulation area, and test them repeatedly for 10 times. Compare the time to find the best path and the transportation cost obtained by delivering goods, so as to compare the accuracy of each algorithm and the superiority of improved ant colony algorithm. The basic information of the goods is shown in Table 2.Table 2
Basic information of goods.
GoodsWeight limit (t)Length (m)Width (m)Height (m)Transportation fee (yuan)10.502.800.700.85300020.301.200.600.78150030.201.000.502.00100040.602.400.750.85350050.702.000.501.50400060.281.000.551.00120070.652.500.201.80365080.631.800.500.90360090.100.900.500.80600100.712.600.401.604200110.421.500.301.802200120.361.400.800.402000130.471.700.561.203100140.512.100.600.983200150.290.980.771.301800The basic information of trucks is shown in Table3.Table 3
Basic information table of freight cars.
TruckWeight limit (t)Capacity (cubic meter)Length (m)Width (m)Height (m)12.512.04.21.91.825.030.06.22.02.0The results of finding the optimal route time for 10 random goods distribution are shown in Table4.Table 4
Time comparison table for finding the best path (min).
Serial numberAnt colony algorithmParetoImproved ant colonyActual value132201025233161515342302024441305265392021226311513207321516158361917189352118231046251926The maximum transportation cost results obtained from 10 random cargo distributions are shown in Table5.Table 5
Comparison of maximum transportation expenses (10,000 yuan).
Serial numberAnt colony algorithmParetoImproved ant colony algorithmActual value11.72.02.42.322.01.82.12.231.81.91.92.142.53.03.23.253.02.93.13.262.82.93.02.972.12.32.72.682.72.52.93.091.92.22.32.4102.32.42.92.7The three algorithms calculate the alignment between the time to find the optimal path and the actual predicted value, as shown in Figure8.Figure 8
Time comparison diagram for finding the best path.The comparison between the maximum transportation cost obtained by the three algorithms and the actual predicted value is shown in Figure9.Figure 9
Comparison diagram of obtaining maximum transportation cost.Therefore, in the aspect of finding the optimal path, the gap between the predicted value and the actual value of ant algorithm is too large. Compared with the former, the predicted value of Pareto is obviously closer to the actual value, but the fact is that its value is unstable, and most of them are higher than the actual value. The improved algorithm mentioned in this paper is closer to the actual value curve than the former two, which shows that its accuracy is higher. In the aspect of revenue, the conclusion is roughly the same as that of the former. After the improvement of optimization mechanism, the performance of this algorithm has been greatly enhanced far beyond both. In the practical application of e-commerce logistics, it can also be seen that compared with the actual value, the improved ant colony algorithm is more suitable for the actual value, and even some predicted values are better than the actual value. Therefore, the improved ant colony algorithm proposed in this paper is more suitable for the performance of e-commerce logistics system. In this experiment, a series of irrelevant factors such as truck model, total area, and obstacle position are obviously controlled. In the experiment of optimization time, the change of optimization time with the change of target location is observed. In the maximum transportation cost experiment, the change of transportation cost with the random change of 10 goods was observed.


## 5. Conclusion

Compared with the other two, the improved ant colony algorithm shows high-efficiency optimization ability and fast convergence speed, while the other two have problems in related performance after multiple iterations, even premature phenomenon. This shows that the improved finer mechanism and conversion mechanism are feasible and effective. In the simulation experiment, it can be found that the improved ant colony algorithm in the actual problem of computing power as expected has obviously higher stability and accuracy than the other two. Therefore, the improved ant colony algorithm design is successful and more suitable for the application of e-commerce logistics system. In the future research, the emphasis is to further improve the performance and efficiency of this algorithm, such as optimization ability, reducing the number of ants lost and improving the cost performance, so as to further improve the efficiency of domestic logistics system.



---

*Source: 9467095-2022-04-09.xml*