Efficient UAV-based mobile edge computing using differential evolution and ant colony optimization

Internet of Things (IoT) tasks are offloaded to servers located at the edge network for improving the power consumption of IoT devices and the execution times of tasks. However, deploying edge servers could be difficult or even impossible in hostile terrain or emergency areas where the network is down. Therefore, edge servers are mounted on unmanned aerial vehicles (UAVs) to support task offloading in such scenarios. However, the challenge is that the UAV has limited energy, and IoT tasks are delay-sensitive. In this paper, a UAV-based offloading strategy is proposed where first, the IoT devices are dynamically clustered considering the limited energy of UAVs, and task delays, and second, the UAV hovers over each cluster head to process the offloaded tasks. The optimization problem of dynamically determining the optimal number of clusters, specifying the member tasks of each cluster, is modeled as a mixed-integer, nonlinear constraint optimization. A discrete differential evolution (DDE) algorithm with new mutation and crossover operators is proposed for the formulated optimization problem, and compared with the particle swarm optimization (PSO) and genetic algorithm (GA) meta-heuristics. Further, the ant colony optimization (ACO) algorithm is employed to identify the shortest path over the cluster heads for the UAV to traverse. The simulation results validate the effectiveness of the proposed offloading strategy in terms of tasks delays and UAV energy consumption.


