# Theory and Realization of Secondary Task Assignment for Multi-UAV Pickup Based on Green Scheduling

Authors: Shunqi Liu; Xi Fang; Yi Guo; Chenwei Liu; Jian Yang
Journal: Complexity
 (2021)

---

## Abstract

The development of artificial intelligence technology has brought changes to various industries. Under the concept of green sustainable development, how to use the progress of science and technology to implement low-carbon strategies is a problem that every enterprise should consider. Aiming at the problem of picking up goods in logistics industry, this paper proposed a secondary task assignment theory for multiple unmanned aerial vehicle (Multi-UAV) based on green scheduling. The theory greatly improves the utilization rate of unmanned aerial vehicle (UAV) and reduces the energy consumption. We analyzed the advantages and disadvantages of local optimal algorithm and global optimal algorithm in time and energy consumption. Through repeated experiments in different ranges, we have well verified the high efficiency and general applicability of this theory, which can provide theoretical and practical implications for logistics enterprises using UAV to achieve low-carbon sustainable development in the future.


---

## Body

## 1. Introduction

While the rapid economic development has brought convenience to the world, the environmental problems are becoming increasingly serious. In the past century, the frequency of major natural disasters and diseases has increased from 0.263 times per year from 1920 to 1999 to 1.2 times per year from 2000 to 2020 [1]. Severe environmental problems have posed challenges for the survival and development of mankind. In 2015, the United Nations Sustainable Development Summit was held in New York. Seventeen sustainable development goals were set to solve the problems between social development, economic growth, and the environment.A feasible solution to the environmental challenge is to realize low-carbon sustainable development. The low-carbon development strategies of enterprises are the key link to achieve green sustainable development. This requires enterprises to have green supply chain management [2]. With the rapid development of the Internet, e-commerce is gradually replacing the traditional entity business model, which also drives the rapid development of the logistics industry. At the same time, the development of artificial intelligence technology has also brought changes to various fields. Due to the advantages of low cost and high efficiency, more and more unmanned equipment is used to complete various tasks instead of human beings. In the military field, unmanned aerial vehicle (UAV) is widely used in security patrol [3], area detection [4], target strike [5], etc. In the manufacturing industry, intelligent machines realize the automatic production of factories [6]. In the medical field, intelligent machines are used for some high-precision operations [7]. In the logistics industry, intelligent machines are mainly used to replace the traditional manned transportation mode [8]. Especially in the context of the outbreak of Novel Coronavirus this year, the use of intelligent machines to achieve contactless pickup is even more important.Due to the complexity of ground environmental factors, it is a hot spot to use UAV to pick up goods instead of truck or in a combined way [9]. Compared with the complex constraints of ground operations, there are relatively fewer restrictions in the air. So UAV can complete the transportation task with less time, closer distance, and lower energy consumption.In the actual transportation, UAV group and goods constitute a huge information system. The collaborative control of UAV group is an extremely complex process. This is mainly reflected in the following:(i)
Diversity of UAV: due to the differences in the size of each pickup location, homogeneous UAV system has great limitations in task assignment, and different types of heterogeneous UAV system make the task assignment more complex.(ii)
Complexity of constraints: each UAV has the maximum loading weight and volume. The weight and volume of the goods at each pickup location are also different, so the correspondence between UAV and goods is a complex optimization problem.(iii)
Computational complexity: with the increase of the number of UAV and goods, the amount of calculation for searching the optimal solution increases exponentially.(iv)
Environmental complexity: complex terrain and bad weather will have a great impact in UAV transportation.(v)
Complexity of communication: with the increase of the number of pickup locations and UAV and the expansion of transportation range, the burden of communication among the UAV group will also increase.Under the influence of the above factors, the realization of multiple unmanned aerial vehicle (Multi-UAV) cooperative transportation is a very complex subject, which has also caused extensive research at home and abroad.In order to solve the problem of limited capacity of UAV, a receding horizon task assignment heuristic algorithm [10] was proposed to achieve persistent UAV delivery schedules. Ren et al. [11] proposed four transport modes of vehicle cooperating with UAV. Reference [12] integrated the scalable K-means algorithm and genetic algorithm to realize a UAV scheduling strategy including reverse logistics. Reference [13] proposed a mixed-integer (0-1 linear) green routing model to reduce transportation cost and carbon dioxide emission.At present, using UAV to pickup and delivery is still in an initial experimental stage, and there are not many relevant theories of task assignment. In addition, most references about the cooperative of Multi-UAV are based on one-time task assignment. In terms of the difficulty of secondary assignment, the objective function and constraints of the first and second task assignment models are different. As we need to redistribute the UAV which still has the ability to perform tasks after the first assignment, the constraints and logical relationship of the second assignment model are more complex, and the design and realization of the algorithm are more difficult. So there are a few studies on secondary assignment which is exactly the key point of this paper. The redistribution of UAV can make full use of its loading capacity, reduce energy consumption, and realize low-carbon operation.We established a complete set of Multi-UAV pickup theory. According to the total weight and volume of the goods, we determine the initial minimum number of UAV. The first task assignment order is determined according to the fitness between the pickup location and UAV. For unassigned locations, we proposed two algorithms based on local optimal and global optimal, respectively, and compared the advantages and disadvantages in distance and time. Through a large number of experiments in five different task area radiuses, we verified the general applicability of the theory.We organize the paper as follows.Section 2 introduces the concept of UAV mission planning, centralized control structure and corresponding algorithm, green scheduling theory, and secondary assignment theory. The first assignment theory based on fitness and the second assignment theory based on local optimal and global optimal are proposed in Section 3. Then, Section 4 shows the calculated results of different algorithms and the analysis. Finally, we summarize the research content of this paper and put forward some suggestions and prospects for future researches in Section 5.


