Research Article
Bioinspired Mobility-Aware Clustering Optimization in Flying Ad Hoc Sensor Network for Internet of Things: BIMAC-FASNET
Algorithm 2
Psuedocode of bioinspired mobility-based clustering (BIMAC).
| Procedure BIMAC_CH-UAVs_selection() | | Input: , | | Output: CH-UAVs | | call procedure nectar_calculation | | | | //random CH-UAVs selection | | CH-UAVs [j] = random | | end for | | while (max! = true) do | | | | //Compute the fitness of solution | | if (u in CH-UAVs) then | | | | end if | | end for | | ifthen | | // is the previous fitness value | | replace | | end if | | if (optimal_CH-UAVs ! = true) then | | | | //visit all employee bees | | | | //select new UAVs from neighbors | | end while | | | | //calculate the probability of new UAVs | | while (onlooker bees ! = null) do | | select a set of CH-UAVs subject to the probability | | end while | | Else | | return CH-UAVs | | end while | | end procedure |
|