Input: , origin city , destination city , departure time , total number of passengers . | Output: The set of the path , the generalized cost of path and passenger volume of path . | Step 1. Set (() = 0, , = “”), (() = , () = , = “D”). | for (++) | if (() = && () = “de” && > ) | ← Maxnum, ; | for (++) | if ( && () = “ar”) | ← Maxnum, ; | set ; | Step 2. From origin node , use Dijkstra algorithm to search the optimal path according to the generalized cost of the arc. | And calculate the generalized cost of this path. | if Maxnum, delete , end; | otherwise : is deposited to the set . | Step 3. Sort the arcs by residual train capacity in path , set the minimal arc capacity is capacity | of the path , namely ; set passenger volume of path : ; | set ; if the arc in the path | , set ← Maxnum. | Step 4. Reconstruction of the passenger travel network: | set ← Maxnum, ← Maxnum; | if , set , end; | otherwise , go to Step 2. |
|