Dev:Double-track line

From railML 2 Wiki
Jump to navigation Jump to search

This tutorial should provide a way to model double track lines on a microscopic and macroscopic levels of aggregation.

For a double-track line, two child lines are needed for each segment of a line. They are grouped together by @belongsToParent attribute. Only parent line represents reality.

The cross sections of parallel track sequences of a line need to be equal.

These levels should be two separate files. Entities from different files can be matched by designator register’s entries, i.e. if two ocp-s have the same designator, then user may find contents of a macroscopic node in a separate file.

A track of the macroscopic view shall begin and end with <macroscopicNode>-s. They represent “segments”. Please note that “segments” mean tracks “between” stations and may be called differently in the national documentation, e.g. “open line”.

Tracks within a station are not present in this view. Line is a sequence of “segments”. Each track of a line sequence shall be of “main” type.

The microscopic view allows for explicit inclusion of tracks within stations into the lines. Each track of the macroscopic view shall begin and end with anything except for <macroscopicNode>-s, e.g. <connection>-s. All tracks within a station shall be referenced from <propEquipment> of an the <ocp> representing that station. The rest of the tracks are segments. A line is a sequence of tracks “between” and “within” a station. Each track of a line sequence shall be of “main” type.

According to the railway regulations entry and home signals may indicate beginning of a “segment”.

See below the source code modified excerpts of both levels based on the “Simple example” of version 12 from 2023-07-25.

Users may consider the original “Simple example” to be of a microscopic level of aggregation. Modifications were made so that a double track line is possible.

Microscopic level of aggregation

Switches are omitted for the sake of brevity.

2023-08-22 double track micro (1).svg


<infrastructure id="inf01">
  <tracks>
    <track id="tr01"
           type="mainTrack"
           mainDir="up">
      <trackTopology>
        <trackBegin pos="0"
                    id="tr01_tb">
          <bufferStop id="tr01_bs01"/>
        </trackBegin>
        <trackEnd pos="600"
                  id="tr01_te">
          <connection ref="tr06_c01"
                      id="tr01_c01"/>
        </trackEnd>
...
        </trackTopology>
...
    </track>
    <track id="tr02"
           type="mainTrack"
           mainDir="down">
      <trackTopology>
        <trackBegin pos="0"
                    id="tr02_tb">
          <bufferStop id="tr02_bs01"/>
        </trackBegin>
        <trackEnd pos="300"
                  id="tr02_te">
          <connection ref="tr04_c01"
                      id="tr02_c01"/>
        </trackEnd>
...
        </trackTopology>
...
    </track>
    <track id="tr03"
           type="mainTrack"
           mainDir="none">
      <trackTopology>
        <trackBegin pos="0"
                    id="tr03_tb">
          <bufferStop id="tr03_bs01"/>
        </trackBegin>
        <trackEnd id="tr03_te"
                  pos="300">
          <connection id="tr03_c01"
                      ref="tr04_c02"/>
        </trackEnd>
...
        </trackTopology>
...
    </track>
    <track id="tr04"
           type="sidingTrack"
           mainDir="down">
      <trackTopology>
        <trackBegin pos="0"
                    id="tr04_tb">
          <connection ref="tr06_c01"
                      id="tr02_c01"/>
        </trackBegin>
        <trackEnd pos="100"
                  id="tr04_te">
          <connection ref="tr07_c01"
                      id="tr04_c03"/>
        </trackEnd>
      </trackTopology>
...
    </track>
    <track id="tr05"
           type="secondaryTrack"
           mainDir="none">
      <trackTopology>
        <trackBegin pos="0"
                    id="tr05_tb">
          <connection ref="tr06_c03"
                      id="tr05_c01"/>
        </trackBegin>
        <trackEnd pos="100"
                  id="tr05_te">
          <connection ref="tr04_c04"
                      id="tr05_c02"/>
        </trackEnd>
      </trackTopology>
