TT:trainPart: Difference between revisions

From railML 2 Wiki
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
m (syntaktische Korrekturen im Beispiel (Verwendung von ’ in Attributen aus didaktischen Gründen obwohl es kein XML ist))
("relativisation" of the usage recommendations for trainNumbers and including attribute /code/)
Line 27: Line 27:


* {{Attr|trainNumber}}:<br>
* {{Attr|trainNumber}}:<br>
As clarified from version 2.2 onwards, this attribute shall contain the number of the train ''part'', not the number of the corresponding train (as the name may suggest). There is no direct way to identify the number of the corresponding train since there may be for instance an operational and a commercial train referring to this train part. However, it is possible to follow the attribute {{TT:Tag|trainPartRef}}.{{Attr|ref}} from any train to find out which one (or more) refers to the current train part.<br>
This attribute may contain the number of the train ''part'' or the number of the corresponding train (as the name may suggest). There is no direct way to identify the number of the corresponding train since there may be for instance an operational and a commercial train referring to this train part. However, it is possible to follow the attribute {{TT:Tag|trainPartRef}}.{{Attr|ref}} from any train to find out which one (or more) refers to the current train part.<br>
Since this has been clarified from version 2.2 onwards only, there may be RailML files from older versions where {{Attr|trainNumber}} actually contains a train number and the number of the train part is given in the attribute {{Attr|name}}.<br>
For more information on trains an train parts, see examples below and [[TT:Train_Coupling_And_Sharing | Train Coupling And Sharing]].
For more information on trains an train parts, see examples below and [[TT:Train_Coupling_And_Sharing | Train Coupling And Sharing]].


Line 97: Line 96:
  </rail:trainPart>
  </rail:trainPart>


==== Example 2: Meaning of train parts and usage of trainNumber, sequence, position, and name ====
==== Example 2: Meaning of train parts and usage of trainNumber, code, sequence, position, and name ====
The following “trains” may be assumed to be published:<br>
The following “trains” may be assumed to be published:<br>
* 456 Praha – Amsterdam (branded “Phoenix”)<br>
* 456 Praha – Amsterdam (branded “Phoenix”)<br>
Line 113: Line 112:


<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
<trainPart id='tp_1.1' name=’Phoenix’ trainNumber='456' … />
<trainPart id='tp_1.1' name=’Phoenix’ code='456' trainNumber='456' … />
<trainPart id='tp_1.2' name=’Phoenix’ trainNumber='456' … />
<trainPart id='tp_1.2' name=’Phoenix’ code='456' trainNumber='456' … />
<trainPart id='tp_2.1' name=’Canopus’ trainNumber='458' … />
<trainPart id='tp_2.1' name=’Canopus’ code='458' trainNumber='458' … />
<trainPart id='tp_2.2' name=’Canopus’ trainNumber='458' … />
<trainPart id='tp_2.2' name=’Canopus’ code='458' trainNumber='458' … />
<trainPart id='tp_3.1' trainNumber='60456' … />
<trainPart id='tp_3.1' code='60456' trainNumber='60456' … />
<trainPart id='tp_3.2' trainNumber='60456' … />
<trainPart id='tp_3.2' code='60456' trainNumber='60456' … />
<trainPart id='tp_4.1' trainNumber='61458' … />
<trainPart id='tp_4.1' code='61458' trainNumber='61458' … />
<trainPart id='tp_4.2' trainNumber='61458' … />
<trainPart id='tp_4.2' code='61458' trainNumber='61458' … />
</syntaxhighlight>  
</syntaxhighlight>  



Revision as of 13:15, 5 December 2014


trainPart
 


Schema description / Schemenbeschreibung

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

Multiplicity / Anzahl

[1..1]

Semantics / Bedeutung

The Element <trainPart> describes the most basic part of a train. Hence there is no changement of the formation or operating period allowed during a train parts route.

Das Element <trainPart> beschreibt die kleinste Einheit eines Zuges. Innerhalb des Laufweges eines trainPart sind daher keinerlei Wechsel der Zugkonfiguration oder der Verkehrsperiode möglich.

Attributes of trainPart / Attribute von trainPart

  • 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 (external link) or ISO 639-2 (external link). For mapping hints see relation to other standards (external link).
    This defines the language used for name and description. Use <additionalName> to provide a name and/or description in other languages.
  • line (introduced with version 2.0): This is the "train part line", which could be different from the "train line".
  • trainLine (deprecated with version 2.1): This is the "train line", used differently.
  • trainNumber:

This attribute may contain the number of the train part or the number of the corresponding train (as the name may suggest). There is no direct way to identify the number of the corresponding train since there may be for instance an operational and a commercial train referring to this train part. However, it is possible to follow the attribute <trainPartRef>.ref from any train to find out which one (or more) refers to the current train part.
For more information on trains an train parts, see examples below and Train Coupling And Sharing.

  • additionalTrainNumber: This is a train number appendix, used to provide uniqueness.
  • processStatus: It describes the trainPart status in relation to a working process. (deprecated with version 2.5)
🗒️ The semantics of the attribute values for @processStatus have not been fully defined in the past. In general the attribute shall describe a state of the process supported by railML®. Therefore the precise semantics shall be clarified between data provider and the data consumer.
Examples:
If an updated version of a timetable is transferred, the @processStatus is used by some systems to indicate if a train was changed compared to the previous data transfer by providing @processStatus=changed.
For the use case slot ordering the attribute is used with the value planned by some systems to describe that a train has been planned in the scheduling tool, but hasn’t been taken into account for the slot ordering process.