## 2. Basic Theory

UAV task planning is to plan path or assign target for UAV according to the types of tasks, the characteristics of UAV, or the resources carried by UAV. The core is to maximize the total revenue of the UAV group, minimize the task time, or minimize the energy consumption under all kinds of constraints. With the increasing complexity of tasks, we often need to weight multiple objective functions to make the task optimal as a whole [14].In the logistics system, UAV task planning can be divided into pickup tasks and delivery tasks according to the types of tasks. With the improvement of intelligent system, UAV may need to pick up and deliver goods at the same time in future transportation. According to the real-time performance of UAV tasks, task planning can be divided into dynamic planning and static planning. Dynamic planning [15] needs to consider the real-time changes of information and makes adjustments in time to ensure that the task planning is optimal within a certain time. Static planning is to make the optimal transportation scheme according to the information of current nodes. It is usually used in the case of stable environment and less influence of uncertain factors. According to the control structure of UAV group, it can be divided into centralized control structure and distributed control structure. In different task systems, the optimal control type should be selected according to the characteristics of the task. The Multi-UAV pickup theory that we proposed in this paper adopted centralized control structure.


### 2.1. Centralized Control Structure

Centralized control structure means that there is only one central controller. Each UAV only inputs and outputs data, so the cost of UAV is relatively low. After analysis and calculation, the central controller sends the decision to each UAV for execution, as shown in Figure1. Centralized control structure solves the problem from a global perspective, which can produce a global optimal solution. Different from the distributed control structure, which needs to solve the problem of data consistency, the centralized control structure does not need to consider the coordination problem between nodes. However, as the scale of transportation increases, the computational load increases significantly. As it has only a single central controller, when it breaks down, the entire system will be paralyzed.Figure 1
Centralized control structure.Commonly used centralized task assignment models include Multiple Traveling Salesman Problem [16], Vehicle Routing Problems [17], and Mixed-Integer Linear Programming [18]. The algorithms used for solving these models mainly include genetic algorithm and particle swarm algorithm.


#### 2.1.1. Traditional Algorithm

Genetic algorithm is a random search algorithm proposed by Holland [19], which is evolved from the evolutionary rules of nature. Because of its intelligence, parallelism, and good global search ability, it is widely used in optimization and combination, machine learning, and other fields. Many improved genetic algorithms have been proposed to overcome the shortcomings of local convergence or nonconvergence of genetic algorithm. Reference [20, 21] solved the multiobjective task assignment of UAV through improved genetic algorithm.Inspired by the behavior of bird swarm, Eberhart and Kennedy [22] proposed particle swarm optimization (PSO). It is similar to genetic algorithm, which also seeks the optimal solution through iteration. But PSO does not need crossover or variation; it obtains the optimal solution through the self-adjustment of particles to the optimal solution. Compared with genetic algorithm, PSO is simpler and more likely to converge to the optimal solution faster. The flow chart of PSO is shown in Figure 2.Figure 2
Flow chart of PSO.


#### 2.1.2. The Proposed Algorithm

In this paper, the algorithm that we used to solve the secondary task assignment of Multi-UAV is based on some ideas of PSO. We considered every UAV as a particle. By calculating the fitness between UAV and pickup locations, the optimal assignment scheme under the current state was determined. Then, we updated the UAV status information and fitness to determine the next task until all pickup locations were assigned. Different from PSO, the calculation of the optimal solution of our algorithm is the superposition of the optimal solution of each subtask.


### 2.2. Green Scheduling

