# Smartphone-Based Task Scheduling in UAV Networks for Disaster Relief
## 5 Problem Statement and Solution
### Task-Offloading Optimization  
In Section 5.1, we proposed a multi-objective optimization problem. Multi-objective optimization refers to optimizing multiple sub-objectives at the same time, and these sub-objectives may conflict with each other. The optimization of one objective may lead to thedeterioration of another objective. Usually, there is no optimal solution that can optimize all objectives at the same time. Pareto optimality is a good method for solving multi-objective optimization problems. It is often used to achieve a good trade-off between multiple objectives. It can find a balanced solution in multi-objective optimization that cannot be improved. That is, it finds a solution that improves one objective and other objectives are not inferior to other solutions. Therefore, based on the idea of Pareto optimality and the Multi-Objective Evolutionary Algorithm framework [28; 29; 30], we propose our multi-objective mutation immune bat (MOMIB) algorithm. It combines the bat algorithm (BA) [19] with the clone immune algorithm [24]. As the classical multi-objective optimization algorithm, the BA has fast convergence speed and good performance. However, it easily falls into local optimal solutions during the optimization process due to the lack of sufficient mutation mechanisms that continuously enrich the population. Therefore, we introduce the immune algorithm with mutation ability into the BA and design a group adjustment evaluation algorithm based on the characteristics of the problem, finally obtaining the MOMIB algorithm. This algorithm can obtain a wider solution optimization domain while ensuring fast convergence, thereby obtaining better performance and more targeted optimization capabilities for the problem at hand. The BA part of our algorithm is introduced first. Each bat is represented as a feasible solution. In the \(t\)-th generation of the optimization process, the \(i\)-th bat can be denoted as a vector \(<x_{i}(t),v_{i}(t),fr_{i}(t),A_{i}(t),r_{i}(t)>\), where \(x_{i}(t)=(x_{i1}(t),x_{i2}(t),\ldots,x_{ik}(t),\ldots,x_{iD}(t))\) represents the position coordinates of the \(i\)-th bat of the \(t\)-th generation; \(v_{i}(t)=(v_{11}(t),v_{i2}(t),\ldots,v_{ik}(t),\ldots,v_{iD}(t))\) represents the velocity direction of the \(i\)-th bat of the \(t\)-th generation; and \(fr_{i}(t)\), \(A_{i}(t)\) and \(r_{i}(t)\) are the frequency, loudness, and pulse emission frequency that need to be used during the bat's movement. At the beginning of the iteration, the frequency (\(fr_{i}\)) is first generated as  
\[fr_{i}(t)=fr_{min}+(fr_{max}+fr_{min})\cdot rand_{1} \tag{23}\]  
where \(rand_{1}\) is a random number in the range (0, 1), and \(fr_{max}\) and \(fr_{min}\) denote the preset upper and lower frequency limits, respectively. The velocity is updated as  
\[v_{ik}(t+1)=v_{ik}(t)+(x_{ik}(t)-p_{k}(t))\cdot fr_{i}(t) \tag{24}\]  
where \(\overrightarrow{p_{k}(t)}=(p_{1}(t),p_{2}(t),\ldots,p_{k}(t),\ldots,p_{D}(t))\) represents the optimal position in the history of the previous t-generation group. Then, we choose to perform global update (25) or local update (26), based on random number \(rand_{2}\) distributed in (0, 1). When \(rand_{2}<r_{i}(t)\), the i-th bat performs a global search; otherwise, a local search is performed:  
\[x^{\prime}_{i}(t+1)=x_{i}(t)+v_{i}(t+1) \tag{25}\]  
\[x^{\prime}_{i}(t+1)=p(t)+\varepsilon_{i}\cdot\overline{A}(t) \tag{26}\]  
where \(\varepsilon_{i}\) is a random number uniformly distributed in (\(-1,1\)), and \(\overline{A}(t)=\sum_{i=1}^{n}A_{j}(t)/n\) is the average loudness of the t-th-generation bat. During the process of position updating, we generate random number \(rand_{3}\), which is uniformly distributed in (0, 1). If, and only if, both \(rand_{3}<A_{i}(t)\) and \(f(\overrightarrow{x^{\prime}_{i}}(t+1))<f(\overrightarrow{x^{\prime}_{i}}(t))\) are satisfied at the same time, the position of the i-th bat is updated to \(\overrightarrow{x^{\prime}_{i}}(t+1)\).