DocName Project Version FullName ShortDescription
EnvTrain RailwayCrossing V5 Environment train
ModelName Number Type Version
ModelName Description Strategy StrategyType RealizedRequirement
EnvTrainTask1 Creation of a train After creation a train, it switchs to the mode init (curMode). Receive initTrain and set the duration for approaching the signal (appDur) to the given value. Set the minimum delay time (minDelayDur) and the passing duration passDur. Depending on the given signalState, switch to appGo or appStop. f
EnvTrainTask2 Approaching the signal If curMode changes to appGo, restart counting down the appDur.  If curMode changes to appStop, stop counting down the appDur. f
EnvTrainTask3 Reaching the signal If appDur becomes zero, switch curMode to sigStop or sigPass, depending an signalState. Notify the track of the reaching via sending sigReached f
EnvTrainTask4 Receiving new signal state If curMode is appGo and newSignalState (stop) is received, count down the appTime to the next availabale, predefined point (computed using minDelayDur) and after raching this point, switch to appStop. 
In newSignalState (go) is received, switch to appGo or stop counting down appDur to the next predefined value.
EnvTrainTask5 Passing the gate While passing the gate, count down passDur. If it becomes zero, send trainPassed to the track and terminate. f
ModelName FullName Type Value Tasks Usage Description
minDelayDur Duration 0 EnvTrainTask1, EnvTrainTask4 r/w minimum time difference between two trains
appDur approach duration Duration 0 EnvTrainTask1, EnvTrainTask2, EnvTrainTask3 w duration to approach to signal
curMode current mode Enum (init, appGo, appStop, sigPass, sigStop) idle EnvTrainTask1, EnvTrainTask2, EnvTrainTask3, EnvTrainTask4 w
passDur passing duration Duration 0 EnvTrainTask1, EnvTrainTask3, EnvTrainTask5 duration to pass from the signal to the leaving sensor
ModelName FullName Parameters Tasks Usage Description SignalPaths
sigReached CharString EnvTrainTask3 p (EnvTrainTask3:*:EnvTrain)=$1
> $1
initTrain CharString, Duration, Duration, Duration, SignalStateType EnvTrainTask1 c Parameters: Instance name, appDur, 
passDur, minDelayDur, sigState
newSignalState CharString, SignalStateType EnvTrainTask1, EnvTrainTask4 c
trainPassed CharString EnvTrainTask5 p (EnvTrainTask5:*:EnvTrain)=$1
> $1