## 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
Subsequently, charging tower \(c_{i}\) can charge the battery for the UAV \(u_{j}\) by as much as \(\min\big{\{}E_{j}^{\max}-e_{j}(t+\Delta t_{(j\to i)}),\delta_{j}-E_{j}^{tr}( \Delta t_{tr})\big{\}}\), as formulated in (18). Moreover, each UAV \(u_{j}\) can be associated with one charging tower \(c_{i}\), as formulated in (17). Moreover, each charging tower \(c_{i}\) can have \(n_{i}\) multiple charging panels [69]; thus, they can be associated with multiple UAVs, as many as \(n_{i}\), as shown in (16). Each charging tower \(c_{i}\) has its own energy budget (i.e., capacity) \(C_{i}^{\max}(t)\), as shown in (15). Finally, conducting the joint optimization to maximize the total energy transfer from the charging towers to their associated UAVs is performed by computing the variables \(x_{(i,j)}(t)\) and \(e_{(i,j)}(t)\), as shown in (14). Theorem 1.1: _The program in (14)-(20) is non-convex._  
Proof: Here, we have to prove that (14) and (15) are not convex in this mathematical program (14)-(20). Note that the proof considers the simplest case at first (i.e., \(|\mathcal{C}|=|\mathcal{U}|=1\)). In this case, (14) becomes \(a_{(i,j)}(t)\cdot x_{(i,j)}(t)\). Let this equation be denoted by \(f\). To show that this given equation is non-convex, the eigenvalues of the second-order Hessian of this given real function should be nonpositive definite [70]. The Hessian \(\bigtriangledown^{2}\!f\) is as follows, where the two variables in (14) are \(e_{(i,j)}(t)\) and \(x_{(i,j)}(t)\): \( \begin{bmatrix}0&1\\ 1&0\end{bmatrix} \) and then the corresponding two eigenvalues are \(\pm 1\). Not all of these values are nonnegative, which indicates that the Hessian is not positive definite, thus finally proving that the optimization function is non-convex. For (15), in a similar way, the corresponding two eigenvalues of the given second-order Hessian matrix are \(\pm 1\); thus, not all of the values are nonnegative (i.e., it also proves that the optimization function is non-convex). Finally, (14) and (15) are not non-convex. Thus, the program (14)-(20) is not convex. Because the optimal solutions cannot be obtained in non-convex programming, this non-convex programming must be converted to convex programming, if possible. **Theorem 2**. : _The use of_  
\[e_{(i,j)}(t)\leq\min\left\{E_{j}^{\max}-e_{j}(t+\Delta t_{(j\to i)}),\delta_{j}-E_{ j}^{tr}(\Delta t_{tr})\right\}\cdot x_{(i,j)}(t),\forall c_{i}\in\mathcal{C}, \forall u_{j}\in\mathcal{U}, \tag{21}\]  
_instead of (18) converts the given non-convex optimization program (14)-(20) into a convex one._  
Proof. : For the non-convex program (14)-(20), \(x_{(i,j)}(t)=0\) indicates that the charging matching between \(u_{j}\) and \(c_{i}\) does not happen. Thus, the corresponding wireless energy transfer does not exist (i.e., \(e_{(i,j)}(t)=0\)), and (21) leads to the same result when \(x_{(i,j)}(t)=0\):  
\[e_{(i,j)}(t)\leq\min\left\{E_{j}^{\max}-e_{j}(t+\Delta t_{(j\to i)}),\delta_{j} -E_{j}^{tr}(\Delta t_{tr})\right\}\cdot\underbrace{0}_{x_{(i,j)}(t)=0}=0, \forall c_{i}\in\mathcal{C},\forall u_{j}\in\mathcal{U}, \tag{22}\]  
However, (21) is equivalent to (18) when \(x_{(i,j)}(t)=1\). Therefore, we can replace \(e_{(i,j)}(t)\cdot x_{(i,j)}(t)\) with \(e_{(i,j)}(t)\). Thus, (14) can also be updated, as follows:  
\[\max:\sum_{\forall c_{i}\in\mathcal{C}}\sum_{\forall u_{j}\in\mathcal{U}}e_{( i,j)}(t), \tag{23}\]  
and then, (15) is also updated, as follows:  
\[\sum_{\forall u_{j}\in\mathcal{U}}e_{(i,j)}(t)\leq C_{i}^{\max}(t),\forall c_ {i}\in\mathcal{C}, \tag{24}\]  
Subsequently, no non-convex terms do not exist in this proposed program (14)-(20), which means that we can obtain optimal solutions for this mathematical program in polynomial time. Eventually, the final form of the joint optimization of charging matching and wireless energy transfer in each unit period \(t\) can be expressed, as follows:  
\[\max: \sum_{\forall c_{i}\in\mathcal{C}},\sum_{\forall u_{j}\in \mathcal{U}}e_{(i,j)}(t),\] (25) s.t.