Use Case: Formations

NOTE: Work in progress. We currently don’t import or export formations. Currently, this is an experimental use case that defines how we might do it. It is still work in progress.

Most important elements:

  • CompoundTrain
  • Train
  • TrainComponent
  • TrainElement
  • PassengerBoardingPositionAssignment (badly named, as we never deal with boarding positions, but quays)
classDiagram


    class Train {
        SelfPropelled: boolean
        components: TrainComponents[]
    }

    %% Contained elements
    class TrainComponent {
        Label: Text
        TrainElement
        TrainElementRef

        
    }

    class TrainElement {
        TrainElementType
        FareClasses

    }

class CompoundTrain {
    SelfPropelled : boolean
    components[]

    }

class TrainInCompoundTrain {
    TrainRef
    Label 
}
    class TrainBlock {
        TrainRef
        StartPointRef
        EndPointRef
        blockParts
    }

    class TrainBlockPart {
        Description
        CompoundTrainRef
        JourneyPartCoupleRef
    }

    class ServiceJourney {
        TrainRef
        BlockRef
        parts : JourneyPart[]
        passingTimes[]
        ServiceJourneyPatternRef
    }

    class ServiceJourneyPattern {
        stopPointInJourneyPattern []
    }

    class StopPointInJourneyPattern {
        ScheduledStopPointRef
    }


    class JourneyPart {
        ParentJourneyRef
        MainPartRef
        JourneyPartCoupleRef
        TrainNumberRef
        TrainBlockPartRef
        FromStopPointRef
        ToStopPointRef
    }

    class PassengerStopAssignment {
        ScheduledStopPointRef
        ArrivesForwards:boolean
        DepartsForwards: boolean
        StopPlaceRef
        QuayRef
        passengerBoardingPositionsAssignments
    }

    class PassengerBoardingPositionAssignment  {
     BoardingUse : boolean
     AlightingUse: boolean
     TrainComponentRef
     IsAllowed: boolean
    }

    %% Containment relations (only contained elements)
    Train "1" o-- "0..*" TrainComponent : contains
    TrainComponent "0" o-- "1" TrainElement : contains or references
    TrainBlock "1" o-- "0..*" TrainBlockPart : contains
    TrainBlock "1" --> "0..*" Train : references
    TrainBlockPart "1" --> "0..*" CompoundTrain : references
    CompoundTrain "1" --> "0..*" TrainInCompoundTrain : contains
    TrainInCompoundTrain "1" -- "1" Train : references
    ServiceJourney "1" o-- "0..1" Train : references
    ServiceJourney "1" o-- "0..1" TrainBlock : references
    ServiceJourney "1"  o-- "0..*" JourneyPart: contains
    JourneyPart  "1" o-- "0..1"  TrainBlock : references
    PassengerStopAssignment "0"  o-- "0..*" PassengerBoardingPositionAssignment : contains
    PassengerBoardingPositionAssignment "1" o-- "0..1"  TrainComponent : references
    ServiceJourney "1"  --> "1" ServiceJourneyPattern : references
    ServiceJourneyPattern "1" o-- "0..*" StopPointInJourneyPattern : contains
    StopPointInJourneyPattern "1"  --> "1" ScheduledStopPoint : references
    PassengerStopAssignment "1" --> "1" ScheduledStopPoint: references
    PassengerBoardingPositionAssignment "1" --> "0..1" ScheduledStopPoint: references

Example

See example 20.

We have two important parts. Firstly, the formation itself as part of vehicleTypes in the TimetableFrame:

				<vehicleTypes>
<CompoundTrain version="1" id="compoundtrain">
	<Name>4231</Name>
	<Description>2212 - 2122</Description>
	<SelfPropelled>true</SelfPropelled>
	<components>
		<TrainInCompoundTrain version="1" id="TICT1">
			<TrainRef version="1" ref="Train1"/>
			<Label>40447</Label>
		</TrainInCompoundTrain>
		<TrainInCompoundTrain version="1" id="TICT2">
			<TrainRef version="1" ref="Train2"/>
			<Label>457</Label>
		</TrainInCompoundTrain>
	</components>
