Multiple Swarm Fruit Fly Optimization Algorithm Based Path Planning Method for Multi-UAVs

: The path planning of unmanned aerial vehicles (UAVs) in the threat and countermeasure region is a constrained nonlinear optimization problem with many static and dynamic constraints. The fruit ﬂy optimization algorithm (FOA) is widely used to handle this kind of nonlinear optimization problem. In this paper, the multiple swarm fruit ﬂy optimization algorithm (MSFOA) is proposed to overcome the drawback of the original FOA in terms of slow global convergence speed and local optimum, and then is applied to solve the coordinated path planning problem for multi-UAVs. In the proposed MSFOA, the whole fruit ﬂy swarm is divided into several sub-swarms with multi-tasks in order to expand the searching space to improve the searching ability, while the o ﬀ spring competition strategy is introduced to improve the utilization degree of each calculation result and realize the exchange of information among various fruit ﬂy sub-swarms. To avoid the collision among multi-UAVs, the collision detection method is also proposed. Simulation results show that the proposed MSFOA is superior to the original FOA in terms of convergence and accuracy.


Introduction
Unmanned aerial vehicles (UAVs) have become an area of great concern to many governmental and military organizations around the world. The autonomy level of the UAVs depends on the methodology used to control the vehicle and plan its flight path [1]. Therefore, path planning, which is to generate a feasible path between two points that has an optimal or near-optimal performance satisfying constraint conditions, is one of the most important challenges in the autonomous navigation process of UAVs [2]. Typically, in increasingly complex mission environments, only one UAV usually cannot meet the mission requirements, so there are often multiple UAVs (multi-UAVs) on the same mission at the same time [3]. This paper mainly discusses the path planning of multi-UAVs cooperation. To solve the cooperative path planning problem of multi-UAVs, an approach is proposed: Priority is set to each UAV. The first priority UAV does not need a plan. Its sub-goal is the final goal. The UAV with second priority plans the path to avoid collision with the first priority UAV. The UAV with the third priority needs to plan its path to avoid collision with the former UAVs [4]. It is proven that finding the optimal path is an non-deterministic polynomial complete problem [2]. As the scale of the problem increases, the complexity of the problem increases rapidly. In many existing works, the optimal path is always considered as the shortest path, and the deterministic search algorithm is used to find the shortest path. However, the optimal path of the UAV should be considered to be related to the Fruit flies have a superior sense of smell and vision [18]. In their search for food, fruit flies can not only use their sense of smell to detect smells in the air, but also can use their sense of sight to locate food and other flies. In the FOA, the flies first use their sense of smell to find the direction of the food source, and then fly toward the direction with the greatest smell concentration. After that, the fruit flies use their vision to find the location of the food and other flies and fly to the direction obtained by their vision.
Without loss of generality, the global optimization problem in the continuous domain can be summarized as minF(x) s.t.x j ∈ [X min , X max ], j = 1, 2, . . . , D where F(x) is the objective function with the D-dimensional decision variable x = (x 1 , x 2 , . . . , x D ) and X min and X max are the lower and upper bounds of the decision space, respectively.
Appl. Sci. 2020, 10, 2822 3 of 21 The parameters of FOA are the population size M pop and the maximum number of iterations NC. Firstly, the fruit fly swarm location (x best , y best ) is randomly initialized in the decision space. The main process of the FOA contains two parts, namely olfactory search and visual search [1,18].
(1) Olfactory search In the olfactory search process, the fruit fly swarm generates in total M pop new locations of the food source that is randomly around its current location using random strategy, which is given by x i = x best +random(−1, 1) y i = y best +random(−1, 1) (2) where x i and y i , i = 1, 2, . . . , M pop , denote the location coordinate of the i-th fruit fly and random(−1,1) is the random value in the range of (−1,1). For each location produced in the olfactory search process, its smell concentration judgement S i is the reciprocal of the distance between the location and the origin, as follows In the FOA framework, the smell concentration judgement S i corresponds to the candidate solution of the objective function F(.) in the decision space. The smell concentration of the food source can be calculated using the smell concentration judgement as follows (2) Visual search The visual search process of the fruit fly swarm can be regarded as a greedy selection procedure, where the fruit fly swarm observes all the locations generated via the above olfactory search and finds out the best location that has the minimum smell concentration, as follows Then the best smell concentration smell index generated via the olfactory search is compared with the smell concentration smell best of the original fruit fly swarm location (x best , y best ). If smell index < smell best , then the original location (x best , y best ) will be replaced by the newly generated location (x index , y index ) and the fly swarm will fly towards the new location by using the visual search. The visual search can be described as follows The olfactory and visual search processes are repeated many times until a program termination condition is reached. The general process of the FOA in solving the minimum problem minF(x) is described in Algorithm 1. Randomly initialize the fruit fly swarm's location x best , y best in the search space. /* Iterative search */ 2 for n = 1: NC 3 /* Olfactory search */ for i = 1: M pop 4 x i = x best + random(-1,1) 5 y i = y best + random(-1,1) /* Calculate the smell concentration */ if smell Index is smaller than smell best of the fruit fly swarm's location x best , y best then

