# The Optimization of Path Planning for Express Delivery Based on Clone Adaptive Ant Colony Optimization

Authors: Yao Zhang; Yan Liu; Chaoqun Li; Yang Liu; Jie Zhou
Journal: Journal of Advanced Transportation
 (2022)

---

## Abstract

In recent years, China's express delivery market has developed rapidly in the context of a booming economy. However, logistics costs are still high, which will affect the decision-making and policy making of relevant departments. Therefore, it is essential to optimize the last-mile assignment problem (LMAP) to meet the consumer’s demand for delivery time and reduce economic expenditure. The LMAP of express delivery requires multiple packages to be delivered to different destinations. Finding the path with the minimum delivery cost and time is an NP-hard problem, and it is impossible to obtain the optimal solution by enumerating all possible answers. This study proposes a new express delivery path planning method based on a clone adaptive ant colony optimization (CAACO) to find suboptimal solutions. Moreover, a new distribution cost fitness function constructed by weighing the economic expenditure and time of express delivery is designed. Specifically, a new adaptive operator and a novel clone operator are also designed to accelerate the speed of convergence. Finally, by comparing the performance of CAACO with ant colony optimization (ACO), simulated annealing (SA), and genetic algorithm (GA), the effectiveness of CAACO in solving the express LAMP is verified. In the simulation results, it is obvious that the economic expenditure and time of express delivery based on the CAACO are lower than ACO, SA, and GA, and the convergence speed is also faster than the SA and GA. It can be seen that CAACO has valuable benefits in solving LMAP.


---

## Body

## 1. Introduction

China's express delivery industry started in 1979. After more than 40 years of development, it has formed a strong market scale. At this stage, China has developed as the world's largest express delivery country, and the express delivery industry has been fully integrated into the lives of the people [1]. It is also a necessary support for increasing the added value of the tertiary industry, stabilizing the economy, and promoting transformation.The express industry has broad prospects and huge market potential. Among them, the path selection of last-mile assignment problem (LMAP) is very important, and it is the only link that directly contacts consumers face-to-face, which is of great significance. The delivery staff needs to deliver the shipment to the designated location of consumers in a complete and timely manner [2, 3]. Due to the relatively scattered delivery locations, it is extremely urgent to optimize the delivery path in order to deliver the shipment to the designated location of the consumer as soon as possible and reduce the cost of delivery.The ultimate goal of this study is to ascertain the optimal path to express LAMP, neither the fastest path nor the shortest path [4, 5]. This path should meet the consumer's demand for delivery time and reduce the delivery economic expenditure as much as possible. The variable cost of last mile is mainly composed of the time spent and the total distance of delivery [6, 7]. Due to differences in the number of traffic lights on each road, the average waiting time for red lights, and road congestion index, in order to ensure that the express delivery arrives at the designated delivery location of consumers on time, sometimes it is necessary to choose a road with a longer distance but fewer traffic lights or a lower road congestion index.In recent years, the use of metaheuristics to find optimal solutions has proven to be very effective [8–13]. For example, the monarch butterfly optimization (MBO) proposed by Wang et al. (2015) is to solve the optimization problems such as display combination and processing function by simulating the migration behavior of monarch butterfly in nature [14]. A slime mold algorithm (SMA), which mainly simulates the foraging and diffusion behavior of slime molds, was proposed in 2020. It can simulate the process of negative and positive feedbacks generated by slime mold propagation wave based on biological oscillator by using adaptive weight and obtain the food optimal connection network with good exploration ability and development tendency, which has a good application prospect [15]. A moth search algorithm (MSA) is an emerging meta-heuristic intelligent optimization algorithm proposed in 2016. It simulates the behavior of moths flying towards the moon at night and has the advantages of simple structure, few parameters, high precision, and strong robustness [16]. In addition, heuristic algorithms such as weighted mean of vectors (INFO) [17], colony predation algorithm (CPA) [18], Runge–Kutta method (RUN) [19], hunger games search (HGS) [20], and Harris hawks optimization (HHO) [21] have been proposed by scholars [22, 23].A new express delivery path planning method based on the clone adaptive ant colony optimization (CAACO) is proposed in this study, which aims at minimizing economic expenditure and time. To sum up, the main innovations and contributions of this study are as follows:(1)
A new delivery cost fitness function is proposed to evaluate the effectiveness of CAACO.(2)
Accuracy and execution efficiency of the algorithm are improved by designing a new clone operator.(3)
An adaptive strategy is introduced into the ant colony optimization (ACO) to accelerate the algorithm convergence speed.(4)
CAACO proposed in this study can find the suboptimal distribution path with a low economic cost, short delivery time, and less fuel consumption.In the simulation experiment, the ability of CAACO to find the optimal solution is compared with that of genetic algorithm (GA) and simulated annealing (SA). Simulation results show that the CAACO has better performance than algorithms based on the SA and GA in allocating path planning, and the global search capability of CAACO is effectively improved by the adaptive and clone strategies proposed in this study.The continuation of this study is as follows: related work is described in the second part of this study. The distribution path planning model is explained in the third part. Optimizing express routing using the CAACO method is in the fourth part. Simulation results and comparisons are analyzed in the fifth part. The conclusion is given in the sixth part.


## 2. Related Work