</CompoundTrain>
<Train version="1" id="Train1">
	<Description>2212</Description>
	<SelfPropelled>true</SelfPropelled>
	<components>
		<TrainComponent version="1" id="bbd:trncmp_447_01">
			<Label>1</Label>
			<TrainElement version="1" id="bbd:trne_447_01">
				<Name/>
				<TrainElementType>carriage</TrainElementType>
				<FareClasses>secondClass</FareClasses>
				<LowFloor>true</LowFloor>
				<facilities>
					<ServiceFacilitySetRef ref="nf" version="1"/>
					<ServiceFacilitySetRef ref="bikehooks" version="1"/>
					<ServiceFacilitySetRef ref="strollerplattform" version="1"/>
				</facilities>
			</TrainElement>
		</TrainComponent>
		<TrainComponent version="1" id="bbd:trncmp_447_02">
			<Label>2</Label>
			<TrainElement version="1" id="bbd:trne_447_02">
				<Name/>
				<TrainElementType>carriage</TrainElementType>
				<FareClasses>secondClass</FareClasses>
				<LowFloor>true</LowFloor>
				<facilities>
					<ServiceFacilitySetRef ref="nf" version="1"/>
					<ServiceFacilitySetRef ref="bikehooks" version="1"/>
					<ServiceFacilitySetRef ref="strollerplattform" version="1"/>
				</facilities>
			</TrainElement>
			<ForwardCoupling>
				<Splittable>false</Splittable>
				<ThroughAccess>openEntrance</ThroughAccess>
			</ForwardCoupling>
		</TrainComponent>
		<TrainComponent version="1" id="bbd:trncmp_447_03">
			<Label>3</Label>
			<TrainElement version="1" id="bbd:trne_447_03">
				<Name/>
				<TrainElementType>carriage</TrainElementType>
				<FareClasses>firstClass</FareClasses>
				<LowFloor>true</LowFloor>
				<facilities>
					<ServiceFacilitySetRef ref="nf" version="1"/>
				</facilities>
			</TrainElement>
			<ForwardCoupling>
				<Splittable>false</Splittable>
				<ThroughAccess>openEntrance</ThroughAccess>
			</ForwardCoupling>
		</TrainComponent>
		<TrainComponent version="1" id="bbd:trncmp_447_04">
			<Label>4</Label>
			<TrainElement version="1" id="bbd:trne_447_04">
				<Name/>
				<TrainElementType>carriage</TrainElementType>
				<FareClasses>secondClass</FareClasses>
				<LowFloor>true</LowFloor>
				<facilities>
					<ServiceFacilitySetRef ref="nf" version="1"/>
					<ServiceFacilitySetRef ref="bikehooks" version="1"/>
					<ServiceFacilitySetRef ref="wheelchairspace" version="1"/>
				</facilities>
			</TrainElement>
			<ForwardCoupling>
				<Splittable>false</Splittable>
				<ThroughAccess>openEntrance</ThroughAccess>
			</ForwardCoupling>
		</TrainComponent>
	</components>
</Train>
<Train version="1" id="Train2">
	<Description>2122</Description>
	<SelfPropelled>true</SelfPropelled>
	<components>
		<TrainComponent version="1" id="bbd:trncmp_448_01">
			<Label>5</Label>
			<TrainElement version="1" id="bbd:trne_448_01">
				<Name/>
				<TrainElementType>carriage</TrainElementType>
				<FareClasses>secondClass</FareClasses>
				<LowFloor>true</LowFloor>
				<facilities>
					<ServiceFacilitySetRef ref="nf" version="1"/>
					<ServiceFacilitySetRef ref="bikehooks" version="1"/>
					<ServiceFacilitySetRef ref="wheelchairspace" version="1"/>
				</facilities>
			</TrainElement>
			<ForwardCoupling>
				<Splittable>true</Splittable>
				<ThroughAccess>noThroughAccess</ThroughAccess>
			</ForwardCoupling>
		</TrainComponent>
		<TrainComponent version="1" id="bbd:trncmp_448_02">
			<Label>6</Label>
			<TrainElement version="1" id="bbd:trne_448_02">
				<Name/>
				<TrainElementType>carriage</TrainElementType>
				<FareClasses>firstClass</FareClasses>
				<LowFloor>true</LowFloor>
				<facilities>
					<ServiceFacilitySetRef ref="nf" version="1"/>
				</facilities>
			</TrainElement>
			<ForwardCoupling>
				<Splittable>false</Splittable>
				<ThroughAccess>openEntrance</ThroughAccess>
			</ForwardCoupling>
		</TrainComponent>
		<TrainComponent version="1" id="bbd:trncmp_448_03">
			<Label>7</Label>
			<TrainElement version="1" id="bbd:trne_448_03">
				<Name/>
				<TrainElementType>restaurantCarriage</TrainElementType>
				<FareClasses>secondClass</FareClasses>
				<LowFloor>true</LowFloor>
				<facilities>
					<ServiceFacilitySetRef ref="nf" version="1"/>
					<ServiceFacilitySetRef ref="bikehooks" version="1"/>
					<ServiceFacilitySetRef ref="strollerplattform" version="1"/>
				</facilities>
			</TrainElement>
			<ForwardCoupling>
				<Splittable>false</Splittable>
				<ThroughAccess>openEntrance</ThroughAccess>
			</ForwardCoupling>
		</TrainComponent>
		<TrainComponent version="1" id="bbd:trncmp_448_04">
			<Label>8</Label>
			<TrainElement version="1" id="bbd:trne_448_04">
				<Name/>
				<TrainElementType>carriage</TrainElementType>
				<FareClasses>secondClass</FareClasses>
				<LowFloor>true</LowFloor>
				<facilities>
					<ServiceFacilitySetRef ref="nf" version="1"/>
					<ServiceFacilitySetRef ref="bikehooks" version="1"/>
					<ServiceFacilitySetRef ref="strollerplattform" version="1"/>
				</facilities>
			</TrainElement>
			<ForwardCoupling>
				<Splittable>false</Splittable>
				<ThroughAccess>openEntrance</ThroughAccess>
			</ForwardCoupling>
		</TrainComponent>
	</components>
