Track-related System-Item Attributes: Difference between revisions

From Planimate Knowledge Base
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 64: Line 64:


:Note the section is not tested for availability.
:Note the section is not tested for availability.
<br> <br>


=== ItemRouteStep  ===
=== ItemRouteStep  ===

Revision as of 10:21, 13 November 2009

Planimate automatically maintains a number of system-item attributes as trains move along a track network. These attributes simplify management of routines executed as trains move through the network and are useful to modellers generating logs and graphs of the train movement which occurs.

These system attributes are available via routines to support more sophisticated decision making, manage and control train movements, derive useful records and for creating train graph outputs.

They can be accessed when items pass through routines. Some can be changed, altering the nature of a train’s movement, others are read-only, and can be used also in switches, to control processing of and delays to train items.


Notes on Usage:

  • In Portals, these time attributes can be read at any time the train is in the Portal, but they will not be valid during lookahead; only read them during actual item moves.
  • Portals always set the timestamps, so all portals should include movement logging code.

Note on Use with Message Items:

  • Track log item parameters are NOT sent back from a message itemto the parent of the message.

These include:

  • loop enter/exit start/end delay times
  • section nominal running time (s.TrackSectionNominalTime)
  • section id (s.TrackLastSectionId)
  • road id (s.TrackLastSectionRoad)

The following are the system attributes maintained for each train item:


Name

Read / Write (R/W)

Description


ItemRouteDir

R
This returns the direction of movement of the train item along the Track Object - either Forward (1) or Reverse (2)

ItemRouteID

R
When an Item is assigned a Route to traverse a Rail Network, this is the ID for that Route. Corresponds to its index in the _Model Routes System Label List.

ItemRouteLocation

R
This returns the _ModelObject index to the next location the train item is to visit on its route.

ItemRouteSectionID

R
For an item/train which is on a route, it will return the section object index that the train would take if it went through a portal exit.
Will return 0 if the section has no object index or if a viable section could not be found.
Note the section is not tested for availability.

ItemRouteStep

R/W
When an Item assigned a Route moves across a Rail Network, as it completes each step by arriving at the next Object named in the Route, its Route Step Attribute will be incremented.

ItemRouteStepCount

R
Returns the total number of steps (Locations) in the Route the item is following.

ItemTrackForwardColumn

R/W
This provide the column reference for Planimate to use to look up the train item's FORWARD direction track section time for the Track being used.

ItemTrackReverseColumn

R/W
This provide the column reference for Planimate to use to look up the train item's REVERSE direction track section time for the Track being used.

LoopDelayOverride

R/W
This enables a modeller to instruct the Planimate Tracks Engine to ignore track portal loop delay testing and assignment when an item is doing a TestEnter on a portal exit leading up to the track.
It is useful where a modeller is doing advanced lookahead in evaluating possible train routes and the loop delay mechanism needs to be temporarily disabled in order that the modeller receives notification whether a route is actually viable.
Note that a special mode dispatcher is also required for this option to be useful.
Planimate will revert any changes made to this attribute during lookahead. Ensure any "Move" code does not leave this attribute in a non zero value or portal loop delays will fail.

RouteTestRow

Enables a modeller to query which row of a Route Selection table is being tested.
This is useful when the change objcet multiple route test capability is being used, as it enables the modeller to access other data they are storing in the table.
The value is the row number from the table. This value is set only during lookahead for Change Objects immediately downstream of the Change Object that is testing routes from the table.
Otherwise this value should not be relied upon for any purpose.

TrackLastSectionID

R
Gives the object label index of the last section the train entered.

TrackLastSectionRoad

R
Gives the road number the item travelled on the section that the train last entered.0 for single road; for multi-road sections its 1,2 (or 3 for triple track)
When an Item leaves a Track Section in a Rail Network, the Road that it travelled on is recorded.
This enables you to track the progress of a train item in great detail.
Consistency of results will depend on the 'direction' in which you have laid the track objects.

Track Loop Entry End

R
This gives the time that train completed arrival at a loop or portal.
If the Portal Option "Track:Does Loop Delays" is set, but there was no entry delay, this time will be the same as the TrackLoopEntryStart time.

TrackLoopEntryStart

R
This gives the time that a train arrived at a portal.
If the Portal Option "Track:Does Loop Delays" is set, and a loop entry delay was required, this is the start time of the loop entry delay period.
During the Loop Entry Delay period, the section remains unavailable and the train cannot begin to leave the Portal.

TrackLoopExitEnd

R
This gives the time that a train actually began to move on the previous section, (i.e. after it completed its Loop Exit Delay).
If the Portal Option "Track:Does Loop Delays" is set, but there is no exit delay, this time will be the same as the TrackLoopExitStart time.

TrackLoopExitStart

R
This gives the time that a train began to leave the previous Portal.
If the Portal Option "Track:Does Loop Delays" is set and a loop exit delay was required, this is the start time of the loop exit delay.

Track Section Nominal Time

R
Gives the nominal running time for the Track section that the train last used.
Note that this could be different to the actual running time which could be modified by section restrictions.