AlgorithmFind-Max-Sen-Covrate(num_deployable, limit_candidate, min_CCL_diff) |
/* |
Initialization */ |
1. |
LB_CCL = (Rc/dmax)2;/* dmax is the maximum distance between sensor nodes */ |
2. |
UB_CCL = (Rc/dmin)2;/* dmin is the minimum distance between sensor nodes */ |
/* |
Test with lower bound */ |
3. |
Deploy-Random(num_deployable, limit_candidate, LB_CCL, LB_sen_covrate, LB_num_deployed); |
4. |
if (LB_sen_covrate = 1 ‖ LB_num_deployed = num_deployable) returnLB_sen_covrate; |
/* |
Test with upper bound */ |
5. |
Deploy-Random(num_deployable, limit_candidate, UB_CCL, UB_sen_covrate, UB_num_deployed); |
6. |
if (UB_sen_covrate < 1 && UB_num_deployed < num_deployable) returnUB_sen_covrate; |
/* |
Test with medium */ |
7. |
if ((UB_CCL − LB_CCL) < min_CCL_diff) returnMax(UB_sen_covrate, LB_sen_covrate); |
8. |
MB_CCL = (LB_CCL+UB_CCL)/2; |
9. |
Deploy-Random(num_deployable, limit_candidate, MB_CCL, MB_sen_covrate, MB_num_deployed); |
10. |
if (MB_sen_covrate < 1 && MB_num_deployed < num_deployable) |
|
{ LB_CCL = MB_CCL, LB_sen_covrate = MB_sen_covrate, |
|
LB_num_deployed = MB_num_deployed } |
11. |
else { UB_CCL = MB_CCL, UB_sen_covrate = MB_sen_covrate, |
|
UB_num_deployed = MB_num_deployed } |
12. |
Go to line 7; |
End_of_Find-Max-Sen-Covrate |