# UAV Task Allocation Based on Clone Selection Algorithm

Authors: Xiaopan Zhang; Xingjun Chen
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

With the continuous development of computer and network technology, the large-scale and clustered operations of drones have gradually become a reality. How to realize the reasonable allocation of UAV cluster combat tasks and realize the intelligent optimization control of UAV cluster is one of the most challenging difficulties in UAV cluster combat. Solving the task allocation problem and finding the optimal solution have been proven to be an NP-hard problem. This paper proposes a CSA-based approach to simultaneously optimize four objectives in multi-UAV task allocation, i.e., maximizing the number of successfully allocated tasks, maximizing the benefits of executing tasks, minimizing resource costs, and minimizing time costs. Experimental results show that, compared with the genetic algorithm, the proposed method has better performance on solving the UAV task allocation problem with multiple objectives.


---

## Body

## 1. Introduction

With the rapid development of Internet of Things and 5G communication technologies, UAV systems are increasingly used in the military field and UAV operations have become an important part of modern military operations. Single-UAV combat often lacks support, guarantee, and target cover, and it usually requires an overall force to complete combat missions. Task allocation is one of the most important problems that need to be solved in multi-UAV operations, and it directly affects the efficiency and profitability of operations. Finding the optimal solution of the task allocation problem has been proven to be NP-hard, and the solving difficulty increases exponentially with the scale of UAV cluster and tasks. Furthermore, task allocation is often a multiobjective optimization problem, which makes the model more complicated, e.g., simultaneously maximizing the number of tasks to be performed, maximizing the benefits of performing tasks, minimizing time costs, and minimizing resource consumption.Many methods for solving the task allocation problem have been proposed, which can be roughly divided into four categories: graph theory [1], integer linear programming [2], state space search [3], and Artificial Intelligence (AI) methods such as genetic algorithm, particle swarm algorithm, simulated annealing, and ant colony algorithm [4–8]. Most methods in the first three categories are complete search algorithms. These algorithms can get the optimal solution, but they require a lot of computing resources and time cost, and it is impractical to apply them to a large-scale problem. AI methods cannot guarantee an optimal solution, but they usually can obtain a local-optimal solution [9] within a reasonable period of time. The above algorithms often optimize a certain goal, such as task revenue [10] or time/resource cost [11].Artificial immune system (AIS) is an emerging research direction of computational intelligence. A clone selection algorithm (CSA) is proposed based on related immune principles [12–14]. This algorithm is widely used in function optimization [15] (e.g., multimodal optimization and continuous function optimization), pattern recognition [16, 17] (e.g., binary character and face recognition), and scheduling problems [18]. Compared with those complete search algorithms, CSA has some advantages and is convenient for practicality and engineering. At the same time, CSA can be used to solve multiobjective problems. Comparing CSA with the GA [19–21], the main difference is the way the population evolves. In the GA, the population evolves through crossover and mutation, and in the CSA, cell reproduction is asexual, with each offspring produced by one cell being an exact copy of its parents, and mutation and selection are made through these offspring. This paper proposes to use CSA to optimize four objectives in UAV task allocation, i.e., maximizing the number of successfully assigned tasks, maximizing the benefits of executing tasks, minimizing resource cost, and minimizing time cost, and comprehensively considers the time constraints, resource constraints, and functional constraints in real-world scenarios. Comparing with the brute-force search algorithm and genetic algorithm, experimental results show that the proposed method could achieve better performance on solving high-dimensional multiobjective task allocation problems.The remaining sections of this paper are organized as follows: Section2 introduces the description of task allocation problems; Section 3 present the details of the proposed method; Section 4 presents the experimental results and our analysis; the proposed work is summarized in Section 5.


## 2. Problem Description

Task allocation involves many objects and related attributes. This section will give a formal representation of the elements, goals, and constraints involved in task allocation [22, 23] to facilitate later expression.


### 2.1. Task Allocation