...
      </track>
    <track id="tr06"
           type="secondaryTrack"
           mainDir="up">
      <trackTopology>
        <trackBegin pos="0"
                    id="tr06_tb">
          <connection ref="tr01_c01"
                      id="tr06_c01"/>
        </trackBegin>
        <trackEnd pos="100"
                  id="tr06_te">
          <connection ref="tr08_c01"
                      id="tr06_c02"/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
    <track id="tr07"
           type="mainTrack"
           mainDir="down">
      <trackTopology>
        <trackBegin pos="0"
                    id="tr07_tb">
          <connection ref="tr04_c03"
                      id="tr07_c01"/>
        </trackBegin>
        <trackEnd pos="200"
                  id="tr07_te">
          <connection ref="tr09_c01"
                      id="tr07_c02"/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
    <track id="tr08"
           type="mainTrack"
           mainDir="up">
      <trackTopology>
        <trackBegin id="tr08_tb"
                    pos="0">
          <connection id="tr08_c01"
                      ref="tr06_c02"/>
        </trackBegin>
        <trackEnd id="tr08_te"
                  pos="100">
          <connection id="tr08_c02"
                      ref="tr10_c01"/>
        </trackEnd>
      </trackTopology>
...
      </track>
    <track id="tr09"
           type="mainTrack"
           mainDir="down">
      <trackTopology>
        <trackBegin id="tr09_tb"
                    pos="1">
          <connection id="tr09_c01"
                      ref="tr07_c02"/>
        </trackBegin>
        <trackEnd pos="100"
                  id="tr09_te">
          <connection ref="tr11_c01"
                      id="tr09_c02"/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
    <track id="tr10"
           type="mainTrack"
           mainDir="up">
      <trackTopology>
        <trackBegin id="tr10_tb"
                    pos="0">
          <connection id="tr10_c01"
                      ref="tr08_c02"/>
        </trackBegin>
        <trackEnd pos="100"
                  id="tr10_te">
          <connection id="tr10_c02"
                      ref="tr14_c01"/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
    <track id="tr11"
           type="mainTrack"
           mainDir="down">
      <trackTopology>
        <trackBegin id="tr11_tb"
                    pos="0">
          <connection id="tr11_c01"
                      ref="tr08_c02"/>
        </trackBegin>
        <trackEnd pos="200"
                  id="tr11_te">
          <connection id="tr11_c02"
                      ref="tr13_c01"/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
    <track id="tr12"
           type="mainTrack"
           mainDir="none">
      <trackTopology>
        <trackBegin id="tr12_tb"
                    pos="0">
          <connection id="tr12_c01"
                      ref="tr10_c03"/>
        </trackBegin>
        <trackEnd pos="100"
                  id="tr12_te">
          <connection id="tr12_c02"
                      ref="tr13_c02"/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
    <track id="tr13"
           type="mainTrack"
           mainDir="down">
      <trackTopology>
        <trackBegin id="tr13_tb"
                    pos="0">
          <connection id="tr13_c01"
                      ref="tr11_c02"/>
        </trackBegin>
        <trackEnd pos="100"
                  id="tr13_te">
          <connection id="tr13_c03"
                      ref="tr15_c01"/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
    <track id="tr14"
           type="mainTrack"
           mainDir="up">
      <trackTopology>
        <trackBegin id="tr14_tb"
                    pos="0">
          <connection id="tr14_c01"
                      ref="tr10_c02"/>
        </trackBegin>
        <trackEnd pos="300"
                  id="tr14_te">
          <bufferStop id="tr14_bs01"/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
    <track id="tr15"
           type="mainTrack"
           mainDir="down">
      <trackTopology>
        <trackBegin id="tr15_tb"
                    pos="0">
          <connection id="tr15_c01"
                      ref="tr13_c03"/>
        </trackBegin>
        <trackEnd pos="100"
                  id="tr15_te">
          <bufferStop id="tr15_bs01"/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
    <track id="tr16"
           type="mainTrack"
           mainDir="none">
      <trackTopology>
        <trackBegin id="tr16_tb"
                    pos="0">
          <connection id="tr16_c01"
                      ref="tr13_c04"/>
        </trackBegin>
        <trackEnd pos="100"
                  id="tr16_te">
          <bufferStop id="tr16_bs01"/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
  </tracks>
  <trackGroups>
    <line id="li01"
          code="6869"
          infrastructureManagerRef="ima01"
          lineCategory="D4"
          type="mainLine">
    </line>
    <line id="li02"
          code="6869"
          infrastructureManagerRef="ima01"
          lineCategory="D4"
          type="mainLine"
          belongsToParent="li01">
