Algorithm 3 Equal Price-Basedd Search Method With Coordination SNs Monitor Patrolling Algorithm |
-
1:
Input: New ID set , , 2, ⋯, and sequence it in an increasing way.
-
2:
Initialization, set the min ID in the waiting expand node list , set the have expanded node list .
-
3:
Take from and expand to , , ⋯, , meanwhile record the corresponding distance , , ⋯, . At last, put , , ⋯, into and into , respectively.
-
4:
Take continue to expand, i.e., is the minimum node, expand it to , , then update and .
-
5:
Continue Step 4 until a new expanded lattice with all of the ID sequence appeared.
-
6:
Set , . According to the new ID sequence, assign each ANs to monitor one lattice.
-
7:
If there is no ANs monitoring at ID , Set ; otherwise
-
8:
Call algorithm 2.
-
9:
, If an AN detects an intruder at time slot , then it claims itself not busy. Count the total number of not busy ANs , if , continue.
-
10:
The ANs are newly selected to monitor lattices with ID .
-
11:
Continue Step 6 until all ANs run out of energy.
|