|
Algorithm 1. |
| input: |
| T: The sample period; |
| sd : The destination station |
| begin |
| Set the weight parameters
|
| Construct all values of di,j and qi,j according to the distances among stations; |
| Tccurrent time; TlTc; |
| while conditions are satisfied do
|
| if (Tc- TlT) then
|
| Construct all values of vi,j and ri,j which are obtained from cloud servers; |
| Construct the weight W using Equations (3) and (4); |
| Get the next station snext; |
| Obtain and report the shortest path from snext to sd using Dijkstra’s algorithm; |
| Tccurrent time; TlTc
|
| else
|
| Tccurrent time; |
| endif
|
| endwhile
|
| end. |