In LMAP, the cost and efficiency of express delivery are directly affected by the choice of delivery path. A suitable and efficient path planning algorithm that can reduce economic expenditure is of great significance to improve the efficiency of express delivery. Therefore, an effective distribution plan can reduce the economic expenditure of distribution as much as possible under the limited distribution resources and greatly increase the overall distribution efficiency [24, 25].Reference [26] proposed a strategy for dispatching a fleet of drones and a truck to deliver packages. The strategy involves trucks for loading packages and transporting them to the vicinity of the distribution point, and drones for door-to-door delivery. For a transportation network that includes locations where trucks can park and where drones can fly and deliver, the study provides a mixed linear integer programming formula to achieve the shortest overall delivery time. In order to expand the scope of distribution, the authors proposed a GRASP meta-heuristic method. However, the strategy takes a long time to run, and it only considers the time cost of delivery without considering the economic cost.In reference [27], a SA method was proposed for vehicle routing problems (VRPs) in unmanned aerial vehicle (UAV) delivery scenarios. In order to strike a balance between the cost and delivery time of UAV delivery, the authors propose two multitrip VRPs to minimize the cost and the total delivery time, respectively. There is also a function that takes into account the energy consumption model and the reuse of unmanned aerial vehicles (UAVs). Although the simulation results show that SA can stably find the suboptimal solution in actual scenarios, the program execution speed is slow and execution time is long.In view of the problem that traditional ACO tends to fall into local optimization when solving the path planning of logistics robots, reference [28] proposed a path planning method based on the ACO. The dynamic adjustment of state transition probabilities is achieved by introducing heuristic operators into the calculation of path transition probabilities. In this way, the ACO not only avoids stagnation but also improves the pheromone update strategy. Although the improved ACO can significantly reduce the number of iterations and shorten the path length, unfortunately, the time complexity of ACO is still very high.A path planning method based on Dijkstra (DB) to minimize the delivery distance of UAV is mentioned in reference [29], which makes use of public transport network. By letting drones that deliver packages take on public transportation and drive on top of it, the delivery range of packages has been significantly increased. Since the multimode network composed of the itinerary of public transportation vehicles and the flight of drones is very complex, the authors use a set of simple programs to turn it into a simple network. In practice, the DB method is extended to cases with uncertainty because public transport vehicles cannot travel exactly at the specified time. It is a pity that the complexity of the DB method is very high, and the execution efficiency is very low.Reference [30] carried out research on the emergency transportation problem after natural disasters and constructed the objective function and complex constraints of the optimal plan according to the two aspects of fairness and effectiveness. In order to simplify the solution process, the hybrid ant colony optimization algorithm (denoted as ACOMR) was proposed. By studying emergency traffic problems in real natural disaster scenarios, an integer linear programming model (cum-MDVRP) is established to comprehensively consider cumulative vehicles and multistation vehicle routing problems. The performance of the cum-MDVRP model is good, and the effectiveness and stability of the ACOMR algorithm are superior. In fact, the possibility of the algorithm falling into premature convergence is still relatively high.The last mile of logistics is the only significant part of online commodity transactions where direct face-to-face contact with consumers is involved. Therefore, it is necessary to reasonably plan the distribution path so that the distributors can deliver the products in a timely manner. On the premise of having the service attitude and ability that satisfy most consumers, the cost of logistics enterprises should also be saved [1, 31]. The proposed method needs to consider time and economic factors to help the delivery staff to deliver orders efficiently.


## 3. System Model

LMAP is an NP-hard problem, which belongs to integer linear programming and needs a heuristic algorithm to solve it.This section introduces an integer linear optimization model for path planning to minimize the economic expenditure and time of express delivery. The mathematical model of LMAP for express delivery can be expressed as a set of paths betweenn sites and one station, where the node set includes n sites numbered 1,2,…,n and one express station numbered 0.The delivery path starts from the station0, and after the n sites are distributed once each, it returns to the station 0. Therefore, the path of delivering n sites can be expressed as U=v1,…,vi,…,vni∈1,n,vi∈1,n, such that U contains all indexes of delivery sites.Two sites can form a link. For example, the link from sitex to site y can be expressed as e=x⟶yx≠y. The cost of link e is mainly limited by the three parameters of link length, red light waiting time, and delivery speed. Among them, the link length can be expressed as Le, the red light waiting time can be expressed as Re, and the delivery speed can be expressed as Ve.


### 3.1. Path Planning Model

On the linke=x⟶yx≠y, the distribution cost of express delivery DCe consists of economic and time, where economic expenditure is represented by ECe and time is represented by TCe. So, the distribution cost of passing link e can be represented as follows:(1)DCe=ECe⋅ξec+TCe⋅ηtc,where ξec is the weighting coefficient of fuel consumption cost and ηtc is weighting coefficient of time. The distribution cost takes into account not only the economic cost but also time. In this way, the optimal path based on low distribution cost has low economic expenditure and short time.Suppose the length of linke is Le, and the average waiting time of the red light is Re, the economic expenditure through link e can be represented as follows:(2)ECeLe,Re=Le⋅o+Re⋅q⋅p,where o is the fuel consumption rate of express delivery vehicles, q is the fuel consumption rate of the car at idling speed, and p is the fuel price.Assume that the average travel speed of the delivery personnel through linke is Ve, the time of passing through link e can be represented as follows:(3)TCeLe,Ve,Re=LeVe+Re.For example, when the length of linke is 5 km, the express delivery vehicle consumes 8 L fuel per 100 km, and the fuel price is 7.13 yuan per liter, the average waiting time of the red light is 0.1 min, the average driving speed of the delivery person is 1 km/min, and the automobile fuel consumption rate at idling speed is 0.04 L/min. According to equation (2), we can get ECeLe,Re=5km⋅0.08L/km+0.1min⋅0.04L/min⋅7.13yuan/L=2.852yuan. According to equation (3), we can get TCeLe,Ve,Re=5km/1km/min+0.1min=5.1min.


### 3.2. Decision Variables

According to the path planning model described in Section 3.1, on the condition that constant parameters such as fuel efficiencyo, fuel speed q, and oil price p of express vehicles are known, the economic cost ECe can be obtained by inputting decision variables Le and Re on link e according to formula (2). According to formula (3), the decision variables for obtaining delivery time TCe are Le, Re, and Ve. Then, formula (1) is used to calculate the DCe of the e.


### 3.3. Path Functions

Suppose a deliveryman starts at the delivery station0, the delivery path is U=v1,…,vi,…,vni∈1,n,vi∈1,n.


#### 3.3.1. Economic Expenditure Function

The economic expenditure ofU can be calculated by the following formula:(4)ECU=∑e∈UECeLe,Re,where ECU is the total economic expenditure of delivering n express items according to U, e is a link on U, and ECe is the economic expenditure of passing through link e.


#### 3.3.2. Delivery Time Function

The delivery time ofU can be calculated by the following formula:(5)TCU=∑e∈UTCLe,Ve,Re,where TCU is the total time of U, e is a link on U, Le is the length of link e, Ve is the average speed through link e, and Re is the total red light waiting time for delivering n express items according to U.


