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 duration of the breaking phase (breakDur) and the minimum distance duration (minDistDur) . Switch to appGo. f
EnvTrainTask7 getting a new sequencing train If a train gets a new sequencing train (newSeqTrain), store its name (seqTrain). If curMode is appStop or sigStop, notify the the sequencing train with its actual Position (curDurToSig) by sending newTrainStop. f
EnvTrainTask8 notifying the sequencing trains If curMode changes to appGo, sigGo, or gateGo, send newTrainStart to seqTrain. If curMode changes to appStop or sigStop, send newTrainStop with the actual Position (curDurToSig).
EnvTrainTask9 preceding train stops The receiving of newTrainStops signals the stopping of the preceding train. The parameter is the current position of this train. This position plus breakDur plus minDistDur is the position, the train has to stop. (curState will becomes appStop or sigStop)
EnvTrainTask10 preceding trains starts The receiving of newTrainStarts signals the new movement of the preceding train. After breakDur plus minDistDur start moving and change curState to appGo or sigGo. 
EnvTrainTask2 Approaching the ts1 If curMode changes to appGo, start counting down ts1Dur. If curMode changes to appStop, stop counting down ts1Dur. f
EnvTrainTask3 Reaching the ts1 If ts1Dur becomes zero, switch curMode to sigGo. Notify the track of the reaching via sending trainArrived f
EnvTrainTask11 Approaching the signal Switch to sigGo and start counting down ts1SigDur-breakDur
EnvTrainTask12 Reaching the signal If ts1SigDur-breakDur becomes zero, switch curMode to gateGo or sigStop, depending on sigState. 
EnvTrainTask13 Receiving current signal state Independent of curMode, receive newSigState and set sigState to the given value. 
EnvTrainTask6 Passing the signal If curMode is sigStop, wait for newSignalState with a go. After breakDur, switch to gateGo.
EnvTrainTask5 Passing the gate If curMode changes to gateGo, 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
newTrainStart CharString EnvTrainTask8 p Receiver
newTrainStop CharString, Duration Receiver,
duartion until reaching the signal
trainArrived
initTrain CharString, Duration, Duration, Duration, Duration, SignalStateType EnvTrainTask1 c Parameters: instancename, ts1Dur, ts1Sig1Dur, Sig1ts2Dur, 
breakDur,
minDistDur, sigState
newSignalState CharString, SignalStateType EnvTrainTask1, EnvTrainTask4 c
trainPassed CharString EnvTrainTask5 p (EnvTrainTask5:*:EnvTrain)=$1
> $1