TT:operationalTrainVariant: Difference between revisions

From railML 3 Wiki
Jump to navigation Jump to search
[unchecked revision][checked revision]
(Changed wording in accordance with results of discussion with developer group)
m (formatting)
 
(15 intermediate revisions by 3 users not shown)
Line 9: Line 9:
==={{semantics}}===
==={{semantics}}===
{{importComment}}
{{importComment}}
{{semcon|There must not be any pair of two {{TT:Tag|operationalTrainVariant}}s of an {{TT:Tag|operationalTrain}} that neither contain {{TT:Tag|isCancelled}} nor {{TT:Tag|isOnRequest}}, that overlap regarding the days of operation indicated by its {{Attr|validityRef}}. When calculating which {{TT:Tag|operationalTrainVariant}} of an {{TT:Tag|operationalTrain}} is valid on a particular day always a maximum of one '''active''' {{TT:Tag|operationalTrainVariant}} shall be the result. If the result is more than one {{TT:Tag|operationalTrainVariant}}, all except one shall be marked as {{TT:Tag|isCancelled}} or {{TT:Tag|isOnRequest}}.|status=proposed|proposed=2023-01-12|approved=2023-01-12|id=TT:002}}
{{semcon|When calculating which {{TT:Tag|operationalTrainVariant}} of an {{TT:Tag|operationalTrain}} is valid on a particular day always a maximum of one '''active''' {{TT:Tag|operationalTrainVariant}} shall be the result. If the result is more than one {{TT:Tag|operationalTrainVariant}}, all except one shall be marked as {{TT:Tag|isCancelled}} or {{TT:Tag|isOnRequest}}. Please see the invalid code below.|status=approved|proposed=2023-01-12|approved=2023-04-06|id=TT:002}}
 
