## 3 Task Assignment Algorithm Based on Extended CNP
### Distributed Multi-Constraint Dynamic Task Assignment Algorithm
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Target**} & \multirow{2}{*}{**Decovered**} & \multirow{2}{*}{**Decovered**} & \multirow{2}{*}{**Subset to Which the**} & \multicolumn{2}{c}{**Time Window of S**} & \multicolumn{2}{c}{**Time Window of A**} \\ \cline{5-5}  & & & **Discoverer Belongs** & **Latest (s)** & **Earliest (s)** & **Latest (s)** \\ \hline T7 & 237.9 & V8 (S) & 2 & 271.0 & 291.0 & 316.0 \\ T8 & 109.1 & V5 (S) & 1 & 155.8 & 175.8 & 200.8 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Information of unknown targets and corresponding subtasks. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Target**} & \multirow{2}{*}{**Coordinates (m)**} & \multicolumn{2}{c}{**Task Type**} \\ \cline{3-5}  & & & **Reconnaissance S** & **Attack A** \\ \hline T7 & (3467.7, 2897.7, 0) & \(\surd\) & \(\surd\) \\ T8 & (1307.7, 3057.7, 0) & \(\surd\) & \(\surd\) \\ \hline \hline \end{tabular}
\end{table} 
Table 6: The table of information on unknown targets. Figure 12: The initial setting of the situation between both sides. (Considering unknowned targets). Figure 13 indicates that through the dynamic task assignment approach based on the extended CNP, the swarm can mobilize the UAVs with task capability and the best execution effect obtained after bidding negotiation to complete tasks for each sudden target according to the time window. ### Reassignment for Subtasks of Failed UAV

During the simulation, the reconnaissance UAV V5, belonging to Subset 1, fails and loses the capability to perform tasks. The failure time is 97.5 s.

According to the assignment results in Section 5.1, the reconnaissance UAV V5 prepares to perform the reconnaissance subtask. The fault of V5 triggers dynamic task assignment, and the tasks (T2, s, 117.5, 62.14)\(\rightarrow\)(T6, s, 167.0, 59.20) of V5 become dynamic tasks. The bidding values of each group of potential bidders (including V2, V4, V3, and V8) are shown in Table 9. The reassignment results of failed UAV subtasks obtained by the designed assignment approach are shown in Table 10.

Figure 13: (a) The execution sequence of the UAV swarm; (b) the diagram of the UAV swarm performing tasks. (Considering unknowned targets). \begin{table}
\begin{tabular}{c c c c} \hline
**UAV** & **Air-range Estimation (m)** & **The Number of Tasks** & **The Execution Planning** \\ \hline V1 & 0 & 0 & None \\ V2 & 3524.00 & 1 & (T\({}_{1}\), A, 98.7, 79.52) \\ V3 & 3262.79 & 1 & (T\({}_{7}\), A, 291.0, 84.77) \\ V4 & 4366.55 & 2 & (T\({}_{1}\), S, 73.7, 65.14)\(\rightarrow\)(T8, S, 155.8, 32.90) \\ V5 & 4230.00 & 2 & (T\({}_{2}\), S, 117.5, 62.14)\(\rightarrow\)(T6, S, 167.0, 59.20) \\ V6 & 4502.80 & 2 & (T\({}_{2}\), A, 142.5, 74.87)\(\rightarrow\)(T8, A, 175.8, 135.13) \\ V7 & 3837.18 & 1 & (T\({}_{6}\), A, 192.0, 72.32) \\ V8 & 5747.08 & 2 & (T\({}_{5}\), S, 249.6, 57.04)\(\rightarrow\)(T7, S, 271.0, 27.42) \\ V9 & 6475.10 & 2 & (T\({}_{3}\), S, 150.3, 51.47)\(\rightarrow\)(T4, S, 193.8, 57.34) \\ V10 & 4477.55 & 1 & (T\({}_{4}\), A, 218.8, 60.51) \\ V11 & 5702.98 & 2 & (T\({}_{3}\), A, 175.3, 56.75)\(\rightarrow\)(T5, A, 274.6, 66.90) \\ \hline \end{tabular}
\end{table} 
Table 8: The task assignment of the UAV swarm. The task assignment results in Table 9 show that UAV V4 of Subset 1 and UAV V8 of Subset 2 replace UAV V5 and continue to perform the tasks, respectively. Combined with the assignment results, the diagrams of UAV swarm task execution and the execution sequence under UAV V5 failure are shown in Figure 14.

The explanation of the assignment result is as follows: after the reconnaissance, UAV V5 loses its mission capability, and its subtasks shall be preferentially executed by other reconnaissance UAVs or reconnaissance UAVs (i.e., V2 and V4) in Subset 1. It can be seen from Figure 14a that after the initial assignment in Section 4.1, the number of tasks that can be performed by UAV V4 is 1. Therefore, through the contract network within the group, it can undertake one reconnaissance subtask of V5.