...
        <trackRef ref="tr01"
                sequence="1"/>
      <trackRef ref="tr06"
                sequence="2"/>
      <trackRef ref="tr08"
                sequence="3"/>
      <trackRef ref="tr10"
                sequence="4"/>
      <trackRef ref="tr14"
                sequence="5"/>
    </line>
    <line id="li03"
          code="6869"
          infrastructureManagerRef="ima01"
          lineCategory="D4"
          type="mainLine"
          belongsToParent="li01">
...
        <trackRef ref="tr02"
                sequence="1"/>
      <trackRef ref="tr04"
                sequence="2"/>
      <trackRef ref="tr07"
                sequence="3"/>
      <trackRef ref="tr09"
                sequence="4"/>
      <trackRef ref="tr11"
                sequence="5"/>
      <trackRef ref="tr13"
                sequence="6"/>
      <trackRef ref="tr15"
                sequence="7"/>
    </line>
  </trackGroups>
  <operationControlPoints>
    <ocp id="ocp01"
         name="Bf Cstadt"
         xml:lang="de"
         type="operationalName">
...
      <propEquipment>
        <trackRef ref="tr01"/>
        <trackRef ref="tr02"/>
        <trackRef ref="tr03"/>
        <trackRef ref="tr04"/>
        <trackRef ref="tr05"/>
        <trackRef ref="tr06"/>
        <trackRef ref="tr07"/>
      </propEquipment>
...
      </ocp>
    <ocp id="ocp02"
         name="Bf Arnau"
         xml:lang="de"
         type="operationalName">
...
      <propEquipment>
        <trackRef ref="tr10"/>
        <trackRef ref="tr11"/>
        <trackRef ref="tr12"/>
        <trackRef ref="tr13"/>
        <trackRef ref="tr14"/>
        <trackRef ref="tr15"/>
        <trackRef ref="tr16"/>
      </propEquipment>
...
      </ocp>
  </operationControlPoints>
...
  </infrastructure>

Macroscopic level of aggregation

Cross sections are omitted for the sake of brevity.

2023-08-22 double track macro (1).svg

Tracks within a station a represented through a “loop” mechanism. Station refers to the belonging tracks through <propEquipment> child. Track within a station refer to the same <macroscopicNode> from both <trackBegin> and <trackEnd> children. Keep in mind that tracks within a station should be referenced from line only if a user owns explicit information about their connections to a line segment. Otherwise, they can be omitted. As tracks are not connected information on a length of a station is loosed.

<infrastructure id="inf01">
  <tracks>
    <track id="tr01"
           type="mainTrack"
           mainDir="up">
      <trackTopology>
        <trackBegin pos="0"
                    id="tr01_tb">
          <macroscopicNode ocpRef='ocp01'/>
        </trackBegin>
        <trackEnd pos="600"
                  id="tr01_te">
          <macroscopicNode ocpRef='ocp01'/>
        </trackEnd>
...
        </trackTopology>
...
    </track>
    <track id="tr02"
           type="mainTrack"
           mainDir="down">
      <trackTopology>
        <trackBegin pos="0"
                    id="tr02_tb">
          <macroscopicNode ocpRef='ocp01'/>
        </trackBegin>
        <trackEnd pos="300"
                  id="tr02_te">
          <macroscopicNode ocpRef='ocp01'/>
        </trackEnd>