#### 3.3.3. Distribution Cost Function

The distribution cost of the delivery pathU consists of economic expenditure and time, which can be calculated by the following formula:(6)DCU=∑e∈UDCe,where DCU is the distribution cost for delivering n express items according to U.


### 3.4. Objective Function

According to the path planning model based on economic expenditure and time minimization conditions, the objective of LMAP for express delivery is to find a path with the least economic expenditure and time that starts from the delivery station0, delivers n express parcels in a certain order, and then returns to the express station 0.Fitness is an index used to measure the pros and cons of individual organisms in nature. The fitness function refers to the correspondence between the combination of the basic attributes of all individuals in practical problems and their fitness. This study calculates the fitness by calculating the economic expenditure and time of the express path to analyze the advantages and disadvantages of the path. The fitness function is shown in the following formula:(7)Fitness=minDCU.


### 3.5. Restrictions

Finding the suboptimal delivery path to minimize economic expenditure and time is the main goal of LMAP for express delivery. The express delivery starts from the station0, traverses all sites once, and then returns to the station 0. The path must meet the following constraints:(8)0≤ECU≤ECmax,(9)0≤TCU≤TCmax.Among them,ECmax represents the maximum economic expenditure acceptable to the courier company and TCmax represents the longest time a delivery person works in a day.


## 3.1. Path Planning Model

On the linke=x⟶yx≠y, the distribution cost of express delivery DCe consists of economic and time, where economic expenditure is represented by ECe and time is represented by TCe. So, the distribution cost of passing link e can be represented as follows:(1)DCe=ECe⋅ξec+TCe⋅ηtc,where ξec is the weighting coefficient of fuel consumption cost and ηtc is weighting coefficient of time. The distribution cost takes into account not only the economic cost but also time. In this way, the optimal path based on low distribution cost has low economic expenditure and short time.Suppose the length of linke is Le, and the average waiting time of the red light is Re, the economic expenditure through link e can be represented as follows:(2)ECeLe,Re=Le⋅o+Re⋅q⋅p,where o is the fuel consumption rate of express delivery vehicles, q is the fuel consumption rate of the car at idling speed, and p is the fuel price.Assume that the average travel speed of the delivery personnel through linke is Ve, the time of passing through link e can be represented as follows:(3)TCeLe,Ve,Re=LeVe+Re.For example, when the length of linke is 5 km, the express delivery vehicle consumes 8 L fuel per 100 km, and the fuel price is 7.13 yuan per liter, the average waiting time of the red light is 0.1 min, the average driving speed of the delivery person is 1 km/min, and the automobile fuel consumption rate at idling speed is 0.04 L/min. According to equation (2), we can get ECeLe,Re=5km⋅0.08L/km+0.1min⋅0.04L/min⋅7.13yuan/L=2.852yuan. According to equation (3), we can get TCeLe,Ve,Re=5km/1km/min+0.1min=5.1min.


## 3.2. Decision Variables

According to the path planning model described in Section 3.1, on the condition that constant parameters such as fuel efficiencyo, fuel speed q, and oil price p of express vehicles are known, the economic cost ECe can be obtained by inputting decision variables Le and Re on link e according to formula (2). According to formula (3), the decision variables for obtaining delivery time TCe are Le, Re, and Ve. Then, formula (1) is used to calculate the DCe of the e.


## 3.3. Path Functions

Suppose a deliveryman starts at the delivery station0, the delivery path is U=v1,…,vi,…,vni∈1,n,vi∈1,n.


### 3.3.1. Economic Expenditure Function

The economic expenditure ofU can be calculated by the following formula:(4)ECU=∑e∈UECeLe,Re,where ECU is the total economic expenditure of delivering n express items according to U, e is a link on U, and ECe is the economic expenditure of passing through link e.


### 3.3.2. Delivery Time Function

The delivery time ofU can be calculated by the following formula:(5)TCU=∑e∈UTCLe,Ve,Re,where TCU is the total time of U, e is a link on U, Le is the length of link e, Ve is the average speed through link e, and Re is the total red light waiting time for delivering n express items according to U.


### 3.3.3. Distribution Cost Function

The distribution cost of the delivery pathU consists of economic expenditure and time, which can be calculated by the following formula:(6)DCU=∑e∈UDCe,where DCU is the distribution cost for delivering n express items according to U.


## 3.3.1. Economic Expenditure Function

The economic expenditure ofU can be calculated by the following formula:(4)ECU=∑e∈UECeLe,Re,where ECU is the total economic expenditure of delivering n express items according to U, e is a link on U, and ECe is the economic expenditure of passing through link e.


## 3.3.2. Delivery Time Function

The delivery time ofU can be calculated by the following formula:(5)TCU=∑e∈UTCLe,Ve,Re,where TCU is the total time of U, e is a link on U, Le is the length of link e, Ve is the average speed through link e, and Re is the total red light waiting time for delivering n express items according to U.


## 3.3.3. Distribution Cost Function

The distribution cost of the delivery pathU consists of economic expenditure and time, which can be calculated by the following formula:(6)DCU=∑e∈UDCe,where DCU is the distribution cost for delivering n express items according to U.


## 3.4. Objective Function

According to the path planning model based on economic expenditure and time minimization conditions, the objective of LMAP for express delivery is to find a path with the least economic expenditure and time that starts from the delivery station0, delivers n express parcels in a certain order, and then returns to the express station 0.Fitness is an index used to measure the pros and cons of individual organisms in nature. The fitness function refers to the correspondence between the combination of the basic attributes of all individuals in practical problems and their fitness. This study calculates the fitness by calculating the economic expenditure and time of the express path to analyze the advantages and disadvantages of the path. The fitness function is shown in the following formula:(7)Fitness=minDCU.


## 3.5. Restrictions

Finding the suboptimal delivery path to minimize economic expenditure and time is the main goal of LMAP for express delivery. The express delivery starts from the station0, traverses all sites once, and then returns to the station 0. The path must meet the following constraints:(8)0≤ECU≤ECmax,(9)0≤TCU≤TCmax.Among them,ECmax represents the maximum economic expenditure acceptable to the courier company and TCmax represents the longest time a delivery person works in a day.