Green scheduling is a kind of green and low-carbon task assignment theory under the background of green logistics policy [23], aiming to reduce the harm to the environment as much as possible under the premise of completing the transportation task. It improves transportation efficiency and reduces cost and energy consumption by making full use of carrying capacity, assigning task objectives reasonably, optimizing task path [24], and many other methods. A good UAV assignment model can assign tasks more reasonably and reduce the flight time and distance of UAV. Using secondary assignment can make full use of the carrying capacity of each UAV and reduce the total number of UAVs, finally achieving low-carbon sustainable development.


### 2.3. Secondary Assignment Theory

In the UAV task assignment system, when the number of UAV is more than the total number of tasks, all tasks can be assigned only once. This will lead to excess performance, that the capability of each UAV is not fully utilized. In the actual task, the number of UAV dispatched is often less than the number of task targets. In this case, we need to select UAV that has completed the first mission and meet the constraints for secondary task assignment. Through redistribution, we can reduce the total number of UAV, maximize the utilization of each UAV, and achieve green task assignment.


## 2.1. Centralized Control Structure

Centralized control structure means that there is only one central controller. Each UAV only inputs and outputs data, so the cost of UAV is relatively low. After analysis and calculation, the central controller sends the decision to each UAV for execution, as shown in Figure1. Centralized control structure solves the problem from a global perspective, which can produce a global optimal solution. Different from the distributed control structure, which needs to solve the problem of data consistency, the centralized control structure does not need to consider the coordination problem between nodes. However, as the scale of transportation increases, the computational load increases significantly. As it has only a single central controller, when it breaks down, the entire system will be paralyzed.Figure 1
Centralized control structure.Commonly used centralized task assignment models include Multiple Traveling Salesman Problem [16], Vehicle Routing Problems [17], and Mixed-Integer Linear Programming [18]. The algorithms used for solving these models mainly include genetic algorithm and particle swarm algorithm.


### 2.1.1. Traditional Algorithm

Genetic algorithm is a random search algorithm proposed by Holland [19], which is evolved from the evolutionary rules of nature. Because of its intelligence, parallelism, and good global search ability, it is widely used in optimization and combination, machine learning, and other fields. Many improved genetic algorithms have been proposed to overcome the shortcomings of local convergence or nonconvergence of genetic algorithm. Reference [20, 21] solved the multiobjective task assignment of UAV through improved genetic algorithm.Inspired by the behavior of bird swarm, Eberhart and Kennedy [22] proposed particle swarm optimization (PSO). It is similar to genetic algorithm, which also seeks the optimal solution through iteration. But PSO does not need crossover or variation; it obtains the optimal solution through the self-adjustment of particles to the optimal solution. Compared with genetic algorithm, PSO is simpler and more likely to converge to the optimal solution faster. The flow chart of PSO is shown in Figure 2.Figure 2
Flow chart of PSO.


### 2.1.2. The Proposed Algorithm

In this paper, the algorithm that we used to solve the secondary task assignment of Multi-UAV is based on some ideas of PSO. We considered every UAV as a particle. By calculating the fitness between UAV and pickup locations, the optimal assignment scheme under the current state was determined. Then, we updated the UAV status information and fitness to determine the next task until all pickup locations were assigned. Different from PSO, the calculation of the optimal solution of our algorithm is the superposition of the optimal solution of each subtask.


## 2.1.1. Traditional Algorithm

Genetic algorithm is a random search algorithm proposed by Holland [19], which is evolved from the evolutionary rules of nature. Because of its intelligence, parallelism, and good global search ability, it is widely used in optimization and combination, machine learning, and other fields. Many improved genetic algorithms have been proposed to overcome the shortcomings of local convergence or nonconvergence of genetic algorithm. Reference [20, 21] solved the multiobjective task assignment of UAV through improved genetic algorithm.Inspired by the behavior of bird swarm, Eberhart and Kennedy [22] proposed particle swarm optimization (PSO). It is similar to genetic algorithm, which also seeks the optimal solution through iteration. But PSO does not need crossover or variation; it obtains the optimal solution through the self-adjustment of particles to the optimal solution. Compared with genetic algorithm, PSO is simpler and more likely to converge to the optimal solution faster. The flow chart of PSO is shown in Figure 2.Figure 2
Flow chart of PSO.


## 2.1.2. The Proposed Algorithm

In this paper, the algorithm that we used to solve the secondary task assignment of Multi-UAV is based on some ideas of PSO. We considered every UAV as a particle. By calculating the fitness between UAV and pickup locations, the optimal assignment scheme under the current state was determined. Then, we updated the UAV status information and fitness to determine the next task until all pickup locations were assigned. Different from PSO, the calculation of the optimal solution of our algorithm is the superposition of the optimal solution of each subtask.