12
Fruit flies move to the location (x Index , y Index and update the smell concentration: 13 x best = x Index 14 y best = y Index 15 smell best = smell Index 16 end if 17 end for

UAV Path Planning Method Based Modified Fruit Fly Optimization Algorithm
In this section, the MSFOA is proposed to enhance the searching ability of the original FOA and is applied to the path planning for multi-UAVs. The symbol description of the main variables appearing in the proposed MSFOA is listed in Abbreviations.

Motivation
The FOA converges quickly when applied to a single UAV path planning. Yet when it is applied to planning the path of multi-UAVs, it is easy to get lost in the local optimal solution. The original FOA is random when searching the solution, which means the convergence speed is fast in the early stage, but it is difficult to converge towards the optimal solution in the later stage. When the fruit fly's path is near the optimal solution, the algorithm may ignore the path, because the path length and the threating level and other constraints are considered. The optimal path is often between the edge of the threating cylinder or the valley. When the fly finds a path near the optimal solution, the path usually falls into the threating cylinder or through the interior of the mountain. This path with a high smell concentration is easy to eliminate but near the optimal solution. When the algorithm is used to plan the path for a simple scenario, it can be repeated many times to get the optimal solution, but when the algorithm is applied to some complex scenarios, such as multi-UAVs path planning or path planning in complex scenarios, the convergence ability of FOA is obviously insufficient.
In FOA, there is no communication between fruit flies and the direction of the path depends only on the given random direction and the random distance, so the ability to converge in solving complex problems is insufficient. In order to overcome the shortfalls of the FOA, increasing the searching ability and communication between fruit flies can improve the convergence ability of the algorithm. At the same time, in order to avoid the problem of possible collision when planning multiple UAVs paths, this algorithm also adds the method of checking for collisions.

Multi-Swarm with Multi-Tasks Strategy
The searching process can be separated by global searching and local searching. Global searching occurs in the early stage of searching, while local searching occurs in the end stage of searching. In this paper, global searching and local searching are considered as different tasks, which should employ different searching strategies. This paper uses a threshold to confirm the two different stages. When the cost is larger than the threshold value, the algorithm is in the global searching period, when the cost is smaller than the threshold value, the algorithm is in the local searching period.
In the global searching period, it is important to enhance the searching space to improve global searching ability since the size of the searching space has a significant impact on the results. FOA only uses the single swarm approach to search for all fruit flies from a single location, thus when the searching space is small, the searching capacity is insufficient. In MSFOA, the searching space of the algorithm can be expanded linearly by using multi-swarm fruit fly at the same time and starting from many different positions. The fruit fly population M pop is divided equally into G swarms. G is the total amount of swarms. Every fruit fly intends to have a big step in searching as shown in Equations (10) and (11). sin((π/2) * random(−1, 1)) is introduced to map random(−1, 1) near −1 and 1.
where X best are the concentration position of the g-th swarm. In the local searching period when fruit fly swarms are near the global optimum, it is important to reduce searching space for further convergence; fruit flies should pay attention to the points near themselves to have a better result. The step of searching is dwindled.

Competitive Strategies of Offspring
In order to avoid multi-swarm falling into local optimum, each swarm is independent in visual search and olfaction search, while the information exchange occurs in the competition of offspring, which is explained in detail below. In this way, not only can the multi-swarms not get into the local optimum at the same time, but also the information exchange between the species cannot be guaranteed.
The competition strategy of the offspring uses the optimal individual to cross with other flies at random to generate a new swarm at the same scale and select a new optimal individual. That is, the swarm in the same number has two optimal individuals, one comes from the old swarm, the other from the new swarm. The optimal solution of the swarm is obtained after competition between two optimal individuals.
The effect of this method is when fruit fly A is near the optimal solution but its smell concentration is high, but the individual from A hybridized with random fruit fly B has the path information of both fruit fly A and B; the path information of the fruit fly can be obtained by distributing the weight of the path data of the two flies. This strategy can increase the probability that the fruit fly near the optimal Appl. Sci. 2020, 10, 2822 6 of 21 solution will be selected by the algorithm. The procedure for generating the i-th new individual of the g-th swarm is as follows: where random(1, G) produces random integers between 1 and G. X new, i mean the position of the i-th fly in the g-th new swarm. coe 1 and coe 2 are the weights of parental path data, satisfying: The calculation of best smell concentration is given by: Then all the fruit flies in every swarm fly to the point with the minimum smell concentration of each swarm. If the smell concentration of the offspring is less than the smell concentration of their best ), then: best and y Set the number of the fruit fly population M pop , the max number of iterations NC, swarms' initial position [x best , y best ], swarm number g, the threshold, genetic coefficient of hybridization coe 1 and coe 2 , the parameter R. 2 for nc = 1: NC 3 for g = 1: G /* Multi-swarm with multi-task searching strategy */ 4 end for 16 end for /*Competitive strategies of offspring*/ 17 for g = 1: end for 25 end for /* Competitive strategy of offspring */ 26 for g = 1: G 27 Competition of offspring and visual searching in each swarm by formulas (18) and (19)  28 end for 29 end for /*Output*/ 30 Find the best individual from the G swarms and export it.