(1)
UAV: as the code of military operations, UAV is expressed asU=u1,u2,⋯,um, where ui represents UAV ii=1,⋯,m and m is the number of UAVs. The initial position of the UAV is expressed as Pu=pu1,pu2,⋯,pum, where pui represents the initial position of the UAV i. The ammunition and fuel carried by each UAV are expressed as ResU=resu1,⋯,resum, where resui represents the number of resources carried by the UAV i.(2)
Task: as a combat task and an indivisible unit, the task is expressed asT=t1,t2,⋯,tn, where tj represents the task jj=1,⋯,n and n is the number of tasks. The initial position of the task is expressed as Pt=pt1,pt2,⋯,ptn, where ptj represents the initial position of task j. The execution of each task requires certain resources to be consumed, which is expressed as ResT=rest1,⋯,restn, where restj represents the resources consumed by task j. Performing each task will obtain a different task revenue expressed as Reward=reward1,⋯,rewardn, where rewardj represents the revenue of executing task j. The validity period of each task is limited by time. Each task has the earliest start execution time earlyj and the latest start execution time latej; the executable range of each task is expressed as TR=early1,late1,⋯,earlyn,laten, where earlyj,latej is the executable range of task j. It tasks different time to execute different tasks; the time consumed to execute the task is expressed as Time=timei,⋯,timen, where timej represents the time consumed to execute task j.(3)
Execution sequence: a task is executed by only one drone. The execution sequence of the UAV is represented asSu=su1,⋯,sum. Among them, sui represents the execution sequence of UAV i, where sui is composed of corresponding tasks, specifically represented as sui=txtytqtztd, where 0<x,y,q,z,d≤n. |sui| is the number of tasks executed by the UAV i, and they are, respectively, task x, task y, task q, task z, and task d. suij is the jth task in the execution sequence of the UAV i. According to the position of the task in the execution sequence, the corresponding task can be expressed as tx=sui1, ty=sui2, tq=sui3, tz=sui4, and td=sui5.(4)
Task allocation: UAV and task are the two subjects of allocation. Since a task can only be performed by one UAV, the allocation relationship can be expressed asA=a1,⋯,an, where aj represents the assignment relationship of the task j. If task j is not assigned to a drone, then aj=NULL, and if assigned, it means the inequality aj≠NULL. At the same time, the assignment to the relevant UAV can be obtained one step further, expressed as aj=ui; it means that task j is assigned to UAV i for execution.


### 2.2. Optimization Objective

With the basic description of the above basic elements, we further derive the definition of objectives to be optimized in UAV task allocation problems.(1)
Maximize the number of successfully assigned tasks:(1)target1=max∀A∑j=1naj≠NULL,where aj≠NULL is true; the return value is 1; otherwise, the value is 0.(2)
Maximize the benefits of performing tasks:(2)target2=max∀A∑j=1naj≠NULL×rewardj.(3)
Minimize resource cost:(3)target3=min∀Su∑i=1marrive_costpui,sui1+∑j=2suiarrive_costsuij−1,suij+∑j=1suiressuij,where arrive_costpui,sui1 represents the resource consumption cost required to execute the first task in the task sequence from agent i to agent.(4)
Minimize time consumption:(4)target2=min∀Sumax∑i=1mtime_costsui,sui,where time_costsui,sui represents the time; it tasks for the UAV ri to execute the tasks in the si sequence.


### 2.3. Constraints

In real-world scenarios, there are often some constraints in task allocation problems. In this paper, we mainly consider the following common constraints [16]:(1)
Time constraint: a UAV can only successfully execute the task when it starts within the executable time range of the task. For the execution sequenceSui of the UAV ui, the constraint is as follows:Forj=1,(5)time_constrainti1T=arrivetimepui,1=traveltimepui,sui1≤latesui1.Forj=2,⋯,∣Sui∣,(6)time_constraintijT=arrivetimeui,j=timesuij+traveltimepui,suij≤latesui1.(2)
Resource constraints: UAV tasks are limited by its own resources. For the execution sequenceSui of UAV ui, the time constraints are as follows:Forj=1,⋯,∣Sui∣,(7)assets_constraintijR=resourcecostpui,j=travelcsotpui,sui1+∑k=2jrestsuik≤resui.(3)
Functional constraints: in real scenarios, different types of UAVs have different functions and therefore perform different tasks. This constraint is explained from the perspective of drones and tasks:(i)
From the perspective of agents, fori=1,⋯,m,(8)function_constraintiU=txty⋯tztd,The constraint indicates that agenti can only execute task x, task y, task z, and task d due to functional limitations, where 0<x,y,q,z,d≤n.(ii)
From the perspective of tasks, forj=1,⋯,n,(9)function_constraintjT=ue,⋯,uf.This shows that the constraint indicates that taskj can only be executed by UAV e, UAV f, etc. due to functional limitations, where 0<e,f≤m.


## 2.1. Task Allocation

(1)
UAV: as the code of military operations, UAV is expressed asU=u1,u2,⋯,um, where ui represents UAV ii=1,⋯,m and m is the number of UAVs. The initial position of the UAV is expressed as Pu=pu1,pu2,⋯,pum, where pui represents the initial position of the UAV i. The ammunition and fuel carried by each UAV are expressed as ResU=resu1,⋯,resum, where resui represents the number of resources carried by the UAV i.(2)
Task: as a combat task and an indivisible unit, the task is expressed asT=t1,t2,⋯,tn, where tj represents the task jj=1,⋯,n and n is the number of tasks. The initial position of the task is expressed as Pt=pt1,pt2,⋯,ptn, where ptj represents the initial position of task j. The execution of each task requires certain resources to be consumed, which is expressed as ResT=rest1,⋯,restn, where restj represents the resources consumed by task j. Performing each task will obtain a different task revenue expressed as Reward=reward1,⋯,rewardn, where rewardj represents the revenue of executing task j. The validity period of each task is limited by time. Each task has the earliest start execution time earlyj and the latest start execution time latej; the executable range of each task is expressed as TR=early1,late1,⋯,earlyn,laten, where earlyj,latej is the executable range of task j. It tasks different time to execute different tasks; the time consumed to execute the task is expressed as Time=timei,⋯,timen, where timej represents the time consumed to execute task j.(3)
Execution sequence: a task is executed by only one drone. The execution sequence of the UAV is represented asSu=su1,⋯,sum. Among them, sui represents the execution sequence of UAV i, where sui is composed of corresponding tasks, specifically represented as sui=txtytqtztd, where 0<x,y,q,z,d≤n. |sui| is the number of tasks executed by the UAV i, and they are, respectively, task x, task y, task q, task z, and task d. suij is the jth task in the execution sequence of the UAV i. According to the position of the task in the execution sequence, the corresponding task can be expressed as tx=sui1, ty=sui2, tq=sui3, tz=sui4, and td=sui5.(4)
Task allocation: UAV and task are the two subjects of allocation. Since a task can only be performed by one UAV, the allocation relationship can be expressed asA=a1,⋯,an, where aj represents the assignment relationship of the task j. If task j is not assigned to a drone, then aj=NULL, and if assigned, it means the inequality aj≠NULL. At the same time, the assignment to the relevant UAV can be obtained one step further, expressed as aj=ui; it means that task j is assigned to UAV i for execution.