## 2.2. Green Scheduling

Green scheduling is a kind of green and low-carbon task assignment theory under the background of green logistics policy [23], aiming to reduce the harm to the environment as much as possible under the premise of completing the transportation task. It improves transportation efficiency and reduces cost and energy consumption by making full use of carrying capacity, assigning task objectives reasonably, optimizing task path [24], and many other methods. A good UAV assignment model can assign tasks more reasonably and reduce the flight time and distance of UAV. Using secondary assignment can make full use of the carrying capacity of each UAV and reduce the total number of UAVs, finally achieving low-carbon sustainable development.


## 2.3. Secondary Assignment Theory

In the UAV task assignment system, when the number of UAV is more than the total number of tasks, all tasks can be assigned only once. This will lead to excess performance, that the capability of each UAV is not fully utilized. In the actual task, the number of UAV dispatched is often less than the number of task targets. In this case, we need to select UAV that has completed the first mission and meet the constraints for secondary task assignment. Through redistribution, we can reduce the total number of UAV, maximize the utilization of each UAV, and achieve green task assignment.


## 3. Multi-UAV Pickup Theory Based on Green Scheduling

This paper mainly studies the application of green scheduling theory in the pickup problem of transportation system. In the UAV pickup system, the fewer the UAV completing the pickup task in a shorter path, the less the energy consumption and exhaust emission. Suppose that there ares pickup locations. The jth location has aj goods, and each piece of goods has weight wjn and volume vjn, n=1,2,…,aj. We send homogeneous UAV from the warehouse to pick up the goods. Set wmax as the maximum loading weight and vmax as the maximum loading volume.The Multi-UAV pickup theory proposed in this paper combines the idea of green scheduling and the theory of secondary task assignment, aiming to dispatch the least UAV to complete the pickup task. In the process of secondary assignment, we use both local optimal algorithm and global optimal algorithm to explore the shortest time and shortest distance of task execution.


### 3.1. Determine the Initial Number of UAV

By calculating the total weight and volume of the goods at each pickup location, we obtain the goods information matrixX. Set u as the initial number of UAV. It should make the total weight and volume of the UAV group exceed the total weight and volume of all goods. It can be expressed as the following mathematical model:(1)minu,s.t.uwmax≥∑j=1sX1j,uvmax≥∑j=1sX2j,where u is an integer and X1j and X2j represent the total weight and volume of all goods at the jth pickup point, respectively.


### 3.2. The First Task Assignment

Formula (1) only gives the minimum number of UAV that can complete the pickup task in theory. As the UAV will not be fully loaded in the actual situation, the initial u UAVs cannot be spread over s pickup locations at the same time. Set f as the fitness between the pickup location and UAV. It is calculated by the proportion of the goods in the UAV’s maximum carrying capacity, including weight fitness fw and volume fitness fv. We assign tasks from large to small according to f.Setεw, εv as the minimum weight proportion and the minimum volume proportion of the goods in the UAV’s carrying capacity. When the remaining capacity of UAV is less than this ratio, we say that the utilization rate of UAV has reached the upper limit. In order to minimize the secondary assignment of UAV, we give priority to the pickup location with the highest utilization rate of UAV, which means(2)fw>1−εw,or(3)fv>1−εv.The remaining pickup locations will be assigned according tof, if there are still UAVs available. The flow chart of the first task assignment is shown in Figure 3 and the pseudo-code is shown in Algorithm 1.Figure 3
Flow chart of the first task assignment.Algorithm 1:The pseudo-code of the first task assignment.
Input: Goods information matrixX, maximum loading weight wmax, maximum loading volume vmax.(1)
Initializeu1, b, j,(2)
Calculate initial number of UAVu, fitness matrix f, minimum weight proportion εw, minimum volume proportion εv, UAV for each location A;(3)
u1=u;(4)
forj=1 to s(5)
iff1j≥1−εw||f2j≥1−εv(6)
Send UAV to locationj;(7)
Updateu1 and f;(8)
end(9)
end(10)
whileu1∼=0(11)
Finding the columnc where the largest element is located in f;(12)
ifu1>Ac(13)
Send UAV to locationc;(14)
Updateu1 and f;(15)
b=b+1;(16)
end(17)
ifb≥s(18)
break(19)
end(20)
endOutput: The first assignment matrixL.This assignment mode can maximize the utilization rate of UAV in the first task, reduce the number of times of UAV picking up goods at different locations, and reduce the energy consumption of UAV flying between each location.


### 3.3. The Second Task Assignment