Problem Modeling
UAV path planning needs to adapt to current terrain and physical world constraints, such as terrain undulation, gravitational acceleration, etc. In addition, the path of the UAV cannot exceed the limits of the UAV itself, such as turning radius, glide angle, flying speed, minimum flying height, and so on. Within these limits, an optimal flight path is planned for the UAV, which can avoid a specific area and reach the target point with less energy consumption in a shorter time. The collision risk between UAVs needs to be considered in the three-dimensional (3D) cooperative path planning of multi-UAVs.
Path representation is a key problem in path planning, and the grid-based map [15] and spline curve [1,5] are two common methods. Zhang proves that by using the B-spline-based path representation strategy, the path can be constructed using a relatively smaller number of parameters than using a complete geometric description of the path [1]. Thus, in charting our course, the algorithm uses very few control points to record the path. When the algorithm needs to use the full path, it will use the control points to generate the whole path.
In this paper, the objective function divides the path constraints into the following categories: path length, threat cost, altitude cost, terrain constraint, corner constraint, and descent angle constraint. All the constraints constitute the objective function. The algorithm uses the objective function to express the quality of a path. Before calculating the objective function, it is necessary to generate a complete path with path points before calculating. The objective function is calculated as follows: where the objective function includes the altitude cost JH, the length cost JL, the threat cost JT, the terrain constraint CH, the corner constraint CT, the climb down constraint CG, and the collision risk JP, which are described in detail as follows.
The altitude cost is determined by all points along the path, which reflects the flying altitude of the UAV above the ground. When flying at a low altitude, the UAV can benefit from terrain masking to avoid unknown radars [1]. Suppose the whole UAV path is represented by k points, if the variable z n is the height of the n-th point in the path, and h min is the minimum flying height of the UAV, then the altitude cost JH adds up the height of all the points along the path on the ground as follows: The path length cost JL reflects the flight length of the entire UAV path, which calculates and adds the distance between any two adjacent points to get the total length as follows: where the variable x n is the x coordinate of the n-th point in the path, y n is the y coordinate of the n-th point in the path, and z n is the z coordinate of the n-th point in the path.
The terrain constraints are determined by the length of the path in the underground section. This symbol is used to punish those paths that are not entirely on the ground. The variable p is the information of the map, and function H(p) means the height of the current point in map p.
Appl. Sci. 2020, 10, 2822 9 of 21 In this paper, the threat around the threat point is only related to the distance, so the threat area is approximated as a cylinder, within a certain range; the closer to the threat point, the greater the degree of threat. The variable n r is the amount of threaten points. T de (i) is the coordinate of the i-th threaten points.
The minimum angle of turning is determined by the maximum speed and gravitational acceleration. The turning angle of each point in the path is calculated. If current turning angle is greater than the max turning angle, and the turning angle constraint increases iteratively. Iterations are added to quickly filter out individuals who do not exceed the limit. The calculation is as follows: where ϕ k denotes the turning angle in the n-th point in the path and ϕ max denotes the maximum turning angle of the UAV.
CG is used to constrain the slope at the current point to meet the maximum climb slopes α and minimum climb slopes β.
where α n = −1.5377 × 10 −10 z 2 n − 2.6997 × 10 −5 z n +0.4211 β n = 2.5063 × 10 −9 z 2 n − 6.3014 × 10 −6 z n − 0.3257 The cost JP is used to assess the risk of collisions between UAVs. The risk of collision between UAVs is determined by the time it takes to reach two points very close together. When planning the path of multi-UAVs, first, these UAVs are numbered according to the degree of importance and then the UAVs with the former number are given priority of passage on the map because each UAV has to avoid the UAV with greater priority.
where PC is the penalty factor, N is the number of current UAV, and N is the number of points in the flight path generated by the B-spline curve. ∆ time_k is the time difference between the two UAVs when they arrive at the point where a possible collision could occur.

