|
Algorithm 2 2D UFBS placement process through the k-medoids algorithm |
-
1:
input: The set of coordinates of all GMTs , and the number of UFBSs Y
-
2:
-
3:
t = 0
-
4:
Initialize Y medoid points , randomly
-
5:
= .
-
6:
for to N do
-
7:
-
8:
-
9:
end for
-
10:
-
11:
repeat
-
12:
for to do
-
13:
for to N do
-
14:
if then
-
15:
Swap the role of with
-
16:
Repeat steps 6 to 9
-
17:
-
18:
if then
-
19:
t = t +1
-
20:
=
-
21:
-
22:
end if
-
23:
end if
-
24:
end for
-
25:
end for
-
26:
until
-
27:
output: A set of centroid points that the UFBSs will be deployed .
|