...
        </trackTopology>
...
    </track>
    <track id="tr03"
           type="mainTrack"
           mainDir="none">
      <trackTopology>
        <trackBegin pos="0"
                    id="tr03_tb">
          <macroscopicNode ocpRef='ocp01'/>
        </trackBegin>
        <trackEnd id="tr03_te"
                  pos="300">
          <macroscopicNode ocpRef='ocp01'/>
        </trackEnd>
...
        </trackTopology>
...
    </track>
    <track id="tr04"
           type="sidingTrack"
           mainDir="down">
      <trackTopology>
        <trackBegin pos="0"
                    id="tr04_tb">
          <macroscopicNode ocpRef='ocp01'/>
        </trackBegin>
        <trackEnd pos="100"
                  id="tr04_te">
          <macroscopicNode ocpRef='ocp01'/>
        </trackEnd>
      </trackTopology>
...
    </track>
    <track id="tr05"
           type="secondaryTrack"
           mainDir="none">
      <trackTopology>
        <trackBegin pos="0"
                    id="tr05_tb">
          <macroscopicNode ocpRef='ocp01'/>
        </trackBegin>
        <trackEnd pos="100"
                  id="tr05_te">
          <macroscopicNode ocpRef='ocp01'/>
        </trackEnd>
      </trackTopology>
...
      </track>
    <track id="tr06"
           type="secondaryTrack"
           mainDir="up">
      <trackTopology>
        <trackBegin pos="0"
                    id="tr06_tb">
          <macroscopicNode ocpRef='ocp01'/>
        </trackBegin>
        <trackEnd pos="100"
                  id="tr06_te">
          <macroscopicNode ocpRef='ocp01'/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
    <track id="tr07"
           type="mainTrack"
           mainDir="down">
      <trackTopology>
        <trackBegin pos="0"
                    id="tr07_tb">
          <macroscopicNode ocpRef='ocp01'/>
        </trackBegin>
        <trackEnd pos="200"
                  id="tr07_te">
          <macroscopicNode ocpRef='ocp01'/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
    <track id="tr08"
           type="mainTrack"
           mainDir="up">
      <trackTopology>
        <trackBegin id="tr08_tb"
                    pos="0">
          <macroscopicNode ocpRef='ocp01'/>
        </trackBegin>
        <trackEnd id="tr08_te"
                  pos="100">
          <macroscopicNode ocpRef='ocp02'/>
        </trackEnd>
      </trackTopology>