## 4. Path Planning for Express Distribution Cost Based on CAACO

A new express delivery path planning method based on the CAACO is proposed in this study, which aims at minimizing economic expenditure and time. It is worth mentioning that ants' path-finding behavior during foraging is the inspiration for this idea [32, 33].Ants release substances called pheromones along the path they travel as they search for food. At the same time, ants are more inclined to choose the path with high pheromone concentration and leave the pheromone on it again, forming a positive feedback mechanism. As a result, more and more ants take the shortest path to the food source, and the pheromone concentration on the shortest path gets higher and higher. Eventually, the ants in the colony can find a food source along the shortest path [34–36]. However, the traditional ACO is slow to find the optimal solution. The CAACO introduces the adaptive strategy and the clone strategy into the traditional ACO in order to plan the optimal path of express delivery faster and more accurately.This section introduces several important parts of the CAACO, mainly parameter declaration, population initialization, fitness calculation, path selection method, operator optimization, pheromone update formula, and termination conditions.


### 4.1. Coding Scheme

Since coding directly affects the distribution cost, adaptability, and pheromone changes in the process of CAACO implementation, program coding is the primary task to solve the LMAP of express delivery based on the CAACO. Although there are many encoding methods used today, such as real numbers and binary numbers, not every encoding is suitable for all algorithms. In order to increase the search space, this study uses real number coding after careful consideration.Suppose there arem ants numbered 1–m, n express sites, and one delivery station, each ant should generate an express delivery path. As shown in Figure 1, in the path planning problem of minimizing the distribution cost of express delivery, the starting point of each ant should be the delivery station 0. Moreover, each ant returns to the station 0 after delivering n sites, which satisfies the following formula:(10)ak,l≠ak,sk∈1,m,l∈1,n,s∈1,n,l≠s,where ak,l represents the No. 1 site delivered by ant k.Figure 1
Distribution path simulation diagram.The delivery path of the antk is expressed as ak,1,ak,2,…,ak,n−1,ak,n. It is necessary to ensure that the delivery path is one of the full permutations of numbers 1–n. For example, when n is 50, the delivery path may be 28,48,…,16,40, as shown in Figure 1.The totality can be expressed by the following formula:(11)A=a1,1a1,2⋯a1,n−1a1,na2,1a2,2⋯a2,n−1a2,n⋯⋯ak,l⋯⋯am−1,1am−1,2⋯am−1,n−1am−1,nam,1am,2⋯am,n−1am,nk∈1,m,l∈1,n,ak,l∈1,n.


### 4.2. Ant Colony Initialization

In order to establish a connection between the express delivery problem and CAACO, this section codes the ant colony based on the express delivery model. Therefore,m ants should be randomly generated as the initial colony before the iteration. The m ants contained in the initial colony can be expressed as A=A1,A2,…,Am−1,Am. The ant k is expressed as Ak=ak,1,ak,2,…,ak,n−1,ak,n.


### 4.3. Fitness Evaluation

Since the ant's path selection scheme is evaluated according to its corresponding fitness value, the fitness function has a great influence on the CAACO's performance. In the multicondition constraint express delivery optimization problem, when the number of traffic lights arrangement rules, the average waiting time of the traffic lights, the delivery time cost coefficient, the oil price, the delivery speed, and other conditions are met, the distribution cost of each ant in the ant colony during the express delivery process can be obtained by formula (6). Furthermore, the smaller the distribution cost, the better the path.


### 4.4. Fault Recognition

The distribution path planned for the LMAP should include each express sites once, that is, no individual should have a duplicate express sites number.In the iterative process, the CAACO avoided multiple visits to the same express sites by using a taboo table when individuals in the population selected paths. In the normal case, individuals in an ant colony should be a legitimate viable solution. Meanwhile, the CAACO tested individuals in the population to avoid incalculable failures. If the same express stop number appears, the individual will be discarded and a new solution will be randomly generated.


### 4.5. Path Selection

Them ants in the ant colony can select sites based on the distribution cost and pheromone content on the path. Among them, the sum of pheromones on the link x,y between site x and site y is denoted by τxy, and the distribution cost is denoted by uxy.The path selection rules of the ants are as follows: each ant starts from the delivery station0, traverses all sites once, and then returns to the delivery station 0. Moreover, each ant leaves a trail of pheromones in its path as it finishes its delivery. Before the CAACO iteration, pheromone content on all legitimate links is the same. The selection of the next site about ant k is influenced by pheromone content and the consumption value of distribution costs. Pxy indicates the probability that the ant gets from site x to site y. In this case, this study uses a taboo table to control an access to each site for only once. When the ant k selects the No. 1 delivery site, the first l−1 identified sites are stored in the taboo table. The possible value range of the No. 1 delivery site should be set B, which is the set 1,2,…,n−1,n excluding the elements in the taboo table.The probability of selecting other sites can be calculated by calculating the number of pheromones on the path and the distribution cost, so as to select the next site. In the No. 1 generation, the probability of ants choosing the linkx,y is calculated by the following formula:(12)Pxyt=τx,yαtux,yβt∑i∈Bτx,iαtux,iβtx∈1,n,y∈B,x≠y.(13)DC=dc1,1dc1,2⋯dc1,n−1dc1,ndc2,1dc2,2⋯dc2,n−1dc2,n⋯⋯dcx,y⋯⋯dcn−1,1dcn−1,2⋯dcn−1,n−1dcn−1,ncn,1cn,2⋯cn,n−1cn,nx∈1,n,y∈1,n.(14)ux,y=1cx,y.In formula (12), τx,yt is the pheromone content on the link x,y of the No. t generation. Among them, ux,y represents the reciprocal of the distribution cost from site x to site y, which is called distribution benefit. α corresponds to the weighted index of pheromone content, and β corresponds to the weighted index of distribution cost consumption, thereby affecting the pheromone concentration and distribution cost consumption. When the other parameters except α are unchanged, as α increases, the probability of ants choosing a path with a higher pheromone concentration increases. When the other parameters except β are unchanged, as β increases, the probability of ants choosing a path with higher distribution efficiency increases.From formulas (13) and (14), the distribution benefit ux,y can be calculated, where DC represents the distribution cost consumption value of the link x,y.


