Research Article
Target Detection Coverage Algorithm Based on 3D-Voronoi Partition for Three-Dimensional Wireless Sensor Networks
Algorithm 1
3D-Voronoi partition coverage algorithm (3D-VPCA).
| | The pseudo code of the 3D-VPCA algorithm is given as follow: | | (1) | : The area of the sensor nodes | | (2) | : The area of the target nodes | | (3) | Input: The total number of sensor nodes and the perceived radius of the nodes | | (4) | Output: Location coordinates and network coverage | | (5) | Initialization: Divide the three-dimensional Voronoi ‘V-body’ unit | | (6) | | | (7) | maxiter = 100 Set the maximum number of iterations | | (8) | max_step = 0∼10 Set the maximum moving step size of the node | | (9) | A = x ∗ rand(n,1) xmax | | (10) | B = y ∗ rand(n,1) ymax | | (11) | C = z ∗ rand(n,1) zmax | | (12) | (X, Y, Z) = (A,B,C) Randomly generated nodes in the area | | (13) | Dividing ‘V-bodies’ , | | (14) | while do | | (15) | if then | | (16) | save the current nodes and ‘V-body’ unit | | (17) | else | | (18) | select the free nodes as coverage | | (19) | if && then | | (20) | calculate the total virtual force | | (21) | move | | (22) | else | | (23) | move boundary nodes | | (24) | end if | | (25) | end if | | (26) | end if |
|