Code: Difference between revisions
mNo edit summary |
|||
(9 intermediate revisions by one other user not shown) | |||
Line 3: | Line 3: | ||
<onlyinclude>[[Image:Change_Palette_Icon.jpg]] | <onlyinclude>[[Image:Change_Palette_Icon.jpg]] | ||
With a Change Object you can make changes in your model whenever an item passes through it during a model run. | With a Change Object you can make changes in your model whenever an item passes through it during a model run. | ||
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.</onlyinclude> | |||
A Change object is always idle. | A Change object is always idle. | ||
A Change Object can be classified as “Logical Only. | |||
It only operates when an item flows through it. | It only operates when an item flows through it. | ||
Change objects are the primary means by which you work with attributes in your model | Change objects are the primary means by which you work with attributes in your model. | ||
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. | 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 === | === Run Routine === | ||
Line 17: | Line 29: | ||
[[Image:Change Routine Icon.jpg]] | [[Image:Change Routine Icon.jpg]] | ||
You can use this option to change [[Attribute|Attribute]] values, [[Table|Table]] cells and perform a wide range of [[Routine_Operations|operations]] within your model whenever an [[Item|Item]] passes through the Change. | |||
==== Modifying Attributes ==== | ==== Modifying Attributes ==== | ||
Line 23: | Line 35: | ||
Attributes can be changed when an item passes through a Change object. | 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, | Attributes can dynamically control [[Interaction|interaction times]] for any delay, and also the behaviour of [[Switch|Switches]], [[Multiserver|MultiServers]], [[Splitter|Splitters]], [[DropOff|DropOffs]] and [[PickUp|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. | The application of Attributes in this fashion enables wide-ranging and complex system control and management structures to be simulated. | ||
Line 29: | Line 41: | ||
Attributes can also collect details about the logical behaviour of your model and present them as on-screen and/or logged statistics. | 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 an [[Item_Attribute|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 a [[Portal Attribute|Portal Attribute]], [[System Attribute|System Attribute]], [[Class Attribute|Class Attribute]] or [[Table|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. | Changes to Attributes can be specified through the use of a range of [[Routine_Operations|Routine Operations ]]that are entered into the Change Object. | ||
Any of these operations can use a Constant value, or an Attribute, Table, or other types of data for reference. | Any of these operations can use a Constant value, or an Attribute, Table, or other types of data for reference. | ||
Refer to the | Refer to the [[Routine_Editor|Routine Editor]] page for detailed information about available Operations.<br> | ||
=== Icon === | === Icon === | ||
{{Breakout|Changing an Item's Icon}} | |||
<br> | |||
=== File === | |||
[[Image:Change File Icon.jpg]] | |||
Any item passing through a Change Object set up for [[Data|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. | For more details on implementing Data Exchange, refer to: [[Data#Data Connectivity and Integration|Data Connectivity and Integration]]. | ||
=== Route === | === Route === | ||
Line 61: | Line 79: | ||
[[Image:Change Route Icon.jpg]] | [[Image:Change Route Icon.jpg]] | ||
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. | Before an Item will travel on [[Track|Track]] Objects it must be assigned a [[Route|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|Route Assignment Table]]. | |||
=== ODBC === | === ODBC === | ||
Line 67: | Line 89: | ||
[[Image:Change ODBC Icon.jpg]] | [[Image:Change ODBC Icon.jpg]] | ||
Enables Data Exchange with Databases that support the ODBC protocols. Refer to the ODBC | Enables Data Exchange with Databases that support the ODBC protocols. | ||
Refer to the [[ODBC Data Exchange|ODBC Data Exchange]] page. | |||
<br> | <br> | ||
Line 75: | Line 99: | ||
Refer to Editing Object Properties for information about editing properties common to all objects. | Refer to Editing Object Properties for information about editing properties common to all objects. | ||
<br> <br> | <br> <br> | ||
== Change Articles == | == Change Articles == |
Latest revision as of 15:25, 14 September 2020
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.
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.
A Change Object can be classified as “Logical Only.
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
You can use this option to change Attribute values, Table cells and perform a wide range of operations within your model whenever 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, MultiServers, 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 Attribute, System Attribute, Class Attribute 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 Object.
Any of these operations can use a Constant value, or an Attribute, Table, or other types of data for reference.
Refer to the Routine Editor page for detailed information about available Operations.
Icon
You can use this option to choose an icon to apply to the item passing through the Change Object.
The Icon option in the Change Object Menu enables you to change Item icons according to an INDEX, which can be a reference to an Attribute Value.
- For full details refer to this page: Changing an Item's Icon
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 Data Exchange page.
Refer to Editing Object Properties for information about editing properties common to all objects.
Change Articles
- File Options
- Routine
- Lookahead
- Changing an Item's Icon
- File access error handling
- Routine Attribute
- Routine Operations Dialog
- Making a HTTP request from a URL
- Speeding up ODBC operations by keeping the connection open
- Determining the last file read or written at a change object
- Executing a command in a minimised window
- Icon Assignment Table
Change Object Frequently Asked Questions