TT:operatingPeriod

From railML 2 Wiki
Jump to navigation Jump to search


operatingPeriod
 


Schema description / Schemabeschreibung

Position of operatingPeriod in the XML-Tree / Position von operatingPeriod im XML-Baum

Multiplicity / Anzahl

[1..∞]

Semantics / Bedeutung

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).
The description in relation to certain days is done using the attribute @bitMask. Here, a 1 is given for each day on which the train runs and a 0 for each day on which it does not. The length of the @bitMask depends on the number of days described by <timetablePeriod>@startDate and <timetablePeriod>@endDate. Accordingly, the first 0 or 1 of @bitMask describes whether the train runs on the first day of the <timetablePeriod> or not. The second 0 or 1 of @bitMask describes whether the train runs on the second day of the <timetablePeriod>. In consequence, to determine if a train is running on a certain day of the <timetablePeriod> one needs to calculate how many days into the timetable period this day is, the 0 or 1 at that index of the @bitMask expresses if the train runs or if it does not.

If both types of description are given for an <operatingPeriod> (specific calendar days and an abstract description based on weeks using operatingDay, then @bitMask is considered the leading description and should be evaluated accordingly.

The attributes @startDate and @endDate can be used to indicate that only limited information could be encoded for the days that were not available outside of the time span spanned by @startDate and @endDate. If @startDate is not given, it must be assumed that the information encoded in <operatingPeriod> begins with the start of <timetablePeriod>. If @endDate is not given, it must be assumed that the information encoded in <operatingPeriod> ends with <timetablePeriod>. If neither @startDate nor @endDate are specified, this means that the <operatingPeriod> encodes information for the entire <timetablePeriod>. If the <timetablePeriod> itself also does not specify a startDate and endDate the encoded timetable is abstract and not fixed on a determined timeframe. The same applies if the <operatingPeriod> does not specify a reference to a <timetablePeriod> via timetablePeriodRef.

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).
Die Bescheibung im Bezug auf konkrete Kalendertage erfolgt über das Attribut @bitMask. Hier wird für jeden Tag, an dem der Zug verkehrt eine 1 angegeben und für jeden Tag, an dem dies nicht der Fall ist eine 0. Die Länge der @bitMask richtet sich dabei nach der Zahl der Tage, die durch <timetablePeriod>@startDate und <timetablePeriod>@endDate beschrieben werden. Dementsprechend beschreibt die erste 0 oder 1 der @bitMask ob der Zug am ersten Tag der <timetablePeriod> verkehrt oder nicht. Die zweite 0 oder 1 von @bitMask beschreibt, ob der Zug am zweiten Tag der <timetablePeriod> verkehrt. Um festzustellen, ob ein Zug an einem bestimmten Tag der <timetablePeriod> verkehrt, muss man folglich berechnen, an welchem Tag der Fahrplanperiode dieser Tag liegt. Die 0 oder 1 an diesem Index der @bitMask gibt an, ob der Zug verkehrt oder nicht.