## 2.2. Optimization Objective

With the basic description of the above basic elements, we further derive the definition of objectives to be optimized in UAV task allocation problems.(1)
Maximize the number of successfully assigned tasks:(1)target1=max∀A∑j=1naj≠NULL,where aj≠NULL is true; the return value is 1; otherwise, the value is 0.(2)
Maximize the benefits of performing tasks:(2)target2=max∀A∑j=1naj≠NULL×rewardj.(3)
Minimize resource cost:(3)target3=min∀Su∑i=1marrive_costpui,sui1+∑j=2suiarrive_costsuij−1,suij+∑j=1suiressuij,where arrive_costpui,sui1 represents the resource consumption cost required to execute the first task in the task sequence from agent i to agent.(4)
Minimize time consumption:(4)target2=min∀Sumax∑i=1mtime_costsui,sui,where time_costsui,sui represents the time; it tasks for the UAV ri to execute the tasks in the si sequence.


## 2.3. Constraints

In real-world scenarios, there are often some constraints in task allocation problems. In this paper, we mainly consider the following common constraints [16]:(1)
Time constraint: a UAV can only successfully execute the task when it starts within the executable time range of the task. For the execution sequenceSui of the UAV ui, the constraint is as follows:Forj=1,(5)time_constrainti1T=arrivetimepui,1=traveltimepui,sui1≤latesui1.Forj=2,⋯,∣Sui∣,(6)time_constraintijT=arrivetimeui,j=timesuij+traveltimepui,suij≤latesui1.(2)
Resource constraints: UAV tasks are limited by its own resources. For the execution sequenceSui of UAV ui, the time constraints are as follows:Forj=1,⋯,∣Sui∣,(7)assets_constraintijR=resourcecostpui,j=travelcsotpui,sui1+∑k=2jrestsuik≤resui.(3)
Functional constraints: in real scenarios, different types of UAVs have different functions and therefore perform different tasks. This constraint is explained from the perspective of drones and tasks:(i)
From the perspective of agents, fori=1,⋯,m,(8)function_constraintiU=txty⋯tztd,The constraint indicates that agenti can only execute task x, task y, task z, and task d due to functional limitations, where 0<x,y,q,z,d≤n.(ii)
From the perspective of tasks, forj=1,⋯,n,(9)function_constraintjT=ue,⋯,uf.This shows that the constraint indicates that taskj can only be executed by UAV e, UAV f, etc. due to functional limitations, where 0<e,f≤m.


## 3. The Proposed Method

The CSA algorithm is a kind of the artificial immune system, which mainly contains ideas such as clone selection, receptor editing, and antibody circulation supplement mechanism and selects mature antibody cells through affinity, and uses a limited gene library to identify endlessly changing antigens. The CSA algorithm simulates immune mechanisms such as clone selection and amplification of antibodies, high-frequency mutations, and receptor editing during the immune response process of the immune system, so that it has strong self-learning, self-organization, and adaptive capabilities. Optimization-related fields are widely used. In this paper, the distribution plan of the UAV is mainly coded into antibody cells, and the final Pareto solution set is obtained through continuous iteration of antibodies [24, 25] (described in detail in Section 3.5).


### 3.1. Basic Framework

In this section, the basic program flow chart of the algorithm will be given, as shown in Figure1.Figure 1
Flow chart of CSA [12].It can be seen that the CSA model is relatively simple and convenient for coding operation. The main steps are described as follows:(1)
First, randomly initialize the UAV task allocation solution, organize the execution sequence of each UAV, and evaluate the affinity function of each antibody, and set the number of antibodies toN(2)
Judging the number of iterations, when it reaches a certain number (maxGen is the maximum number), the algorithm ends the output distribution plan(3)
Perform cloning operations on the current population, which involves the number of clones and the proportion of clones selected according to their affinity(4)
The cloned antibody is mutated according to the affinity ratio of the cloned individual(5)
SelectNfrom the original population and the cloned population 2Nfor the next iteration(6)
Repeat steps (2)–(5). This is a simple program description process of the algorithm, and each process will be described in detail below


