Research Article
Dynamic Automated Search of Shunting Routes within Mesoscopic Rail-Traffic Simulators
Algorithm 3
Modification of Algorithm
1 for
SV = {
, } and
FV = {
}.
| (1) | function Start_Finish_Test(↓SV, ↓FV, ↓L, ↓↑okay) | | (2) | if (SV = ∅ or FV = ∅ or FV ⊂ SV) then | | (3) | okay ← false | | (4) | exit | | (5) | end | | (6) | for each ∈ SVdo | | (7) | for each ∈ FVdo | | (8) | if (ω () < L or κ () < L) then | | (9) | okay ← false | | (10) | exit | | (11) | end | | (12) | end | | (13) | end | | (14) | end | | (15) | function Start_Finish_Init(↓SV, ↓FV) | | (16) | for each ∈ SVdo | | (17) | Get_Indexes(↓, ↑i, ↑x) | | (18) | ← 0 | | (19) | end | | (20) | Get_Indexes(↓, ↑j, ↑y) | | (21) | b ← (3 − j) | | (22) | XV ← {} // a forbidden vertex represents a pair vertex to the finish vertex | | (23) | end |
|