### 4.6. Pheromone Update

In order to find the best delivery path, it is necessary to calculate and update the pheromone on each path. In fact, when the ant passes through the linkx,y, it will leave a pheromone on this path. As the algorithm continues to evolve, the pheromone content on each link continues to volatilize during the evolution process. In the CAACO, each ant traverses all sites once from station 0 and then returns to station 0 and leave pheromone on the delivery path. In round t,t+1, the pheromone on link x,y is modified to(15)τxyt+1=1−ρ⋅τxyt+Δτxyt,t+1.(16)Δτxyt,t+1=∑k=1mΔτxykt,t+1.In formula (15), Δτxyt,t+1 represents the pheromone content left by ants on the link x,y in the t,t+1 round. ρ represents the pheromone volatilization factor, which affects pheromone volatilization rate. According to formula (16), Δτxykt,t+1 represents the pheromone content of the ant k on the link x,y in the t,t+1 round.The ant colony pheromone concentration of CAACO is updated and calculated by the following formula:(17)τxyk=uxy⋅Q,where Q is a constant representing the unit concentration of pheromones left by the ant along its path and uxy represents the distribution benefit value of the link x,y. In this model, ant colonies use the entire pheromone environment. When ants find a transmission route, they release pheromone.


### 4.7. Termination Condition

The program automatically determines whether the stop condition is met during the CAACO execution. After the optimal solution of the algorithm enters a long-term stable state, when the algorithm end condition is met, the program will stop after outputting the result.


### 4.8. Adaptive Operator

When using the CAACO to solve the LMAP of express delivery, the convergence rate of the algorithm is very fast due to its positive feedback mechanism. But it is easy to fall into premature convergence, which makes it impossible to find the delivery path with the lowest distribution cost. This is because the ants select the link based on the pheromone content on the path. The path selection range of ants is limited to some high pheromone content paths because the pheromone content of multiple ant paths may be much higher than other paths, which reduces the global search ability of the algorithm.For this reason, this study chooses an adaptive operator for optimization. Actually, by modifying the pheromone volatilization factor, the probability of being selected for a path that is rarely selected is slightly increased.The adaptive operator updates the pheromone by adding the adaptive method of the pheromone volatilization function, as shown in the following formulas:(18)τxyt+1=1−ρ1+λt⋅τxyt+Δτxyt,t+1τ≥τmax,τxyt+1=1−ρ1−λt⋅τxyt+Δτxyt,t+1τ<τmax,.(19)λt=tc,where λt is the pheromone volatilization index formula proportional to the iterative generation number, t is the iterative algebra, and c is a constant.


### 4.9. Clone Operator

By reserving the adaptive individuals to the maximum extent, the cloning operator significantly improves the convergence performance of CAACO. At the same time, the global search ability of CAACO does not decrease because of the application of clone operator. In addition, the best-fit individual in the population is selected as the clone parent. The specific optimization operation of clone operator in CAACO is shown as follows:In each iteration, the ant individual with the lowest distribution cost is selected as the parentp to clone some identical replicas, and then each clone is subjected to mutation operation. That is, for each clone c, two random integers v and s satisfy v∈1,n,s∈1,n,v≠s. Then, the No. v and No. s sites are swapped, which is swapac,v,ac,s. After these operations, a new delivery path is created. When all the copies are mutated, the distribution cost of all the copies is calculated and the copy with the smallest distribution cost is recorded as r. If the distribution cost of r is smaller than the parent p, then the delivery path of r replaces the p.


### 4.10. CAACO Steps

The main steps of CAACO are as follows:Step 1. Set parameters of path collection and constraints of the LMAP. Define the pheromone volatilization coefficient and the initial pheromone content of each path. Set the maximum number of iterations is set toGt_max, and the initial number of iterations is Gt=0. The ant colony consists of M ants.Step 2. Record the iteration algebra,Gt=Gt+1.Step 3. Enumerate the next ant,k=k+1.Step 4. Increase the number of sites,i=i+1.Step 5. First, the probability of the next possible delivery location is calculated according to formula (12). Second, the next delivery location is chosen by roulette.Step 6. Ifi=n, continue to step 7; otherwise, reset i=0, then skip to step 3.Step 7. By calculating the fitness of each ant individual, the best individual parent is selected and cloned.Step 8. The best clone after mutation is selected and has the probability to replace the parent.Step 9. The pheromone content of each link is updated according to formula (15).Step 10. WhenGt=Gt_max, the result will be printed and the program will stop; otherwise, reset k=0, and then go to step 2.Figure2 shows the entire execution flow of the CAACO algorithm.Figure 2
Flow chart of CAACO.


## 4.1. Coding Scheme

Since coding directly affects the distribution cost, adaptability, and pheromone changes in the process of CAACO implementation, program coding is the primary task to solve the LMAP of express delivery based on the CAACO. Although there are many encoding methods used today, such as real numbers and binary numbers, not every encoding is suitable for all algorithms. In order to increase the search space, this study uses real number coding after careful consideration.Suppose there arem ants numbered 1–m, n express sites, and one delivery station, each ant should generate an express delivery path. As shown in Figure 1, in the path planning problem of minimizing the distribution cost of express delivery, the starting point of each ant should be the delivery station 0. Moreover, each ant returns to the station 0 after delivering n sites, which satisfies the following formula:(10)ak,l≠ak,sk∈1,m,l∈1,n,s∈1,n,l≠s,where ak,l represents the No. 1 site delivered by ant k.Figure 1
Distribution path simulation diagram.The delivery path of the antk is expressed as ak,1,ak,2,…,ak,n−1,ak,n. It is necessary to ensure that the delivery path is one of the full permutations of numbers 1–n. For example, when n is 50, the delivery path may be 28,48,…,16,40, as shown in Figure 1.The totality can be expressed by the following formula:(11)A=a1,1a1,2⋯a1,n−1a1,na2,1a2,2⋯a2,n−1a2,n⋯⋯ak,l⋯⋯am−1,1am−1,2⋯am−1,n−1am−1,nam,1am,2⋯am,n−1am,nk∈1,m,l∈1,n,ak,l∈1,n.