=={{examples}}==
=={{examples}}==
=== Violation and fixes of semantic constraint TT:002 ===
==== Violation ====
Below is an example of the code violating the semantic constraint TT:002. Interpretation of the code given below results in a conflict, because both {{TT:Tag|operationalTrainVariant}}s "ov-1" and "ov-2" run on Monday.
{{scrollbox|
<syntaxhighlight lang=xml line>
      <operationalTrain id="ot-1">
        <operationalTrainVariant id="ov-1" itineraryRef="it-1" validityRef="va-2">
          <identifiers>
            <identifier number="OT1066" type="OperationalTrainNumber"/>
          </identifiers>
          <operationalTrainSection>
            <operationalTrainSectionPart id="os-1">
              <formationInformation formationRef="fm-1"/>
            </operationalTrainSectionPart>
          </operationalTrainSection>
        </operationalTrainVariant>
        <operationalTrainVariant id="ov-2" itineraryRef="it-1" validityRef="va-2">
          <identifiers>
            <identifier number="OT1067" type="OperationalTrainNumber"/>
          </identifiers>
          <operationalTrainSection>
            <operationalTrainSectionPart id="os-2">
              <formationInformation formationRef="fm-1"/>
            </operationalTrainSectionPart>
          </operationalTrainSection>
        </operationalTrainVariant>
      </operationalTrain>
</syntaxhighlight>
|height=500px}}
{{TT:Tag|validity}}:
{{scrollbox|
<syntaxhighlight lang=xml>
      <validity id="va-2">
        <operatingDayValidity timetableScenarioRef="ts01" pattern="1111100"/>
      </validity>
</syntaxhighlight>
|height=150px}}
How to solve this issue? Setting {{@|offset|TT:operationalTrainVariant}} of whatever length to e.g. "os-2" does not fix the conflict as it arises because of 2 or more {{TT:Tag|operationalTrainVariant}}s referring to the same {{TT:Tag|validity}}.
==== Fix by cancelling ====
Invalid code above can be fixed by cancelling one the trains by {{TT:Tag|isCancelled}}.
{{scrollbox|
<syntaxhighlight lang=xml line>
      <operationalTrain id="ot-1">
        <operationalTrainVariant id="ov-1" itineraryRef="it-1" validityRef="va-2">
          <identifiers>
            <identifier number="OT1066" type="OperationalTrainNumber"/>
          </identifiers>
          <operationalTrainSection>
            <operationalTrainSectionPart id="os-1">
              <formationInformation formationRef="fm-1"/>
            </operationalTrainSectionPart>
          </operationalTrainSection>
        </operationalTrainVariant>
        <operationalTrainVariant id="ov-2" itineraryRef="it-1" validityRef="va-2">
          <identifiers>
            <identifier number="OT1067" type="OperationalTrainNumber"/>
          </identifiers>
          <isCancelled/>
          <operationalTrainSection>
            <operationalTrainSectionPart id="os-2">
              <formationInformation formationRef="fm-1"/>
            </operationalTrainSectionPart>
          </operationalTrainSection>
        </operationalTrainVariant>
      </operationalTrain>
</syntaxhighlight>
|height=500px}}
==== Fix by request of dispatcher ====
Invalid code above can also be fixed by providing a child {{TT:Tag|isOnRequest}} to "ov-1" or "ov-2" meaning that one of the trains is not cancelled but will not run until further command of dispatcher is given. However, if this command is given, then a new timetable should be produced with no conflicts in it, i.e. no two trains departing from the same track to the same station at the same time. As a result still only one train will go on Monday within this timetable.
{{scrollbox|
<syntaxhighlight lang=xml line>
      <operationalTrain id="ot-1">
        <operationalTrainVariant id="ov-1" itineraryRef="it-1" validityRef="va-2">
          <identifiers>
            <identifier number="OT1066" type="OperationalTrainNumber"/>
          </identifiers>
          <operationalTrainSection>
            <operationalTrainSectionPart id="os-1">
              <formationInformation formationRef="fm-1"/>
            </operationalTrainSectionPart>
          </operationalTrainSection>
        </operationalTrainVariant>
        <operationalTrainVariant id="ov-2" itineraryRef="it-1" validityRef="va-2">
          <identifiers>
            <identifier number="OT1067" type="OperationalTrainNumber"/>
          </identifiers>
          <isOnRequest/>
          <operationalTrainSection>
            <operationalTrainSectionPart id="os-2">
              <formationInformation formationRef="fm-1"/>
            </operationalTrainSectionPart>
          </operationalTrainSection>
        </operationalTrainVariant>
      </operationalTrain>
</syntaxhighlight>
|height=500px}}
{{importComment}}
{{importComment}}
=={{Additional Information}}==
=={{Additional Information}}==
==={{Notes}}===
==={{Notes}}===
An {{TT:Tag|operationalTrainVariant}} is specific for a certain day. It shall not be used to describe different alternative train paths of a microscopic infrastructure model a train may go on a certain day, e.g. use track A or B to get from OP 1 to OP 2. An {{TT:Tag|operationalTrain}} shall always only have a single {{TT:Tag|operationalTrainVariant}} that is applicable for a certain day.
An {{TT:Tag|operationalTrainVariant}} is specific for a certain day. It shall not be used to describe different alternative train paths of a microscopic infrastructure model <ref>[[IS:topology#Microscopic_Topology|IS:topology]]</ref> a train may go on a certain day, e.g. use track A or B to get from OP 1 to OP 2.
 
==={{Open issues}}===
==={{Open issues}}===
== References ==
<references />

Latest revision as of 14:50, 11 September 2024

Introduction

Documentation

Syntax

Autoexport from the XML-Schema for element TT:operationalTrainVariant of railML® version 3.2
Documentation An operational train variant is a specific variant of a train that is operated in this way on all operating days indicated by the provided validity. It is expected that the validities of all operational train variants within an operational train do not overlap. The difference between one variant and the next of an operational train is that the trains path may differ to some degree.
Subschema timetable
Parents* operationalTrain
Children identifiers (0..1), isCancelled (0..1), isOnRequest (0..1), operationalTrainSection (1..*)
Attributes:
  • itineraryRef: References the itinerary of the operational train variant. The operational train variant is expected to stop or passthrough all of the OPs specified by the base itinerary points that are referenced by this itinerary. (obligatory; xs:string; patterns: (urn:uuid:)?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|{[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}}),

  • offset: Allows to specify a temporal offset to the times provided with the itinerary.
    This means that the resulting arrival and departure times of the individual base itinerary points are calculated by adding the offset of the itinerary AND the offset of the operational train variant to them. Of course the offset may also be negative. (optional; xs:duration),

  • validityRef: Reference to a validity. This validity specifies if the operational train variant is operated on a certain day, or if it is not. (obligatory; xs:string; patterns: (urn:uuid:)?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|{[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}}),

  • id: unique identifier (obligatory; xs:string; patterns: (urn:uuid:)?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|{[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}}); compare: Dev:Identities
*Notice:
Elements may have different parent elements. As a consequence they may be used in different contexts.
Please, consider this as well as a user of this wiki as when developing this documentation further.
Aspects that are only relevant with respect to one of several parents should be explained exclusively in the documentation of the respective parent element.


 

This element does not appear in railML® 3.1 within the TT subschema. It is available only in railML® 3.2. Do not hesitate to contact railML.org for further questions.


Changes 3.1→3.2

Introduced with version 3.2.

Semantics

Private-cloud-icon.png Semantic Constraint "TT:002":
 
When calculating which <operationalTrainVariant> of an <operationalTrain> is valid on a particular day always a maximum of one active <operationalTrainVariant> shall be the result. If the result is more than one <operationalTrainVariant>, all except one shall be marked as <isCancelled> or <isOnRequest>. Please see the invalid code below.
 
Proposed on January 12th 2023
Approved on April 06th 2023
FIXME: add Link to discussion!
Please, recognize our guidelines on semantic constraints

Best Practice / Examples

Violation and fixes of semantic constraint TT:002

Violation

Below is an example of the code violating the semantic constraint TT:002. Interpretation of the code given below results in a conflict, because both <operationalTrainVariant>s "ov-1" and "ov-2" run on Monday.

      <operationalTrain id="ot-1">
        <operationalTrainVariant id="ov-1" itineraryRef="it-1" validityRef="va-2">
          <identifiers>
            <identifier number="OT1066" type="OperationalTrainNumber"/>
          </identifiers>
          <operationalTrainSection>
            <operationalTrainSectionPart id="os-1">
              <formationInformation formationRef="fm-1"/>
            </operationalTrainSectionPart>
          </operationalTrainSection>
        </operationalTrainVariant>

        <operationalTrainVariant id="ov-2" itineraryRef="it-1" validityRef="va-2">
          <identifiers>
            <identifier number="OT1067" type="OperationalTrainNumber"/>
          </identifiers>
          <operationalTrainSection>
            <operationalTrainSectionPart id="os-2">
              <formationInformation formationRef="fm-1"/>
            </operationalTrainSectionPart>
          </operationalTrainSection>
        </operationalTrainVariant>
      </operationalTrain>


<validity>:

      <validity id="va-2">
        <operatingDayValidity timetableScenarioRef="ts01" pattern="1111100"/>
      </validity>


How to solve this issue? Setting @offset of whatever length to e.g. "os-2" does not fix the conflict as it arises because of 2 or more <operationalTrainVariant>s referring to the same <validity>.

Fix by cancelling

Invalid code above can be fixed by cancelling one the trains by <isCancelled>.

      <operationalTrain id="ot-1">
        <operationalTrainVariant id="ov-1" itineraryRef="it-1" validityRef="va-2">
          <identifiers>
            <identifier number="OT1066" type="OperationalTrainNumber"/>
          </identifiers>
          <operationalTrainSection>
            <operationalTrainSectionPart id="os-1">
              <formationInformation formationRef="fm-1"/>
            </operationalTrainSectionPart>
          </operationalTrainSection>
        </operationalTrainVariant>

        <operationalTrainVariant id="ov-2" itineraryRef="it-1" validityRef="va-2">
          <identifiers>
            <identifier number="OT1067" type="OperationalTrainNumber"/>
          </identifiers>
          <isCancelled/>
          <operationalTrainSection>
            <operationalTrainSectionPart id="os-2">
              <formationInformation formationRef="fm-1"/>
            </operationalTrainSectionPart>
          </operationalTrainSection>
        </operationalTrainVariant>
      </operationalTrain>

Fix by request of dispatcher

Invalid code above can also be fixed by providing a child <isOnRequest> to "ov-1" or "ov-2" meaning that one of the trains is not cancelled but will not run until further command of dispatcher is given. However, if this command is given, then a new timetable should be produced with no conflicts in it, i.e. no two trains departing from the same track to the same station at the same time. As a result still only one train will go on Monday within this timetable.

      <operationalTrain id="ot-1">
        <operationalTrainVariant id="ov-1" itineraryRef="it-1" validityRef="va-2">
          <identifiers>
            <identifier number="OT1066" type="OperationalTrainNumber"/>
          </identifiers>
          <operationalTrainSection>
            <operationalTrainSectionPart id="os-1">
              <formationInformation formationRef="fm-1"/>
            </operationalTrainSectionPart>
          </operationalTrainSection>
        </operationalTrainVariant>

        <operationalTrainVariant id="ov-2" itineraryRef="it-1" validityRef="va-2">
          <identifiers>
            <identifier number="OT1067" type="OperationalTrainNumber"/>
          </identifiers>
          <isOnRequest/>
          <operationalTrainSection>
            <operationalTrainSectionPart id="os-2">
              <formationInformation formationRef="fm-1"/>
            </operationalTrainSectionPart>
          </operationalTrainSection>
        </operationalTrainVariant>
      </operationalTrain>


Additional Information

Notes

An <operationalTrainVariant> is specific for a certain day. It shall not be used to describe different alternative train paths of a microscopic infrastructure model [1] a train may go on a certain day, e.g. use track A or B to get from OP 1 to OP 2.

Open Issues

References