|
Algorithm 2 Spatial and Temporal Matching Algorithm |
|
Input:
|
HCTPlist Pi, Pi+k; CandidateList , … ; Trajetory Pi+1 → Pi+2 … → Pi+k
|
|
Output:
|
OSM-WayID-List; |
| 1: |
Initialize OSM-WayID-List as empty list; |
| 2: |
for each and
do
|
| 3: |
F() = 1; |
| 4: |
F() = 1; |
| 5: |
end for
|
| 6: |
for t = i + 1 to i + k − 1 do
|
| 7: |
max = −∞; |
| 8: |
for
s = 1 to candidateList(Pt).count do
|
| 9: |
F() = F() + F( → ); |
| 10: |
Alt = F(); |
| 11: |
if (Alt > max) then
|
| 12: |
max = Alt; |
| 13: |
C = max. ; |
| 14: |
end if
|
| 15: |
end for
|
| 16: |
OSM-WayID-List.add(C.id); |
| 17: |
end for
|