|
Algorithm 1 The Bandwidth-aware Data Collection (BDC) Algorithm |
Input: Historical data set , Output: The collected traffic state matrix and indicator matrix , Step 1: determine the selection priority of the road segments (Offline Phase)
-
1:
Compute based on Equation (2),
-
2:
Set priority matrix
-
3:
for each
do
-
4:
for
j from 1 to T
do
-
5:
-
6:
-
7:
Decompose as and based on Equation (11)
-
8:
-
9:
Compute based on Equation (12)
-
10:
end for
-
11:
end for
-
12:
Set index matrix
-
13:
forj from 1 to T
do
-
14:
the jth column row vector of
-
15:
Sort elements of in descending order
-
16:
the index vector of sorted elements in
-
17:
-
18:
end for
Step 2: allocate wireless bandwidth and collect vehicle data (Online Phase)
-
19:
forj from 1 to T
do
-
20:
-
21:
for each
do
-
22:
Set
-
23:
-
24:
if
then
-
25:
randomly select L elements from
-
26:
Compute by Equation (2)
-
27:
else
-
28:
break
-
29:
end if
-
30:
-
31:
end for
-
32:
end for
-
33:
Output and
|