## 3 The Proposed Method
### Negotiate for Scout Task Assignment
#### 3.1.2 Collaborative Optimization of Reconnaissance Tasks Assignment
1:whileTrue do
2:\(\Delta g_{j^{\prime}n^{\prime}}\leftarrow\max\limits_{\left(u_{i},t_{j}, \tau_{j}^{s};\delta_{j}\right)\in\beta^{sc}\atop\left(u_{i},t_


```
0:\(\hat{\beta^{sc}}\) : Part of the task-assignment scheme that has been specified \(\langle U^{sc},T^{sc}\rangle\): The set of scout UAVs and tasks that need to be optimized
0: The optimized plan \(\beta^{sc}\). 1:if\(\langle U^{sc},T^{sc}\rangle\) is not given then\(\triangleright\) Automatically select scout UAVs and tasks
2:\(U^{sc}\leftarrow\) the set of scout UAVs within \(n_{c}\) hops to \(u_{i}\)
3: Init \(T_{0}\) as an empty list
4:while\(|T_{sc}|<N^{sc\max}\)do\(\triangleright\) Iteratively add tasks according to the evaluated priority
5:for\(u_{m}\) in \(U^{sc}\)do
6:if the latest task added to \(T_{0}\) for \(u_{m}\) is duplicated with existing tasks then
7:\(T_{0}\leftarrow\) add the next preferred task of \(u_{m}\) according to \(\eta_{limj}(\tau)\) to \(T_{0}\)
8:endif
9:endfor
10:\(T^{sc}\leftarrow\left\{t_{j}|t_{j}\in T_{0},\left(t_{j},\cdot\right)\
otin \hat{\beta^{sc}}\right\}\)\(\triangleright\) Remove duplicate tasks and tasks in \(\hat{\beta^{sc}}\)
11:if no task is added to \(T_{0}\)then
12: Break
13:endif
14:endwhile
15:endif
16:function\(f_{\beta}(\beta^{sc})\)
17:\(\beta^{sc}\leftarrow\beta^{sc}\cup\hat{\beta^{sc}}\)\(\triangleright\) Merge the specified and generated plans
18: Calculate \(\tau_{j}^{s}\) of each assignment \(\left(u_{i},t_{j},\tau_{j}^{s},\delta_{j}\right)\in\beta^{sc}\) with the predicted previous task finish time and the travel time between \(u_{i}\) and \(t_{j}\)
19: Optimize the time collaborate of \(\beta^{sc}\) with Algorithm 1
20:return\(J(\beta^{sc})\)\(\triangleright\) Calculate the fitness of \(\beta^{sc}\) with Equation (9)
21:endfunction
22:\(\beta^{sc^{*}}\leftarrow\) Using GA to optimize the assignment of tasks in \(T^{sc}\) to \(U^{sc}\) with the goal to maximize \(f_{\beta}(\beta^{sc})\)
23:return the best plan \(\beta^{sc^{*}}\)
```
**Algorithm 2** Scout plan optimization within UAV \(u_{i}\)

After determining \(\langle U^{sc},T^{sc}\rangle\), the algorithm optimizes the assignment of the tasks based on GA, and its optimization goal is to maximize its fitness function \(f_{\beta}(\beta^{sc})\). In \(f_{\beta}(\beta^{sc})\), it first merges plan \(\beta^{sc}\) with the specified part of plan \(\hat{\beta^{sc}}\); Then the start time of the task is estimated according to the predicted finish time of the preceding task of the UAV in each assignment and the travel time from the UAV to the corresponding task. Then, Algorithm 1 is used to quickly optimize the time collaboration between the assignments. Finally, the fitness is calculated according to the objective function defined by Equation (9). When Algorithm 2 is used for conflict resolution optimization of multiple plans, the non conflict part of the plan can be regarded as \(\hat{\beta^{sc}}\) and the conflict part as \(\langle U^{sc},T^{sc}\rangle\), which can reduce the search space of the optimization problem and improve the optimization speed. (3) Negotiation-based conflict resolution

After each UAV has generated or updated the best plan \(\beta^{sc^{*}}\) for scout task allocation, it will send the plan to UAVs within \(n_{c}\) hops. Let \(B^{sc}_{i}=\{\beta^{sc}_{i}|hop(u_{i},u_{m})\leqslant n_{c}\}\) be the set of scout task-allocation plans received by \(u_{i}\) from other UAVs, then the scout task negotiation and conflict resolution algorithm can be expressed as Algorithm 3. The received UAV uses Algorithm 3 to resolve the conflict between its own plan and the received plan to update its plan until there is no conflict between the plans of neighboring nodes. ```
0:\(\beta_{i}^{sc}\): The latest local scout plan \(B_{i}^{sc}\): The set of received scout plans Output: The updated local plan \(\beta_{i}^{sc}\).