Dev:StateSpace: Difference between revisions

From railML 3 Wiki
Jump to navigation Jump to search
[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 ===


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 functional classes can make use of these tuples. The using of the state space is twofold:
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.
# <div style="margin-left:0.7cm;margin-right:0cm;">direct use of (asset, state) tuples with class {{doc|IL|assetAndState}} when just the state of the asset is needed
# <div style="margin-left:0.7cm;margin-right:0cm;">indirect use of (asset, state) tuples with class {{doc|IL|assetAndGivenState}} when additional the level of enforcement and its proving is needed because it is not obvious from the context.


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.


Because of the construct of an abstract class the instances of {{doc|IL|assetAndState}} can use specific enumerations with the related states. The possible values in these enumerations are self-explanatory. In addition it can have the following attribute:
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.
=== AssetAndGivenState ===


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}} using the abstract class {{doc|IL|assetAndState}} or {{tag|IL|requiredSwitchPosition}} using the class {{doc|IL|assetAndGivenState}}. The latter one is similar build as {{doc|IL|assetAndState}} but including the information as child element {{tag|IL|relatedAssetAndState}}.
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}}


The class {{doc|IL|assetAndState}} is an abstract tuple of references to the asset and its related state. Depending on the particular instance the naming of these elements are varying.
=== AssetAndGivenState ===
*{{tag|IL|refersTo…}} – This is the reference to the particular asset in {{doc|IL|assetsForIL}}.
*{{tag|IL|inPosition}}, {{tag|IL|inState}}, {{tag|IL|showsAspect}} – This is the related position/state/aspect of the asset like {{enum|left}} for a switch.


There are several instantiations of the abstract class {{doc|IL|assetAndState}}. These are:
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.
*{{doc|IL|crossingAndPosition}} – This combines a {{doc|IL|movableCrossing}} with a possible position.
*{{doc|IL|derailerAndPosition}} – This combines a {{doc|IL|derailerIL}} with a possible position.
*{{doc|IL|lockAndState}} – This combines a {{doc|IL|lockIL}} with a possible state.
*{{doc|IL|levelCrossingAndState}} – This combines a {{doc|IL|levelCrossingIL}} with a possible state.
*{{doc|IL|sectionAndVacancy}} – This combines a {{doc|IL|tvdSection}} with a possible vacancy state.
*{{doc|IL|signalAndAspect}} – This combines a {{doc|IL|signalIL}} with reference to an aspect as defined in {{doc|IL|genericTypes}}.
*{{doc|IL|swicthPointAndPosition}} – This combines a {{doc|IL|switchIL}} with a possible position.


The class {{doc|IL|assetAndGivenState}} adds information on the level of enforcement and the way of proving it.
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.

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:

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>