Research Article
Heuristic Approach to Select Opportunistic Routing Forwarders (HASORF) to Enhance Throughput for Wireless Sensor Networks
Algorithm 1
HASORF (when number of forwarders is 1).
(1) Get Distance = getdistance | (2) Get Total Nodes = get_nodes | (3) Assign Candidate_list = Exclude_S_D(getnodes) | (4) Assign Forwarder_List_id_Pos = get_nodes_id_pos(Candidate_list) | (5) if No_of_Forwarders == 1 | (6) Assign Candidate = round(Distance/2) | (7) for = 0 to length(Forwarder_List_id_Pos) | (8) Match Forwarder_list_id_pos[] == candidate | (9) Assign Forwarder = Forwarder_list_id_pos[] | (10) end for | (11) end if |
|