### 3.2. Encoding of Antibody

An important part of using evolutionary algorithms is to encode real-world problems into antibodies, which are feasible solutions to allocation problems. For the CSA algorithm, the concept of antibody is very important, and the code of the antibody also determines the actual optimization effect of the algorithm. These solutions are composed of the execution sequence of each UAV. These components are called “genes,” and their practical meaning is the actual distribution execution sequence of the UAV. Here is a specific description of the encoding rule [22]. For example, Table 1 shows an example of 3 drones and antibody codes composed of 10 tasks.Table 1
Example of antibody coding.
UAV 1UAV 2UAV 31 7 2 43 6 4 58 9 2 10 1The following information can be obtained from the coding example in the figure above. From the functional constraints of the UAV,function_constraint1U=1,7,2,4, function_constraint2U=3,6,4,5, and function_constraint3U=8,9,2,10,1. From the perspective of the functional constraints of the task, function_constraint2T=1,3, and function_constraint3T=2. This kind of coding is directly based on the functional constraints of the drone, reducing a lot of useless calculations and judgments, which is conducive to improving efficiency. At the same time, it can also get su1⊆1,7,2,4, su2⊆3,6,4,5, and su3⊆8,9,2,10,1. We know the actual execution sequence that the UAV finally allocates must be a subset of the UAV’s functional constraints. At the same time, there are some shortcomings in this coding. As far as t2 is concerned, due to its simultaneous existence in the functional constraints of u1 and u3 (in simple terms, there is a many-to-many relationship between the UAV and the task), it is difficult for the algorithm to choose who performs the more excellent, simple processing is carried out in the encoding here, and it is stated that the UAV with lower encoding will be executed first; that is to say, if u1 is not limited in resources and time, t2 can be executed first, and then t2 in the function constraint of u3 fails; if the u1 constraint is not satisfied, u3 starts to judge the conditions for executing t2.


### 3.3. Cloning, Mutation, and Selection

The original CSA algorithm selects cloned antibodies according to the degree of affinity. Most antibodies with higher affinity are cloned for mutation in order to produce better individuals; a small number of antibodies with poor affinity are cloned to prevent mutation. The algorithm enters the local optimum to improve the quality of the solution. Such a strategy is in line with the realistic model and has a certain optimization effect; however, because the problem is a multiobjective optimization, each solution may evolve into a Pareto solution. Therefore, under this problem model, we assume that each antibody in each original population will be cloned according to its affinity to change the following individuals.The mutation operation is performed in the cloned individual. The main operation of mutation is to randomly change part of the gene in the antibody. The algorithm mutates according to the degree of affinity. It is assumed that individuals with higher affinity have higher quality solutions, individuals with higher clone affinity have a lower mutation rate, and individuals with lower affinity have a higher mutation rate. This is because the quality of individual solutions with high affinity has been further optimized. Less variation is to maintain the quality of its own solutions and to explore around the solution at the same time; while individuals with low affinity undergo a lot of variation to let it explore a larger solution space. This also means that individuals with less affinity change fewer gene segments, while individuals with greater affinity change more. The detailed change parameters will be given in the experimental part.


### 3.4. Affinity Function

The four objectives in Section2 are normalized, and the corresponding constraints are added to the calculation of the affinity function. When evaluating each individual x, the following affinity function can be used:(1)
The value of the first objective can be calculated by the following formula:(10)affinity1x=1.0−∑i=1me1xin,where xi=i1,⋯,ib and e1xi are calculated by(11)e1xi=∑w=1bhiw,where(12)hiw=ifviwhasbeenallocated,0,orarrival_timexiE+iw,xiE+1>lateiw,orresource_costxiE+iw,xiE+1>resi,1,otherwise,and it judges whetherviw can be added to the current execution sequence of ui, xiE (it is the initial empty set) is the current execution sequence of ai, and xiE+iw means adding iw to xiE(2)
The value of the second objective can be calculated by the following formula:(13)affinity2x=1.0−∑i=1me2xi∑i=1nrewardi,where e2xi=∑w=1bhiw×rewardiw(3)
The value of the third objective can be calculated by the following formula:(14)affinity3x=∑i=1me3xim×max_r,where max_r represents the maximum amount of resources carried by the drone, e3xi=∑w=1khiw×travel_costplast,pviw+rescostiw, and plast represents the location of the last task assigned to ui (when w=1, plast represents the location of ui)(4)
The value of the forth objective can be calculated by the following formula:(15)affinity4x=maxi=1me4xim×max_t,among them, max_t is the longest time to complete and e4xi=∑w=1khiw×travel_timeplast,pviw+timecostiwIt is worth noting that not all tasks encoded in antibodies can be successfully assigned to drones, and the order in which drones perform tasks is implicit in the antibody. Through above transformation, we can input the individual into the four functions in formulas (10)–(15) to facilitate the evaluation of the individual.


### 3.5. Multiobjective Optimal Solution Set

Since in the case of multiobjective, each individual has multiple attributes (each task is identified as an attribute in the coding here); the comparison between two individuals cannot simply use the size relationship. Therefore, this section will briefly introduce the basis of multiobjective optimization.