When the number of locations is more than the number of UAVs, one-time assignment cannot meet the whole task. In this case, we need to make a secondary assignment for the remaining locations according tof. In order to improve the utilization rate of UAV, we redistributed the UAV that still had the ability to perform other tasks after the first assignment. For a specific task, we would give priority to the UAV that has been dispatched. When more than one UAV can complete the task, we choose the optimal assignment scheme by comparing the time and distance. A new UAV will be dispatched from the warehouse only when there is no UAV available.In the first task assignment, all UAVs are located in the warehouse, so the distance from the pickup location is the same. We only need to consider the size off of each pickup location. After the first assignment, the position of each UAV will be different, which makes the distance between UAV and the unassigned location different. In this case, if we only consider the size of f, it may appear that the task will be assigned to the UAV far away from the task location. This will reduce the efficiency of the whole UAV group. Therefore, we need to select the UAV with the shortest flight distance from all the UAVs that can complete the pickup task.


#### 3.3.1. Local Optimal Algorithm

For the unassigned pickup locationk, we set Rk as its quantity of goods. The remaining carrying capacity of UAV i after the first task assignment is set as Ii. If(4)Ii≥Rk,we say that UAV i can complete the pickup task of location k. For all the UAVs that can complete the pickup task, we calculate the distance between each UAV and location k and then select the shortest path to assign the task. When no UAV is available or needs to be called from two or more locations, we directly assign a new UAV q from the warehouse to perform the task and add its remaining carrying capacity Iq to the total UAV information list I. The flow chart of the second task assignment based on the local optimal algorithm is shown in Figure 4 and the pseudo-code is shown in Algorithm 2.Figure 4
Flow chart of the second task assignment.Algorithm 2:The pseudo-code of the second task assignment.
Input: Fitness matrixf, goods surplus X1, UAV payload surplus X2, number of locations s, location coordinate matrix P.(1)
whilef∼=0(2)
Finding the columnc where the largest element is located in f;(3)
f1c=f2c=0;(4)
forj=1 to s(5)
ifX11j≥X11c&X22j≥X22c(6)
Calculate the assignment matrixD;(7)
end(8)
end(9)
if column c of D is not all zero(10)
Finding the columnd where the minimum element is located in D, D1dc=1;(11)
else(12)
Dispatch new UAV;(13)
end(14)
endOutput: Secondary assignment matrix D1.


#### 3.3.2. Global Optimal Algorithm

The distance obtained by the above algorithm is optimal only in the process of secondary task assignment; it may not reach the global optimization in the whole UAV pickup task. This is because the unassigned pickup location may be around the return route of UAV. If selected from these UAVs to carry out the pickup task, although it may increase the time for the entire UAV group to complete the task, it will shorten the total flight distance of the UAV group. The global optimal algorithm not only considers the distance between UAV and unassigned location but also considers the impact on other UAVs in path planning when the task is assigned to a UAV. The global optimal algorithm selects the UAV which makes the total distance of the UAV group the shortest.


## 3.1. Determine the Initial Number of UAV

By calculating the total weight and volume of the goods at each pickup location, we obtain the goods information matrixX. Set u as the initial number of UAV. It should make the total weight and volume of the UAV group exceed the total weight and volume of all goods. It can be expressed as the following mathematical model:(1)minu,s.t.uwmax≥∑j=1sX1j,uvmax≥∑j=1sX2j,where u is an integer and X1j and X2j represent the total weight and volume of all goods at the jth pickup point, respectively.


## 3.2. The First Task Assignment

Formula (1) only gives the minimum number of UAV that can complete the pickup task in theory. As the UAV will not be fully loaded in the actual situation, the initial u UAVs cannot be spread over s pickup locations at the same time. Set f as the fitness between the pickup location and UAV. It is calculated by the proportion of the goods in the UAV’s maximum carrying capacity, including weight fitness fw and volume fitness fv. We assign tasks from large to small according to f.Setεw, εv as the minimum weight proportion and the minimum volume proportion of the goods in the UAV’s carrying capacity. When the remaining capacity of UAV is less than this ratio, we say that the utilization rate of UAV has reached the upper limit. In order to minimize the secondary assignment of UAV, we give priority to the pickup location with the highest utilization rate of UAV, which means(2)fw>1−εw,or(3)fv>1−εv.The remaining pickup locations will be assigned according tof, if there are still UAVs available. The flow chart of the first task assignment is shown in Figure 3 and the pseudo-code is shown in Algorithm 1.Figure 3
Flow chart of the first task assignment.Algorithm 1:The pseudo-code of the first task assignment.
Input: Goods information matrixX, maximum loading weight wmax, maximum loading volume vmax.(1)
Initializeu1, b, j,(2)
Calculate initial number of UAVu, fitness matrix f, minimum weight proportion εw, minimum volume proportion εv, UAV for each location A;(3)
u1=u;(4)
forj=1 to s(5)
iff1j≥1−εw||f2j≥1−εv(6)
Send UAV to locationj;(7)
Updateu1 and f;(8)
end(9)
end(10)
whileu1∼=0(11)
Finding the columnc where the largest element is located in f;(12)
ifu1>Ac(13)
Send UAV to locationc;(14)
Updateu1 and f;(15)
b=b+1;(16)
end(17)
ifb≥s(18)
break(19)
end(20)
endOutput: The first assignment matrixL.This assignment mode can maximize the utilization rate of UAV in the first task, reduce the number of times of UAV picking up goods at different locations, and reduce the energy consumption of UAV flying between each location.


