Dev:StateSpace: Difference between revisions
[checked revision] | [checked revision] |
No edit summary |
(First step of cleanup) |
||
Line 1: | Line 1: | ||
{{head|State Space}} | {{head|State Space}} | ||
The railway network owns assets that can be associated with a state. This is expressed as a set of tuples, for instance, (signal<sub>i</sub> / aspect<sub>k</sub>). Other interlocking entities can use these tuples to describe a required state of a related entity. The state space is used in two ways, as described below. | |||
=== AssetAndState === | === AssetAndState === | ||
When just a related asset and its state is needed, types are based on the abstract class <tt>AssetAndState</tt> directly, and extend it with a suitable reference to an asset as well as a property describing the state. | |||
Because of the construct of an abstract class the instances of <tt>AssetAndState</tt> can use specific enumerations with the related states. The possible values in these enumerations are documented separately for each element. | |||
Depending on the particular instance the naming of these elements are varying. | |||
*{{tag|IL|refersTo…}} – This is the reference to the particular asset in {{doc|IL|assetsForIL}}. | |||
*{{@|inPosition}}, {{@|inState}}, {{tag|IL|showsAspect}} – This is the related position/state/aspect of the asset like {{enum|left}} for a switch. | |||
In addition it can have the following attribute: | |||
*{{@|isNegated}} – This Boolean value shall be used to express the inversion, i.e. all other possible states or positions are meant except the given one. | *{{@|isNegated}} – This Boolean value shall be used to express the inversion, i.e. all other possible states or positions are meant except the given one. | ||
There are several types extending <tt>AssetAndState</tt>. These are, with the elements using them: | |||
*<tt>CrossingAndPosition</tt> – This combines a {{doc|IL|movableCrossing}} with a possible position. | |||
** {{tag|IL|relatedCrossingAndPosition}} | |||
*<tt>DerailerAndPosition</tt> – This combines a {{doc|IL|derailerIL}} with a possible position. | |||
** {{tag|IL|relatedDerailerAndPosition}} | |||
** {{tag|IL|relatedDerailerInPosition}} | |||
*<tt>DetectorAndState</tt> - This combines a {{doc|IL|genericDetector}} with a possible state. | |||
** {{tag|IL|relatedDetectorAndState}} | |||
*<tt>LevelCrossingAndState</tt> – This combines a {{doc|IL|levelCrossingIL}} with a possible state. | |||
** {{tag|IL|relatedLevelCrossingAndState}} | |||
*<tt>LockAndState</tt> – This combines a {{doc|IL|keyLockIL}} with a possible state. | |||
** {{tag|IL|relatedLockAndState}} | |||
*<tt>SectionAndVacancy</tt> – This combines a {{doc|IL|tvdSection}} with a possible vacancy state. | |||
** {{tag|IL|relatedSectionAndVacancy}} | |||
*<tt>SignalAndAspect</tt> – This combines a {{doc|IL|signalIL}} with reference to an aspect as defined in {{doc|IL|hasAspect}}. | |||
** {{tag|IL|distantAspect}} | |||
** {{tag|IL|masterAspect}} | |||
** {{tag|IL|relatedSignalAndAspect}} | |||
** {{tag|IL|slaveAspect}} | |||
*<tt>SwitchAndPosition</tt> – This combines a {{doc|IL|switchIL}} with a possible position. | |||
** {{tag|IL|facingSwitchInPosition}} | |||
** {{tag|IL|relatedSwitchAndPosition}} | |||
** {{tag|IL|relatedSwitchInPosition}} | |||
** {{tag|IL|switchPositionInDepartureTrack}} | |||
** {{tag|IL|trailingSwitchInPosition}} | |||
*<tt>TunnelGateState</tt> - This combines a {{doc|IL|tunnelGateIL}} with a possible state. | |||
** {{tag|IL|relatedToTunnelGateAndState}} | |||
=== AssetAndGivenState === | |||
When the level of enforcement and the way the state is proven is also needed, types are basted on the abstract class <tt>AssetAndGivenState</tt>, and extend it with an element of another type extending <tt>AssetAndState</tt> as described above. | |||
The class | The class <tt>AssetAndGivenState</tt> adds information on the level of enforcement and the way of proving it. | ||
*{{@|mustOrShould}} – This allows the definition how strong the state is required. | *{{@|mustOrShould}} – This allows the definition how strong the state is required. | ||
**{{enum|should}} – The state is the preferred one and should be used if possible (recommendation). | **{{enum|should}} – The state is the preferred one and should be used if possible (recommendation). | ||
Line 36: | Line 57: | ||
**{{enum|oneOff}} – The interlocking checks the asset state only once when request for the asset is made. | **{{enum|oneOff}} – The interlocking checks the asset state only once when request for the asset is made. | ||
*{{@|isNegated}} – This Boolean value shall be used to express the inversion, i.e. all other possible states or positions are meant except the given one. | *{{@|isNegated}} – This Boolean value shall be used to express the inversion, i.e. all other possible states or positions are meant except the given one. | ||
=== Examples === | |||
For a clear definition of a {{doc|IL|route}} it is necessary to have not only information about assets needed but also their state they shall assume during its use in the route. This is realised with elements like {{tag|IL|facingSwitchInPosition}} of type <tt>SwitchAndPosition</tt> extending <tt>AssetAndState</tt> and {{tag|IL|requiredSwitchPosition}} of type <tt>SwitchAndGivenPosition</tt> extending <tt>AssetAndGivenState</tt>. In the latter the (asset, state) tuple is given by the child element {{tag|IL|relatedSwitchAndPosition}}. | |||
The extract shows the sample definition of a particular switch position as used to describe the route path. | The extract shows the sample definition of a particular switch position as used to describe the route path. |
Revision as of 12:07, 15 May 2024
State Space
The railway network owns assets that can be associated with a state. This is expressed as a set of tuples, for instance, (signali / aspectk). Other interlocking entities can use these tuples to describe a required state of a related entity. The state space is used in two ways, as described below.
AssetAndState
When just a related asset and its state is needed, types are based on the abstract class AssetAndState directly, and extend it with a suitable reference to an asset as well as a property describing the state.
Because of the construct of an abstract class the instances of AssetAndState can use specific enumerations with the related states. The possible values in these enumerations are documented separately for each element.
Depending on the particular instance the naming of these elements are varying.
- <refersTo…> – This is the reference to the particular asset in assetsForIL.
- @inPosition, @inState, <showsAspect> – This is the related position/state/aspect of the asset like left for a switch.
In addition it can have the following attribute:
- @isNegated – This Boolean value shall be used to express the inversion, i.e. all other possible states or positions are meant except the given one.
There are several types extending AssetAndState. These are, with the elements using them:
- CrossingAndPosition – This combines a movableCrossing with a possible position.
- DerailerAndPosition – This combines a derailerIL with a possible position.
- DetectorAndState - This combines a genericDetector with a possible state.
- LevelCrossingAndState – This combines a levelCrossingIL with a possible state.
- LockAndState – This combines a keyLockIL with a possible state.
- SectionAndVacancy – This combines a tvdSection with a possible vacancy state.
- SignalAndAspect – This combines a signalIL with reference to an aspect as defined in hasAspect.
- SwitchAndPosition – This combines a switchIL with a possible position.
- TunnelGateState - This combines a tunnelGateIL with a possible state.
AssetAndGivenState
When the level of enforcement and the way the state is proven is also needed, types are basted on the abstract class AssetAndGivenState, and extend it with an element of another type extending AssetAndState as described above.
The class AssetAndGivenState adds information on the level of enforcement and the way of proving it.
- @mustOrShould – This allows the definition how strong the state is required.
- should – The state is the preferred one and should be used if possible (recommendation).
- must – The state must be used in any case (obligation).
- @proving – This describes the way the state is proven.
- staffAcknowledged – The asset is proven by staff to have the required state. This is acknowledged by manual input action (command) to the interlocking.
- continuously – The interlocking checks the asset state continuously as long as the asset is required.
- oneOff – The interlocking checks the asset state only once when request for the asset is made.
- @isNegated – This Boolean value shall be used to express the inversion, i.e. all other possible states or positions are meant except the given one.
Examples
For a clear definition of a route it is necessary to have not only information about assets needed but also their state they shall assume during its use in the route. This is realised with elements like <facingSwitchInPosition> of type SwitchAndPosition extending AssetAndState and <requiredSwitchPosition> of type SwitchAndGivenPosition extending AssetAndGivenState. In the latter the (asset, state) tuple is given by the child element <relatedSwitchAndPosition>.
The extract shows the sample definition of a particular switch position as used to describe the route path.
<facingSwitchInPosition id="rp_pt_swi01_li" inPosition="left"> <designator register="_SimpleRegister" entry="pt01 in left"/> <refersToSwitch ref="pt_swi01"/> </facingSwitchInPosition>
The extended variant is shown here. The named track section must be occupied and is checked continuously for it.
<requiredSectionState mustOrShould="must" proving="continuously"> <relatedSectionAndVacancy inState="occupied"> <refersToSection ref="A02T" /> </relatedSectionAndVacancy> </requiredSectionState>