#### 3.5.1. Domination Relationship

In the domination relationship between different individuals, letx and y be two different individuals in the multiobjective optimization population, if the following two conditions are met:(1)
For all subgoals (referred to as four goals in this article),x is no worse than y, that is, fkx≤fkyk=1,2,⋯,r(2)
There is at least a certain subgoal that makesx better than y. It is expressed as ∃l∈1,2,⋯,r, which satisfies flx<flyAt this time,x is called nondominated and y is dominated, where x dominates y. It can be symbolized as x≺y. If x and y do not meet the above conditions, it proves that there is no dominant relationship between the two.


#### 3.5.2. Pareto Solution Set

It can be obtained from the above dominance relationship that all individuals in a population can be sorted by the definition of dominance relationship, but because some solution sets may not have dominance relationships, these solution sets are in the same position. Through these characteristics, a solution set can be obtained. Each individualz in this solution set satisfies(1)
Individuals in the population are dominated by it, expressed asz≺p, p∈A(2)
Other individuals cannot dominate it; that is, there is no dominance relationship between the two, expressed asz⊀q,q⊀z,q∈BIn (1) and (2),A∩B=∅, and A∪B=U.At the end of the experiment, we will select the Pareto-based multiobjective optimal solution set as the task allocation plan, in which the subobjectives compared between individuals can refer to the affinity function.


## 3.1. Basic Framework

In this section, the basic program flow chart of the algorithm will be given, as shown in Figure1.Figure 1
Flow chart of CSA [12].It can be seen that the CSA model is relatively simple and convenient for coding operation. The main steps are described as follows:(1)
First, randomly initialize the UAV task allocation solution, organize the execution sequence of each UAV, and evaluate the affinity function of each antibody, and set the number of antibodies toN(2)
Judging the number of iterations, when it reaches a certain number (maxGen is the maximum number), the algorithm ends the output distribution plan(3)
Perform cloning operations on the current population, which involves the number of clones and the proportion of clones selected according to their affinity(4)
The cloned antibody is mutated according to the affinity ratio of the cloned individual(5)
SelectNfrom the original population and the cloned population 2Nfor the next iteration(6)
Repeat steps (2)–(5). This is a simple program description process of the algorithm, and each process will be described in detail below


## 3.2. Encoding of Antibody

An important part of using evolutionary algorithms is to encode real-world problems into antibodies, which are feasible solutions to allocation problems. For the CSA algorithm, the concept of antibody is very important, and the code of the antibody also determines the actual optimization effect of the algorithm. These solutions are composed of the execution sequence of each UAV. These components are called “genes,” and their practical meaning is the actual distribution execution sequence of the UAV. Here is a specific description of the encoding rule [22]. For example, Table 1 shows an example of 3 drones and antibody codes composed of 10 tasks.Table 1
Example of antibody coding.
UAV 1UAV 2UAV 31 7 2 43 6 4 58 9 2 10 1The following information can be obtained from the coding example in the figure above. From the functional constraints of the UAV,function_constraint1U=1,7,2,4, function_constraint2U=3,6,4,5, and function_constraint3U=8,9,2,10,1. From the perspective of the functional constraints of the task, function_constraint2T=1,3, and function_constraint3T=2. This kind of coding is directly based on the functional constraints of the drone, reducing a lot of useless calculations and judgments, which is conducive to improving efficiency. At the same time, it can also get su1⊆1,7,2,4, su2⊆3,6,4,5, and su3⊆8,9,2,10,1. We know the actual execution sequence that the UAV finally allocates must be a subset of the UAV’s functional constraints. At the same time, there are some shortcomings in this coding. As far as t2 is concerned, due to its simultaneous existence in the functional constraints of u1 and u3 (in simple terms, there is a many-to-many relationship between the UAV and the task), it is difficult for the algorithm to choose who performs the more excellent, simple processing is carried out in the encoding here, and it is stated that the UAV with lower encoding will be executed first; that is to say, if u1 is not limited in resources and time, t2 can be executed first, and then t2 in the function constraint of u3 fails; if the u1 constraint is not satisfied, u3 starts to judge the conditions for executing t2.


## 3.3. Cloning, Mutation, and Selection

The original CSA algorithm selects cloned antibodies according to the degree of affinity. Most antibodies with higher affinity are cloned for mutation in order to produce better individuals; a small number of antibodies with poor affinity are cloned to prevent mutation. The algorithm enters the local optimum to improve the quality of the solution. Such a strategy is in line with the realistic model and has a certain optimization effect; however, because the problem is a multiobjective optimization, each solution may evolve into a Pareto solution. Therefore, under this problem model, we assume that each antibody in each original population will be cloned according to its affinity to change the following individuals.The mutation operation is performed in the cloned individual. The main operation of mutation is to randomly change part of the gene in the antibody. The algorithm mutates according to the degree of affinity. It is assumed that individuals with higher affinity have higher quality solutions, individuals with higher clone affinity have a lower mutation rate, and individuals with lower affinity have a higher mutation rate. This is because the quality of individual solutions with high affinity has been further optimized. Less variation is to maintain the quality of its own solutions and to explore around the solution at the same time; while individuals with low affinity undergo a lot of variation to let it explore a larger solution space. This also means that individuals with less affinity change fewer gene segments, while individuals with greater affinity change more. The detailed change parameters will be given in the experimental part.