## 3.3. The Second Task Assignment

When the number of locations is more than the number of UAVs, one-time assignment cannot meet the whole task. In this case, we need to make a secondary assignment for the remaining locations according tof. In order to improve the utilization rate of UAV, we redistributed the UAV that still had the ability to perform other tasks after the first assignment. For a specific task, we would give priority to the UAV that has been dispatched. When more than one UAV can complete the task, we choose the optimal assignment scheme by comparing the time and distance. A new UAV will be dispatched from the warehouse only when there is no UAV available.In the first task assignment, all UAVs are located in the warehouse, so the distance from the pickup location is the same. We only need to consider the size off of each pickup location. After the first assignment, the position of each UAV will be different, which makes the distance between UAV and the unassigned location different. In this case, if we only consider the size of f, it may appear that the task will be assigned to the UAV far away from the task location. This will reduce the efficiency of the whole UAV group. Therefore, we need to select the UAV with the shortest flight distance from all the UAVs that can complete the pickup task.


### 3.3.1. Local Optimal Algorithm

For the unassigned pickup locationk, we set Rk as its quantity of goods. The remaining carrying capacity of UAV i after the first task assignment is set as Ii. If(4)Ii≥Rk,we say that UAV i can complete the pickup task of location k. For all the UAVs that can complete the pickup task, we calculate the distance between each UAV and location k and then select the shortest path to assign the task. When no UAV is available or needs to be called from two or more locations, we directly assign a new UAV q from the warehouse to perform the task and add its remaining carrying capacity Iq to the total UAV information list I. The flow chart of the second task assignment based on the local optimal algorithm is shown in Figure 4 and the pseudo-code is shown in Algorithm 2.Figure 4
Flow chart of the second task assignment.Algorithm 2:The pseudo-code of the second task assignment.
Input: Fitness matrixf, goods surplus X1, UAV payload surplus X2, number of locations s, location coordinate matrix P.(1)
whilef∼=0(2)
Finding the columnc where the largest element is located in f;(3)
f1c=f2c=0;(4)
forj=1 to s(5)
ifX11j≥X11c&X22j≥X22c(6)
Calculate the assignment matrixD;(7)
end(8)
end(9)
if column c of D is not all zero(10)
Finding the columnd where the minimum element is located in D, D1dc=1;(11)
else(12)
Dispatch new UAV;(13)
end(14)
endOutput: Secondary assignment matrix D1.


### 3.3.2. Global Optimal Algorithm

The distance obtained by the above algorithm is optimal only in the process of secondary task assignment; it may not reach the global optimization in the whole UAV pickup task. This is because the unassigned pickup location may be around the return route of UAV. If selected from these UAVs to carry out the pickup task, although it may increase the time for the entire UAV group to complete the task, it will shorten the total flight distance of the UAV group. The global optimal algorithm not only considers the distance between UAV and unassigned location but also considers the impact on other UAVs in path planning when the task is assigned to a UAV. The global optimal algorithm selects the UAV which makes the total distance of the UAV group the shortest.


## 3.3.1. Local Optimal Algorithm

For the unassigned pickup locationk, we set Rk as its quantity of goods. The remaining carrying capacity of UAV i after the first task assignment is set as Ii. If(4)Ii≥Rk,we say that UAV i can complete the pickup task of location k. For all the UAVs that can complete the pickup task, we calculate the distance between each UAV and location k and then select the shortest path to assign the task. When no UAV is available or needs to be called from two or more locations, we directly assign a new UAV q from the warehouse to perform the task and add its remaining carrying capacity Iq to the total UAV information list I. The flow chart of the second task assignment based on the local optimal algorithm is shown in Figure 4 and the pseudo-code is shown in Algorithm 2.Figure 4
Flow chart of the second task assignment.Algorithm 2:The pseudo-code of the second task assignment.
Input: Fitness matrixf, goods surplus X1, UAV payload surplus X2, number of locations s, location coordinate matrix P.(1)
whilef∼=0(2)
Finding the columnc where the largest element is located in f;(3)
f1c=f2c=0;(4)
forj=1 to s(5)
ifX11j≥X11c&X22j≥X22c(6)
Calculate the assignment matrixD;(7)
end(8)
end(9)
if column c of D is not all zero(10)
Finding the columnd where the minimum element is located in D, D1dc=1;(11)
else(12)
Dispatch new UAV;(13)
end(14)
endOutput: Secondary assignment matrix D1.


