Algorithm 4 Genetic-Algorithm-Based Allocation. |
-
1:
Find clusters and centroid
-
2:
Init-UAV-placement() ← centroid
-
3:
LB ← []
-
4:
UB ← []
-
5:
Genetic algorithm’s parameters ← default
-
6:
Find UAVs’ placement using the genetic algorithm with the objective to maximize the total throughput, which is the output of the following function.
-
7:

-
8:
Function Throughput-calculation
-
9:
Throughput = zeros()
-
10:
for
do
-
11:
Throughput(m,:) = NLoS throughput Formula (8), using positions given by one generation of the genetic algorithm.
-
12:
end for
-
13:
Throughput( + 1, :) = LoS throughput Formula (5), using positions given by one generation of the genetic algorithm
-
14:
A = zeros(+ 1, ), Throughput-temp = Throughput
-
15:
while sum(A) do
-
16:
Find max(Throughput-temp) & its index-x and index-y
-
17:
A(index-x,index-y) = 1
-
18:
Delete Throughput-temp(:,index-y)
-
19:
if index-x ≤ sum(A(index-x,:)) = then
-
20:
Delete Throughput-temp(index-x, :)
-
21:
end if
-
22:
end while
-
23:
Total-throughput = sum(Throughput ⊙ A)
-
24:
return Total-throughput
-
25:
Endfunction
|