Scenario-defined trains

From SignalWiki
Revision as of 23:49, 27 February 2013 by Charlie (talk | contribs)

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Contents | Developers pages | Command Line Options | Timetables | Scenario Creation | Developing Installers



It is possible to create a scenario that does not have any trains, either existing in the yard, or in the timetable. Trains can be created (spawned) at the boundaries of the yard from the timetable, and optionally, from an explicit definition. Additionally, trains can be placed at precise locations in the yard. All scenario-defined trains, either spawning or stabled, are defined within a set of Consists tags:

 <Scenario app="ProductName" description="MyScenario" startDate="1965-01-01" startTime="00:00:00" >
    <Consists loadFromTimetable="true">
        <!-- scenario-defined trains go here -->
    </Consists>
 </Scenario>

To load trains from the timetable defined for this scenario, set the mandatory attribute loadFromTimetable to true. To specify a scenario with no timetable trains, set loadFromTimetable to false.

Defining spawning trains

<SpawningConsist id="loc>9903"
                 physics="7"
                 maxTechAllowedSpeed="80"
                 track="SPAWN_TC2_0"
                 startTime="08:05:20"
                 speed="80"
                 type="EL"
                 destination="Velp"
                 commDestination="Vp"
                 isEngineeringTrain="false"
                 consistTemplate="28">

   <PlatformStops>
      Arnhem,7,--:--,08:30,Arnhem-Velperpoort,1,08:35,08:38
   </PlatformStops>

   <MovementOrders>
      <Order type="Turnaround" track="" station="Arnhem-kap" />
      <Order type="Couple" track="" station="Arnhem-berg" with="9903w" newID="9903" calls="true" callsForDelay="false" newDir="R" />
   </MovementOrders>

</SpawningConsist>

Optional Attributes

SpawningConsist defines some additional, optional attributes:

steeringID
string
defines the steering number for the train, if one needs to be defined
path
integer
defines the path template ID number in the database
dependsOnTrain
integer
defines the database ID on which the scenario train depends
trainInstructions
string
indicates any special instructions for the dispatcher
origin
string
defines where the train originally came from
startNX
defines the neighbour (entrance/N) where the train enters the area of responsibility
endNX
defines the neighbour (exit/X) where the train exits the area of responsibility
outOfGaugeType
defines the type of out-of-gauge train.
outOfGaugeInstructions
defines various special instructions for this out-of-gauge train.

Defining stabled trains

<ExistingConsist id="9903"
                 physics="8"
                 maxTechAllowedSpeed="40"
                 distance="180"
                 direction="L"
                 type="DL"
                 destination="Arnhem"
                 commDestination="Ah"
                 isEngineeringTrain="true"
                 consistTemplate="13"
                 entryPoint="SPAWN_ZV_0" >
   <Occupying>
      <Track>210AT</Track>
      <Track>A202T</Track>
   </Occupying>
   <VisitedPlatformStops>Arnhem,4,--:--,12:14</VisitedPlatformStops>

   <UnvisitedPlatformStops>Arnhem,24,08:05,--:--</UnvisitedPlatformStops>

   <MovementOrders>
      <Order type="Uncouple" track="" station="Arnhem-berg" left="loc<9903" leftDir="L" right="9903w" 
            rightDir="R" at="0" newID="9903w" leftCalls="true" rightCalls="false"
            leftCallsForDelay="false" rightCallsForDelay="false"/>
      <Order type="Turnaround" track="" station="Arnhem-Westzijde" />
   </MovementOrders>
</ExistingConsist>

Optional Attributes

SpawningConsist defines some additional, optional attributes:

steeringID
string
defines the steering number for the train, if one needs to be defined
dependsOnTrain
integer
defines the database ID on which the scenario train depends
trainInstructions
string
indicates any special instructions for the dispatcher
origin
string
defines where the train originally came from
startNX
defines the neighbour (entrance/N) where the train enters the area of responsibility
endNX
defines the neighbour (exit/X) where the train exits the area of responsibility

Movement orders

You can define movement orders for each scenario-defined train, either a spawning train or stabled train.

The following types of Movement Orders are available:

 0: Renumber
 1: Turnaround
 2: Couple
 3: Uncouple
 4: Call
 5: ChangeDriver
 7: PullUp
 8: StopShort
 9: StopAhead
10: SwitchLock
13: StableCars
14: SpotCars
??: SpotCarsSpecify 
16: MoveTo
17: RunAround
18: ContentChanges



Contents | Developers pages | Command Line Options | Timetables | Scenario Creation | Developing Installers