Code

From Planimate Knowledge Base
Revision as of 13:09, 17 April 2009 by Tony.Griffith (talk | contribs)
Jump to navigation Jump to search

Change: Changes Your Model During a Run

With a Change Object you can make changes in your model whenever an item passes through it during a model run. A Change Object can be classified as “Logical Only. You use a Change Object to dynamically influence your model’s behaviour. Change Objects enable you to construct wide-ranging and complex system control and management structures in your model, and more sophisticated or detailed animation.

A Change object is always idle.

It only operates when an item flows through it.

Change objects are the primary means by which you work with attributes in your model. A Change object can perform sets of calculations (called Routines) that reference and modify Attributes, which can in turn determine the behaviour of other objects like Switches, Multi-Servers, etc. This kind of programming activity is event-based, and thus very flexible.

Change objects can alter an Item's Icon, by referencing an Index Number. Change objects also enable you to read and write attribute or table information to/from text files during your model run. They can also assign routes used for Rail network modelling, and perform queries and operations that read and write from ODBC Data sources.

Run Routine

Perform operations that change referenced Attribute values, Table elements or an entire Table every time an Item passes through the Change.

Modifying Attributes

Attributes can be changed when an item passes through a Change object.

Attributes can dynamically control interaction times for any delay, and also the behaviour of Switches, Multi-Servers, Splitters, DropOffs and PickUps during a model run.

The application of Attributes in this fashion enables wide-ranging and complex system control and management structures to be simulated.

Attributes can also collect details about the logical behaviour of your model and present them as on-screen and/or logged statistics.

Changes to an Item Attribute occur as the item passes through the Change Object, and affects only that individual Attribute of that individual item that is passing through the Change.

Changes to a Portal, System, Class or Table Attribute occur as the item passes through the Change, and its new value is "detected" at that time by any object that makes reference to that Attribute.

Changes to Attributes can be specified through the use of a range of Routine Operations that are entered into the Change.

Any of these operations can use a Constant value, or an Attribute, Table, or other types of data for reference.

Refer to the Routines topic for detailed information about available Operations.

Icon

Choose an icon to apply to the item passing through the Change Object.

Refer to Changing an Item's Icon for more details.


File

Any item passing through a Change Object set up for Data Exchange triggers a Data Exchange event. There are a number of options for data transfer using a Change Object. Data can be both imported and exported during a Model Run. The exported data comprises the the current value of selected attributes, and Tables. Imported Data is assigned to various Attributes, or Tables. You can select the Attributes that you wish to write, using the Attribute Selection Dialog.

For more details on implementing Data Exchange, refer to: Data Connectivity and Integration.

Route

Before an Item will travel on Track Objects it must be assigned a Route. The item needs to pass through a change object in which a route is applied to it before it departs the portal to go on to the track. Use the Route option in the change object and you can build up a list of routes in a Route Assignment Table.

ODBC

Enables Data Exchange with Databases that support the ODBC protocols. Refer to the ODBC Topics in the section on Data.



Refer to Editing Object Properties for information about editing properties common to all objects.



Change Articles



Change Object Frequently Asked Questions