## 4.2. Ant Colony Initialization

In order to establish a connection between the express delivery problem and CAACO, this section codes the ant colony based on the express delivery model. Therefore,m ants should be randomly generated as the initial colony before the iteration. The m ants contained in the initial colony can be expressed as A=A1,A2,…,Am−1,Am. The ant k is expressed as Ak=ak,1,ak,2,…,ak,n−1,ak,n.


## 4.3. Fitness Evaluation

Since the ant's path selection scheme is evaluated according to its corresponding fitness value, the fitness function has a great influence on the CAACO's performance. In the multicondition constraint express delivery optimization problem, when the number of traffic lights arrangement rules, the average waiting time of the traffic lights, the delivery time cost coefficient, the oil price, the delivery speed, and other conditions are met, the distribution cost of each ant in the ant colony during the express delivery process can be obtained by formula (6). Furthermore, the smaller the distribution cost, the better the path.


## 4.4. Fault Recognition

The distribution path planned for the LMAP should include each express sites once, that is, no individual should have a duplicate express sites number.In the iterative process, the CAACO avoided multiple visits to the same express sites by using a taboo table when individuals in the population selected paths. In the normal case, individuals in an ant colony should be a legitimate viable solution. Meanwhile, the CAACO tested individuals in the population to avoid incalculable failures. If the same express stop number appears, the individual will be discarded and a new solution will be randomly generated.


## 4.5. Path Selection

Them ants in the ant colony can select sites based on the distribution cost and pheromone content on the path. Among them, the sum of pheromones on the link x,y between site x and site y is denoted by τxy, and the distribution cost is denoted by uxy.The path selection rules of the ants are as follows: each ant starts from the delivery station0, traverses all sites once, and then returns to the delivery station 0. Moreover, each ant leaves a trail of pheromones in its path as it finishes its delivery. Before the CAACO iteration, pheromone content on all legitimate links is the same. The selection of the next site about ant k is influenced by pheromone content and the consumption value of distribution costs. Pxy indicates the probability that the ant gets from site x to site y. In this case, this study uses a taboo table to control an access to each site for only once. When the ant k selects the No. 1 delivery site, the first l−1 identified sites are stored in the taboo table. The possible value range of the No. 1 delivery site should be set B, which is the set 1,2,…,n−1,n excluding the elements in the taboo table.The probability of selecting other sites can be calculated by calculating the number of pheromones on the path and the distribution cost, so as to select the next site. In the No. 1 generation, the probability of ants choosing the linkx,y is calculated by the following formula:(12)Pxyt=τx,yαtux,yβt∑i∈Bτx,iαtux,iβtx∈1,n,y∈B,x≠y.(13)DC=dc1,1dc1,2⋯dc1,n−1dc1,ndc2,1dc2,2⋯dc2,n−1dc2,n⋯⋯dcx,y⋯⋯dcn−1,1dcn−1,2⋯dcn−1,n−1dcn−1,ncn,1cn,2⋯cn,n−1cn,nx∈1,n,y∈1,n.(14)ux,y=1cx,y.In formula (12), τx,yt is the pheromone content on the link x,y of the No. t generation. Among them, ux,y represents the reciprocal of the distribution cost from site x to site y, which is called distribution benefit. α corresponds to the weighted index of pheromone content, and β corresponds to the weighted index of distribution cost consumption, thereby affecting the pheromone concentration and distribution cost consumption. When the other parameters except α are unchanged, as α increases, the probability of ants choosing a path with a higher pheromone concentration increases. When the other parameters except β are unchanged, as β increases, the probability of ants choosing a path with higher distribution efficiency increases.From formulas (13) and (14), the distribution benefit ux,y can be calculated, where DC represents the distribution cost consumption value of the link x,y.


## 4.6. Pheromone Update

In order to find the best delivery path, it is necessary to calculate and update the pheromone on each path. In fact, when the ant passes through the linkx,y, it will leave a pheromone on this path. As the algorithm continues to evolve, the pheromone content on each link continues to volatilize during the evolution process. In the CAACO, each ant traverses all sites once from station 0 and then returns to station 0 and leave pheromone on the delivery path. In round t,t+1, the pheromone on link x,y is modified to(15)τxyt+1=1−ρ⋅τxyt+Δτxyt,t+1.(16)Δτxyt,t+1=∑k=1mΔτxykt,t+1.In formula (15), Δτxyt,t+1 represents the pheromone content left by ants on the link x,y in the t,t+1 round. ρ represents the pheromone volatilization factor, which affects pheromone volatilization rate. According to formula (16), Δτxykt,t+1 represents the pheromone content of the ant k on the link x,y in the t,t+1 round.The ant colony pheromone concentration of CAACO is updated and calculated by the following formula:(17)τxyk=uxy⋅Q,where Q is a constant representing the unit concentration of pheromones left by the ant along its path and uxy represents the distribution benefit value of the link x,y. In this model, ant colonies use the entire pheromone environment. When ants find a transmission route, they release pheromone.


## 4.7. Termination Condition

The program automatically determines whether the stop condition is met during the CAACO execution. After the optimal solution of the algorithm enters a long-term stable state, when the algorithm end condition is met, the program will stop after outputting the result.


## 4.8. Adaptive Operator

When using the CAACO to solve the LMAP of express delivery, the convergence rate of the algorithm is very fast due to its positive feedback mechanism. But it is easy to fall into premature convergence, which makes it impossible to find the delivery path with the lowest distribution cost. This is because the ants select the link based on the pheromone content on the path. The path selection range of ants is limited to some high pheromone content paths because the pheromone content of multiple ant paths may be much higher than other paths, which reduces the global search ability of the algorithm.For this reason, this study chooses an adaptive operator for optimization. Actually, by modifying the pheromone volatilization factor, the probability of being selected for a path that is rarely selected is slightly increased.The adaptive operator updates the pheromone by adding the adaptive method of the pheromone volatilization function, as shown in the following formulas:(18)τxyt+1=1−ρ1+λt⋅τxyt+Δτxyt,t+1τ≥τmax,τxyt+1=1−ρ1−λt⋅τxyt+Δτxyt,t+1τ<τmax,.(19)λt=tc,where λt is the pheromone volatilization index formula proportional to the iterative generation number, t is the iterative algebra, and c is a constant.


