# High Throughput Data Relay in UAV Wireless Networks
## 4 Proposed Solution
### Overall Algorithm  
Based on the results of the two sub-problems (7) and (10), we construct an overall iterative algorithm for problem (5). Specifically, during each iteration, the victim bandwidth scheduling \(\mathcal{A}\) and UAV flight trajectory \(\mathcal{C}\) are alternately optimized, by solving each sub-problem (7) or (10) in turn whilst maintaining the other variables unchanged. Moreover, the trajectory achieved in each iteration is used as the input to the next iteration. The details of the algorithm are provided in Algorithm 1. As stated, power balance is implemented to connect the two sub-problems. Furthermore, at the end of the algorithm, we construct the optimal integer victim bandwidth scheduling from the continuous values calculated by the iterative approach. ```
1:Initialize the UAV trajectory, and denote it as \(\mathcal{C}^{0}\). 2:Denote the iteration number variable as \(g\), and let \(g=0\). 3:repeat
4: Solve sub-problem (7) for given \(\mathcal{C}^{g}\), and denote the optimal solution as \(\mathcal{A}^{g+1}\). 5: Execute power balance. 6: Solve sub-problem (10) for given \(\mathcal{A}^{g+1}\), \(\mathcal{C}^{g}\), and denote the optimal solution as \(\mathcal{C}^{g+1}\). 7: Update \(g=g+1\). 8:until The increase of the objective value is below a threshold \(th\). 9: Treat the optimal solution \(\mathcal{C}^{g+1}\) for the last iteration as the optimal UAV trajectory. 10: Construct the optimal victim bandwidth scheduling based on the optimal solution \(\mathcal{A}^{g+1}\) for the last iteration. ```  
**Algorithm 1** Iterative solution for problem (5)  
In the solution obtained by Algorithm 1, if the victim bandwidth scheduling variables \(a_{n}[k]\) are all integer, then the obtained solution is a feasible solution of problem (5). Otherwise, for all the non-integer \(a_{n}[k]\), the range for the value should be \(1<a_{n}[k]<2\). We denote the fractional part as \(b_{n}[k]=a_{n}[k]-1\). During each time slot \(\delta_{t}\), we can regard the expectation of the victim bandwidth scheduling as \(a_{n}[k]\). Thus, for a specific victim with given \(a_{n}[k]\), in the period of \(\delta_{t}b_{n}[k]\) the bandwidth scheduling is configured as \(2\), and in the remaining period \(\delta_{t}(1-b_{n}[k])\), the bandwidth scheduling is configured as \(1\). Therefore, the integer victim bandwidth scheduling is constructed based on the non-integer value. If the bandwidth is allocated explicitly, it permits an integer solution with zero relaxation gap. Next, we discuss the convergence of Algorithm 1 as follows. We first define the objective variable \(R\) as a function of \(\mathcal{A}\) and \(\mathcal{C}\), that is \(R=\eta(\mathcal{A},\mathcal{C})\). In step 4 of Algorithm 1, since the optimal solution of sub-problem (7) is obtained for given \(\mathcal{C}^{g}\), we have  
\[\eta(\mathcal{A}^{g},\mathcal{C}^{g})\leq\eta(\mathcal{A}^{g+1},\mathcal{C}^{g }). \tag{11}\]Then for given \(\mathcal{A}^{g+1}\) and \(\mathcal{C}^{g}\) in step 6 of Algorithm 1, it follows that  
\[\eta(\mathcal{A}^{g+1},\mathcal{C}^{g})\leq\eta^{lb,g}(\mathcal{A}^{g+1}, \mathcal{C}^{g+1}) \tag{12a}\] \[\eta^{lb,g}(\mathcal{A}^{g+1},\mathcal{C}^{g+1})\leq\eta(\mathcal{A}^{g+1}, \mathcal{C}^{g+1}), \tag{12b}\]  
where (12a) holds since \(\eta(\mathcal{A}^{g+1},\mathcal{C}^{g})\) has the same objective value as \(\eta^{lb,g}(\mathcal{A}^{g+1},\mathcal{C}^{g})\) at the given point \(\mathcal{C}^{g}\), and \(\eta^{lb,g}(\mathcal{A}^{g+1},\mathcal{C}^{g})\leq\eta^{lb,g}(\mathcal{A}^{g+1 },\mathcal{C}^{g+1})\) since at Step 6 of Algorithm 1 with given \(\mathcal{A}^{g+1}\), sub-problem (10) is solved optimally with solution \(\mathcal{C}^{g+1}\). (12b) holds because for any iteration \(g\), \(\eta^{lb,g}(\mathcal{A}^{g},\mathcal{C}^{g})\) is always a lower bound of \(\eta(\mathcal{A}^{g},\mathcal{C}^{g})\) for any \(\mathcal{A}\) and \(\mathcal{C}\).