Item Related System Attributes

From Planimate Knowledge Base
Revision as of 23:24, 12 December 2008 by Tony.Griffith (talk | contribs)
Jump to navigation Jump to search

Item Related System Attributes

Name Read / Write Description

Item ID R The Item’s unique ID number in the system model during the model run.

Item Owning Item ID R Returns the ID of any item which OWNS the current item if it is a message item. If the current item is not a message item, -1 is returned.

Item Priority R/W Read or change the Item’s Priority in a change object using this attribute.

Items Carried R Read the number of Items being carried by the item, when it is acting as an Agent (and even when it is not).

Item Route ID 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.

Item Route Step 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.

Item Route Step Count R Indicates the number of Locations included in the Route Definition. Can be used to interrogate a route in a routine through iteration, using this as the end point.

Item Route Location R/W The _Model Objects Name of the Location included in the Route at the particular Route Step the Item is on.

Item Route Dir. R/W Indicates whether the Item is moving in the Forward or Back direction along the track. This can enable you to make your train item perform U-turns.

Item Stopping R When an Item enters a Loop Object on a Rail Network, it will know whether it has to stop to allow a train to pass it in one direction or another. If it does have to stop, this attribute can be read. (>1 = Stopping; 0 = Not Stopping).

Item Booking ID R/W Required for calculation operations to support adding bookings to a section; reading back all bookings from a section; clearing a sections bookings. Sections are read and written using a table which must have the following columns: "_book id" identifier of the item which the section is booked for. An integer >= 1. Only the item whose system attribute "booking id" matches will have access to the section during the booked interval "_from"; "_to" Specify the time range over which the section is booked

Act As An Agent R/W Determines how any agent-sensitive object (in tray, out tray, facility) will treat the item. The default setting of this attribute is that of the items class (set during edit of the class). For proper operation, you must ensure that any change made to this system attribute is seen during lookahead - if set in a routine just before the object, the routine must execute during lookahead. Otherwise the item may be let in as an item when in fact you wanted it to enter as an agent.

Item Show info Panel W Enables the info panel to be hidden/shown on an item by item basis.

Item Last Track Road R 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. (1 for Single or Road 1; 2 for second Road). Consistency of results will depend on the ‘direction’ in which you have laid the track objects.

Item Total Delay W When ‘placing an Item in an Object, set this value so the item knows what delay is involved.

Item Delay Left W When ‘placing an Item in an Object, set this value so the item knows what remaining delay is involved. Set ONLY after setting "Item Total Delay", as the engine needs it to compute the effective item entry time.

Item Location R/W Read this for a current location of an item. The object must be part of the _Model Objects label list. When ‘placing an Item in an Object, set this value so the item knows what Object it is being placed into. Set this using the _Model Objects label list, or a subset of it.

Item Location Detail R Extra parameter to item location, e.g. road # (of a track object), server # (in a Multi-Server). Not completely implemented, so don’t use it yet.

Item Trace Animation W When an item passes through a Change Object, and in its routine this attribute is set to a value of 1, the tracing of the animation of this item commences. That single item’s progress through the model structure will be following, shifting screens as it moves around, until it is destroyed, or until it is set back to Zero.

The following three system attributes are used for rail applications in conjunction with Dynamic Routes and Timetables.

Item Time Until Arrival R/W Gives the time which must elapse before the item needs to arrive at the next step in its route. (When an item is inside a station, its step pointer is already advanced to the next step). If the timetabled time has already passed or no route is assigned, this will yield 0.

Item Time Until Departure R/W Gives the time which must elapse before the item should leave the current object in its route. This is unavailable if the current object was the last step in the route (the route has completed). If the timetabled time has already passed or no route is assigned, this will yield 0.

Item Dwell Time R/W Gives the minimum time which the item must spend at the current object, even if its behind on its timetable. If no route is assigned, this will yield 0.

Item Transit Target W Before an Item can cross a Spatial link, it needs this attribute set. This is the other end of the Transit. To be a valid Target, it must be a Portal in the same subsystem as the Portal the link begins with, and must be in the _Model Objects List.

Item Transit Time W This is the time that the item will take to traverse the links on its way to the Transit target.

Item Transit Distance R This is set when an item first enters a spatial net. The value is the total distance to the specified target on the spatial link network. It doesn't get set until the item actually enters the spatial net. It is available upon arrival at the target, and can be used to track distances travelled (in pixels). It gets cleared when you assign a new target.

Broadcast Receivers R When an Item arrives at a Broadcast Dispatcher, the transmitted broadcast will be picked up by some Broadcast Entries tuned to it. This tells you how many. This is set after an item is released by a broadcast dispatcher. It is set to the number of receivers that the broadcast was sent to. This includes all entries which produced an item and all sockets which sent the broadcast over TCP/IP. Attribute Routine Runtime_Engine Item