Difference between revisions of "TT:operatingPeriod"

From wiki.railML.org
Jump to: navigation, search
[checked revision][checked revision]
(Undo revision 6852 by Ferri Leberl (talk))
(Removed description of the obsolete attribute dayOffset, replaced link to pdf file about "Mitternachtsübergänge in railM" by reference to wiki page How to indicate midnight overruns in railML with same content.)
 
Line 33: Line 33:
  
 
* {{Attr|bitMask}}: This is a bit mask with {{Enum|0}} or {{Enum|1}} for every day of the {{TT:Doc|timetablePeriod}}.
 
* {{Attr|bitMask}}: This is a bit mask with {{Enum|0}} or {{Enum|1}} for every day of the {{TT:Doc|timetablePeriod}}.
 
* {{Attr|dayOffset}} {{Intro|2.2}}: An offset of {{Enum|1}} indicates that the train starts on the bitMask days but after midnight, so the real date differs from the bitMask date by 1. (Please see Open Issues below)
 
  
 
|constraints =
 
|constraints =
Line 46: Line 44:
  
 
* {{Attr|bitMask}} optional, consisting of the digits {{Enum|0}} and/or {{Enum|1}}<br>The "string-length" has to be the number of days in the time period defined through {{Attr|startDate}} and {{Attr|endDate}} of the {{TT:Tag|timetablePeriod}} element.<br>This means: If the timetable period is reduced by attributes {{Attr|startDate}}+{{Attr|endDate}} of the element {{TT:Doc|operatingPeriod}} the difference quantity of days in the {{Attr|bitmask}} has to be set to {{Enum|0}} but not to be skipped.
 
* {{Attr|bitMask}} optional, consisting of the digits {{Enum|0}} and/or {{Enum|1}}<br>The "string-length" has to be the number of days in the time period defined through {{Attr|startDate}} and {{Attr|endDate}} of the {{TT:Tag|timetablePeriod}} element.<br>This means: If the timetable period is reduced by attributes {{Attr|startDate}}+{{Attr|endDate}} of the element {{TT:Doc|operatingPeriod}} the difference quantity of days in the {{Attr|bitmask}} has to be set to {{Enum|0}} but not to be skipped.
 
* {{Attr|dayOffset}} {{XsdType|integer}}, optional, default: {{Enum|0}}
 
  
 
The attributes {{Attr|startDate}} and {{Attr|endDate}} are not allowed to enhance the time period given by the referenced {{TT:Doc|timetablePeriod}}. <br> {{Deu|{{Attr|startDate}} und {{Attr|endDate}} sind nur gemeinsam zu benutzen und dürfen nur Tage innerhalb der Gültigkeitsperiode der {{TT:Doc|timetablePeriod}} referenzieren.}}
 
The attributes {{Attr|startDate}} and {{Attr|endDate}} are not allowed to enhance the time period given by the referenced {{TT:Doc|timetablePeriod}}. <br> {{Deu|{{Attr|startDate}} und {{Attr|endDate}} sind nur gemeinsam zu benutzen und dürfen nur Tage innerhalb der Gültigkeitsperiode der {{TT:Doc|timetablePeriod}} referenzieren.}}
Line 59: Line 55:
 
see also  
 
see also  
 
