Research Article
Optimization-Based Artificial Bee Colony Algorithm for Data Collection in Large-Scale Mobile Wireless Sensor Networks
Algorithm 1
Cluster selection algorithm.
(1) Initialize the routing table | (2) While TRUE do | (3) Listen for packets; | (4) If Receive Broad_Msg | (5) Be selected as a cluster; | (6) Send Broad_Msg1, SNA, 0 //SNA is the network address of current node | (7) Else If Receive Broad_Msg1, srcNetwAddr, hop | (8) Lookup routing table with destination srcNetwAddr; | (9) If no corresponding route item | (10) Add new item to the routing table Destination = srcNetwAddr, Metric = hop + 1 | (11) Broadcast Broad_Msg1, srcNetwAddr, hop + 1 | (12) Else If Metric > hop + 1 | (13) Update route item with new metric Metric = hop + 1 | (14) Broadcast Broad_Msg1, srcNetwAddr, hop = 1 | (15) Else | (16) Ignore current broadcast message | (17) End If | (18) End If |
|