Possible values are:

  • planned
  • actual
  • calculated
  • toBeChecked
  • changed
  • imported
  • other:anything: Any value that does not fit any value from the previous enumeration list, fulfilling the constraint: at minimum two characters, whitespace is not allowed. Please, apply Dev:usingAny accordingly.
  • debitcode: This is a debitor code for finacial considerations.
  • remarks: This is a free remark for further description.
  • timetablePeriodRef: This refers to the id attribute of the associated <timetablePeriod> element.
  • categoryRef: This refers to the id attribute of the associated <category> element.
  • cancellation (introduced with version 2.3): indicates, that this trainPart is no longer valid and should be canceled out of a previously delivered set (i. e. out of a previously railml file).

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

Best practice & Examples / Empfohlene Anwendung & Beispiele

Example 1

Part of the City Night Line 242:

<rail:trainPart id="CNL_242_2" trainNumber="242" processStatus="actual" 
 description="CNL 242" timetablePeriodRef="J08" categoryRef="cCNL">
 <rail:ocpsTT>
 ...
 </rail:ocpsTT>
</rail:trainPart>

Example 2: Meaning of train parts and usage of trainNumber, code, sequence, position, and name

The following “trains” may be assumed to be published:

  • 456 Praha – Amsterdam (branded “Phoenix”)
  • 458 Praha – Zürich (branded “Canopus”)
  • 60456 Praha – Berlin
  • 61458 Praha – Erfurt

The “trains” run coupled between Praha and Dresden. In RailML, they are entitled as commercial trains. (Actually, there are more trains involved in reality. This has been simplified a little bit for the purposes of this example.)

From the operational point of view, there are the following operational trains:

  • 456 Praha – Amsterdam
  • 458 Dresden – Zürich

Please note that the numbers of the operational are identical with some numbers of commercial trains. But, this does by far not mean that these trains are identical! It is only that different objects have the same numbers (one could say: by coincidence).

<trainParts> in RailML:

<trainPart id='tp_1.1' name=’Phoenix’ code='456' trainNumber='456' … />
<trainPart id='tp_1.2' name=’Phoenix’ code='456' trainNumber='456' … />
<trainPart id='tp_2.1' name=’Canopus’ code='458' trainNumber='458' … />
<trainPart id='tp_2.2' name=’Canopus’ code='458' trainNumber='458' … />
<trainPart id='tp_3.1' code='60456' trainNumber='60456' … />
<trainPart id='tp_3.2' code='60456' trainNumber='60456' … />
<trainPart id='tp_4.1' code='61458' trainNumber='61458' … />
<trainPart id='tp_4.2' code='61458' trainNumber='61458' … />

commercial trains:

<train id='trc_1' trainNumber='456' name=’Phoenix’ type='commercial'>
  <trainPartSequence sequence='1'>	//section Praha - Dresden
    <trainPartRef ref='tp_1.1' position='1'/>
  </trainPartSequence>
  <trainPartSequence sequence='2'>	//section Dresden - Amsterdam
    <trainPartRef ref='tp_1.2' position='1'/>
  </trainPartSequence>
</train>

<train id='trc_2' trainNumber='458' name=’Canopus’ type='commercial'>
  <trainPartSequence sequence='1'>	//section Praha - Dresden
    <trainPartRef ref='tp_2.1' position='3’/>
  </trainPartSequence>
  <trainPartSequence sequence='2'>	//section Dresden - Zürich
    <trainPartRef ref='tp_2.2' position='1'/>
  </trainPartSequence>
</train>

<train id='trc_3' trainNumber='60456' type='commercial'>
  <trainPartSequence sequence='1'>	//section Praha - Dresden
    <trainPartRef ref='tp_3.1' position='2'/>
  </trainPartSequence>
  <trainPartSequence sequence='2'>	//section Dresden - Amsterdam
    <trainPartRef ref='tp_3.2' position='2'/>
  </trainPartSequence>
</train>

<train id='trc_4' trainNumber='61458' type='commercial'>
  <trainPartSequence sequence='1'>	//section Praha - Dresden
    <trainPartRef ref='tp_4.1' position='4'/>
  </trainPartSequence>			//section Dresden - Zürich
  <trainPartSequence sequence='2'>
    <trainPartRef ref='tp_4.2' position='2'/>
  </trainPartSequence>
</train>

operational trains:

<train id='tro_1' type='operational' trainNumber='456'>
  <trainPartSequence sequence='1'>	//section Praha - Dresden
    <trainPartRef ref='tp_1.1' position='1'/>
    <trainPartRef ref='tp_3.1' position='2'/>
    <trainPartRef ref='tp_2.1' position='3'/>
    <trainPartRef ref='tp_4.1' position='4'/>
  </trainPartSequence>
  <trainPartSequence sequence='2'>	//section Dresden - Amsterdam
    <trainPartRef ref='tp_1.2' position='1'/>
    <trainPartRef ref='tp_3.2' position='2'/>
  </trainPartSequence>
</train>

<train id='tro_2' type='operational' trainNumber='458'>
  <trainPartSequence sequence='1'>	//section Dresden - Zürich
    <trainPartRef ref='tp_2.2' position='1'/>
    <trainPartRef ref='tp_4.2' position='2'/>
  </trainPartSequence>
</train>

Notes / Anmerkungen

There are several ways to describe an empty run (inside a station) or depot run. If it is planned in all details in the timetable, it is treated as a train and will be defined with appropriate ocpTT's in the trainPart, possibly with serviceSectionRef's if known. If it is loosely planned with time constants but not infrastructural references, it is not treated as a train run and will be defined as blockPart with an appropriate mission value.

To find out whether a train part is passenger or freight hauling, see Train types, categories, products, and passenger usage.

Open issues / Offene Punkte/Pendenzen

Not yet described. / Noch nicht beschrieben.