StabledTrains
Jump to navigation
Jump to search
Contents | Developers pages | Command Line Options | Timetables | Scenario Creation | Developing Installers
Page is under construction. Information is subject to change.
- ID
- (int)
- Automatically incremented.
- TrainID
- (string)
- The name of the train used within the simulation.
- LinkToTrainID
- (int)
- A reference to the a train defined in the TimeTable table. Such a reference is used to refer to information in that table that is not available in the StabledTrains table (days on which the train runs, for example).
- SteeringID
- (string)
- (optional)
- The steering number, if defined, for this train.
- Direction
- (int)
- Defines the direction the train faces when initially created.
- 0 - Left
- 1 - Right
- PhysicsID
- (int)
- Reference to a row in the TrainTypes table. Defines physical and mechanical properties of the train.
- ConsistTemplate
- (int)
- Reference to a row in the ConsistTemplates table. Defines rollingstock for the train.
- StationID
- (string)
- When the timetable has multiple stations defined, this field indicates to which station the stabled train belongs.
- TrackID
- (string)
- Defines the name of the track onto which the train is placed. The train must fit on this track or will not be loaded.
- TrackPosition
- (int)
- Defines the distance from the left-most insulation joint of the track to the train. The train must fit on this track or will not be loaded.
- StartTime
- (DateTime)
- Only the time portion of the DateTime is used (the date portion is ignored).
- Defines the starting time of when a stabled train will appear when starting a new simulation. If a simulation starts before this time, the stabled train is not created.
- EndTime
- (DateTime)
- Only the time portion of the DateTime is used (the date portion is ignored).
- Defines the ending time of when a stabled train will appear when starting a new simulation. If a simulation starts after this time, the stabled train is not created.
- IsStaffed
- (bool)
- True when the train is initially staffed with a driver.
- StartAtMovementOrder
- (int)
- Indicates which movement order is the next to be carried out. This is useful when defining stabled trains that are as a result of "previous" shunting.
- PeriodStart
- (DateTime)
- Only the date portion of the DateTime is used (the time portion is ignored).
- When left blank, stabled train is valid for all dates
- Defines the date when the stabled train is valid. Simulations started with a date before this date are not created.
- PeriodEnd
- (DateTime)
- Only the date portion of the DateTime is used (the time portion is ignored).
- When left blank, stabled train is valid for all dates
- Defines the date until which the stabled train is valid. Simulations started with a date after this date are not created.
Loading Stabled Trains
The following is a step-by-step summary of the stabled trains loading procedure.
- Fields are read from the StabledTrains table.
- We then look to see if there's an associated item(hereafter called the 'timetableitem') from the TimeTable table using the value in LinkToTrainID. If yes:
- We check to see if it has a SteeringID. If yes, and no SteeringID is defined in the table, then we assume the SteeringID from the timetableitem.
- We then check if that item is delayed more than 5 minutes or so. If yes, and the trainID of the stabled train starts with "Lok>" ("loc>" in non-German sims), then we change the name of the train to either the name of the first vehicle, or the name of the first vehicle + the number of remaining vehicles.
- We then use the timetableitem to check if the train should run on this particular day.
- Then, we check if the train ID belongs to a rejected train series (Timetable expert levels).
- If we have not encountered any errors, and the train is within the PeriodStart/PeriodEnd dates, runs today, and is within the StartTime/EndTime times, and is not a rejected train series
- If we have a linked timetableitem and its trainID does NOT match the train ID defined for the stabled train, we discard the timetableitem.
- If we still have a linked timetableitem, we obtain the movement orders and the path, if they are defined.
- If we do not have a linked timetableitem, we check if any movement orders are defined for this train using its trainID only. (Such orders are defined using the Train_ID_Soft field in the MovementOrders table).
- If we have a linked timetableitem, we discard movement orders up to the StartAtMovementOrder index number.
- If we have a linked timetableitem, we obtain the platform/timetable stops, the StartNX/EndNX/Destination values from it
With this information, we then attempt to place the train, provided that the train fits on the given track at the given position, and the track is not already occupied.
Contents | Developers pages | Command Line Options | Timetables | Scenario Creation | Developing Installers