|
Algorithm 1: Genetic algorithm-based device association strategy |
-
1:
Input: Device set , UAV set , ground 5G base station set and channel state information.
-
2:
Output: Optimal device association strategy .
-
3:
Initialize: Population size , crossover probability , mutation probability , maximum number of iterations and .
-
4:
Random generate initial population .
-
5:
repeat
-
6:
for each population individual in do
-
7:
Calculate the fitness function using (12).
-
8:
end for
-
9:
Selective manipulation of individuals using elitist retention strategies and roulette wheel strategies.
-
10:
Replication of elite individuals into the next generation of populations.
-
11:
For all parental chromosomes that are selected, a set of two is used, and each set is crossed over according to the crossover probability to generate new offspring to be added to the next generation population.
-
12:
According to , genes in the chromosomes of non-elite individuals of the parent are mutated, and the mutated individuals are inserted into the next generation population.
-
13:
Combining lines 8–11 yields the new generation of populations .
-
14:
.
-
15:
until .
-
16:
Return .
|