| Algorithm 1 A greedy algorithm for decision LBTC |
|
Input: A bound on maximum movement, a set of sensors with original positions and r being the sensing radii, a set of POIs with positions , where is the position for ; |
| Output: New positions for the sensors or return “infeasible”. |
| 1: Set and , where s is the leftmost point of the uncovered part of the barrier. |
| 2: For each sensor i do |
| 3: Compute the leftmost position and the rightmost position that sensor i can monitor; |
| 4: EndFor |
| 5: While do |
| 6: If there exists , such that then |
| 7: Select the sensor with minimum among all the sensors , which is to find sensor that ; |
| 8: Set and ; |
| 9: Set and ; |
| 10: Else |
| 11: Return “infeasible”; |
| 12: End if |
| 13: If then /*All POIs have been covered. */ |
| 14: Return “feasible” together with the new positions ; |
| 15: Endif |
| 16: Endwhile |