Research Article

Dynamic Automated Search of Shunting Routes within Mesoscopic Rail-Traffic Simulators

Algorithm 4

Modification of Algorithm 1 for SV = {} and FV = {, }.
(1)function Start_Finish_Test(↓SV, ↓FV, ↓L, ↓↑okay)
(2)if (SV = ∅ or FV = ∅ or SV ⊂ FV) then
(3)  okay ← false
(4)  exit
(5)end
(6)for each ∈ SVdo
(7)  if (ω () < L or (κ () < L and κ () < L)) then
(8)   okay ← false
(9)   exit
(10)  end
(11)end
(12)end
(13)function Start_Finish_Init(↓SV, ↓FV)
(14)for each ∈ FVdo
(15)  if κ () < L then
(16)   FV = FV − {} // exclusions of finish vertices with insufficient vacant capacities
(17)  end
(18)end
(19)Get_Indexes(, ↑i, ↑x)
(20) ← 0
(21)a ← (3 − i)
(22)XV ← {} // a forbidden vertex represents a pair vertex to the start vertex
(23)end