Application of MSFOA to Multi-UAVs Path Planning
(1) Collision detection method Collision avoidance is an important part of multi-UAVs path planning. Due to the huge space in the 3D map, this method only detects the possibility of collision after the path is generated. When the n-th UAV's flight path is going to check for collision, this method will check it in pairs with the previous n − 1 UAV's flight path. The n-th path is called the path to be detected, and the previous n − 1 is called the air_path n−1 . For each point on the detection path, the distance from each point between the detection path and air_path n−1 is calculated. If the distance is less than the minimum safe distance, the two points will be called a possible collision point, and the path will be punished. The mathematical descriptions are as follows: where JP i is the collision risk between the i-th UAVs and the m-th UAVs, the parameter C is the time penalty factor, and t carsh is the time difference between the two UAVs at the point of possible collision, determined by the following formula: (2) MSFOA based multi-UAVs path planning In order to further explain the MSFOA based path planning, the specific steps of multi-UAVs path planning for MSFOA is elaborated. The algorithm records the location of the d-th control point of the i-th individual fruit fly in swarm g with X where S (g), j i is the smell concentration judgment. The path is generated by where P i is the coordinate on the Z axis of all the control points along this path. k represents the number of control points, where k values range from 2 to D-1. Then add the starting and ending points: where X S,N , Y S,N , Z S,N is the beginning of the path of the N-th UAV, and X T , Y T , Z T is the end of the path of the UAV. There is no essential difference between the multi-origin and multi-destination model in this paper. The MSFOA for multi-UAVs path planning is implemented as follows: Step 1: Determine information of the UAVs mission, including starting coordinates (X S, N , Y S, N , Z S, N ) and ending coordinates (X T , Y T , Z T ). The number of UAVs required for the mission Num, maximum velocity v max , maximum turn overload n max , and minimum altitude h min . Mission map information p, boundary P x max , P y max , P z max , and the number D of control points that each UAV needs to plan out.
Step 2: Identify enemy ground weapons, including threat types such as radar, missiles, anti-aircraft guns, weapon positions (X threat, j , Y threat, j ), and their respective threat ranges.
Step 3: Set up the parameters of MSFOA, including maximum iteration number NC, the number of new swarms G, the fruit fly population size M pop , the threshold, the searching step dwindled parameter R, and cross genetic coefficient coe 1 and coe 2 .
Step 7: Generate the random locations for the food source using the olfactory according to best is larger; otherwise, generate the new locations according to Equation (35), as follows best +R * random(−1, 1) (35) Step 8: Update the smell concentration judgement according to the formula below: old, i is bigger than 1, jump to step 7, otherwise jump to step 9.
Step 9: if d < D, let d = d + 1, jump to step 7, otherwise jump to step 10.
Step 10: Generate the path of this fruit fly path i using Equations (31)-(33). Update smell concentration by the formula below smell (g) where J is described in Equation (20). If i < M pop /G, then let i = i + 1, d = 1 and jump to step 7, otherwise jump to step 11.
Step 11: Find out the old best in the g-th swarm (x oldbest ) using Equations (12) and (13). If g < G, then let g = g + 1, d = 1, i = 1 and jump to step 7, otherwise jump to step 12.
Step 13: Generate fruit fly in new swarms according to the equation below: Step 14: Update the smell concentration judgement according to the equation below: new, i is bigger than 1, jump to step 6, otherwise jump to step 8.
Step 15: if d < D, let d = d + 1, jump to step 13, otherwise jump to step 16.
Step 16: Generate the path of this fruit fly path i by using Equations (31)-(33). Update smell concentration by the equation below: If i < M pop /G, then let i = i + 1, d = 1 and jump to step 13, otherwise jump to step 17.
Step 17: Find out the index of new best in the g-th new swarm Index new by Equation (17).
Step 18: All the fruit flies in the g-th swarm fly to the location with the minimum smell concentration according to Equations (18) and (19). If g < G, then let g = g + 1, d = 1, i = 1 and jump to step 13, otherwise jump to step 19.
Step 19: If nc < NC, let nc = nc + 1 and jump to step 5, otherwise jump to step 20.
Step 20: If num < Num, generate and output the path of the num-th UAV then let num = num + 1 and jump to step 5; otherwise, end and output the UAV paths.

