Research Article

Fuzzy Weight Cluster-Based Routing Algorithm for Wireless Sensor Networks

Algorithm 1

The pseudocode implementation of the initialization.
void time_snychronization( );
int grads = 0;
if (receive(hello1)) flag = 1;
else if (receive(hello2))
    /estimate distance between sink and itself. is the
      demarcation point between free space model and
   two ray ground model. RSSI(SK) and RSSI(ID)
   represent the received signal strength at sink node
   and this node, respectively./
  double dtosk = pow(10.0, (RSSI(SK) − RSSI(ID) + (sigma))/(10 lambda))/;
  if (flag != 1) {broadcast(grads);}
/ and are the bandaries of deployment area/
while ( + grads /8 < + )
    If (receive(grads))
    
     grads++;
     // is the farthest distance to receive the sink’s signal
     dtosk = + grads /8;
     broadcast(grads);