Skip to main content
. 2019 May 26;19(10):2403. doi: 10.3390/s19102403
Algorithm 1 Compute the optimal deployment for Problem 1
1. Input:T¯={{T11,T12,...,T1M1},...,{Tq1,Tq2,...,TqMq}},R¯={R1,R2,...,RN},L, ω(precision threshold)
2. Output: the optimal placement order S*, the optimal value λ*,l=0,r=INF(a larger number)
3. Repeat
4.  mid←l+r2 
5.   Call Algorithm 2( T¯, R¯ ) to get len and S //order S can denote the barrier P
6.   If len>L+ω
7.   l←mid
8.   Else 
9.   r←mid
10. Until|l−r|≤ω
11. Return S*←S,λ*←mid