ObjectType
Document
DocName Project Version FullName ShortDescription
EnvTrain RailwayCrossing V5 Environment train
 
Description
 
Components
ModelName Number Type Version
 
Tasks
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 ts1 (ts1Dur), ts1Sig1Dur and sigTS2Dur. Set the minimum delay time (minDelayDur) . Depending on the given signalState, switch to appGo or appStop. f
EnvTrainTask2 Approaching the signal If curMode changes to appGo, restart counting down the ts1Dur.  If curMode changes to appStop, stop counting down the ts1Dur. f
EnvTrainTask3 Reaching the signal If ts1Dur becomes zero, switch curMode to to sigStop or sigPass, depending an signalState. Notify the track of the reaching via sending trainArrived f
EnvTrainTask6 Passing the signal If curMode is sigPass, count down ts1SigDur. If newSignalState (halt) is received, count down the ts1SigDur to the next availabale, predefined point (computed using minDelayDur) and after raching this point, switch to sigStop. If newSignalState (go) is received, switch to sigPass or stop counting down ts1SigDur to the next predefined value. If ts1SigDur becomes zero, switch curMode to gatePass
EnvTrainTask4 Receiving new signal state If curMode is appGo and newSignalState (halt) is received, count down the ts1Dur to the next availabale, predefined point (computed using minDelayDur) and after raching this point, switch to appStop. If newSignalState (go) is received, switch to appGo or stop counting down ts1Dur to the next predefined value. f
EnvTrainTask5 Passing the gate If curMode is gatePass, count down sigTs2Dur. If it becomes zero, send trainPassed to the track and terminate. f
 
Attributes
ModelName FullName Type Value Tasks Usage Description
ts1Dur 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
sigTs2Dur passing duration Duration 0 EnvTrainTask1, EnvTrainTask3, EnvTrainTask5 duration to pass from the signal to the leaving sensor
ts1SigDur
 
Signals
ModelName FullName Parameters Tasks Usage Description SignalPaths
sigReached CharString EnvTrainTask3 p (EnvTrainTask3:*:EnvTrain)=$1
> $1
trainArrived
initTrain CharString, Duration, Duration, Duration, Duration, SignalStateType EnvTrainTask1 c Parameters: instancename, ts1Dur, ts1Sig1Dur, Sig1ts2Dur, minDelayDur, sigState
newSignalState CharString, SignalStateType EnvTrainTask1, EnvTrainTask4 c
trainPassed CharString EnvTrainTask5 p (EnvTrainTask5:*:EnvTrain)=$1
> $1