A Novel Genetic Trajectory Planning Algorithm With Variable Population Size for Multi-UAV-Assisted Mobile Edge Computing System

This paper presents a multi-unmanned aerial vehicle (UAV)-assisted mobile edge computing (MEC) system, where multiple UAVs (variable number of UAVs) are deployed to serve Internet of Things devices (IoTDs). We aim to minimize the sum of hovering and flying energies of UAVs by optimizing the trajectories of UAVs. The problem is very complicated as we have to consider the deployment of stop points (SPs), the association between UAVs and SPs, and the order of SPs for UAVs. To solve the problem, this paper proposed a novel genetic trajectory planning algorithm with variable population size (GTPA-VP), which consists of two phases. In the first phase, a genetic algorithm (GA) with a variable population size is used to update the deployment of SPs. Accordingly, a multi-chrome GA is adopted to find the association between UAVs and SPs, an optimal number of UAVs, and the optimal order of SPs for UAVs. The effectiveness of the proposed GTPA-VP is demonstrated through several experiments on a set of ten instances with up to 200 IoTDs. It is evident from the experimental results that the proposed GTPA-VP outperforms the benchmark algorithms in terms of the energy consumption of the system.


I. INTRODUCTION
With the development of mobile communication systems, a huge number of new resource-intensive and latencysensitive applications are emerging, such as virtual reality, and online gaming [1]. Such applications are usually sensitive to latency and require huge computational resources. Due to limitations of the Internet of Things devices (IoTDs), it is very difficult to execute these tasks on them.
Mobile edge computing (MEC) is a promising technology to address the above-mentioned issue. It can provide service with low latency and high reliability for IoTDs. It can execute tasks of IoTDs at the nearby edge cloud and sends back the The associate editor coordinating the review of this manuscript and approving it for publication was Le Hoang Son . results to IoTDs [1]. Due to the shorter physical distance between MEC's server/edge cloud and IoTDs, it consumes less energy as compared to mobile cloud computing. However, it is still lacking in fulfilling the requirements of IoTDs, as the locations of edge clouds are usually fixed and cannot be adjusted flexibly according to the requirements of IoTDs. Therefore, it cannot provide timely services during natural disasters as the terrestrial communication link may be broken/lost.
To cope with these ever-increasing demands, unmanned aerial vehicle (UAV) is considered one of the most promising technologies. Compared to the traditional MEC systems that utilize the terrestrial fixed base stations, UAV-aided MEC systems are more cost-effective and likely to achieve a better quality of service due to their appealing properties of VOLUME 9, 2021 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ flexible deployment, fully controllable mobility, and low cost. In fact, with the assistance of UAVs, the performance of MEC systems such as data rate and latency can be significantly enhanced by establishing the line-of-sight communication links between UAVs and IoTDs. In addition, through dynamically adjusting the flying state, UAVs are capable of improving communication performance in MEC systems. Moreover, UAVs can provide emergency services to the target devices in case of emergency. Hence, the utilization of UAVs is expected to enhance data collection from IoTDs. Recently, UAVs have received much attention and importance due to their autonomy and flexibility and have been extensively utilized in various fields, such as wireless communication [2]- [4], military [5], [6], surveillance and monitoring [7], [8], smart agriculture [9], delivery of medical supplies [10], and rescue operations [11], [12]. In the most recent research work, UAVs have been used to enhance the capabilities of the MEC systems. For example, Wang et al. [13] studied a multi-UAV-enabled MEC system, where a number of UAVs were deployed as flying edge clouds for large-scale IoTDs. They jointly optimized the deployment of UAVs and task scheduling. Zhang et al. [14] proposed a UAV-assisted MEC for efficient multitask scheduling to minimize completion time. Garg et al. [15] studied the application of a UAV-empowered MEC system in cyber-threat detection of smart vehicles. Zhang et al. [16] studied the energy-aware dynamic resource allocation problem for a UAV-assisted MEC system over the Internet of Vehicles. They explored the energy-aware dynamic resource allocation problem by taking into account partial computation offloading, social content caching, and radio resource scheduling. Du et al. [17] optimized joint resource and workflow scheduling in a UAV-enabled wirelessly powered MEC system. Moreover, in order to fully exploit the potential of UAV-assisted MEC systems, some researchers have explored appropriate path planning and trajectory designing of UAVs. For example, Zhang et al. [18] proposed an energy-efficient trajectory optimization scheme for UAV-assisted Internet of Things networks. They deployed a single UAV powered by both solar energy and charging stations, resulting in sustainable communication services. They optimized the trajectory design of UAV by jointly considering the average data rate, the total energy consumption, and the fairness of coverage for the Internet of Things terminals. Wang et al. [19] introduced a multi-agent deep reinforcement learning-based trajectory planning algorithm for UAV-aided MEC framework, where several UAVs having different trajectories fly over the target area and support the ground IoTDs. They aimed to jointly optimize the geographical fairness among all the IoTDs, the fairness of each UAV' UE-load, and the overall energy consumption of IoTDs. They proposed a multi-agent deep reinforcement learning-based trajectory control algorithm for managing the trajectory of each UAV independently. Given the UAVs' trajectories, a low-complexity approach is introduced for optimizing the offloading decisions of IoTDs. Liu et al. [20] investigated the UAV-enabled wire-less powered cooperative MEC system, where a UAV is deployed with an energy transmitter and a MEC server provides both energy and computing services to sensor devices. They formulated an optimization problem to minimize the required energy of UAV by mutually optimizing the CPU frequencies, the offloading amount, the transmit power, and the UAV's trajectory. They proposed a successive convex approximation-based algorithm and a decomposition and iteration-based algorithm to handle the non-convex problem. Tun et al. [21] studied the problems of energy-efficient UAV trajectory optimization, resource allocation, and task offloading in a UAV-assisted MEC system. They aimed at minimizing not only the energy consumption of mobile devices but also UAV's propulsion and computing power. They introduced a block successive upper-bound minimization algorithm, which is a powerful tool for non-convex and nonsmooth problem. Wu and Zhang [22] considered a practical scenario of UAVs in an orthogonal frequency-division multiple access (OFDMA) system. They proposed an iterative block coordinate descent approach for optimizing the UAV's trajectory and OFDMA resource allocation to maximize the minimum average throughput of IoTDs. Diao et al. [23] optimized joint trajectory and data allocation to minimize the maximum energy consumption. Jeong et al. [24] studied the bit allocation and trajectory planning under latency and energy budget constraints. Hu et al. [25] developed a UAV-assisted relaying and MEC system, where the UAV can act as the MEC server or the relay. They proposed a joint task scheduling and trajectory optimization algorithm to minimize the weighted sum energy consumption of UAVs and IoTDs subject to task constraints. Yang et al. [26] presented the sum power minimization problem for a UAV-enabled MEC network. To solve the non-convex sum power minimization problem, they proposed a low-complexity algorithm with solving three subproblems iteratively. They proposed a compressive sensing-based algorithm for the UE association subproblem. For the computation capacity allocation subproblem, the optimal solution is obtained in closed form. They used a one-dimensional search method for the optimal solution of the location planning subproblem. Finally, they proposed a fuzzy C-means clustering-based algorithm to obtain a feasible solution. Zhang et al. [27] investigated the computation efficiency maximization problem in the multi-UAV assisted MEC network. They jointly optimized user association, computation, and communication resource allocation as well as trajectory scheduling of UAVs. To tackle the problem, they proposed an iterative optimization algorithm with a double-loop structure. In the outer loop, they have adopted Dinkelbach method to find the optimal computation efficiency, while in the inner loop, they proposed a joint optimization algorithm for user association, resource allocation, and trajectory scheduling. Huang et al. [28] studied a multi-UAV-assisted MEC system, where the UAVs act as edge servers to provide computing services for IoTDs. They presented an energy-efficient trajectory planning algorithm (TPA) to minimize the energy consumption of the system. Zeng et al. [29] proposed an efficient algorithm to optimize the trajectory of UAV, including the hovering locations and duration. They formulated the problem as a traveling salesman problem to minimize the energy consumption of UAV.
From the above introduction and related literature, it can be seen that the deployment of multiple UAVs in MEC systems remains scarce in current studies. In fact, collaboration among multiple UAVs can improve the capabilities of the system. In addition, variable number of UAVs have rarely been considered in current studies. In this paper, we consider the trajectory planning problem in a multi-UAV-assisted MEC system with a variable number of UAVs. Compared with the conventional trajectory planning problems, this research problem is more challenging due to the fact that the deployment of the stop points (SPs) of UAVs is unknown in prior. Furthermore, in case of a multi-UAV-assisted MEC system, we need to consider the association between UAVs and SPs.
The main contributions of this paper are summarized as follows: • A new multi-UAV-assisted MEC system is proposed and formulated with the aim of minimizing the sum of the hovering energy and flying energy of the system by considering the deployment including the number and locations of SPs, the number of UAVs, and their association with SPs, and the order of SPs.
• A GA trajectory planning algorithm with variable population size (GTPA-VP) is proposed, which consists of two phases. First, operators of continuous genetic algorithm (GA) [30] with variable population size are proposed to optimize the deployment of SPs. Subsequently, MCGA is adopted to associate UAVs with SPs and predict the optimal number of UAVs as well as construct the order of SPs in each cluster.
• Extensive experiments have been carried out on a set of ten instances with up to 200 IoTDs. The experimental results show the effectiveness of GTPA-VP.
The remainder of this paper is organized as follows. Section II introduces the system model, including the problem formulation of the proposed system. Section III presents the details of our proposed algorithm GTPA-VP. In Section IV, the simulation results are discussed. Finally, Section V concludes this paper.