## 3.3.2. Global Optimal Algorithm

The distance obtained by the above algorithm is optimal only in the process of secondary task assignment; it may not reach the global optimization in the whole UAV pickup task. This is because the unassigned pickup location may be around the return route of UAV. If selected from these UAVs to carry out the pickup task, although it may increase the time for the entire UAV group to complete the task, it will shorten the total flight distance of the UAV group. The global optimal algorithm not only considers the distance between UAV and unassigned location but also considers the impact on other UAVs in path planning when the task is assigned to a UAV. The global optimal algorithm selects the UAV which makes the total distance of the UAV group the shortest.


## 4. Experiments and Analysis

The experiment consists of three parts. Firstly, determine the initial number of UAV according to the total quantity of goods. Secondly, carry out the first task assignment according to the size off. Finally, use the local optimal algorithm and global optimal algorithm, respectively, to carry out the second task assignment for the unassigned locations.Set the warehouse as the center of a circle. We consider homogeneous UAV to pick up at 8 locations randomly generated in the circle with radiusR=1km. Set wmax=10kg, vmax=60dm3. The parameters of all goods at each pickup location are shown in Table 1. According to Table 1, we can calculate the total amount of goods of each pickup location, as shown in Table 2.Table 1
The parameters of all goods.
LocationGoods1234567814.010.7512.391.570.99———3.222.6733.819.226.17———21.021.320.31.10.460.351.56—12.117.572.575.633.784.512.69—30.780.910.320.40.58———4.487.6116.481.581.15———41.742.250.411.15————16.6917.698.3415.66————52.540.881.43—————25.735.571.38—————62.391.063.783.761.970.543.090.7417.2318.1210.297.239.8913.1435.553.6970.640.821.010.310.430.44——2.463.674.722.340.837.05——82.223.511.13—————3.513.767.63—————Note: for every location, the first row represents the weight and the second row represents the volume.Table 2
The total amount of goods of each pickup location.
LocationNumber12345678Weight (kg)19.716.112.995.554.8517.333.656.86Volume (dm3)55.0938.8631.3058.3832.68115.1421.0724.89From formula (1), we get u=7. It can be calculated from Table 2 that εw=0.0730, εv=0.0567. The fitness matrix f of each pickup location is shown in Table 3.Table 3
Fitness matrixf.
LocationNumber12345678fw0.98550.61100.29900.55500.48500.86650.36500.6860fv0.91820.64770.52170.97300.54470.95950.35120.4148We can see from Table3 that locations 1, 4, and 6 satisfy the constraints of formula (2) or (3). The number of UAVs that they needed is 2, 1, and 2, respectively. For the remaining two UAVs, we will assign them according to the size of f. That is, we assign location 8 first for its proportion of weight which is 0.6860 and then assign location 2 for its proportion of volume which is 0.6477. The first assignment matrix L is shown in Table 4. Seven UAVs are sent to locations 1, 2, 4, 6, and 8. The specific effect of the first task assignment is shown in Figure 5.Table 4
The first assignment matrixL.
LocationNumber12345678UAV21010201Figure 5
The effect of the first task assignment.For secondary assignment, we calculate the goods surplusRjj=1,2,…,s at each location and the payload surplus Iii=1,2,…,s of each UAV, respectively, as shown in Tables 5 and 6. According to Table 3, the order of secondary task assignment is 5⟶3⟶7.Table 5
Goods surplus.
LocationNumber12345678Weight (kg)002.9904.8503.650Volume (dm3)0031.30032.68021.070Table 6
UAV payload surplus.
LocationNumber12345678Weight (kg)0.293.8904.4502.6703.14Volume (dm3)64.9121.1401.6204.86035.11For location 5, the remaining UAV carrying capacity cannot meet its demand, so we directly dispatch a new UAV 8 from the warehouse and add its remaining carrying capacityIm to the total information list I so that the UAV can continue to participate in the subsequent task assignment. For locations 3 and 7, we select the UAV with the shortest distance from all the UAVs that satisfy the constraints. Based on the generated coordinates of 8 locations above, we use the global optimal algorithm to calculate the total time and total distance of the UAV group. The comparison with the local optimal algorithm is shown in Table 7 and Figure 6.Table 7
Comparison of two algorithms.
Local optimal algorithmGlobal optimal algorithmTime (min)4.50496.2503Distance (km)10.524410.4409Figure 6
The effect of two algorithms: (a) local optimal algorithm and (b) global optimal algorithm.
(a)(b)Due to the randomness of the coordinate of each pickup location, we repeat the above experiment 100 times to compare the advantages and disadvantages of the local optimal algorithm and the global optimal algorithm under more general conditions, as shown in Figure7. We can see that the local optimal algorithm focuses on minimizing the task time of the UAV group, while the global optimal algorithm focuses on minimizing the total flight distance of the UAV group. This is because the local optimal algorithm considers the shortest flight path of a single UAV. The total time of UAV group depends on the UAV with the longest task time, in other words, the UAV with the longest flight path. The local optimal algorithm is optimizing from the perspective of a single UAV, which can shorten the longest path of one UAV and increase the total distance of the whole UAV group. On the contrary, the global optimal algorithm is optimizing from the perspective of the whole UAV group. The distance of a single UAV may increase, but the flight distance of the whole UAV group will decrease.Figure 7
The results of two algorithms whenR=1km: (a) total task time of two algorithms; (b) total task distance of two algorithms. Maximum optimization rate: 38.74%; maximum optimization rate: 4.71%.
(a)(b)In order to verify the universal applicability of the algorithm, we also simulate in a larger circle withR=2,3,4,5km, respectively. The results are shown in Figures 8–11. We marked the maximum effect of the optimization and calculated the average values of different algorithms, as shown in Table 8.Figure 8
The results of two algorithms whenR=2km: (a) total task time of two algorithms; (b) total task distance of two algorithms. Maximum optimization rate: 31.47%; maximum optimization rate: 5.41%.
(a)(b)Figure 9
The results of two algorithms whenR=3km: (a) total task time of two algorithms; (b) total task distance of two algorithms. Maximum optimization rate: 22.62%; maximum optimization rate: 7.17%
(a)(b)Figure 10
The results of two algorithms whenR=4km: (a) total task time of two algorithms; (b) total task distance of two algorithms. Maximum optimization rate: 36.50%; maximum optimization rate: 4.88%.
(a)(b)Figure 11
The results of two algorithms whenR=5km: (a) total task time of two algorithms; (b) total task distance of two algorithms. Maximum optimization rate: 17.16%; maximum optimization rate: 5.52%.
(a)(b)Table 8
The average of the results of the two algorithms.
R=1kmR=2kmR=3kmR=4kmR=5kmDistance (km)Time (min)Distance (km)Time (km)Distance (min)Time (km)Distance (km)Time (min)Distance (km)Time (km)Local12.12816.503124.038512.864836.327419.659346.831225.566762.368234.0831Global12.07716.536423.949012.966236.184119.800446.670525.712362.163334.2576We can see clearly that, in a variety of different ranges, the local optimal algorithm can always get the minimum task time and the global optimal algorithm gets the shortest flight distance. And with the increase of the range, the advantages of each algorithm become more and more obvious.


