## 3 Task Assignment Algorithm Based on Extended CNP
### Distributed Multi-Constraint Dynamic Task Assignment Algorithm
Step 2: Generate bidding scheme  
On the basis of the target information and various constraints, each potential bidder first determines the bidding scheme for the target of the group, including whether the subset participates in the bidding for target \(T_{k}\), subtasks that can be performed and the corresponding UAVs, and the reward for performing each subtask, and so forth. Through the contract network in subsets, each subtask of target \(T_{k}\) is preassigned to form the bidding scheme for target \(T_{k}\). The specific process is as follows:  
1 A subset leader UAV \(V_{j}\) releases subtask information to each follower UAV. In order to improve the assignment efficiency and shorten the time, the task concurrency mechanism is introduced to publish the information of each subtask at the same time;  
2 For subtask \(\textit{Task}_{k}\), the follower UAV \(V_{m}\) judges whether it has the corresponding type of payload, whether the number of payloads can meet the task execution requirements, and whether it meets the time window \(\textit{Time}\textit{Bar}_{k}\) according to the subtask information. If any constraint is not satisfied, UAV \(V_{m}\) will not bid for subtask \(\textit{Task}_{k}\);  
3 If the above constraints are met, UAV \(V_{m}\) prepains the flight path of \(\textit{Task}_{k}\) based on the modified artificial potential field (MAP) method and substitutes the preplanned range \(L_{mk}\) and survivability estimation \(h_{m,est}\) into the individual bidding function to calculate the bidding \(B_{mk}\);  
4 Compare the bidding value \(B_{mk}\) with the subtask negotiation threshold \(Th_{k}\). If \(B_{mk}<Th_{k}\), it means that the system efficiency has not been improved when UAV \(V_{m}\) is used to perform subtask \(\textit{Task}_{k}\), and \(V_{m}\) actively abandons pre-assignment bidding for \(\textit{Task}_{k}\); otherwise, \(V_{m}\) participates in the bidding;  
5 Each follower UAV respectively performs steps 2-4 to complete the pre-assignment of each subtask. The subset leader UAV \(V_{j}\) generates the subset's bidding scheme for target \(T_{k}\) according to the pre-assignment results. The above is the basic process of bidding scheme generation. Due to the existence of multi-UAV cooperatively performing subtasks and the introduction of the task concurrency mechanism, the generation of the bidding scheme needs to solve a \"multi-participants-multi-tasks\" assignment optimization subproblem. In order to solve the subproblem, an assignment mechanism based on the contract network within subsets is constructed. For the subtasks that need to be executed by multiple UAVs, a cooperator determination mechanism is introduced to complete the task allocation; for the sequential subtasks with time windows, a sequential task selection mechanism is introduced. Details are as follows:  
(1) The determination mechanism on cooperatorsThe process of the determination mechanism on cooperators is shown in Figure 4. To simplify the assignment process, give the tenderee the initiative, expand the set of bidders, and provide more feasible pre-assignment schemes, the tenderee bidding mechanism is introduced, that is, when the subtask tenderee (subset leader UAV \(V_{j}\)) meets conditions such as capability constraints and time constraints, it can participate in bidding. If \(V_{j}\) meets the constraints for performing \(Task_{k}\) and decides to bid with the bidding value \(B_{jk}\), then \(Th\) is chosen as \(B_{jk}\). UAV \(V_{j}\) sends \(Task_{k}\) information and negotiation threshold \(B_{jk}\) to each follower UAV. The bidding value of follower UAV \(V_{m}\) for \(Task_{k}\) is \(B_{mk}\). If \(B_{mk}>B_{jk}\), \(V_{m}\) decides to bid and feedback \(B_{mk}\) to \(V_{j}\).