## 3.4. Affinity Function

The four objectives in Section2 are normalized, and the corresponding constraints are added to the calculation of the affinity function. When evaluating each individual x, the following affinity function can be used:(1)
The value of the first objective can be calculated by the following formula:(10)affinity1x=1.0−∑i=1me1xin,where xi=i1,⋯,ib and e1xi are calculated by(11)e1xi=∑w=1bhiw,where(12)hiw=ifviwhasbeenallocated,0,orarrival_timexiE+iw,xiE+1>lateiw,orresource_costxiE+iw,xiE+1>resi,1,otherwise,and it judges whetherviw can be added to the current execution sequence of ui, xiE (it is the initial empty set) is the current execution sequence of ai, and xiE+iw means adding iw to xiE(2)
The value of the second objective can be calculated by the following formula:(13)affinity2x=1.0−∑i=1me2xi∑i=1nrewardi,where e2xi=∑w=1bhiw×rewardiw(3)
The value of the third objective can be calculated by the following formula:(14)affinity3x=∑i=1me3xim×max_r,where max_r represents the maximum amount of resources carried by the drone, e3xi=∑w=1khiw×travel_costplast,pviw+rescostiw, and plast represents the location of the last task assigned to ui (when w=1, plast represents the location of ui)(4)
The value of the forth objective can be calculated by the following formula:(15)affinity4x=maxi=1me4xim×max_t,among them, max_t is the longest time to complete and e4xi=∑w=1khiw×travel_timeplast,pviw+timecostiwIt is worth noting that not all tasks encoded in antibodies can be successfully assigned to drones, and the order in which drones perform tasks is implicit in the antibody. Through above transformation, we can input the individual into the four functions in formulas (10)–(15) to facilitate the evaluation of the individual.


## 3.5. Multiobjective Optimal Solution Set

Since in the case of multiobjective, each individual has multiple attributes (each task is identified as an attribute in the coding here); the comparison between two individuals cannot simply use the size relationship. Therefore, this section will briefly introduce the basis of multiobjective optimization.


### 3.5.1. Domination Relationship

In the domination relationship between different individuals, letx and y be two different individuals in the multiobjective optimization population, if the following two conditions are met:(1)
For all subgoals (referred to as four goals in this article),x is no worse than y, that is, fkx≤fkyk=1,2,⋯,r(2)
There is at least a certain subgoal that makesx better than y. It is expressed as ∃l∈1,2,⋯,r, which satisfies flx<flyAt this time,x is called nondominated and y is dominated, where x dominates y. It can be symbolized as x≺y. If x and y do not meet the above conditions, it proves that there is no dominant relationship between the two.


### 3.5.2. Pareto Solution Set

It can be obtained from the above dominance relationship that all individuals in a population can be sorted by the definition of dominance relationship, but because some solution sets may not have dominance relationships, these solution sets are in the same position. Through these characteristics, a solution set can be obtained. Each individualz in this solution set satisfies(1)
Individuals in the population are dominated by it, expressed asz≺p, p∈A(2)
Other individuals cannot dominate it; that is, there is no dominance relationship between the two, expressed asz⊀q,q⊀z,q∈BIn (1) and (2),A∩B=∅, and A∪B=U.At the end of the experiment, we will select the Pareto-based multiobjective optimal solution set as the task allocation plan, in which the subobjectives compared between individuals can refer to the affinity function.


## 3.5.1. Domination Relationship

In the domination relationship between different individuals, letx and y be two different individuals in the multiobjective optimization population, if the following two conditions are met:(1)
For all subgoals (referred to as four goals in this article),x is no worse than y, that is, fkx≤fkyk=1,2,⋯,r(2)
There is at least a certain subgoal that makesx better than y. It is expressed as ∃l∈1,2,⋯,r, which satisfies flx<flyAt this time,x is called nondominated and y is dominated, where x dominates y. It can be symbolized as x≺y. If x and y do not meet the above conditions, it proves that there is no dominant relationship between the two.


## 3.5.2. Pareto Solution Set

It can be obtained from the above dominance relationship that all individuals in a population can be sorted by the definition of dominance relationship, but because some solution sets may not have dominance relationships, these solution sets are in the same position. Through these characteristics, a solution set can be obtained. Each individualz in this solution set satisfies(1)
Individuals in the population are dominated by it, expressed asz≺p, p∈A(2)
Other individuals cannot dominate it; that is, there is no dominance relationship between the two, expressed asz⊀q,q⊀z,q∈BIn (1) and (2),A∩B=∅, and A∪B=U.At the end of the experiment, we will select the Pareto-based multiobjective optimal solution set as the task allocation plan, in which the subobjectives compared between individuals can refer to the affinity function.


## 4. Experimental Results