INTRODUCTION
Mobile edge computing (MEC) has emerged as a promising foundation for providing quality of service (QoS) requirements for the Internet of Things (IoT) and mobile devices to overcome the limited resource capabilities of these devices in terms of processing cycles and energy (Hussein & Mousa, 2020). MEC is an edge network of servers supported by a backend layer of cloud computing located near the IoT and mobile devices network. Offloading computational tasks of the IoT and mobile devices to the edge servers improves execution delay and power consumption of devices by taking advantage of low bandwidth group for processing the offloaded tasks of each group members. This problem is an NP-hard complex optimization problem, and evolutionary algorithms can be applied to find a near optimal solution in an acceptable computation time (Hu et al., 2019(Hu et al., , 2020Wu et al., 2020). Therefore, we investigate the use of evolutionary meta-heuristics, including differential evolution (DE), particle swarm optimization (PSO), and genetic algorithms (GAs), to obtain a near-optimal solution for the clustering problem considering energy and time. The second subproblem is the determination of the shortest UAV trajectory over the clusters head considering the time and energy of the UAV flying. The contributions of this paper are presented as follows: The distribution of mobile devices in a specific area is non-uniform. Therefore, partitioning and load balancing offloaded computing tasks into a set of regions severely impacts the performance of the offloading system. Performance degradation may occur, as some regions may become heavily loaded with requests while other regions are lightly loaded with requests. As a result, the waiting time increases in the heavily loaded regions, and some offloading requests could fail. In addition, the UAV energy may be lost if a large number of clusters is set. Therefore, the UAV deployment optimization problem is formulated as mixed-integer, nonlinear constraint optimization that is aimed at minimizing the number of clusters while considering the energy consumption of the UAV and the delays of the offloaded tasks. Two discrete differential meta-heuristics are proposed with mutation and crossover operators, namely, discrete DE (DDE) and discrete PSO (DPSO), for the formulated optimization problem. The proposed DDE algorithm is proposed to obtain a near-optimal solution for the number of clusters, members of each cluster and load balancing tasks in the determined clusters. The energy of the UAV is limited, and the UAV follows a determined trajectory over different regions to process the offloaded computational tasks and to return the results. Therefore, the UAV trajectory should be optimized to address the energy limitations considering the communication, computation, and mechanical operations of flying and hovering. The partitioned regions are employed as an initial population for an ant colony optimization (ACO) algorithm to obtain a near-optimal solution for minimizing the UAV trajectory. Several extensive experiments are performed with the proposed strategy. The evaluations show that the proposed offloading system is effectively capable of significantly improving the task delay and energy consumption compared with a discrete particle swarm optimization (DPSO) and the genetic algorithm (GA).
The remainder of the paper is organized as follows: "Related Work" introduces the related work of UAV-assisted, mobile edge environments. "UAV-Based Offloading System Model and Problem Formulation" presents a system model and a formulation of the optimization problem, while "Proposed Meta-Heuristics" outlines the proposed optimization using DDE, DPSO, and ACO. In "Experimental Results", the experimental results of the proposed strategy are presented and evaluated, followed by a summary and conclusion of the paper with a discussion of future research directions in "Conclusion and Future Work".

RELATED WORK
The MEC architecture is a successful solution for the limited computational resources in terms of computation and energy, and thus, the performance of the offloaded tasks are improved by taking advantage of the low latency and high bandwidth of the edge servers (Yu, 2016;Zakaryia, Ahmed & Hussein, 2020). UAVs have the advantages of agility, mobility and fast deployment and can provide on-demand communication and computation services when mounted with communication equipment and MEC servers with a LoS advantage, which will produce better transmission rates with reduced energy consumption of the mobile devices. However, the limitation of the energy of the UAV affects the communication and computational capacity, as well as the service time offered to the ground mobile equipment (Nguyen et al., 2020). Therefore, different research efforts are conducted for the key challenges based on the different configurations, optimization objectives, and underlying constrains.
In Hu et al. (2019a), the UAV trajectory and ratio of offloading tasks are jointly optimized with the aim of minimizing the sum of the maximum delay of all users in different time slots, as statistically specified. In Wang et al. (2020a), the task offloading decisions are reached based on the objective of minimizing offloading delay and energy consumption considering bandwidth, size of the data, and power consumption. The offloading decision for each mobile task includes offloading to the UAV or offloading to the ground MEC through the UAV. However, the study does not consider the optimization of UAV trajectories. In Tang et al. (2020), a partial offloading UAV-based MEC system that is aimed at maximizing the number of offloading tasks is proposed. The offloading problem is formulated as a mixed-integer, nonlinear programming problem and is solved using block coordinate descent (BCD) and a convex optimization technique. However, the mobility of the UAV is not considered in the proposed model. In Yang et al. (2020), DE with deep reinforcement learning is selected for the deployment of multi-UAVs with the aim of minimizing the offloaded task delays and load balancing UAVs loads. In Li et al. (2020a), a successive complex optimization technique is utilized to jointly optimize the UAV trajectory and computational load allocation with the aim of minimizing UAV energy. However, the proposed system does not consider the distribution of the mobile devices on the ground area or the time requirements of the offloaded tasks. In Wang et al. (2020b), a two-layer optimization method is proposed to jointly optimize multi-UAV deployment and mobile task allocation and to minimize UAV energy consumption. The upper layer of the optimization method uses a DE algorithm that minimizes the number of UAVs, and in the lower layer, a greedy algorithm is proposed for identifying an optimal solution whether tasks are offloaded or processed locally. In Chen et al. (2020), an intelligent task offloading system is proposed. The proposed system intelligently perceives the network environment and makes offloading decisions using a Monte Carlo tree search. Furthermore, a deep neural network is applied to optimize the search based on the latency delay. However, the proposed offloading strategy requires training data, a prediction model for the channel state, and time for the self-learning process. In Hu et al. (2019b), a UAV is connected with a cellular base station as either a relay to the base station or as a computing server for the offloaded computation tasks of the mobile equipment. A greedy search based on nonconvex optimization is proposed with the aim of minimizing the weighted sum energy of the UAV and the mobile devices by jointly optimizing the computational resource scheduling, allocation of bandwidth resources, and trajectory of the UAV. In Li et al. (2020b), an energy-efficient, UAV-based, offloading architecture that optimizes the bit allocations in different regions of user tasks and the trajectory of the UAV using successive approximation is proposed. However, the proposed scheme does not address how to partition the fixed clustered slots, and further, the time delay is not considered in the proposed scheme. In Zhan et al. (2020), a joint optimization of computation offloading, resource allocation, and UAV trajectory is proposed with the aim of minimizing the energy consumption of the UAV. In Guo & Liu (2020), the UAV energy is optimized considering the transmitted bits in both the uplink and downlink and the UAV trajectory using a greedy search based on the successive convex approximation. In Yu et al. (2020), an alternative optimization algorithm based on successive convex approximation (SCA) is proposed to minimize the weighted sum of the service delay of the IoT tasks by jointly optimizing computing offloading, resource allocation and trajectory.
In summary, approaches such as greedy search and exhaustive search cannot be applied to such an optimization problem because there are many discrete and continuous decision parameters, including the number, location of deployment, offloading decision in each deployment, and shortest trajectory path. Therefore, most research uses heuristic approaches with fixed partitions; these approaches are not scalable because their complexity is extensive. Further, deep learning approaches, such as Lan et al. (2019), Wang et al. (2021), requires training data which may not feasible in the mobile and stochastic environment. Therefore, we opt to use evolutionary meta-heuristics, including DE, PSO, and GAs, to obtain a near-optimal solution for such NP-hard problems in an acceptable time. The proposed UAV-based offloading system determines the optimal number of clusters and specifies the member tasks of each cluster which are permitted to offload when the UAV hover the cluster head considering the UAV energy and task delay constraints.

UAV-BASED OFFLOADING SYSTEM MODEL AND PROBLEM FORMULATION
A UAV-based offloading system consists of two layers. The first layer, the ground layer, is the IoT and mobile device layer, which has N stationary wireless devices S = {s 1 , s 2 , …, s N } on the ground. The wireless devices offload their computations to the edge layer to accelerate computations and to optimize energy consumption of the IoT devices. The second layer is the flying MEC layer, which consists of a single UAV that is supported with an edge server that offers computation offloading services for the ground layer with minimum latency. The UAV flies at a steady altitude H > 0. The UAV has the communication coverage radius R c . The UAV flies according to a specified trajectory over a set of K regions starting from a specific predetermined starting point. The UAV hovers over each region k to process the offloaded tasks that are scheduled in this region, and the UAV returns to the starting point by the end of the trajectory cycle.
The coordinates of each s i device location in the ground layer are known in advance and are given by s i = {x i , y i }. The coordinates of the UAV position in region k are given by u k = {x k , y k }, and the distance between the UAV and s i is calculated using the Euclidean distance: where device s i should be in the cover radius R c of the UAV.
are the required computing cycles, task delay, and data size, respectively. In the proposed UAV-based offloading system, the set of ground devices s i ∀i ∈ N are partitioned into K regions, where the UAV hovers over each region to process the offloaded tasks, and δ ik = 1 when mobile device s i offloads its task t i to be processed when the UAV hovers over region k. The following subsection presents the system formulation, followed by a formulation of the objective function. The key abbreviations used in the paper are listed in Table 1. The following subsections present the formulations for the computation, the communication, and the power consumption model for the optimization problem.

Communication model
Assume that the UAV has a ground coverage range with a radius of R c . Similar to Bejaoui, Park & Alouini (2020), the time-varying channel gain between a ground IoT device s i within partition k to the UAV via orthogonal frequency division multiplex access (OFDMA) is calculated using Eq. (3).
where ρ 0 is the received power at a reference distance of 1 m. The transmission rate between sensor i and the UAV in region k at position u k = {x k , y k } is calculated as (He et al., 2018) using Eq. (4).
where B is the bandwidth of the uplink channel, P i is the maximum transmit power of the wireless device s i , and N 0 is the channel noise. The transmission time T trans ik for offloading a task from the i th IoT device to the UAV at region k is calculated using Eq. (5).
The total transmission time at region k with position {x k , y k } is calculated using Eq. (6).
where δ ik represents the offloading decision for task t i in region k with coordinates {x k , y k }, where δ ik = 1 means that the task is processed when the UAV hovers over region k.

Computation model
The computation time T comp ik for processing task t i at the UAV is calculated using Eq. (7).
where f u is the processing capacity of the UAV. Assume that the edge server executes the offloaded tasks in a queue ordered by first come first served. The overall computation time in region k when the UAV hovers at position {x k , y k } is calculated using the following equation: The total time for the UAV in region k is the total offloading delay, which is calculated as the sum of the transmission delay and computation delay using the following equation:

Energy consumption model
The energy model which is used in this study follows the energy model described in Bejaoui, Park & Alouini (2020) for a fixed wing UAV. The UAV works under limited charged energy capacity, and the propulsion energy consumption is much higher than computation and communication energy (Wang et al., 2020b). The adopted model is simple where the energy is computed using a constant coefficient that depends on the architecture. For example, the hovering energy is calculated by multiplying a hovering energy coefficient by the hovering time. The total UAV energy consumption is a result of several operations, including (1) wireless communication with IoT devices to receive offloaded tasks and to return results, (2) computation of the offloaded tasks, and (3) propulsion energy consumption of flying and hovering. The transmission energy consumption at region k is calculated using Eq. (10).
where κ 1 is an energy factor for wireless communication.
The computation energy consumption in region k is calculated using Eq. (11).
where κ 2 is an energy factor for computation processing.
Following the propulsion energy model of the UAV proposed in reference to the propulsion model proposed in Wu et al. (2019), the propulsion energy consumption for hovering in region k is calculated using Eq. (12).
where γ is an energy factor for hovering and T k ðx k ; y k ; d ik N i¼1 Þ is the time in which the UAV hovers in region k to process the offloaded tasks, calculated using Eq. (9).
The propulsion energy consumption for flying to region k is calculated using Eq. (13).
where Γ is an energy factor for flying and μ is the UAV speed between the coordinates of regions u k−1 and u k . The total energy consumption of the UAV is the sum of the resulting transmission energy consumption, resulting computing energy, and propulsion energy consumption for hovering and flying. Therefore, the total energy consumption for region k is calculated using the following equation: UAV deployment and optimization The aim of the study is to design an intelligent UAV-based offloading strategy where the IoT devices are dynamically clustered considering the number of clusters K, members of the clusters, and total energy. The cluster members can be measured using the maximum number of members in the clusters _ mðd ik Þ and the sum of the distances between the members and their cluster centers _ Dðd ik Þ according to the following Equations: The total energy E over K clusters are calculated using the following Equation: The optimization problem of dynamically determining the optimal number of clusters, specifying the member tasks of each cluster, is modeled as mixed-integer, nonlinear constraint optimization and is formulated as follows: Subject to the following constraints: C 1 ensures that the determined cluster members fall within the communication radius of the cluster. Constraint C 2 states that the overall time required for the transmission and computations over all regions is less than the maximum flaying time of the UAV, T u . Constraint C 3 states that the overall energy required for the UAV over all regions, including communication and computation as well as hovering, is less than the maximum energy of the UAV, E u . C 4 states that the offloading decision of each task is allocated to only one offloading region. To address the constraints, a penalty value is added to the optimization function for each violated constraint using the following Equation: where λ is a penalty value. C 2 k is the value of the violated constraint k squared.

PROPOSED META-HEURISTICS
UAV energy, deployment, UAV trajectory, and task delays are key challenges in a UAV-based MEC architecture. Obtaining the optimal solution for this problem using greedy search and exhaustive search optimization requires very high complexity algorithm with extremely high execution time. Also, the optimization problems involves many discrete and continuous decision parameters, including number, location of deployment, the offloading decision in each deployment, and the shortest trajectory path. Further, deep learning approaches require training data, which may not be feasible in a mobile and stochastic environment. Therefore, the optimization problem is divided into two subproblem in order to find a near optimal solution in real-time for such complex (NP)-hard optimization problem in an acceptable complexity and time. The first subproblem is the clustering the IoT devices into groups where the UAV hovers over each group for processing the offloaded tasks of each group members. In this section, we investigate the use of evolutionary meta-heuristics, including differential evolution (DE), particle swarm optimization (PSO), and genetic algorithms (GAs), to obtain a near-optimal solution for the clustering problem considering energy and time. Also, the second subproblem is the determination of the shortest UAV trajectory over the clusters head considering the time and energy of the UAV flying. Also, in this section, we investigate the use of the ACO optimization algorithm to identify the shorest trajectory that satisfy the time and energy constrains. Evolutionary and nature-inspire optimization meta-heuristics, such as DE, PSO, GA, and ACO, have the potential to obtain a near-optimal solution in an acceptable time (Islambouli & Sharafeddine, 2019). The following subsections describe the use of different meta-heuristics, namely DE, PSO, and ACO, to optimize the UAV-based MEC offloading system.

DE meta-heuristic
DE is a population-based stochastic search process. DE has a few control parameters and strong search capabilities compared to most search meta-heuristics and is able to solve complex, nonlinear optimization functions (Deng et al., 2021). The DE simulates biological evolution in nature using mutation, crossover, and selection operations. The process iterates for a fixed number of iterations, and the population is continuously updated. The process starts with initialization of the population, where Np individuals, X i , i∈ [1 Np], are randomly initialized. Each individual represents a possible solution to the underlying problem. The DE mutation step generates new candidate individuals V i to provide diverse mutants for better exploration of the search space. The most common mutation strategies are: where r1, r2, and r3 are randomly generated integers numbers ∈ [1 Np]. F is a positive factor to scale difference individuals. X best is the best individual with the best fitness value in the population.
In the crossover operator, the target individual X i is combined with mutant individual V i , which resulted from the mutation operation, to produce trial individual U i according to probability cr using the following Equation: where jrand is a random integer from the dimension of the search space.
In the selection process, a greedy selection is applied to the trial and corresponding individual from the previous generation. The objective function value of the trial individual f(U i ) is compared with the objective function value of the corresponding target vector f(X i ), and the individual with the least function value will survive to the next generation.

Proposed DDE algorithm
The first step in the proposed algorithm is the encoding of the individual solution. Each individual X i is composed of N genes, representing the IoT devices. Each gene will have an ID of the device, which will be the center of the cluster. The center of each cluster represents the cluster head where certain IoT devices belongs to, in which the members only offload their computation tasks once the UAV hoovers over that cluster head. For example, X 1 = {2, 2, 2, 4, 4, 4} represents an individual solution for six IoT devices, and there are two clusters. The first cluster contains three devices 1, 2, and 3, and the second cluster contains three devices 4, 5, and 6. Devices {2, 4} are the centers of the clusters. This section shows that the cluster heads and their members are optimized by applying the proposed DDE algorithm using the objective function shown in Eq. (24) which considers the total time, energy, number of clusters, cluster members, and the distances between the members in the clusters. The DE algorithm is designed to solve continuous optimization problems. Therefore, the algorithm must be converted to output a discrete value. A discrete differential evolution (DDE) is designed using mutation and crossover operators. Algorithm 1 shows the detailed steps of the proposed DDE algorithm. The first step of the algorithm is the initialization of the parameters followed by the random initialization of the population individuals. After that, the mutation step using Eq. (25), is changed to the following Equation: where f 1 represents a mutation operation on individual X with probability F. For each gene in the individual, the random number r ∈ [0 1] is generated, and the gene is perturbed with a random value while r < F. A single point crossover operator, f 2 , is applied to the resulting perturbed individual with a random individual from the population. A uniform crossover, f 3 , is applied to the result of the single point crossover with the best solution found, X best . A greedy selection is applied to the crossover operators f 2 and f 3 . The last step involves the crossover and the greedy selection operations described using Eqs. (27) and (28) are applied.

PSO meta-heuristic
The PSO is a stochastic, population-based, search meta-heuristic that simulates the social behavior of a swarm of birds searching for food. Each particle, an individual bird in the swarm, searches for food in the search space to identify the best food source based on the particle position, particle best found solution, and swarm best found global solution (Zakaryia, Ahmed & Hussein, 2020). Each individual particle represents a possible solution in the search space of the problem under observation. In the iterative search process of PSO, each individual particle X i updates its value X i (t + 1) by updating its corresponding velocity V i (t + 1) using the following Eqs. (30) and (31): Algorithm 1 Proposed DDE algorithm.

Result: bestFitness, X best
Initialize N, N p , N iter , cr, and F Random initialize X i with random clustering IDs Calculate the fitness of each possible solution X i using an optimization function with penalty, Eq. (24) Set bestFitness = min(X) Set X best for the individual with the minimum fitness for each iter in N iter do for each X i in N p do Apply the mutation operation, and calculate the mutated individual V i (t) using Eq. (29) Apply the crossover operation, and calculate the target individual U i (t) using Eq. (27) Apply the greedy selection, calculate the new population X i (t + 1) using Eq. (28) end Calculate the fitness of each possible solution in the new population if bestFitness > best fitness of the new population then update X best and bestFitness end end where V i and X i are the velocity position and particle position, respectively, of individual i, and t is the iteration number. Xl i is the best position of individual X i , and Xg is the global best position for all individuals. ω is the inertia weight. C 1 and C 2 are the cognitive coefficient and social coefficient. α and β are random numbers ∈N[0 1]. PSO is an effective solution for optimization problems in the continuous domain, and a discrete version of the PSO algorithm must be adopted to suit the problem under study (Zakaryia, Ahmed & Hussein, 2020). A new Discrete PSO (DPSO) is designed and presented in the following subsection.

DPSO algorithm
In the DPSO, each individual is updated using mutation and crossover operators similar to the method used in DDE. The same encoding described in the DDE algorithm is employed. The particle position is updated using mutation, and a crossover operator is proposed using the following Equation: where ω4f 1 (X i ) represents a mutation operation applied on individual X i with probability w. f 2 is a single point crossover operator, and f 3 is a uniform crossover operator. C 1 and C 2 serve as probabilities for the single point and uniform crossover operators. Algorithm 2 shows the steps of the proposed DPSO algorithm. The algorithm starts by initializing the parameters, including the number of devices N, population size N p , number of iterations N iter , and mutation and crossover probabilities ω, C 1 , and C 2 . The second step involves initializing the particles with random numbers. In the third step, an evaluation of the population with the objective function is performed using Eq. (24). Steps 5, 6, the local best of each particle and the global best of all particles, are updated.
Steps 7-14 are iterated for N iter iterations. In each iteration, each particle is updated with mutation and crossover operators using Eq. (32), and a greedy selection is applied to the new individuals. The fitness of each particle in the new population is updated. The local best and global best are updated.

UAV shortest trajectory using ACO
The solution of the proposed DDE algorithm identifies a set of clusters with their members. The following algorithm optimizes the shortest path among the cluster centers for the UAV to traverse using ACO. Compared to the classical algorithms of path planning, the ACO has the capability to deal with complex, dynamically changing environments, and several research studies have shown that ACO can obtain a near optimal path solution for the shortest path problem in an acceptable computational time for small and large-scale networks (Ouyang et al., 2021). Also, the ACO meta-heuristic has the advantage that it can escape the local optima and finding the global optima (Puris, Bello & Herrera, 2010).
ACO is a meta-heuristic search algorithm that is based on the behavior of a group of ants in the process of searching for food. The behavior of the group optimizes an objective through a feedback strategy that ants use to identify the optimal path between the colony and the food source. Ants start leaving the colony and select random path searching of food sources. Ants communicate with each other by releasing a chemical, referred to as a pheromone, with a quantity proportional to the quantity and quality of the discovered food. This pheromone is considered an evaluation for the optimization objective. Eventually, all ants discover the shortest path by following the path corresponding to the highest pheromone concentration. The ACO meta-heuristic is an efficient search algorithm for NP-hard problems, including traveling salesman, job shop scheduling, and scheduling in mobile edge computing (Hussein, Mousa & Alqarni, 2019).
Given the set of points K that represent the cluster head locations. The goal is to identify the shortest path among the points for the UAV to traverse for hovering to process the offloaded tasks. The length of the path from the first cluster head to the last cluster head is considered because the flying time and the flying energy are completely dependent on the length of the trajectory path of the UAV. The following two conditions must be satisfied on the the determined UAV trajectory path: where C 1 ensures that the total time including communication, computation, and flying, T fly , is less than the total flying time of the UAV T u . Also, constraint C 2 states that the overall energy including computation, communication, hovering and flying is less than the Algorithm 2 Proposed DPSO algorithm.

Result: bestFitness, X best
Initialize N, N p , N iter , ω, C 1 and C 2 Randomly initialize X i and V i with random clustering IDs Update X g = min(Xl) end maximum energy of the UAV, E u . T fly and E fly are calculated using the following two Equations: where Γ and μ are the flying energy factor and the UAV speed between the clusters head, and u i is the position of the cluster head i. Initially, all ants are randomly placed on cluster heads. The algorithm iterates for a fixed number of iterations N iter . During each iteration, each ant m selects the next cluster head j from cluster i with probability P m ij ðtÞ, calculated using Eq. (37).
where t is an iteration number, and α is a heuristic variable that controls the effect of the pheromone quantity and β is a heuristic parameter that specifies the quality of the node selection. η ij (t) is a heuristic function that represents the quality of the next node selection; it is calculated using Eq. (38).
where Q is a constant and d(i, j) is the Euclidean distance between the points i and j. s m ij ðtÞ represents the pheromone trail quantity for the selected path for an ant m in iteration t, calculated using Eq. (39).
where Ds m ij ðtÞ ¼ 1=L m and ρ is a constant that represents the rate of pheromone evaporation at each step. L m is the length of the trajectory path determined by ant m.
Once all ants have completed their path finding, i.e., a complete iteration has been performed, the pheromone trail is updated globally. The global pheromone update is calculated using Eq. (40).
where Ds m ij ðtÞ ¼ 1=L best , L best is the best shortest path discovered, and ρ g is the global evaporation rate.
Algorithm 3 shows the steps of the proposed ACO-based UAV shortest path among a set of cluster heads. The proposed algorithm starts by initializing the parameter settings α and β; the local pheromone concentration Q; the local pheromone decay parameter ρ; the global pheromone decay parameter ρ g ; the number of ants N ants ; the number of iterations N iter ; and the number of cluster heads points N k .
Step 2 initializes the pheromone matrix s m ij ð0Þ ¼ 1=dði; jÞ for each ant m. During each iteration, for each ant, ant m searches for a complete path journey. All ants are randomly placed on initial points. The selection of the next point j is calculated with probability P m ij ðtÞ using Eq. (37). The selection of the next point is performed using the roulette wheel selection method (Holland, 1992). When an ant finishes a complete journey, the local pheromone trail matrix is updated using Eq. (39). After each iteration, the ACO-based algorithm updates the global pheromone trail matrix s m ij ðtÞ using Eq. (40). The algorithm iterates until the maximum number of iterations is reached.

EXPERIMENTAL RESULTS
This section provides the simulation results that verify the performance of the proposed UAV-based offloading systems using the proposed meta-heuristics. The IoT devices are randomly deployed in a 200 m × 200 m area with the simulation parameters that are established according to the values described in Table 2. Different possible values of the meta-heuristics parameters are tested in the experiments, and the best value that obtained the best results are reported. However, there are many methods for tuning hyperparameters of the meta-heuristics, including grid search, artificial neural network, and bayesian optimization across continuous spaces which can be considered in our future works. The proposed DDE algorithm has two parameters F and Cr, and Fig. 1 shows the impact of the different values of the DDE algorithm parameters on the value of the objective function. The figure shows that the best values that maintain lowest objective function value are F = 0.9 and CR = 0.2. The GA has a crossover value set to 1 and a mutation probability set to 0.05. The DPSO parameters are set to w = 0.2, c 1 = 0.9, and c 2 = 0.9. The maximum number of iterations is set to 500. The collected results are based on applying 10 different runs, and the average is calculated.
To evaluate the convergence of the proposed meta-heuristics in terms of clustering efficiency, Fig. 2 shows the value of the objective function of the DDE, DPSO, and GA  meta-heuristics during the iterations of a single run. The DDE algorithm is capable of achieving the best convergence compared to DPSO and the GA within the fewer number of iterations. Also, the DPSO with with the mutation and crossover operators can achieve better performance than the GA algorithm.  Figure 3 shows the clusters resulting from the DDE algorithm for 50 IoT devices. The algorithm successfully produced 30 clusters and their members fall within the communication radius of the cluster heads. Further, the shortest path for the UAV is efficiently produced using the ACO algorithm. To evaluate the clustering process in terms of the number of clusters, Fig. 4 shows the resulting average number of clusters using the proposed meta-heuristics for different runs as increasing the number of IoT devices. The proposed DDE algorithm maintains the lowest number clusters. The DDE algorithm is able to obtain the global optimum compared to the PSO and GA algorithms, and thus, a better clustering is maintained using the DDE algorithm.
For the evaluation in terms of time delay, Fig. 5 shows the resulting delay during the iterations of the algorithms. The figure assures that the DDE algorithm is capable of identifying the lowest time delay faster than the DPSO and GA algorithms, which In terms of energy, Fig. 7 shows the energy achieved during the iterations of a single run. The proposed meta-heuristics are capable of reducing the energy while the DDE algorithm maintains the lowest energy consumption. Further, Fig. 8 shows the average of the UAV energy as increasing the number of the IoT devices. This figure shows that as the number of IoT devices increases, the corresponding energy consumption increases. This increase is attributed to increasing the transmission and processing times, and consequently, the hovering time will increase. The DDE algorithm outperforms the PSO and GA algorithms and saves energy.

CONCLUSION AND FUTURE WORK
This paper proposed a UAV-based offloading system that is aimed at minimizing the delay and the UAV energy consumption. Two different subproblems for the proposed system are investigated. The first subproblem is the clustering of the IoT devices, where the proposed offloading system partitions the ground devices into clusters, and the UAV hovers over each cluster head to process the offloaded tasks for the cluster members. The second problem is the shortest path for the UAV to traverse the cluster heads. For the first sub-problem, two different discrete meta-heuristic are proposed for the clustering process, namely, DDE and DPSO. The proposed meta-heuristics are compared with the GA. For the second subproblem, ACO is employed to identify the shortest path among the cluster heads. The experimental results show the effectiveness of the proposed offloading system using DDE and ACO in terms of delay, energy, the number of resulting clusters, and optimized trajectory of the UAV. Future work will consider the mobility of ground devices. We will investigate UAV-based, offloading MEC with multi-cooperative UAVs to study the effect of using multi-cooperative UAVs on the scope of the problem and the performance of the proposed strategy algorithm. Another interesting point for the future work is to test the proposed offloading strategy on real-time tasks where the tasks execution time must meet a specified delay tolerance in the optimization, and to do a complete analysis on different type of tasks, including compute-bound, network-bound, and real-time.