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