Research Article
Optimal Location through Distributed Algorithm to Avoid Energy Hole in Mobile Sink WSNs
//To find the optimal sink anchor | (1) Maxenergy = 0; | (2) min_global_energy = ∞; //current value that minimize the maximum energy consumption | (3) For | (5) For | //sink can pause at any point of the network | (6) Maxenergy = 0; | //set the initial maximum energy consumption as 0 | (7) for //number of nodes | (8) for each do | (9) computer energy consumption use Corollary 2 | //compute energy cost of node when sink is at | (10) | // represent the actual energy consumption of node | (11) If Maxenergy < //when the energy | // consumption of node is larger than current maximum | (12) Maxenergy = //compare energy of | //sink is the energy consumption of node | (13) Endif | (14) End for | (15) End for; | (16) If min_global_energy > Maxenergy // Maxenergy | //represent the maximum energy consumption of sink() | (17) min_global_energy = Maxenergy | //minimize the comprehensive energy | (18) ; ; | //next sink anchor to minimize the comprehensive energy | (19) Endif | (20) End for | (21) End for | (22) Return(); | //return the optimal next sink anchor |
|