# Wildlife Monitoring Using a Multi-UAV System with Optimal Transport Theory
## 3 Method
### OT-Based Multi-UAV Exploration: Time-Invariant Case
#### 3.2.1 A Three-Stage Approach
* Weight update stage:  
Figure 4: Schematic of the next goal point \({}^{g}x^{k}_{T+1}\) determination process for agent \(k\): (**a**) increase the radius of the search circle until \(h\) numbers of sample points are found; (**b**) construct a tree associated with the found points \(y_{j}\) and then select a particular path (red arrows) that has a minimum cost. After arriving at a new location \(x_{T+1}^{k}\), which may differ from the next goal point location \(\delta x_{T+1}^{k}\), the agents update their own weight information \(n_{T+1}^{k}(y_{j})\) of the sample points \(y_{j}\) from the weight update law given by  
\[n_{T+1}^{k}(y_{j})=n_{T}^{k}(y_{j})-n_{(T+1)j}^{k*},\,\forall j \tag{7}\]  
where \(\pi_{(T+1)j}^{k*}\) denotes the optimal transport plan for agent \(k\) at time \(T+1\) depicting the weight distribution plan from the current agent position \(x_{T+1}^{k}\) to the sample points \(\{y_{j}\}_{j=1}^{N}\). The optimal transport plan can be obtained from the solution of the following LP problem. \[ \begin{split}\underset{\pi_{(T+1)j}^{k}}{\text{minimize}}& \sum_{j}\pi_{(T+1)j}^{k}\|x_{T+1}^{k}-y_{j}\|\\ \text{subject to}&\pi_{(T+1)j}^{k}\geq 0,\,\,\sum_{j=1} ^{N}\pi_{(T+1)j}^{k}=\frac{1}{M_{a}},\\ &\pi_{(T+1)j}^{k}\leq\min\biggl{(}n_{T}^{k}(y_{j}),\frac{1}{M_{a} }\biggr{)},\,\forall j.\end{split}  \tag{8}\]  
The optimal solution \(\pi_{(T+1)j}^{k*}\) for the LP problem (8) provides the information about how much weight should be distributed from \(\frac{1}{M_{a}}\) for the new agent \(k\) position \(x_{T+1}^{k}\) to the sample point weight \(n_{T}^{k}(y_{j})\) for each sample point \(y_{j}\). Although all the new and future UAV points \(\{x_{t}^{k}\}_{t=T+1}^{M_{a}}\) are concentrated at the new agent position \(x_{T+1}^{k}\), agent \(k\) is allowed to distribute only the assigned weight \(\frac{1}{M_{a}}\) to the sample points \(\{y_{j}\}_{j=1}^{N}\). This is mainly because the future UAV points \(\{x_{t}\}_{t=T+2}^{M_{a}}\) are still undetermined and therefore, agent \(k\) can only distribute the weight for the future UAV points in the future time steps. The first constraint in (8) ensures that the transport plan \(\pi_{(T+1)j}\) from \(x_{T+1}^{k}\) to \(\{y_{j}\}_{j=1}^{N}\) has a non-negative value. The second constraint is included to guarantee that the law of mass conversation is satisfied, meaning that the total weight distributed from the new agent position \(x_{T+1}^{k}\) for agent \(k\) and the weight received by the sample points \(\{y_{j}\}_{j=1}^{N}\), both must be the same. The last constraint guarantees that the transport plan \(\pi_{(T+1)}\) should not exceed the maximum weight capacities of the sample points and the UAV point. After calculating the optimal solution \(\pi_{(T+1)j}^{k*}\) of (8), the weight of the sample points is updated by agent \(k\) using (7). Since the new UAV location \(x_{T+1}^{k}\) for agent \(k\) is a single point, the analytical solution for (8) can be obtained by the following proposition. **Proposition 1**. : _The optimal solution for the LP problem (8) is obtained by repeating_  
\[ \begin{split}&\pi_{(T+1)j^{*}}^{k}=\min\Bigl{(}n_{T}^{k}(y_{j}),m(x_{T+ 1}^{k})\Bigr{)},\\ &\text{where }j^{*}=\underset{j\in\{j|n_{T}^{k}(y_{j})>0\}}{ \text{arg min}}\|x_{T+1}^{k}-y_{j}\|\\ & m(x_{T+1}^{k})=m(x_{T+1}^{k})-\pi_{(T+1)j^{*}}^{k}\\ & n_{T}^{k}(y_{j^{*}})=n_{T}^{k}(y_{j^{*}})-\pi_{(T+1)j^{*}}^{k} \end{split}  \tag{9}\]  
_until \(m(x_{T+1}^{k})\) becomes zero._  
Proof. : Given the new position of agent \(k\) at time \(T+1\), \(x_{T+1}^{k}\), the optimal transport plan for agent \(k\) is to deliver the maximum permissible weight to the closest points with positive weights in order until the weight \(m(x_{T+1}^{k})\) remains positive. * Weight information exchange and update stage:Once the weight update of the sample points is completed by all agents, this information is shared with the central agent that receives all information \(\{\{\{n_{T}^{k}(y_{j})\}_{j=1}^{N}\}_{k=1}^{n_{a}}\}\) from agents and transmits the common value to them in every time step.