## 4.9. Clone Operator

By reserving the adaptive individuals to the maximum extent, the cloning operator significantly improves the convergence performance of CAACO. At the same time, the global search ability of CAACO does not decrease because of the application of clone operator. In addition, the best-fit individual in the population is selected as the clone parent. The specific optimization operation of clone operator in CAACO is shown as follows:In each iteration, the ant individual with the lowest distribution cost is selected as the parentp to clone some identical replicas, and then each clone is subjected to mutation operation. That is, for each clone c, two random integers v and s satisfy v∈1,n,s∈1,n,v≠s. Then, the No. v and No. s sites are swapped, which is swapac,v,ac,s. After these operations, a new delivery path is created. When all the copies are mutated, the distribution cost of all the copies is calculated and the copy with the smallest distribution cost is recorded as r. If the distribution cost of r is smaller than the parent p, then the delivery path of r replaces the p.


## 4.10. CAACO Steps

The main steps of CAACO are as follows:Step 1. Set parameters of path collection and constraints of the LMAP. Define the pheromone volatilization coefficient and the initial pheromone content of each path. Set the maximum number of iterations is set toGt_max, and the initial number of iterations is Gt=0. The ant colony consists of M ants.Step 2. Record the iteration algebra,Gt=Gt+1.Step 3. Enumerate the next ant,k=k+1.Step 4. Increase the number of sites,i=i+1.Step 5. First, the probability of the next possible delivery location is calculated according to formula (12). Second, the next delivery location is chosen by roulette.Step 6. Ifi=n, continue to step 7; otherwise, reset i=0, then skip to step 3.Step 7. By calculating the fitness of each ant individual, the best individual parent is selected and cloned.Step 8. The best clone after mutation is selected and has the probability to replace the parent.Step 9. The pheromone content of each link is updated according to formula (15).Step 10. WhenGt=Gt_max, the result will be printed and the program will stop; otherwise, reset k=0, and then go to step 2.Figure2 shows the entire execution flow of the CAACO algorithm.Figure 2
Flow chart of CAACO.


## 5. Discussion on Simulation Results

