Research Article
Efficient 3D Positioning of UAVs and User Association Based on Hybrid PSO-K-Means Clustering Algorithm in Future Wireless Networks
Algorithm 2
Users association with UAVs.
| Input: | | Output: | | Initialize: = | (1) | Step 1 | (2) | for 1 to do | (3) | Create a list of UAVs that satisfy constraint | (4) | end for | (5) | Step 2 | (6) | for 1 to do | (7) | ifthen | (8) | choose users having maximum data rate (i.e., max. ) | (9) | end | (10) | else ifthen | (11) | choose users having minimum data rate (i.e., min. ) | (12) | end | (13) | Counters Initialize: = 0, for all j | (14) | while do | (15) | if and | (16) | Update = 1, , , and | (17) | end if | (18) | end while | (19) | end for |
|