...
      </track>
    <track id="tr09"
           type="mainTrack"
           mainDir="down">
      <trackTopology>
        <trackBegin id="tr09_tb"
                    pos="1">
          <macroscopicNode ocpRef='ocp01'/>
        </trackBegin>
        <trackEnd pos="100"
                  id="tr09_te">
          <macroscopicNode ocpRef='ocp02'/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
    <track id="tr10"
           type="mainTrack"
           mainDir="up">
      <trackTopology>
        <trackBegin id="tr10_tb"
                    pos="0">
          <macroscopicNode ocpRef='ocp02'/>
        </trackBegin>
        <trackEnd pos="100"
                  id="tr10_te">
          <macroscopicNode ocpRef='ocp02'/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
    <track id="tr11"
           type="mainTrack"
           mainDir="down">
      <trackTopology>
        <trackBegin id="tr11_tb"
                    pos="0">
          <macroscopicNode ocpRef='ocp02'/>
        </trackBegin>
        <trackEnd pos="200"
                  id="tr11_te">
          <macroscopicNode ocpRef='ocp02'/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
    <track id="tr12"
           type="mainTrack"
           mainDir="none">
      <trackTopology>
        <trackBegin id="tr12_tb"
                    pos="0">
          <macroscopicNode ocpRef='ocp02'/>
        </trackBegin>
        <trackEnd pos="100"
                  id="tr12_te">
          <macroscopicNode ocpRef='ocp02'/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
    <track id="tr13"
           type="mainTrack"
           mainDir="down">
      <trackTopology>
        <trackBegin id="tr13_tb"
                    pos="0">
          <macroscopicNode ocpRef='ocp02'/>
        </trackBegin>
        <trackEnd pos="100"
                  id="tr13_te">
          <macroscopicNode ocpRef='ocp02'/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
    <track id="tr14"
           type="mainTrack"
           mainDir="up">
      <trackTopology>
        <trackBegin id="tr14_tb"
                    pos="0">
          <macroscopicNode ocpRef='ocp02'/>
        </trackBegin>
        <trackEnd pos="300"
                  id="tr14_te">
          <macroscopicNode ocpRef='ocp02'/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
    <track id="tr15"
           type="mainTrack"
           mainDir="down">
      <trackTopology>
        <trackBegin id="tr15_tb"
                    pos="0">
          <macroscopicNode ocpRef='ocp02'/>
        </trackBegin>
        <trackEnd pos="100"
                  id="tr15_te">
          <macroscopicNode ocpRef='ocp02'/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
    <track id="tr16"
           type="mainTrack"
           mainDir="none">
      <trackTopology>
        <trackBegin id="tr16_tb"
                    pos="0">
          <macroscopicNode ocpRef='ocp02'/>
        </trackBegin>
        <trackEnd pos="100"
                  id="tr16_te">
          <macroscopicNode ocpRef='ocp02'/>
        </trackEnd>
...
        </trackTopology>
...
      </track>
  </tracks>
  <trackGroups>
    <line id="li01"
          code="6869"
          infrastructureManagerRef="ima01"
          lineCategory="D4"
          type="mainLine">
    </line>
    <line id="li02"
          code="6869"
          infrastructureManagerRef="ima01"
          lineCategory="D4"
          type="mainLine"
          belongsToParent="li01">
...
        <trackRef ref="tr01"
                sequence="1"/>
      <trackRef ref="tr06"
                sequence="2"/>
      <trackRef ref="tr08"
                sequence="3"/>
      <trackRef ref="tr10"
                sequence="4"/>
      <trackRef ref="tr14"
                sequence="5"/>
    </line>
    <line id="li03"
          code="6869"
          infrastructureManagerRef="ima01"
          lineCategory="D4"
          type="mainLine"
          belongsToParent="li01">
...
        <trackRef ref="tr02"
                sequence="1"/>
      <trackRef ref="tr04"
                sequence="2"/>
      <trackRef ref="tr07"
                sequence="3"/>
      <trackRef ref="tr09"
                sequence="4"/>
      <trackRef ref="tr11"
                sequence="5"/>
      <trackRef ref="tr13"
                sequence="6"/>
      <trackRef ref="tr15"
                sequence="7"/>
    </line>
  </trackGroups>
  <operationControlPoints>
    <ocp id="ocp01"
         name="Bf Cstadt"
         xml:lang="de"
         type="operationalName">
...
      <propEquipment>
        <trackRef ref="tr01"/>
        <trackRef ref="tr02"/>
        <trackRef ref="tr03"/>
        <trackRef ref="tr04"/>
        <trackRef ref="tr05"/>
        <trackRef ref="tr06"/>
        <trackRef ref="tr07"/>
      </propEquipment>
...
      </ocp>
    <ocp id="ocp02"
         name="Bf Arnau"
         xml:lang="de"
         type="operationalName">
...
      <propEquipment>
        <trackRef ref="tr10"/>
        <trackRef ref="tr11"/>
        <trackRef ref="tr12"/>
        <trackRef ref="tr13"/>
        <trackRef ref="tr14"/>
        <trackRef ref="tr15"/>
        <trackRef ref="tr16"/>
      </propEquipment>
...
      </ocp>
  </operationControlPoints>
...
  </infrastructure>