## 2 Problem Description
### Dynamic Task Allocation Problem  
We adopt a seven-element combination \(\{V,S_{G},\,T,\,O,\,M_{t},\,R,\,C\}\) to describe the dynamic task assignment problem. \(V=\{V_{1},\,V_{2},\,\ldots,\,V_{N}\}\) is the set of UAVs and \(N\) represents the number of UAVs in the swarm; \(S_{g}=\{S_{g1},\,S_{g2},\,\ldots,\,S_{gNG}\}\) is the set of subsets and \(N_{G}\) represents the number of UAV subsets in the swarm; \(T=\{T_{1},\,T_{2},\,\ldots,\,T_{NT}\}\) is the set of targets, where \(N_{T}\) is the number of targets; \(O=\{O_{1},\,O_{2},\,\ldots,\,O_{Nobs}\}\) is the set of obstacles, where \(N_{obs}\) is the number of obstacles; \(M_{t}=\{M_{t1},\,M_{2},\,\ldots,\,M_{t,Ntype}\}\) is the task type set of each target, where \(N_{type}\) is the number of the types. For the \"Reconnaissance-Attack\" mission scenario, the task type set includes the reconnaissance and attack of two elements, which can be expressed as \(M_{t}=\{Scout,\,Attack\}\); \(R=\{R_{1},\,R_{2},\,\ldots,\,R_{Ntype}\}\) is the set of the maximum task values for the \"Reconnaissance-Attack\" mission scenario \(R=\{R_{S},R_{A}\}\); \(C\) is the set of multiple constraints, mainly including UAV capacity constraint, time win  
Figure 2: (**a**) The detection area of reconnaissance payload; (**b**) the available area of attack payload. ow constraint, sequential constraint, and cooperation constraint. These constraints are described as follows:  
**Definition 1** (UAV capability constraints). _The UAV capability constraints are mainly reflected in three aspects: the maximum range, the executable task types, and the maximum number of executable tasks._  
(a) (The maximum range constraint) Assume that the initial state of UAV \(V_{i}\) is \(s_{i0}\), and the task sequence is \(Seq_{i}=\{s_{i1},s_{i2},\ldots,s_{iN,s_{i}}\}\), where \(N_{s,i}\) is the number of tasks to be executed. From Section 2.3, the maximum range of UAV \(V_{i}\) is \(D_{i,max}\) and the maximum range constraint can be expressed as  
\[\sum_{j=1}^{N_{s,i}}L(s_{ij},s_{i,j-1})\ \leq D_{i,max} \tag{5}\]  
where \(L(s_{ij},s_{i,j-1})\), which relates to task \(s_{i,j-1}\) and task \(s_{ij}\), represents the air-range from the position of task \(s_{i,j-1}\) to the position of task \(s_{ij}\). That means the whole air-range couples with the task sequence. (b) (The executable task type constraint) In the process of the swarm cooperative task execution, different sorts of UAVs perform different types of tasks. There is a mapping between the UAV capability \(P_{i}=\{P_{i,scout},P_{i,attack}\}\) and \(M_{t}=\{Scout,Attack\}\), which can be expressed as  
\[P_{i}=\{P_{i,scout},P_{i,attack}\}=\left\{ \begin{array}{l}\{1,*\}\to Scout\\ \{*,1\}\to Attack\end{array} \right. \tag{6}\]  
(c) (The task number constraint) The payload number and energy carried by UAVs have limits; thus, it is necessary to restrict the maximum number of tasks performed by the UAV. Assuming that the number of tasks assigned to UAV \(V_{i}\) is \(N_{vt,i}\) and the upper limit is \(N_{vi,\max}\), the constraint is expressed as  
\[N_{vt,i}\leq N_{vi,\max} \tag{7}\]  
**Definition 2** (Sequence constraint). _If there is a specific execution order between subtasks Task\({}_{i}\) and Task\({}_{j}\), there is sequence constraint between Task\({}_{i}\) and Task\({}_{j}\). Reference [9] gives the concrete model of sequence constraint._  
**Definition 3** (Time window constraint). _The start time when task \(s_{i,j}\) in Seq\({}_{i}=\{s_{i1},s_{i2},\ldots,\)\(s_{iN,s_{i}}\}\) is performed by UAV \(V_{i}\) needs to be guaranteed to be in the time window \(t_{s,ij}\in[t_{b,j},t_{e,j}]\), where \(t_{b,j}\) is the earliest start time and \(t_{e,j}\) is the latest one. The start time \(t_{s,i}\) has relations with the last task and the preplanned flight path of the UAV. Suppose \(t_{e,j-1}\) the time when UAV accomplishes the last task and the preplanning air-range from \(s_{i,j-1}\) to \(s_{i,j}\), then the time window constraint can be expressed as_  
\[\left\{