Skip to main content
. 2020 Jul 13;20(14):3887. doi: 10.3390/s20143887
Algorithm 1. Forwarder_Set_Selection (S = Source, D = Destination)
//When any source node S want to send a packet towards D, it will execute this algorithm//
Notations
  • NBL: Neighbor list

  • REP_Count: Count of replies received by the source node

  • SID: Identity of the source node

  • RES: Energy residual of the node

  • PRR: Packet Reception Ratio

  • FL(S): Forwarder List of source node S

Input
  Source Node S, SID, RES, and Location corresponding to the node S
Process
  START
  1.   Let NBL (S) be the neighbor list of node S

  2.   Let REP_Count (node): = 0

  3.   For count: = 1 to 5 repeat

      Broadcast “Hello_Packet” as {SID, Coordinates (x, y), RES} from S;

  4.   IF (reply == True and node !Ɛ NBL(S))

      Add the replying node to the neighbor list NBL(S) with following values updated

        {Node_ID, Location, Energy};

      Else IF (reply == True and node Ɛ NBL(S))

      REP_Count (node) = REP_Count (node) + 1;

      Else

      count = count + 1;

      endIF

      count = count + 1;

      endFor

  5.   For each node in NBL (S) repeat

      Calculate PRR (node);

      IF PRR (node) >= 0.2

      Add node to forwarder set (FL(S));

      endIF

      endFor

  6.   Forwarder Set FL(S) is formed;

  END
Output: Creation of forwarder list consisting of neighbor nodes of the source node S.