II. SYSTEM MODEL
As shown in Fig UAVs fly over all the IoTDs to collect the data. We assume that the UAVs will stop at SPs for some time and the IoTDs can send the sensing data to the UAVs. We assume UAVs will hover over t ∈ T = {1, 2, . . . , T } SPs at the air in which each SP may last for T max seconds, where T max is the fixed value. Therefore, one has where a ij [t] = 1 denotes that the i-th IoTD decides to send its sensing data to j-th UAV at t-th SP, while a ij [t] = 0 indicates otherwise. Then, one has which denotes that one IoTD should choose one UAV at each SP to send its sensing data. We assume that the UE always sends data to the closest UAV at each SP t. Then, one has Assume that at each SP t, j-th UAV can accept at most U j IoTDs, Therefore, one has We assume that i-th IoTD may collect D i amount of data which intends to send it to the UAV. Then, the transmission time (T Tr ) to send the data from IoTD to UAV at t-th SP is as where r ij [t] is the data rate which is given by (14). The processing time (T C i [t]) of the data in UAV can be obtained as: , ∀j ∈ M, ∀t ∈ T where F i is the CPU cycles that a task may need to process and f ij [t] is the computation capacity of the UAV assigned to each data processing procedure, where where f max is the maximal computing power the UAV can provide to each IoTD. Also, the total time T i [t] for transmitting and processing task of UE i is given as: Then, one can have Assume that the coordinate of i-th IoTD is (x i , y i ) and the coordinate of the j-th UAV at the t-th SP is ( Additionally, assume that the UAV's trajectory can be characterized by a sequence of location q where H is a fixed value. In addition, all UAVs take off from the same initial position q[0] and land in at the same position where S max = V max · T max is the maximum horizontal distance that the UAV can travel and V max is the maximum speed. Then, the horizontal distance between the i-th IoTD and the UAV can be obtained as Also, the distance between the i-th IoTD and the j-th UAV at t-th SP is measured as Then, the channel power gain can be given as where β 0 denotes the channel power gain at the reference distance 1m. If IoTD i decides to offload data to the UAV j at SP t, then the data rate can be given as where σ 2 is the noise power and p tr i is the transmission power, which is constrained by Assume the flying energy of the UAV is proportional to the flying distance, then the flying energy can be calculated as Also, for the hovering energy, one can have In this study, we aim to optimize the trajectories of UAVs in order to minimize the energy consumption of the system. Thus, we can have the optimization problem as follows. where the objective function is the sum of hovering energy and flying energy of UAVs and (18i) and (18j) present the lower and upper bounds of the X-axis and Y-axis, respectively.

III. PROPOSED ALGORITHM A. MOTIVATION
By analyzing the proposed system model and problem formulation in Section II, it is clear that (18(a)) is a non-convex, NP-hard, and nonlinear optimization problem that cannot be solved by traditional optimization methods. Evolutionary algorithms (EAs) are a kind of population-based heuristic gradient-free optimization algorithms that have the potential to address the above-mentioned problem (18(a)). However, EAs still face some issues in solving (18(a)).
• To solve (18(a)), we need to consider the number of UAVs, the number of SPs and their locations, which one UAV will visit which specific SPs, and in what order the UAV will visit the assigned SPs. Therefore, it is a complicated/complex problem to be tackled by the EAs directly.
• (18(a)) contains integer decision variable M and number of SPs T j for UAV j, binary variable a ij [t], and continuous variables (X j and Y j ). Therefore, it is a mixed decision variable problem, which is challenging to be solved by the EAs [13], [31].
• Since, the number of UAVs is unknown in prior, the clustering of SPs into different clusters requires an unsupervised scheme (i.e., free of initialization/parameterfree clustering algorithm) that can group closely spaced SPs into different clusters automatically and can also simultaneously find an optimal number of clusters/UAVs [32].
• Since the number of SPs is unknown in prior, thus the length of individual is not fixed. The commonly used crossover and mutation operators of EAs are constructed for fixed-length individuals [33]. Therefore, the direct use of EAs would be ineffective.
In this paper, we proposed an algorithm called GTPA-VP to design the trajectories of UAVs. The proposed algorithm consists of two phases: the deployment of SPs and the association between UAVs and SPs and the order of SPs.
The main technical advantages of the proposed algorithm are given as.
• Considering the strong coupling among the deployment of SPs, the association between UAVs and SPs, and the order of SPs. GTPA-VP plans the trajectories of UAVs at each iteration through two phases: updating the deployment of SPs and the association between UAVs and SPs and constructing the optimal order of SPs for UAVs.
• In GTPA-VP, the deployment of SPs is addressed by proposing a GA with variable population size. Each individual represents the location of an SP; thus, the whole population represents a whole deployment, rather than a set of deployments. Since the length of the individual is fixed, we can directly adopt the commonly used crossover and mutation operators for updating the deployment of SPs.
• In GTPA-VP, the association between UAVs and SPs and the order of SPs were jointly addressed by adopting MCGA [34], [35]. MCGA can associate UAVs with SPs without knowing the number of clusters in prior as well as can predict the optimal number of clusters/UAVs. In addition, it can also construct the order of SPs for all UAVs.

B. GTPA-VP
The framework of GTPA-VP is given in Algorithm 1.
In the initialization, the locations of SPs are produced randomly, forming an initial population POP = (X 1 , Y 1 ), (X 2 , Y 2 ),. . . ,(X max , Y max ). Accordingly, MCGA is adopted to group SPs into different clusters (i.e., UAVs are associated with SPs) and construct the order of SPs in each cluster. After that, POP is evaluated via Eq. (18(a)), if it is feasible, the initial population is generated successfully; otherwise, the initialization is repeated until it is feasible or the number of fitness evaluations (FEs) is not less than maximum FEs (FEs max ). Accordingly, an offspring population POP C is first produced via continuous GA in Algorithm 2 during the evolution. After that, we construct three new populations POP 1 , POP 2 , and POP 3 using Algorithm 3. Then, the SPs in POP 1 , POP 2 , and POP 3 are grouped into different clusters Produce an offspring population POP C via operators of GA given in Algorithm 2; 10: for i = 1: |POP C | do 11: Construct three new populations POP 1 , POP 2 , and POP 3 via Algorithm 3; 12: for l = 1: 3 do 13: Jointly cluster SPs of POP l by associating UAVs with SPs and design the trajectories of UAVs by using MCGA given in Algorithm 4; 14: end for 15: Evaluate POP 1 , POP 2 , and POP 3 via Eq. (18(a)); 16: FEs = FEs + 3; 17: if at least one feasible population exists among POP 1 , POP 2 , and POP 3 then 18: Update POP by the feasible population among POP 1 , POP 2 , and POP 3 with the greatest performance improvement against POP; 19: end if 20: end for 21: end while 22: Output: The best POP along with the construction of the order of SPs in each cluster by using MCGA in Algorithm 4. Accordingly, the three new populations POP 1 , POP 2 , and POP 3 are evaluated using Eq. (18(a)). Finally, we replace POP with the feasible population among one of POP 1 , POP 2 , and POP 3 with the greatest performance improvement against POP, if at least one feasible population exists among them. This process continues until FEs ≥ FEs max .

C. DEPLOYMENT OF SPs
The deployment of SPs is updated by using operators of continuous GA [30], which is a simple, most popular, and effective EA and has been successfully applied in many fields [36], [37]. More specifically, random selection, continuous crossover, and continuous mutation operators were adopted in GTPA-VP to generate an offspring population POP C (i.e., locations of new SPs). The individuals of POP C are adopted to update parent population POP (i.e., locations of SPs can be updated). Thus, the locations of SPs can be updated by using the above process. Since each individual in GA represents a location of SP. Therefore, Algorithm 2 Updating Deployment of SPs Using Continuous GA 1: Initialize: POP C = ∅, crossover probability P c , mutation probability P m ; 2: for k = 1: 2: |POP| do 3: x 1 , x 2 ← Apply random selection to select parents; 4: y 1 , y 2 ← Apply continuous crossover (x 1 , x 2 );  the whole population represents the locations of all SPs. Hence, the number of SPs is equal to the population size. Thus, the population size is kept variable during evolution while updating the number of SPs i.e., the population size can be increased, kept unchanged, or reduced. By using Algorithm 3, we construct three new population POP 1 , POP 2 , and POP 3 by inserting, replacing, and removing an individual in/from population POP, respectively. More specifically, POP 1 is constructed by inserting an individual i from offspring POP C to POP, POP 2 is constructed by replacing ith individual in POP C with an individual in POP, and POP 3 is construed by removing a random individual from POP. Therefore, the population sizes of POP 1 , POP 2 , and POP 3 are one more than, the same as, and one less than that of POP, respectively. Thus, the population size is varying during the updation of SPs by using POP 1 , POP 2 , or POP 3 .

D. ASSOCIATION BETWEEN UAVs AND SPs AND THE ORDER OF SPs
In this subsection, we associate UAVs with SPs (i.e., SPs are grouped into different clusters and then a UAV is assigned to each cluster to visits its SPs) and construct the order of Swap ← Apply Swap to transpose genes from two random chromosome; 8: Slide ← Apply Slide operator to slide the genes in/among random chromosomes; 9: Crossover ← Apply one point crossover; 10: end for 11: end for 12: OUTPUT: NEW POP POP N SPs for UAVs. In GTPA-VP, we used MCGA [34], [35], [38] to jointly handle association between UAVs and SPs (i.e., grouped closely SPs into the same cluster and a UAV is assigned to visit its SPs) and the order of SPs for UAVs. Moreover, this algorithm can also predict the optimal number of UAVs.
There are two sets of mutation operators, the so-called In-route mutations and the cross-route mutations. In-route mutation operators work inside one chromosome, like the gene sequence inversion or the flip, which just swaps 2 genes inside a chromosome. A cross-route mutation operator is applied on multiple chromosomes and can alter them at the same time. Figure 2 presents the multi-chromosome representation of the UAV routing problem. The ''Swap'' operator randomly chose sequences of genes from two chromosomes and transposed them, i.e. swap them. If one of the gene sequences is empty, the operator will be realized as the insertion of the nonempty sequence to a randomly chosen place in the other chromosome. Slide operator is applied to slide the SPs of a randomly selected UAV. The crossover operator is also a cross-route mutation, which does a one-point crossover between two UAVs. Further details of MCGA can be found in [35] and [38].
A ''Local Optimization'' operator given in Algorithm 4 is applied in MCGA, which is a simple TSP solver (i.e., UAV solver) using GA. This operator operates on each UAV and optimizes its routes separately. It can be seen from Algorithm 4, the algorithm requires two input sets, the coordinates of the locations of SPs, and the distance matrix which contains distances among SPs. Moreover, it requires some parameters, such as population size, number of iterations, and additional constraints. After applying the local optimization operator, operators of GA in algorithm 5 are used to produce new population POP N (i.e., new order of SPs). First, the initial population (i.e., order of SPs) is generated, which consists of randomly generated individuals. The selection operator used in MCGA is tournament selection, where tournament size i.e. the number of individuals who compete for survival is 8. Therefore population size must be divisible by 8. The winner of the tournament is the member with the smallest fitness, this individual is selected for a new individual creation, and this member will get into the new population without any modification. The penalty of routes that exceed the constraints (18g) is realized uncommonly. The big fitness value is not assigned, but the chromosomes associated with the big fitness value are split by the chromosome partition operator. In this way, too-long routes are transformed into smaller routes, which do not exceed the constraints (18g).

A. PARAMETER SETTINGS
The parameter settings of the proposed multi-UAV-assisted MEC system are presented in Table 1 [28]. We have used the same parameters for all compared algorithms used in this paper for a fair comparison. The parameter settings were kept the same as used in other articles such as: [28]. We have tested ten instances with up to 200 IoTDs to evaluate the performance of GTPA-VP. We assume that all the UEs are distributed randomly in a 1000 m × 1000 m square region. In GTPA-VP, we set the following parameters: P c = 0.95 and P m = 0.01. The maximum number of fitness evaluations (FEs max ) is set to 5000 and 20 runs are implemented independently on each algorithm. The mean energy consumption and the standard deviation of the proposed system over 20 runs are denoted by mean EC and Std Dev, respectively. In addition, we performed the Wilcoxon rank-sum test at 0.05 significant level. In the simulation results, we used ⇑, ⇓, and to show that GTPA-VP performs significantly better than, worse than, and similar to its competitors. Since most of the existing solutions are designed for different systems and problems, therefore, are not applicable to our proposed system. However, we have compared our algorithm with some existing approaches such as TPA [28], etc. In addition, we have compared each phase of the proposed GTPA-VP with an existing method to show its effectiveness.
In order to show the effectiveness of GTPA-VP, we designed algorithms called Kmeans-Greedy, GAC-Greedy, and TPA [28]. Kmeans-Greedy uses K-means algorithm [39] for clustering and a greedy algorithm for the order of SPs. GAC-Greedy uses GA clustering(GAC) [40] and a greedy algorithm for the order of SPs. K-means algorithm needs the number of UAVs in advance which was set to 4 in this paper, while GAC algorithm does not require the number of UAVs in prior. In GAC, the number of iterations and population size were set to 50 and 10, respectively. The deployment of SPs was kept the same in both Kmeans-Greedy and GAC-Greedy as used in GTPA-VP. The parameters of TPA were kept unchanged. TPA also requires the number of UAVs for clustering SPs, which was set to 4. The mean EC and Std Dev of GTPA-VP, Kmeans-Greedy, GAC-Greedy, and TPA are presented in Table 2. In addition, Figure 3 presents the evolution of the mean EC by GTPA-VP, Kmeans-Greedy, GAC-Greedy, and TPA on ten instances. One can see from Table 2 and Figure 3 that the proposed GTPA-VP performs better than Kmeans-Greedy, GAC-Greedy, and TPA in terms of mean EC. In addition, the statistical test results of GTPA-VP, Kmeans-Greedy, GAC-Greedy, and TPA are summarized at the bottom of Table 2, which show that GTPA-VP is significantly better than Kmeans-Greedy, GAC-Greedy, and TPA. The superiority of GTPA-VP against compared algorithms can be attributed as 1) in GTPA-VP, the association between UAVs and SPs and the trajectories of UAVs are jointly addressed which may lead to good performance and 2) in GTPA-VP, MCGA is used to construct the order of SPs for UAVs, which is a known famous EA for its good convergence.

