## 3 Task Assignment Algorithm Based on Extended CNP
### Distributed Multi-Constraint Dynamic Task Assignment Algorithm
At this time, V2 is executing the attack subtask T1(a) according to the initial allocation results. During this execution, it crosses several threat areas, resulting in low survivability estimation, and the bidding value is negative, which is not suitable to continue to perform the subtask. Therefore, the leader UAV V2 of Subset 1 releases the information to Subset 2 for assistance through the contract network among the groups. Subset 2 conducts bidding negotiation through the contract network within the group and finally assigns UAV V8 to assist Subset 1 to take over reconnaissance subtask T6 (s). ### The Analysis of the Real-Time Performance of the Assignment Approach

All the simulation experiments have been implemented on a personal PC; the parameters are Intel Core i5-5350U CPU @ 1.80 GHz 8 GB RAM, and the programming environment is MATLAB 2018b. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Subtask** & **Bidding Winner** & **Winning Bidding Value** & **Start Time (s)** \\ \hline T2 (S) & V4 (Subset 1) & 30.88 & 117.5 s \\ T6 (S) & V8 (Subset 2) & 52.89 & 167.0 s \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Task assignment under the circumstance of UAV breakdown. Figure 14: (**a**) The execution sequence of the UAV swarm; (**b**) the diagram of the swarm performing tasks under V5 failure. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Bidding Value of Subtask**} & \multicolumn{2}{c}{**Subset 1**} & \multicolumn{2}{c}{**Subset 2**} \\ \cline{2-5}  & **V2** & **V4** & **V3** & **V8** \\ \hline T2 (S) & 10.72 & 30.88 & \(-\)106.49 & \(-\)48.62 \\ T6 (S) & \(-\)6.74 & 21.83 & \(-\)2.77 & 52.89 \\ \hline \hline \end{tabular}
\end{table} 
Table 9: The bidding values of potential bidders for dynamic subtasks. #### 5.4.1 Real-Time Performance with Different Problem Scales

The real-time performance of the assignment approach is mainly influenced by three factors: 1 the number of subsets of the UAV swarm; 2 the number of UAVs in each subset; 3 the number of targets. To illustrate the impact of the factors above, the variable-controlling method is adopted. The details of simulation cases to be compared are in Table 11. Correspondingly, the comparison of assignment times in different cases is shown in Figure 15.

According to the comparison among the simulation, on one hand, due to the slowly increasing tendency of the assignment time in Figure 15a,b, it can be concluded that the real-time performance of the proposed approach has low sensitivity with the size of the \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Case**} & **Number of** & **Number of UAVs** & **Number of** & **The Size of the** \\  & **Subsets** & **of Each Subset** & **Targets** & **UAV Swarm** \\ \hline (a) & 5, 10, 15, 20, 25 & 10 & 10 & 50, 100, 150, 200, 250 \\ (b) & 5 & 20, 40, 60, 80, 100 & 10 & 100, 200, 300, 400, \\ (c) & 5 & 10 & 500 \\ \hline \hline \end{tabular}
\end{table} 
Table 11: The simulation cases to be compared. Figure 15: Assignment time varies with (a) the number of subsets, (b) the number of UAVs of each subset, and (c) the number of targets. UAV swarm. On the other hand, comparing (a) with (b), the task assignment time is more sensitive with the number of subsets than with the number of UAVs of each subset. Moreover, according to Figure 15c, the task assignment time is sensitive to the number of targets, which indicates that the performance of the approach may become worse with the number of targets increasing. #### 5.4.2 Algorithm Comparison

In order to verify the effectiveness of the distributed approach based on contract network protocol (CNP) in solving the UAV swarm task assignment problem, it is compared with the centralized task assignment approach used in reference [10]. Scenarios are designed with different sizes of UAV swarm performing multiple task assignments. From the simulation results, both the centralized approach (ACO) and the distributed approach (CNP) are able to obtain the solution to the UAV swarm task assignment problem.