Research Article

BioWSN: A Bio-Inspired Method for Optimization of Routing in Wireless Sensor Networks

Algorithm 2

Routing.
: set of cluster heads.
m: number of grey wolves.
: Random generation of grey wolves.
Setting initial values of , , and .
: total number of iterations.
Fitness evaluation of each grey wolf.
: the best solution.
: second best solution.
: third best solution.
whiledo
for each in do
  Update the position of
end for
 Update , , and
 Evaluate the fitness of all grey wolves using equations (20)–(22)
 Map a new position for and move it there if it’s improved
 Update , , and
end while
return as the solution for routing.