* [http://www.irfp.de/download/railml_beispiel_verkehrstage.pdf Weitere Informationen und RailML-Beispiel zu Verkehrstagen, PDF, 185 kByte]
 
* [http://www.irfp.de/download/railml_beispiel_verkehrstage.pdf Weitere Informationen und RailML-Beispiel zu Verkehrstagen, PDF, 185 kByte]
* [http://www.irfp.de/download/railml_beispiel_mueg.pdf RailML-Beispiel zu Mitternachtsübergängen, PDF, 269 kByte]
+
* [[TT:Midnight_overrun | How to indicate midnight overruns in railML]]
 
|notes =  
 
|notes =  
Please note that <{{TT:Doc|ocpTT}}>.<{{TT:Doc|times}}>.{{Attr|arrivalDay}}/{{Attr|departureDay}} and <{{TT:Doc|operatingPeriod}}>.{{Attr|dayOffset}} are very similar working attributes but they are not the same. The actual offset from an <{{TT:Doc|operatingPeriod}}> to the actual days of an arrival is the ''sum'' of {{Attr|dayOffset}} and {{Attr|arrivalDay}} (and similar for departures).
 
 
So, if you have to create a <{{TT:Doc|trainPart}}> with {{Attr|departureDay}}=1 at its first <{{TT:Doc|ocpTT}}>, do not repeat the {{Attr|departureDay}}=1 with {{Attr|dayOffset}}=1 at the <{{TT:Doc|operatingPeriod}}> of that <{{TT:Doc|trainPart}}>! This would result in ''two'' days shift of the {{Attr|bitMask}} of <{{TT:Doc|operatingPeriod}}>.
 
 
The <{{TT:Doc|operatingPeriod}}>.{{Attr|dayOffset}}>0 is intended to be used if a <{{TT:Doc|trainPart}}> ran over midnight ''before it’s first <ocpTT>'' - so it ‘inherited’ the midnight overrun from an earlier section. In such a case, the <{{TT:Doc|trainPart}}> would refer to an <{{TT:Doc|operatingPeriod}}> with {{Attr|dayOffset}}=1 but ''nevertheless start with {{Attr|departureDay}}=0 at its first <ocpTT>''.
 
 
If then the <{{TT:Doc|trainPart}}> runs over midnight again (a second time in total) we do have the situation of {{Attr|departureDay}}=1 and <{{TT:Doc|operatingPeriod}}>.{{Attr|dayOffset}}=1 - meaning that there were really two midnight overruns, one inherited from an earlier section and one in the current section.
 
 
It seams as if it is redundant whether a <{{TT:Doc|trainPart}}> starts with {{Attr|departureDay}}=1 or refers to an <{{TT:Doc|operatingPeriod}}> with {{Attr|dayOffset}}=1. It is not, since a train shall always start with {{Attr|departureDay}}=0 at its fist <{{TT:Doc|ocpTT}}> in its first section; {{Attr|departureDay}}>0 is intended to happen only in first <{{TT:Doc|ocpTT}}>s in further sections.
 
 
For more information, see [[TT:Midnight_overrun | How to indicate midnight overruns in RailML]]
 
 
|openissues =
 
|openissues =
The attribute {{Attr|dayOffset}} has not been implemented in railML and although it was documented in the Wiki it is not present in the railML 2.2 XSD definition! There is currently a discussion in the railML Forum to decide whether or not it shall be introduced in version 2.4 ([http://www.railml.org/forum/index.php?t=msg&th=523&start=0& Link to forum]).
 
 
|backHome = TT:elements
 
|backHome = TT:elements
 
}}
 
}}

Latest revision as of 13:40, 17 October 2017

Scheme description / Schemenbeschreibung / Description du schéma

Position of operatingPeriod in the XML-Tree / Position von operatingPeriod im XML-Baum / position de operatingPeriod dans l’aborescence XML

Semantics / Bedeutung / Sémantique

The Element <operatingPeriod> describes the operation of a train. This could either be in relation to certain days of a calendar or abstract based on a standard week (or both).

Das Element <operatingPeriod> beschreibt die Verkehrsperiode eines Zuges. Dies kann entweder im Bezug auf konkrete Kalendertage oder abstrakt über eine wochenbasierte Beschreibung mittels operatingDay erfolgen (oder beides).

Attributes of operatingPeriod / Attribute von operatingPeriod / Attributs de operatingPeriod

  • id: This is the unique identifier which is used to refer to the current element. It is used for XML file internal unambiguous references. How to handle it?
  • code (introduced with version 2.1): This is a short string for typical, specific abbreviations, used in different systems with the same understanding.
  • name: This is a short name for the current item.
  • description: This is a more detailed description as addition to the short name. It shall allow a short overview or hints to the contents of this data set.
  • xml:lang (introduced with version 2.1): This is a unique identifier of language. It uses basically the language standard IETF BCP 47 which may be different to ISO 639-1 or ISO 639-2. For mapping hints see relation to other standards.
    This is used for defining name and description.
  • timetablePeriodRef: This refers to the id attribute of the associated <timetablePeriod> element.
  • startDate: This is the first day of the period, if the operating period is shorter than the underlying timetablePeriod.
    Die Angabe von startDate beschränkt die Anwendung der Bildungsregel des operatingDay-Elements auf diesen Datumsbereich.
  • endDate: This is the last day of the period, if the operating period is shorter than the underlying timetablePeriod.
    Die Angabe von endDate beschränkt die Anwendung der Bildungsregel des operatingDay-Elements auf diesen Datumsbereich.
  • bitMask: This is a bit mask with 0 or 1 for every day of the timetablePeriod.

Constraints / Beschränkungen / Contraintes

  • id: xs:ID, mandatory
    a string, starting with a letter (a..zA..Z) or an underscore (_),
    followed by a non-colonized and non-spaced string consisting of letters, digits, points (.), dashes (-) or underscores (_)
  • bitMask optional, consisting of the digits 0 and/or 1
    The "string-length" has to be the number of days in the time period defined through startDate and endDate of the <timetablePeriod> element.
    This means: If the timetable period is reduced by attributes startDate+endDate of the element operatingPeriod the difference quantity of days in the bitmask has to be set to 0 but not to be skipped.

The attributes startDate and endDate are not allowed to enhance the time period given by the referenced timetablePeriod.
startDate und endDate sind nur gemeinsam zu benutzen und dürfen nur Tage innerhalb der Gültigkeitsperiode der timetablePeriod referenzieren.

Best practice & Examples / Empfohlene Anwendung & Beispiele / Bonnes pratiques & exemples

  <operatingPeriod id="op15" name="15" description="Mo-Fr" timetablePeriodRef="tp2005" bitMask="011111001111000111100011111...111110" />

see also

Notes / Anmerkungen / Notes

Open issues / Offene Punkte/Pedenzen / Questions ouvertes