Research Article
A Cluster-Based Fuzzy Fusion Algorithm for Event Detection in Heterogeneous Wireless Sensor Networks
Algorithm 2
Pseudocode of
-means based clustering algorithm (
BCA).
Notations: | : communication range of the CH | : a selected number of mobile nodes to determine number of clusters | Static_nodes: number of static nodes | Input: Coordinates of static nodes Vector_staticNodes | Determine value of : | (1) For | (2) For all static nodes If | (3) | (4) Static_Number(++); | (5) End for | (6) End for | (7) | (8) | (9) Divide the sensing field into squares, and order the centres of squares to be initial positions of centroids. | Determine converged centroids using -means: | (1) Let initial initial positions of centroids to be | (2) Until there are no changes in any mean | (3) Use the estimated means to classify the samples into clusters | (4) For from 1 to | (5) Replace with the mean of all of the samples for cluster | (6) End For | (7) End Until | Motion period for CHs: | (1) Select mobile nodes and dispatch them to locations of using greedy method or Hungarian method. |
|