| Algorithm 2: The vice cluster-head election |
|
Input: all member nodes and their primary cluster-heads within K clusters Output: all vice cluster-heads in the set C2 ----------------------------------------------------------------------------------------------------------------- (1) For each cluster (2) For member nodes in the same cluster except the primary cluster-head (3) Calculate the residual energy objective function and the distance function of each node, respectively (4) If the sum of residual energy of all nodes is greater than half of the initial energy of the network (0.5 * n) (5) Calculate the node adaptation function value according to = 1/2 + ½ * (6) Else (7) Calculate the node adaptation function value according to = + (1 − )/2 * (8) Find the node with the largest fitness function value and save this node in formation in the set C2 (9) End |