This section will demonstrate the effectiveness of the method proposed in this article through experimental comparison and conclusion analysis.


### 4.1. Experimental Environment

The experimental environment of this article is as follows: Window 10 operating system 64-bit professional edition, Intel i7-7600U CPU, clocked at 2.80 GHz, memory 8 G, and the programming environment is Visual Studio 2010.First, randomly generate relevant agent and task data. In order to facilitate comparative experiments, randomly generate test data in the preparation phase. In order to simulate the experiment, supposing the initial test position of each UAV ispui=x,yi=1⋯m, x and y are random integers between 0,100; the earliest possible execution time earlyj is a random number between 0,100, and the latest execution time latej is a random number between [earlyj,150); the time required to execute the task timej is random number between [1,10); the resources consumed to execute the task restj is a random number between [0,100); the revenue of the task rewardj is a random number between [0,1) [22]. For functional constraints, this article assumes that each task must have one or more drones that can perform it. After a certain number of iterations, the overall UAV and task change. We make corresponding changes to the antibody through the change information. In order to facilitate the experiment, it is assumed that the time cost and resource cost of transmission have a linear relationship with distance. The experimental parameters of the main CSA algorithm are shown in Table 2.Table 2
Parameter settings.
Parameter nameValueHypermutation ratio[0.2, 0.5, 0.8, 1]Population size200Number of iterations1000Number of clones1Recombination ratio[0, 0.5]Optimization number4


### 4.2. Comparison of Results of Different Algorithms

In this paper, the CSA algorithm and the GA algorithm are consistent with the experimental test data. The algorithm parameter environment and parameters are as shown in the subsection. Four sets of task allocation test data of different scales will be carried out to compare the final Pareto set. Figure2 shows the two algorithms m=5,n=10, m=20,n=50, m=50,n=200, and m=200,n=1000, respectively. The distribution of Pareto solution set. Table 3 compares the dominance of the Pareto solution set.Figure 2
distribution of Pareto solution sets for different scales of problems.
(a)
CSA algorithm (m=5, n=10)(b)
GA algorithm (m=5, n=10)(c)
CSA algorithm (m=20, n=50)(d)
GA algorithm (m=20,n=50)(e)
CSA algorithm (m=50, n=200)(f)
GA algorithm (m=50, n=200)(g)
CSA algorithm (m=200, n=1000)(h)
GA algorithm (m=200, n=1000)Table 3
Comparison results of different algorithms.
Problem scaleGA (No. of nondominated solutions)CSA (number of nondominated solutions)No. of solutions (GA dominates CSA)No. of solutions (CSA dominates GA)5_1014310120_5043870550_200578803200_1000599306It can be observed from Figure2 that in the comparative experiments of different scales, the number of nondominated solutions of the CSA algorithm is more, and the distribution area of the solutions is wider, which also means that the diversity is better, from the analysis in Table 3. It can be obtained that the solution of the CSA algorithm is generally better than that of the GA algorithm. This trend becomes more obvious with the increase of scale. The main reason is that the mutation strategy of the CSA algorithm is better than the mutation strategy of the GA; the CSA variation dynamically changes individuals with the degree of affinity, while the GA algorithm only performs a small amount of mutation on the basis of crossover and variation range is often small, resulting in a small exploration pace, and the dynamic change of the variation range is beneficial to improve the efficiency of the solution. The experimental results just proved this point.


### 4.3. Results on Different Ratios of Tasks to UAVs

In this section, the results of CSA algorithm on different ratios of tasks to UAVs are presented, i.e.,n=100, 150, 200, and 250, when m=50. Since there are many Pareto solutions and it is impossible to compare all the solutions, there is only one of the similar data (i.e., if the difference between two data is within 0.05 in f1,f2,f3,f4). Table 4 compares the experimental results of different ratios.Table 4
Optimization objective results for different ratios of tasks to UAVs.
Problem scaleNumber of nondominated solutionsMinf1Minf2Minf3Minf450_100210.25000.24020.08020.680450_150160.47330.42270.09880.744850_200130.57500.54790.10260.735850_250110.66800.62000.11110.7001According to Section3.4, the smaller the target value of f1,f2,f3,f4, the better the optimization effect. In Table 4, it can be seen that in the comparative experiments of different ratios, when the number of UAVs remains the same, as the task scale increases rapidly, the difficulty of solving the problem is further increased. It will lead to a decrease in the number of nondominated solutions and a decrease in quality (the values of f1,f2,f3,f4 continue to increase), which is in line objective facts. Combining this, in order to maximize the number of tasks successfully assigned, maximize the benefits of tasks execution, minimize the resource costs, and minimize the time costs, the ratio of drones and tasks must be balanced as much as possible. Increase the number of drones as much as possible to optimize the allocation plan, when considering the constraints of many conditions.


## 4.1. Experimental Environment

