Research Article

PACR: Position-Aware Protocol for Connectivity Restoration in Mobile Sensor Networks

Algorithm 1: PACR algorithm.

Input: AOI and
 1. Begin
 2. Check: If (node, A,)
 3. Broadcast (Node ID of A “Coordinator”)
 4. Check: the level of energy supply (maximum of 5 nodes)
 5. Make Recovery nodes having maximum energy
 6. Send message (“Recovery node”)//message will be sent to selected recovery nodes
 7. Generate (recovery plan basis on the energy level)
 8. Broadcast (recovery plan)
 9. End if
 10. If Received (Some node ID “Coordinator”) & (“Recovery node”)//messages
 11. Receive (Recovery Plan)
 12. Calculate (the area of the overlapped region).//Recovery nodes will calculate the area of the overlapped region
 13. Calculate (the required distance for movement).
 14. If ()
 15. Broadcast (“permanent relocation”)//Node will relocate
 16. End program
 17. End If
 18. Else
 19. If (Neighbor node B have alternate route)
 20. Send (data)//towards node B
 21. Else
 22. Buffer (data)
 23. End if
 24. Broadcast (“temporary relocation”)//message to neighbors
 25. Move (towards a failure node)
 26. End if
 27. If (Relocated Back to original position)
 28. If (data is buffering)
 29. then send data through original neighbors
 30. End if
 31. End if
 32. Else
 33. End Program
 34. If (Node A abrupt fail)
 35. Neighbor nodes will not receive a heartbeat message
 36. The first node will take responsibility
 37. Go to step 4
Algorithm 1: PACR algorithm.