Wenn für eine <operatingPeriod> beide Arten der Beschreibung angegeben sind (konkrete Kalendertage und abstrakt über eine wochenbasierte Bescheibung mittels operatingDay, dann wird @bitMask als führend angesehen und sollte entsprechend ausgewertet werden.

Die Attribute @startDate und @endDate können dazu genutzt werden auszudrücken, dass nur begrenzte Informationen kodiert werden konnten und für die Tage, die ausserhalb der von @startDate und @endDate aufgespannten Zeitspanne keine Informationen verfügbar waren. Wenn @startDate nicht angegeben wird, muss davon ausgegangen werden, dass die <operatingPeriod> Informationen beginnend mit dem Beginn der <timetablePeriod> kodiert. Wird kein @endDate angegeben, muss davon ausgegangen werden, dass die in der <operatingPeriod> kodierten Informationen mit der <timetablePeriod> endet. Werden weder @startDate noch @endDate angegeben werden, bedeutet dies, dass die <operatingPeriod> Informationen über die gesamte <timetablePeriod> kodiert. Wenn auch an der <timetablePeriod> kein startDate und endDate angegeben wurde, bedeutet das, dass der im Dokument beschriebene Fahrplan abstrakt ist und sich auf keine konkrete Zeitperiode bezieht. Das selbe gilt, wenn die <operatingPeriod> keinen Verweis auf eine <timetablePeriod> über das Attribut timetablePeriodRef definiert.
 
Please, be aware of the semantic constraint(s)!

Attributes of operatingPeriod / Attribute von operatingPeriod

  • id: XML-file-wide unique, machine-interpretable identity, required for later referencing that element internally. For a detailed explanation see Dev:identities.
    XML-Datei-weit eindeutige, maschineninterpretierbare Identität, die für die spätere interne Referenzierung dieses Elements erforderlich ist. Für eine detaillierte Erklärung siehe Dev:identities.
  • code (introduced with version 2.1): Machine-interpretable string (e.g. an abbreviation) used for identification of the object across exchange partners, usecase specific uniqueness constraints may apply. Please see our description of the differences between id, code and human-readable identifiers.
    Maschineninterpretierbare Zeichenkette (z.B. Abkürzung), die zur Identifizierung des Objekts auch bei Austauschpartnern verwendet wird, wobei spezifische Eindeutigkeitsbeschränkungen gelten können. Bitte beachten Sie unsere Erläuterung zu den Unterschieden zwischen id, code and menschenlesbaren Kennzeichnungen.
  • name: Established, human-readable short string, giving the object a name. Not intended for machine interpretation, please see our notice on human interpretable data fields.
    Etablierte, menschenlesbare kurze Zeichenkette, die das Objekt benennt. Nicht zur maschinellen Interpretation bestimmt, siehe Hinweise zu menschenlesbaren Datenfeldern.
  • description: Human-readable, more detailed description as addition to the name. It should give additional explanations or hints to the contents of this element. Not intended for machine interpretation, please see our notice on human interpretable data fields.
    Menschenlesbare, detailliertere Beschreibung als Ergänzung zu name. Sie soll zusätzliche Erläuterungen oder Hinweise auf den Inhalt dieses Elements geben. Nicht zur maschinellen Interpretation bestimmt, siehe Hinweise zu menschenlesbaren Datenfeldern.
  • xml:lang (introduced with version 2.1): This is a unique identifier of language. It uses basically the language standard IETF BCP 47 (external link) which may be different to ISO 639-1 (Wiki banner.png) or ISO 639-2 (Wiki banner.png). For mapping hints see relation to other standards (Wiki banner.png).
    This defines the language used for name and description. Use <additionalName> to provide a name and/or description in other languages.
  • timetablePeriodRef: This refers to the id attribute of the associated <timetablePeriod> element.

Syntactic Constraints / Syntaktische Beschränkungen

  • id: xs:ID, required
    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 (_)
  • code: xs:string, optional
  • name: xs:string, optional
  • description: xs:string, optional
  • xml:lang: xs:language, language identification, optional
  • timetablePeriodRef xs:IDREF, optional
  • startDate xs:date, optional; shall be lower or equal endDate if both are used.
  • endDate xs:date, optional; shall be higher or equal startDate if both are used.
  • 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 dürfen nur Tage innerhalb der Gültigkeitsperiode der timetablePeriod referenzieren.

Semantic Constraints / Semantische Beschränkungen

Private-cloud-icon.png Semantic Constraint "CO:002":
 
Any starting time stamp (as it may result e.g. from a combination of startDate and startTime) shall be lower or equal any ending time stamp (e.g. endDate) if both are given.
 
Proposed on November 12th 2018
Approved on March 21st 2019
FIXME Forum missing
Please, recognize our guidelines on semantic constraints 

Best practice & Examples / Empfohlene Anwendung & Beispiele

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

see also

Notes / Anmerkungen

Open issues / Offene Punkte/Pendenzen