Results and Discussion
This section discusses the simulations used to assess the performance of our proposed algorithm in solving the UAV path planning problem. Seven algorithms are tested under three scenarios, including MSFOA, FOA, PSO, DE, ABC, IFFO, and MFOA. The 3D stereo displays of three scenarios are shown in Figure 1. The algorithm is coded using Matlab-2018b. Owing to their stochastic nature, evolutionary algorithms may arrive at better or worse solutions than they previously reached during their search for new solutions. For this reason, every tested algorithm is run 40 times independently for each scenario and the statistical results are used for performance evaluation and comparison. We coded the above algorithms and set the parameters according to their references. The main parameters of the seven tested algorithms are detailed in Table 1. The best values of each scenario are highlighted using boldface. The parameter configurations are all based on the suggestions in the corresponding references; where these values have a fair comparison, the same maximum iteration number is used for all algorithms as the stopping criterion, while the population size is set as 100 for all algorithms.

DE [10]
M sol = 100 The scaling factor F is set as a random value in [0.2, 0.9], the crossover factor cr = 0.9. ABC [11] N e = 50, N u = 50 The largest local searching times Limit = 20.
Above all, these experimental results demonstrate that the MSFOA still maintains a higher performance than the FOA, PSO, DE, ABC, and two other modified FOA versions.          For the first scenario, all seven tested algorithms find the safe flight path for UAVs. It can be seen that the best path generated by MSFOA flies the smoothest. In comparing these results in the first scenario column in Table 2, it is observed that the MSFOA obtains the minimum best among the algorithms, which indicates that MSFOA has the most powerful optimization ability in the statistical sense. Figure 3 displays the experimental results of the second test scenario. For this test scenario, DE and IFFO come into the threat areas. From Table 2, it can be seen that MSFOA achieves the smallest mean cost value. Furthermore, the result of the third scenario is shown in Figure 4. It is obvious that MSFOA has the best path for UAVs. In the third scenario column of Table 2, the cost of MSFOA is significantly decreased in comparison to the other algorithms.
Above all, these experimental results demonstrate that the MSFOA still maintains a higher performance than the FOA, PSO, DE, ABC, and two other modified FOA versions.
The convergence curves of the average best cost values are displayed in Figures 5-7. In the first scenario, it can be seen that DE, FOA, and IFFO show inferior convergence. MFOA achieves a faster convergence speed and smaller cost than MSFOA in the early stages. However, in the later iterations when most algorithms come to stagnation, MSFOA still shows the ability to search for better solutions. The searching range decreases as the cost value decreases below the threshold, which can improve the local searching ability near the optimal solution, and thus leads to the best global convergence of the algorithms.
In Table 3, the best, median, and average of the cost values of the sum for three UAVs are recorded. The best values are highlighted using boldface. From this table, it can be seen that MSFOA achieves the smallest cost value in the first and third scenario and the second smallest in the second scenario. MFOA obtains a smaller average and median in the second scenario, but the distributed interval of solutions obtained by MFOA in Figure 3 is evidently worse than that obtained by MSFOA. Comprehensively comparing the statistical data of all algorithms in the three scenarios, MSFOA still shows its superiority to other algorithms in terms of searching ability and stability.  The convergence curves of the average best cost values are displayed in Figures 5-7. In the first scenario, it can be seen that DE, FOA, and IFFO show inferior convergence. MFOA achieves a faster convergence speed and smaller cost than MSFOA in the early stages. However, in the later iterations when most algorithms come to stagnation, MSFOA still shows the ability to search for better solutions. The searching range decreases as the cost value decreases below the threshold, which can improve the local searching ability near the optimal solution, and thus leads to the best global convergence of the algorithms.
In Table 3, the best, median, and average of the cost values of the sum for three UAVs are recorded. The best values are highlighted using boldface. From this table, it can be seen that MSFOA achieves the smallest cost value in the first and third scenario and the second smallest in the second scenario. MFOA obtains a smaller average and median in the second scenario, but the distributed interval of solutions obtained by MFOA in Figure 3 is evidently worse than that obtained by MSFOA. Comprehensively comparing the statistical data of all algorithms in the three scenarios, MSFOA still shows its superiority to other algorithms in terms of searching ability and stability.

