ObjectType
Document
DocName |
Project |
Version |
FullName |
ShortDescription |
EnvTrain |
RailwayCrossing |
V9 |
Environment train |
|
|
Description
A train resides in one of three different zones: The first one is between
the outside and the approaching sensor ts1, the second one describes the
way from ts1 to the signal, and the third one is defined by the stretch
from the signal to the leaving sensor ts2, including the gate. |
|
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 track durations (i.e. values for approaching
the ts1 (ts1Dur), ts1SigDur and sigTS2Dur; set the
duration of the breaking phase (breakDur), the minimum distance
duration (minDistDur)). Further, set the current signal state (sigState).
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, trainStop
or sigStop, notify the sequencing train with its current position,
relative to the signal, 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 current position, relative to the signal. |
f |
|
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. Compute the distance to this point. After reaching this position,
switch curState to appStop (if the train has not yet reached
ts1) or otherwise to trainStop. |
f |
|
EnvTrainTask10 |
preceding trains starts |
The receiving of newTrainStarts signals the new movement of
the preceding train. After breakDur, start moving and change curState
to appGo or sigGo. |
f |
|
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 |
If curMode changes to sigGo, start counting down ts1SigDur-breakDur. |
f |
|
EnvTrainTask12 |
Reaching the signal |
If ts1SigDur-breakDur becomes zero, switch curMode to
gateGo or sigBreak, depending on sigState. |
f |
|
EnvTrainTask13 |
Receiving current signal state |
If curMode is not sigBreak or sigStop, receive newSignalState
and set sigState to the given value. |
f |
|
EnvTrainTask6 |
Passing the signal |
If curMode is sigStop or sigBreak, wait for newSignalState
with a go. After breakDur, switch to gateGo. |
f |
|
EnvTrainTask5 |
Passing the gate |
If curMode changes to gateGo, compute the distance to ts2 by
adding the current distance to the signal (the remaining part of ts1SigDur)
to sigTs2Dur and begin counting down this duration. If it
becomes zero, send trainPassed to the track and terminate. |
f |
|
EnvTrainTask4 |
computing the current position, relative to the signal |
If curMode is appGo or appStop, the current position is computed
by ts1SigDur + the remaining part of ts1Dur. If curMode
is sigGo, sigStop, trainStop, the postion is the remaining part of ts1SigDur. |
|
EnvTrainTask7, EnvTrainTask8, EnvTrainTask9 |
|
Attributes
ModelName |
FullName |
Type |
Value |
Tasks |
Usage |
Description |
ts1Dur |
approach duration |
Duration |
0 |
EnvTrainTask1, EnvTrainTask2 |
w |
duration to reach the ts1 |
|
|
|
|
EnvTrainTask3, EnvTrainTask5, EnvTrainTask4 |
r |
|
ts1SigDur |
signal duration |
Duration |
0 |
EnvTrainTask1, EnvTrainTask11, EnvTrainTask4 |
w |
duration from ts1 to signal |
|
|
|
|
EnvTrainTask12 |
r |
|
sigTs2Dur |
passing duration |
Duration |
0 |
EnvTrainTask1, EnvTrainTask5 |
w |
duration from the signal to ts2 |
breakDur |
breaking duration |
Duration |
0 |
EnvTrainTask1 |
w |
duration that is needed to break |
|
|
|
|
EnvTrainTask9, EnvTrainTask10, EnvTrainTask11, EnvTrainTask12, EnvTrainTask6 |
r |
|
minDistDur |
minimum distance duration |
Duration |
0 |
EnvTrainTask1 |
w |
minimum time difference between two trains |
|
|
|
|
EnvTrainTask9 |
r |
|
sigState |
signal state |
SignalStateType := Enum (go, halt) |
halt |
EnvTrainTask1, EnvTrainTask13, EnvTrainTask6 |
w |
current state of the signal |
|
|
|
|
EnvTrainTask12 |
r |
|
curMode |
current mode |
Enum (init, appGo, appStop, sigStop, trainStop, sigGo, gateGo, sigBreak) |
init |
EnvTrainTask1, EnvTrainTask9, EnvTrainTask10, EnvTrainTask3, EnvTrainTask12 |
w |
|
|
|
|
|
EnvTrainTask7, EnvTrainTask8, EnvTrainTask2, EnvTrainTask11, EnvTrainTask13,
EnvTrainTask6, EnvTrainTask5, EnvTrainTask4 |
r |
|
seqTrain |
sequenced train |
CharString |
'' |
EnvTrainTask7 |
w |
names the sequencing train |
|
|
|
|
EnvTrainTask8 |
r |
|
|
Signals
ModelName |
FullName |
Parameters |
Tasks |
Usage |
Description |
SignalPaths |
newTrainStart |
|
CharString |
EnvTrainTask8 |
p |
Parameters:
Receiver |
|
|
|
|
EnvTrainTask10 |
c |
|
|
newTrainStop |
|
CharString, Duration |
EnvTrainTask7 |
p |
Parameters:
Receiver,
current position, relative to the signal |
|
|
|
|
EnvTrainTask9 |
c |
|
|
trainArrived |
|
CharString |
EnvTrainTask3 |
p |
Parameters:
Sender |
|
initTrain |
|
CharString, TrackDurationType, SignalStateType |
EnvTrainTask1 |
c |
Parameters:
Instancename, (. ts1Dur, ts1SigDur, sigTs2Dur,
breakDur,
minDistDur .), sigState |
|
newSignalState |
|
CharString, SignalStateType |
EnvTrainTask13, EnvTrainTask6 |
c |
Parameters:
Instancename, signalState |
|
trainPassed |
|
CharString |
EnvTrainTask5 |
p |
Parameters:
Sender |
|
newSeqTrain |
|
CharString, CharString |
EnvTrainTask7 |
c |
Parameters:
instanceName, seqTrainName |
|
|