## 4 Joint Message-Passing and Convex Optimization Framework for UAV Scheduling
### Algorithm Details
#### 4.2.2 Joint Optimization for Charging Matching and Wireless Energy Transfer  
The unscheduled UAVs turn off their built-in cameras because they do not need to monitor the corresponding target areas and require recharging their batteries, as described in Section 4.2.1. Suppose that the set of unscheduled UAVs requires charging from the set of charging towers as depicted in Figure 1. As illustrated in Figure 1, the charging towers are connected to a single controller, which is a charging tower center that makes decisions for the joint optimization for charging matching (i.e., decisions for charging matching of UAVs and charging towers in terms of maximizing charging amounts) and wireless energy transfer (i.e., decisions for the amounts of wirelessly transferred energy for the matched UAVs and their associated charging towers), in each unit period \(t\). Let \(c_{i}\) and \(u_{j}\) denote charging towers and unscheduled UAVs, where \(\forall i\in\{1,...,|\mathcal{C}|\}\) and \(\forall j\in\{1,...,|\mathcal{U}|\}\), respectively. We assume that each charging tower can charge multiple unscheduled UAVs simultaneously. The set of unscheduled UAVs (i.e., \(\mathcal{U}\)) is determined as the set of \(u_{j}\), where \(u_{j}\in\{s_{j}\mid\mathcal{I}_{j}=0,\) where \(s_{j}\in\mathcal{S}\}\). Therefore, the set of unscheduled UAVs is the subset of total UAVs \(\mathcal{S}\), denoted as \(\mathcal{U}\subseteq\mathcal{S}\). We assume that every unscheduled UAV is associated with only one charging tower. In this joint optimization problem for charging matching and wireless energy transfer, the objective is  
Figure 1: System model for the unscheduled unmanned aerial vehicles (UAVs) in terms of charging tower scheduling and wireless energy transfer decisions. to maximize the total amount of charging energy from the charging towers during time \(t\). Our given problem can be formulated, as follows:  
\[\max: \sum_{\forall c_{i}\in\mathcal{C}}\boldsymbol{\cdot}\sum_{\forall u _{ij}\in\mathcal{U}}e_{(i,j)}(t)\cdot x_{(i,j)}(t),\] (14) s.t. \[\sum_{\forall u_{ij}\in\mathcal{U}}e_{(i,j)}(t)\cdot x_{(i,j)}(t) \leq C_{i}^{\max}(t),\forall c_{i}\in\mathcal{C}, \tag{15}\] \[\sum_{\forall u_{ij}\in\mathcal{U}}x_{(i,j)}(t)\leq n_{i},\forall c _{i}\in\mathcal{C},\] (16) \[\sum_{\forall c_{j}\in\mathcal{C}}x_{(i,j)}(t)\leq 1,\forall u_{j} \in\mathcal{U},\] (17) \[e_{(i,j)}(t)\leq\min\Big{\{}E_{j}^{\max}-e_{j}(t+\Delta t_{(j \to i)}),\delta_{j}-E_{j}^{tr}(\Delta t_{tr})\Big{\}},\forall c_{i}\in \mathcal{C},\forall u_{j}\in\mathcal{U},\] (18) \[e_{(i,j)}(t)\geq 0,\forall c_{i}\in\mathcal{C},\forall u_{j} \in\mathcal{U},\] (19) \[x_{(i,j)}(t)\in\{0,1\},\forall c_{i}\in\mathcal{C},\forall u_{j} \in\mathcal{U}. \tag{20}\]  
In this mathematical program (14)-(20), if the charging matching of charging tower \(c_{i}\) to UAV \(u_{j}\) is established, \(x_{(i,j)}(t)=1\), otherwise \(x_{(i,j)}(t)=0\) according to (20). In addition, the amounts of charged energy from \(c_{i}\) to \(u_{j}\) are denoted as \(e_{(i,j)}(t)\), according to (19). As indicated in (18), the amount of charging from charging tower \(c_{i}\) to its associated UAV \(u_{j}\) during the period \(t\) should consider the travel time of the UAVs to reach their associated towers. In (18), \(e_{j}(t+\Delta t_{(j\to i)})\) stands for the current energy status of UAV \(u_{j}\) at time \(t+\Delta t_{(j\to i)}\), where \(\Delta t_{(j\to i)}\) represents the travel time, while UAV \(u_{j}\) moves to its associated charging tower \(c_{i}\). The \(\delta_{j}\) indicates the amount of charging of \(u_{j}\) within \(t\), and \(E_{j}^{tr}(\Delta t_{tr})\) stands for the expenditure of energy during the round-trip travel time \(\Delta t_{tr}\) (i.e., the UAV \(u_{j}\) travels to its associated charging tower \(c_{i}\) and returns to its original position or flies to a new waypoint), as described in (4).