Conclusions
This paper proposed an MSFOA for cooperative path planning of multi-UAVs over threedimensional rugged terrain. In order to ensure the convergence speed and avoid local optimization, we have improved this in many ways. The multi-swarm strategy is used to increase the searching ability of the algorithm. In order to make use of any searching information effectively, we proposed the competition strategy of offspring, which ensures the efficient use of searching information and avoids falling into local optimum. In order to plan the flight path for multi-UAVs and avoid the collision between UAVs, we proposed a method to detect the collision between UAVs. Several simulations have shown the effective performance of the proposed approach. This paper proposed a method which can be used for multi-UAV path planning and can solve the high-dimensional function optimization problem. It can be widely used in the field of robotics. In addition, the parameters and sub-swarm amount usually affect the searching performance, and this may be improved in further work.

Conclusions
This paper proposed an MSFOA for cooperative path planning of multi-UAVs over threedimensional rugged terrain. In order to ensure the convergence speed and avoid local optimization, we have improved this in many ways. The multi-swarm strategy is used to increase the searching ability of the algorithm. In order to make use of any searching information effectively, we proposed the competition strategy of offspring, which ensures the efficient use of searching information and avoids falling into local optimum. In order to plan the flight path for multi-UAVs and avoid the collision between UAVs, we proposed a method to detect the collision between UAVs. Several simulations have shown the effective performance of the proposed approach. This paper proposed a method which can be used for multi-UAV path planning and can solve the high-dimensional function optimization problem. It can be widely used in the field of robotics. In addition, the parameters and sub-swarm amount usually affect the searching performance, and this may be improved in further work.

Conclusions
This paper proposed an MSFOA for cooperative path planning of multi-UAVs over three-dimensional rugged terrain. In order to ensure the convergence speed and avoid local optimization, we have improved this in many ways. The multi-swarm strategy is used to increase the searching ability of the algorithm. In order to make use of any searching information effectively, we proposed the competition strategy of offspring, which ensures the efficient use of searching information and avoids falling into local optimum. In order to plan the flight path for multi-UAVs and avoid the collision between UAVs, we proposed a method to detect the collision between UAVs. Several simulations have shown the effective performance of the proposed approach. This paper proposed a method which can be used for multi-UAV path planning and can solve the high-dimensional function optimization problem. It can be widely used in the field of robotics. In addition, the parameters and sub-swarm amount usually affect the searching performance, and this may be improved in further work.
Author Contributions: K.S. and X.Z. proposed the algorithm and wrote the paper, as well as analyzed the data; K.S. and S.X. conceived and performed the experiments. All authors have read and agreed to the published version of the manuscript.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The x coordinate of the location of the g-th old swarm.
The y coordinate of the location of the g-th old swarm.
The x coordinate of the i-th fruit fly in the g-th old swarm.
The y coordinate of the i-th fruit fly in the g-th old swarm.
The smell concentration judgement of the i-th fruit fly in the g-th old swarm.
The smell concentration of the i-th fruit fly in the g-th old swarm.

Index (g) old
The index of the fly with the best smell concentration in the g-th old swarm.
x (g) oldbest The x coordinate of the fly with the best smell concentration in the g-th old swarm.
The y coordinate of the fly with the best smell concentration in the g-th old swarm.
The x coordinate of the i-th fruit fly in the g-th new swarm.
The y coordinate of the i-th fruit fly in the g-th new swarm.
The smell concentration judgement of the i-th fruit fly in the g-th new swarm.
The smell concentration of the i-th fruit fly in the g-th new swarm.

(g) new
The index of the fly with the best smell concentration in the g-th new swarm. G The number of swarms.