</Train>
					</vehicleTypes>

Secondly, the PassengerStopAssignment that shows how the train is structured into the stop:

<PassengerStopAssignment id="ch:1:PassengerStopAssignment:8507492:80" version="1">
	<!-- no scheduled stop point reference here as we do not want to confuse consumers who ignore PassengerStopAssignments-->
	<StopPlaceRef ref="ch:1:sloid:7492" version="1"/>
	<!-- we assign the quay sector. The platform quay is known as the quay sector again references it (see definition of quay sector) -->
	<QuayRef ref="ch:1:sloid:7492:0:460848sectorB" version="1"/>
	<!-- now we assign all train components to the sector B -->
	<passengerBoardingPositionAssignments>
		<PassengerBoardingPositionAssignment id="pbpa20" version="1">
			<Description>Assign coach 5 to sector B</Description>
			<ScheduledStopPointRef ref="ch:1:sloid:7492:0:460848" version="1"/>
			<TrainComponentRef version="1" ref="bbd:trncmp_448_01"/>
		</PassengerBoardingPositionAssignment>
		<PassengerBoardingPositionAssignment id="pbpa21" version="1">
			<Description>Assign coach 6 to sector B</Description>
			<ScheduledStopPointRef ref="ch:1:sloid:7492:0:460848" version="1"/>
			<TrainComponentRef version="1" ref="bbd:trncmp_448_02"/>
		</PassengerBoardingPositionAssignment>
		<PassengerBoardingPositionAssignment id="pbpa22" version="1">
			<Description>Assign coach 7 to sector B</Description>
			<ScheduledStopPointRef ref="ch:1:sloid:7492:0:460848" version="1"/>
			<TrainComponentRef version="1" ref="bbd:trncmp_448_03"/>
		</PassengerBoardingPositionAssignment>
		<PassengerBoardingPositionAssignment id="pbpa23" version="1">
			<Description>Assign coach 8 to sector B</Description>
			<ScheduledStopPointRef ref="ch:1:sloid:7492:0:460848" version="1"/>
			<TrainComponentRef version="1" ref="bbd:trncmp_448_04"/>
		</PassengerBoardingPositionAssignment>
	</passengerBoardingPositionAssignments>
</PassengerStopAssignment>		

Usage Notes

  • Formations are modelled with CompoundTrain (referenced from the ServiceJourney with CompoundTrainRef) and Train. Block is not used.
  • We don’t invent additional ScheduledStopPoints for the sectors. The ScheduledStopPointRef of a PassengerBoardingPositionAssignment references the ScheduledStopPoint of the platform; the sector is given by the QuayRef of the PassengerStopAssignment.
  • If the quay is too short for the full train, the train components whose doors stay closed get a PassengerBoardingPositionAssignment with IsAllowed false (see Quay too short for the full train).

Quay too short for the full train

In Furna (RhB), the quay (track 1) is too short for the RE 1014 (Klosters Platz – Landquart, line RE13), which runs with two train parts. Only the doors of the front train part open. HRDF only delivers this as info text 000089875: “Bitte benützen Sie für den Ausstieg in Furna den vordersten Zugteil.”

In NeTEx, the PassengerStopAssignment of the formation in Furna contains one PassengerBoardingPositionAssignment per train component of the rear train part, with IsAllowed false. The ScheduledStopPointRef references the ScheduledStopPoint of track 1 in Furna. The info text is additionally delivered as Notice.

<PassengerStopAssignment id="ch:1:PassengerStopAssignment:8509061:formation" version="1">
  <StopPlaceRef ref="ch:1:sloid:9061" version="1"/>
  <QuayRef ref="ch:1:sloid:9061:0:487660" version="1"/>
  <passengerBoardingPositionAssignments>
    <PassengerBoardingPositionAssignment id="ch:1:PassengerBoardingPositionAssignment:8509061:4" version="1">
      <Description>Coach 4: doors stay closed in Furna</Description>
      <ScheduledStopPointRef ref="ch:1:sloid:9061:0:487660" version="1"/>
      <TrainComponentRef ref="ch:1:TrainComponent:RE1014-2-1" version="1"/>
      <IsAllowed>false</IsAllowed>
    </PassengerBoardingPositionAssignment>
    <!-- ... coaches 5 and 6 -->
  </passengerBoardingPositionAssignments>
</PassengerStopAssignment>

See example 24. The formation itself (number of coaches, classes) is illustrative, as HRDF contains no formation data.