Research Article

Quality of Service-Based Node Relocation Technique for Mobile Sensor Networks

Algorithm 1

Proposed algorithm’s pseudocode.
Input: distances of neighbouring nodes
(1)IF (node, A, detects the neighbour node, F, had been failed)
(2)Routing table updated (information about failed node will be deleted)
(3)IF F = leaf node
(4)Do not move
(5)Else
(6)On-board energy level check
(7)IF (energy is sufficient)
(8)Calculate the area of the overlapped coverage
(9)Broadcast “Temporary Relocation” MSG to neighbours
(10)move to (F)
(11)END IF
(12)ELSE IF (the node, A, receives “Temporary Relocation”)
(13)Search (new route)
(14)IF new route available
(15)Transmit data to a new path
(16)IF (new route undiscovered)
(17)Buffer the Data
(18)END IF
(19)ELSE IF node A receives (“Back to original position”)
(20)IF (data is buffered)
(21)Send data using “reallocated back node”
(22)END IF
(23)END IF
Temporarily Relocation to (F)
(24)Step towards F
(25)IF (reached F)
(26)Broadcast “Will manage recovery” message
(27)Coordinator = 1
(28)END IF
(29)IF (received “Will manage recovery” from node j)
(30)IF (ID ≥ j) Coordinator = 0
(31)Stop moving
(32)Transmit relevant data to the coordinator
(33)Receive recovery schedule
(34)IF (first node not on schedule)
(35)Relocate back to orign ()
(36)END IF
(37)IF Coordinator = 1
(38)From all concerned nodes collect significant information
(39)Form ranked list and recovery schedule
(40)Broadcast recovery schedule
(41)IF (not the first node on schedule)
(42)Relocate back to self ()
(43)END IF
(44)ELSE IF
(45)Relocate to (F)
(46)END IF
Another neighbour node failed during the recovery process
(47)IF (node, A, detects the neighbour node, J, had been failed)
(48)Routing table updated
(49)On-board energy level check
(50)IF (energy is sufficient)
(51)Compare (distance F with distance J)//distance F = distance b/w A and F, distance J = distance b/w A and J
(52)IF distance F < distance J
(53)Do not move to J
(54)IF distance F > distance J
(55)Broadcast “Going to save J” MSG to recovery nodes
(56)move to (J)
(57)Go to (step 5)//replace F with J
(58)IF receive (Going to save J)
(59)Update list
(60)END IF