The experimental environment of this article is as follows: Window 10 operating system 64-bit professional edition, Intel i7-7600U CPU, clocked at 2.80 GHz, memory 8 G, and the programming environment is Visual Studio 2010.First, randomly generate relevant agent and task data. In order to facilitate comparative experiments, randomly generate test data in the preparation phase. In order to simulate the experiment, supposing the initial test position of each UAV ispui=x,yi=1⋯m, x and y are random integers between 0,100; the earliest possible execution time earlyj is a random number between 0,100, and the latest execution time latej is a random number between [earlyj,150); the time required to execute the task timej is random number between [1,10); the resources consumed to execute the task restj is a random number between [0,100); the revenue of the task rewardj is a random number between [0,1) [22]. For functional constraints, this article assumes that each task must have one or more drones that can perform it. After a certain number of iterations, the overall UAV and task change. We make corresponding changes to the antibody through the change information. In order to facilitate the experiment, it is assumed that the time cost and resource cost of transmission have a linear relationship with distance. The experimental parameters of the main CSA algorithm are shown in Table 2.Table 2
Parameter settings.
Parameter nameValueHypermutation ratio[0.2, 0.5, 0.8, 1]Population size200Number of iterations1000Number of clones1Recombination ratio[0, 0.5]Optimization number4


## 4.2. Comparison of Results of Different Algorithms

In this paper, the CSA algorithm and the GA algorithm are consistent with the experimental test data. The algorithm parameter environment and parameters are as shown in the subsection. Four sets of task allocation test data of different scales will be carried out to compare the final Pareto set. Figure2 shows the two algorithms m=5,n=10, m=20,n=50, m=50,n=200, and m=200,n=1000, respectively. The distribution of Pareto solution set. Table 3 compares the dominance of the Pareto solution set.Figure 2
distribution of Pareto solution sets for different scales of problems.
(a)
CSA algorithm (m=5, n=10)(b)
GA algorithm (m=5, n=10)(c)
CSA algorithm (m=20, n=50)(d)
GA algorithm (m=20,n=50)(e)
CSA algorithm (m=50, n=200)(f)
GA algorithm (m=50, n=200)(g)
CSA algorithm (m=200, n=1000)(h)
GA algorithm (m=200, n=1000)Table 3
Comparison results of different algorithms.
Problem scaleGA (No. of nondominated solutions)CSA (number of nondominated solutions)No. of solutions (GA dominates CSA)No. of solutions (CSA dominates GA)5_1014310120_5043870550_200578803200_1000599306It can be observed from Figure2 that in the comparative experiments of different scales, the number of nondominated solutions of the CSA algorithm is more, and the distribution area of the solutions is wider, which also means that the diversity is better, from the analysis in Table 3. It can be obtained that the solution of the CSA algorithm is generally better than that of the GA algorithm. This trend becomes more obvious with the increase of scale. The main reason is that the mutation strategy of the CSA algorithm is better than the mutation strategy of the GA; the CSA variation dynamically changes individuals with the degree of affinity, while the GA algorithm only performs a small amount of mutation on the basis of crossover and variation range is often small, resulting in a small exploration pace, and the dynamic change of the variation range is beneficial to improve the efficiency of the solution. The experimental results just proved this point.


## 4.3. Results on Different Ratios of Tasks to UAVs

In this section, the results of CSA algorithm on different ratios of tasks to UAVs are presented, i.e.,n=100, 150, 200, and 250, when m=50. Since there are many Pareto solutions and it is impossible to compare all the solutions, there is only one of the similar data (i.e., if the difference between two data is within 0.05 in f1,f2,f3,f4). Table 4 compares the experimental results of different ratios.Table 4
Optimization objective results for different ratios of tasks to UAVs.
Problem scaleNumber of nondominated solutionsMinf1Minf2Minf3Minf450_100210.25000.24020.08020.680450_150160.47330.42270.09880.744850_200130.57500.54790.10260.735850_250110.66800.62000.11110.7001According to Section3.4, the smaller the target value of f1,f2,f3,f4, the better the optimization effect. In Table 4, it can be seen that in the comparative experiments of different ratios, when the number of UAVs remains the same, as the task scale increases rapidly, the difficulty of solving the problem is further increased. It will lead to a decrease in the number of nondominated solutions and a decrease in quality (the values of f1,f2,f3,f4 continue to increase), which is in line objective facts. Combining this, in order to maximize the number of tasks successfully assigned, maximize the benefits of tasks execution, minimize the resource costs, and minimize the time costs, the ratio of drones and tasks must be balanced as much as possible. Increase the number of drones as much as possible to optimize the allocation plan, when considering the constraints of many conditions.


## 5. Conclusion

In order to solve the problem of UAV combat task allocation, this paper proposes a clone selection algorithm based on the artificial immune system; this algorithm simultaneously optimizes four objectives, namely, maximizing the number of tasks successfully assigned, maximizing the benefits of tasks execution, minimizing the resource costs, and minimizing the time costs. And the effectiveness of method is proved by experimental comparison. In the later stage, the comparison algorithm model will be improved mainly by the high-dimensional multiobjective optimization strategy of genetic algorithm (for example, niche strategy and reference point based on hyperplane), and the gene recombination of clone selection algorithm will be added to optimize the CSA algorithm to further improve the quality of solutions.



---

*Source: 5518927-2021-07-05.xml*