## 3 Task Assignment Algorithm Based on Extended CNP
### Distributed Multi-Constraint Dynamic Task Assignment Algorithm
However, the distributed approach (CNP) has an obvious advantage in terms of solution efficiency. The solution time for different sized assignment problems is shown in Table 12.

**Remark**: _Generally, a global optimal solution to such problems can rarely be obtained. Therefore, feasible solutions to the task assignment problem obtained in the solving process are considered in general._

As a heuristic algorithm, ACO searches in the solution space, learns from the results of each iteration, and finally converges to a feasible solution, which means that ACO requires a lot of computational resources and a much longer time. Simulation results show that this problem becomes more pronounced when the problem size (e.g., size of the UAV swarm, the number of targets) increases. In contrast to heuristic algorithms such as ACO, CNP merely performs the optimization by bidding on each subset of UAVs as well as UAV individuals without the iterative process of searching for feasible solutions in a large solution space. The results illustrate that, as a distributed assignment approach, the proposed method in this paper has advantages in real-time performance compared with the ACO proposed in reference [10], which proves the effectiveness of the method to some extent. ## 6 Conclusions

Aiming at the problem of the cooperative reconnaissance-attack task assignment of UAV swarms in complex environments, this paper proposes a distributed grouping cooperative dynamic task assignment approach by considering multiple constraints, realizes the effective assignment of cooperative reconnaissance-attack tasks to multiple targets, and optimizes the combat effectiveness of the swarm. The main conclusions include:

(1) The proposed extended CNP algorithm, which is based on the determination mechanism of cooperators and the selection mechanism of sequential tasks, with the bidding function considering the constraints of sequence, flight path, and threat; it can \begin{table}
\begin{tabular}{c c c c} \hline \hline
**The Size of the** & **The Number of** & **The Total Solving Time** & **The Total Solving** \\
**UAV Swarm** & **Targets** & **of the CNP-Based** & **Time of ACO** \\  & & **Approach/(Seconds)** & **(50 Iterations)/(Seconds)** \\ \hline
50 & 10 & 1.66 & 41.5 \\
100 & 10 & 1.70 & 59.8 \\
150 & 10 & 1.85 & 74.9 \\
200 & 10 & 1.93 & 96.2 \\
250 & 10 & 1.98 & 112.5 \\
150 & 15 & 2.03 & 88.2 \\
150 & 20 & 3.50 & 124.1 \\
150 & 25 & 5.30 & 179.0 \\ \hline \hline \end{tabular}
\end{table} 
Table 12: The real-time performance between the proposed approach and ACO in reference [10]. realize the reasonable assignment of reconnaissance and attack tasks on multiple targets under multiple constraints and the optimization of UAV swarm task execution efficiency. (2) The proposed dynamic task assignment strategy based on the event-trigger mechanism constructs the overall architecture of cooperative dynamic task assignment for the distributed grouping of the UAV swarm and improves the adaptability of the swarm to the dynamic environment and sudden targets during task execution. (3) Three typical simulation scenarios are designed. The simulation results show that the task assignment approach in this paper can solve the problem of cooperative sequential dynamic task assignment when the UAV swarm with subsets performs reconnaissance-attack tasks in a complex environment with incomplete situational awareness and sudden targets and realize reconnaissance and attack coverage on each target. Moreover, the real-time performance of the assignment approach has been analyzed, which indicates that the proposed approach has low sensitivity to the size of the UAV swarm. Conceptualization, B.Q. and D.Z. ; methodology, B.Q. ; software, B.Q. ; validation, B.Q. ; formal analysis, B.Q. ; investigation, B.Q. and D.Z. ; resources, D.Z. and S.T. ; data curation, B.Q. and M.W. ; writing--original draft preparation, B.Q. ; writing--review and editing, B.Q. ; visualization, B.Q. ; supervision, D.Z. and S.T. ; project administration, D.Z. and S.T. ; funding acquisition, D.Z.