In order to reflect the performance of CAACO, this section compares the CAACO with ACO, GA, and SA. The iterative process of ACO is basically the same as that of CAACO, but the adaptive operator and clone operator are not added for optimization to reflect the optimization effect of CAACO. The significance of population in GA is the same as CAACO, each individual represents a feasible solution, and the random generation of the original population is also consistent with CAACO.The iterative process of GA mainly includes selection, crossover, and mutation. The selection operation is to randomly select some individuals from the old population (which can be repeatedly selected) to form a new population. However, due to the characteristic of LMAP that each site only passes once, the crossover and mutation processes of GA need to be paid extra attention to avoid illegal solutions [37], in which the cross operation chooses subtour exchange crossover (SEC). First, the two individuals f and g to be crossed should be selected, then the set of express sites pos should be randomly selected, and the relative positions of the sites belonging to pos in f and g should be crossed (Figure 3). Exchange order of single point (EOS) was selected for the mutation operation. For the individual f to perform the mutation operation, two different position indexes index1 and index2 should be randomly calculated first, and then the numbers of these two positions should be exchanged (Figure 4).Figure 3
Crossover operation (SEC).Figure 4
Mutation operation (EOS).The SA starts from a higher initial temperature, and with the continuous decline of temperature parameters, it randomly searches for the global optimal solution of the objective function in the solution space in combination with the characteristics of mutation and probabilistic selection and can jump out of the local optimal solution in probability and eventually approach the global optimal solution [22]. The meaning of the solution in SA is the same as the meaning of the individual in CAACO. In addition, in the iteration process of SA, the temperature T change is calculated according to formula (21), and EOS is selected as the disturbance process of SA mutation operation. If the new solution obtained by mutation is superior to the original solution, the new solution is accepted. Otherwise, a new solution is selected according to the probability PC of formula (20), which is beneficial to escape from local convergence:(20)PC=1,ifDCnew<DCfre,exp−DCnew−DCfreT,ifDCnew>DCfre.(21)Tt+1=ς⋅Tt,T0=T0,where new is the new solution after mutation, and fre is the original solution, T0 constant representing the initial value of T, T is a variable that decreases as the number of iterations t increases, and ς is the coefficient of change.The performance of CAACO is tested in the simulation experiment, and simulation results of CAACO are compared with ACO, SA, and GA under the same hardware and software conditions by adjusting different express delivery sites’ quantity. Therefore, the software and hardware environments are uniformly equipped with Intel(R) Core (TM) i7 2.20 GHz CPU and a unified version of Windows 10. On this premise, it proves that CAACO has a superior performance in solving the problem of express delivery path planning based on minimizing distribution cost.In the comparison process, it is necessary to ensure that these four algorithms use the same distribution cost weighting formula for express delivery paths and control the number of individuals in the CAACO, ACO, and GA populations to be the same. In addition, CAACO and ACO parameters are determined through continuous program testing. The GA and SA use the original parameter setting [27, 37]. Tables 1–4 show the parameter values of each algorithm. In the CAACO, a pheromone volatile factor ρ was 0.1, pheromone content weighted index α is 0.5, distribution cost consumption weighted index β is 5, and pheromone content per ant Q is 20. In the ACO, the parameters are consistent with those of CAACO. In the GA, a crossover probability is set to 0.5 and mutation probability to 0.1 [37]. In the SA, the initial temperature is set to 1000, the temperature attenuation coefficient is 0.95, and the number of temperature iterations increases with the number of fast sites, which is about 2 times of the number of fast sites [27]. With everything in place, the program is run to get the results of CAACO, ACO, GA, and SA algorithms.Table 1
Parameters of CAACO.
CAACOPheromone volatilization factorρ0.1Weighted index of pheromone contentα0.5Weighted index of distribution cost consumptionβ5Pheromone content of each individual antQ20Table 2
Parameters of ACO.
ACOPheromone volatilization factorρ0.1Weighted index of pheromone contentα0.5Weighted index of distribution cost consumptionβ5Pheromone content of each individual antQ20Table 3
Parameters of GA.
GACrossover probability0.1Mutation probability0.5Table 4
Parameters of SA.
SAInitial temperature1000Temperature attenuation coefficient0.95Number of temperature iterationsApproximately 2 ∗ number of sitesFor the express delivery path planning problem of minimizing distribution cost, when the number of iterations, population size, and other parameters remain unchanged, as the number of sites changes, the minimum distribution cost of CAACO, ACO, GA, and SA changes. The relationship is given in Table5.Table 5
Minimum distribution cost of different number of sites.
Algorithm30 sites50 sites70 sites90 sitesSA162.1811230.6079249.9613293.0244GA155.6000211.7276236.7995275.7588ACO151.9915199.6935225.6022258.6268CAACO149.1365190.4494219.8949254.1350Figures5(a)–5(d) show the simulation results of CAACO, GA, and SA under four different express quantity conditions. From Figures 2(a)–2(d), based on the four different expressions, the CAACO planned path not only has a lower distribution cost than SA and GA but also has a faster convergence speed.Figure 5
The distribution costs of the four algorithms are compared after 200 iterations at different numbers of sites: (a) 30 sites; (b) 50 sites; (c) 70 sites; (d) 90 sites.
(a)(b)(c)(d)As shown in Figure5(d), the CAACO's high performance is more obvious when the number of sites to be delivered is 90. In the first 50 iterations, the distribution cost of CAACO was greatly reduced, and the convergence speed was significantly higher than that of GA and SA. In the 50 to 200 generation iterations, the distribution cost of CAACO is close to 254.1350, the distribution cost of ACO is close to 258.6268, the distribution cost of GA is close to 275.7588, and the distribution cost of SA is close to 293.0244.As can be seen from Figures5(a)–5(c), when the number of sites is 30, 50, and 70, the CAACO is superior to the ACO, GA, and SA in terms of express delivery path planning. Although ACO can converge to a local optimal solution earlier, it is easy to fall into premature convergence. The GA and SA have a slower convergence speed and lower global search capability.In summary, under the same constraints of the same number of iterations and other parameters, the CAACO performs well in solving the express route planning problem based on the minimization of delivery cost.The histogram in Figures6(a)–6(c) compares the performance of CAACO, ACO, GA, and SA in the LMAP path planning from three aspects of distribution cost, economic expenditure, and time. Apparently, the overall distribution efficiency of CAACO is better than ACO, SA, and GA under a different number of express sites.Figure 6
(a) Distribution cost, (b) economic expenditure, and (c) time of the four algorithms are compared under a different number of sites.
(a)(b)(c)It can be seen from Figures7(a)–7(d) that after 10 iterations, the distribution cost of CAACO has been significantly lower than ACO, GA, and SA. Moreover, in the next 190 times of convergence, the CAACO has a stable convergence rate, while the GA and SA have a slower convergence rate. Although the convergence speed of ACO is faster than GA and SA, its global search ability is poor. Apparently, with the increase in the number of sites, the CAACO's high performance is fully reflected. In short, the results show that CAACO is more effective than ACO, GA, and SA in solving LMAP.Figure 7
The distribution costs of the four algorithms are compared every 10 generations at different numbers of sites: (a) 40 sites; (b) 60 sites; (c) 80 sites; (d) 100 sites.
(a)(b)(c)(d)In Figures8(a)–8(c), the results of the four algorithms being executed 20 times are analyzed by scatter diagrams when the number of sites is 40, 60, 80, and 100, respectively. Obviously, the CAACO has the most dense points, and the results obtained are generally better than ACO, GA, and SA, and as the number of express sites increases, the CAACO is better.Figure 8
The stability of (a) delivery cost, (b) economic expenditure, and (c) time is displayed through the results of four algorithms executed 20 times when the number of sites is 40, 60, 80, and 100, respectively.
(a)(b)(c)In Figures9(a)–9(c), the results of the four algorithms being executed 20 times are analyzed by box plots when the number of sites is 40, 60, 80, and 100, respectively. It is easy to see, compared to the ACO, SA, and GA, that the CAACO has the narrowest box, the best stability in finding suboptimal solutions, and the very low probability of outliers.Figure 9
The stability of (a) distribution cost, (b) economic expenditure, and (c) time is compared through the results of four algorithms executed 20 times when the number of sites is 40, 60, 80, and 100, respectively.
(a)(b)(c)As listed in Table6, the computational complexity of CAACO, ACO, and GA is Omn2, and that of SA is OTmaxn2, where m represents population capacity, n represents the number of sites, and Tmax represents the number of iterations at each temperature in SA. However, as the number of nodes increases, the parameter T of SA should also increase to find better results. In the case of a large number of sites, the SA takes more time than the CAACO. Although the CAACO consumes some time due to the addition of clone operator and adaptive operator, it is not inferior to ACO and GA in terms of computational complexity.Table 6
The computation complexity of four algorithms.
AlgorithmCAACOACOSAGAComputation complexityOmn2Omn2OTmaxn2Omn2


## 6. Conclusion

With the booming development of logistics industry, it is urgent to reduce the delivery time and cost, so it is necessary to design a new algorithm to find the delivery path with less delivery time and lower economic cost. In the optimization process of CAACO, an effective population coding scheme is specified first, and the population is initialized. Then, the fitness is calculated, the delivery path is selected, and the pheromone on the path is updated. On the one hand, by adding an adaptive operator, the convergence rate of CAACO in the early stage is controlled to achieve the purpose of strengthening CAACO's global search capability. On the other hand, by adding a clone operator to maximize the preservation of adaptable individuals, the convergence performance of CAACO is significantly improved. In terms of simulation, this study compares the performance of CAACO with the ACO, GA, and SA. The results show that CAACO's convergence speed is faster, and the performance of finding express delivery paths that minimize economic expenditure and time is good. Since the LMAP is based on the minimum economic cost and the shortest delivery time involves various theories and technologies, there are still more problems to be solved in CAACO. In the future, we will continue to accumulate experience in practical applications to improve the algorithm.



---

*Source: 4825018-2022-05-12.xml*