## 5. Conclusion and Prospect

This paper proposed a set of secondary task assignment theory based on the idea of low-carbon and sustainability under the background of Multi-UAV pickup. By minimizing the number of UAV and minimizing the task time and the total distance, the energy consumption can be reduced as much as possible to achieve green scheduling.The feasibility and universal applicability of the theory were well verified by a large number of simulations in many different situations. We compared the local optimal algorithm and the global optimal algorithm in detail and verified their advantages in time and distance, respectively. In the actual task assignment, managers can choose a more appropriate algorithm according to their own needs.At present, the use of UAV for transportation is still in the stage of continuous exploration and improvement. Our theory of Multi-UAV secondary assignment has realized the green scheduling to a certain extent, but there are still the following main deficiencies:(i)
The UAV group is homogeneous. When there is a large difference in the quantity of goods among pickup locations, the homogeneous UAV group may not be able to meet the needs of the task.(ii)
With the increase of the number of pickup locations and the amount of goods, whether the theory proposed in this paper can get good task assignment effect needs to be further verified.Therefore, in the following research work, we plan to set up more pickup locations to verify the feasibility of this theory. We also consider a heterogeneous UAV system. Through the reasonable collocation of UAVs of different specifications, the utilization rate of the UAV group is further improved, the resource consumption is reduced, and the goal of low-carbon sustainable development is achieved.



---

*Source: 6618430-2021-01-31.xml*