Читать книгу Internet of Things in Business Transformation - Группа авторов - Страница 36

3.4.1 Dragonfly Algorithm

Оглавление

The main objective of the dragonfly is the survival. So they need to be attracted towards the food and distracted form the enemies [18]. Five main factors for position updating are shown in the Figure 3.4. Alignment formula is shown in Equation (3.1) [18].

[3.1]

Table 3.2: Proposed Technique. Here Vj is the velocity of the j-th neighbor. Cohesion calculation formula [18].

Table 3.2 Dragonfly Algorithm.

1) Initialization of WBAN’s randomly in the network 2) Random direction of WBAN’s is defined 3) Speed and velocity of each WBAN is initialized 4) Mesh topology creation among nodes 5) For all Dragonflies same radius is initialized 6) Calculation of distance among all WBANs, normalizing and associating the distance values with corresponding nodes 7) For (iteration = 1) 1 to 10 8) Available nodes for cluster formation = All Node a) WHILE (Nodes Available for clustering! = empty) b) End while 9) FOR Drag-fly(i) = form 1 to Total population a) Source (Food/enemy) = empty, Food Source Cost = infinity, and Enemy Source cost = -infinity b) Objective Values calculation, of Dragonflies c) Update the radius d) Update sources (food and enemy) e) Update weights 10) END FOR 11) FOR Drag-fly(i) = From 1 to Total population a) FOR Drag-fly(i) = 1 to Total population i) Update neighboring radius b) ENDFOR c) Calculate Separation, Alignment, Cohesion, Enemy and Food weights 12) IF neighbor! =0 a) Velocity Update b) Position Update 13) Else a) Levy flight 14) END IF 15) END FOR 16) Best cost == Food fitness 17) END FOR 18) IF not clustered nodes>20% a) Goto line #1 19) Else a) Output 20) End IF

[3.2]

Attrition for food calculated as [18]:

[3.3]

Here X+ is position of food source. And X is current position of an individual.

Distraction away from an enemy [18]:

[3.4]

X—is position of an enemy.

Internet of Things in Business Transformation

Подняться наверх