B. EFFECTIVENESS OF DEPLOYMENT OF SPs
In GTPA-VP, GA operators with variable population sizes are proposed for updating the deployment of SPs. To prove its effectiveness, we compare the proposed algorithm with two VOLUME 9, 2021  other variants named RAN-GTPA and DE-GTPA. In RAN-GTPA, the locations of SPs are updated randomly, while in DE-GTPA, operators of DE [41] are used to update the deployment of SPs. Table 3 presents the mean EC and Std Dev of GTPA-VP, RAN-GTPA, and DE-GTPA on ten instances, which shows that the mean EC of GTPA-VP is significantly smaller than RAN-GTPA and DE-GTPA on all instances. In addition, the statistical test results of GTPA-VP, RAN-GTPA, and DE-GTPA are summarized at the bottom of Table 3. It is clear that GTPA-VP provides significantly better results than RAN-GTPA and DE-GTPA. The better performance of the deployment of SPs is due to the following reason: since GTPA-VP can simultaneously update the number and locations of SPs and the dimension of the search space is always fixed, therefore, it can achieve better performance.

C. EFFECTIVENESS OF THE ASSOCIATION BETWEEN UAVs AND SPs AND THE ORDER OF SPs
GTPA-VP adopted an MCGA to jointly handle the association between UAVs and SPs and the order of SPs for UAVs. In order to show the effectiveness of MCGA used in GTPA-VP, we designed algorithms called GAC-GA, DEC-GA, and Kmeans-GA. GAC-GA, DEC-GA, and Kmeans-GA use GAC [40], DE clustering (DEC) [40], and K-means clustering [39], respectively for associating SPs with UAVs. All the above-mentioned algorithms use GA [42] for constructing the order of SPs. The deployment of SPs was kept the same for all of them as used in GTPA-VP. The number of iterations and population size were set to 50 and 10, respectively in DEC and GAC.
The mean EC and Std Dev of GTPA-VP, GAC-GA, DEC-GA, and Kmeans-GA are presented in Table 4. In addition, Figure 4 presents the evolution of the mean EC by GTPA-VP, GAC-GA, DEC-GA, and Kmeans-GA on ten instances. One can see from Table 4 and Figure 4 that the proposed GTPA-VP performs better than GAC-GA, DEC-GA, and Kmeans-GA in terms of mean EC. In addition, the statistical test results of GTPA-VP, GAC-GA, DEC-GA, and Kmeans-GA are summarized at the bottom of Table 4, which shows that GTPA-VP is significantly better than GAC-GA, DEC-GA, and Kmeans-GA. The superiority of GTPA-VP against compared algorithms can be attributed as: in GTPA-VP, MCGA (which is known for its good convergence) is used to jointly address the association between UAVs and SPs and the order of SPs for UAVs, which may lead to good performance, while in GAC-GA, DEC-GA, and Kmeans-GA, they are addressed independently.

V. CONCLUSION
In this paper, a multi-UAV-assisted MEC system has been studied, where multiple UAVs have been used to serve IoTDs. We aimed to optimize the sum of hovering and flying energies of UAVs in the system. The problem is complicated to be solved by traditional optimization methods. We have proposed a genetic trajectory planning algorithm with variable population size called GTPA-VP, which consists of two phases. In the first phase, a GA with a variable population size was proposed for the deployment of SPs. This algorithm adaptively updates the number and location of SPs by using three operators: insert, replace, and delete. Accordingly, MCGA is adopted to associate SPs with UAVs, predict an optimal number of UAVs, and construct the optimal order of SPs for UAVs, in order to minimize the flying distances (i.e flying energies) of UAVs as well as improved the mean EC of the system. The experimental results on ten instances up to 200 IoTDs have shown that GTPA-VP performs better than other compared variants in terms of energy consumption. In the future, we intend to improve the complexity of the proposed algorithm keeping in view the current industrial applications and demands of MEC systems across the globe.