|
|
Algorithm 2 Utility Greedy algorithm |
|
| Input: |
|
G = (V, E): The weighted road graph; |
|
T: The delay bound; |
|
B: The budget constraint; |
| Output: |
|
c: The placement set of installing c-RSUs; |
|
w: The placement set of installing w-RSUs; |
| 1: |
= ∅,
= ∅; |
| 2: |
For all i, j ∈ V, initial Dij according to Equation (2); |
| 3: |
while the placement cost is not exceed the budget Bdo
|
| 4: |
for all unselected vi ∈ Vdo
|
| 5: |
Calc c-RSUs delay-bounded coverage utility uc(i) according to Equation (11); |
| 6: |
end for
|
| 7: |
for all unselected vi ∈ U and vi is with the transmission range of an existing RSU do
|
| 8: |
Calc w-RSUs delay-bounded coverage utility uw(i) according to Equation (11); |
| 9: |
end for
|
| 10: |
v* = {vi ∣ max{uc(l), uw(k)}, ∀vi ∈ V }; |
| 11: |
if install a c-RSU then
|
| 12: |
c =
c ∪ {v*}; |
| 13: |
end if
|
| 14: |
if install a w-RSU then
|
| 15: |
w =
w ∪ {v*}; |
| 16: |
end if
|
| 17: |
V = V \ {v*}; |
| 18: |
=
∪
v*; |
| 19: |
end while |
| 20: |
return
c,
w
|
|