Workspace Updating


Running a simulation

To run a simulation use the iterate step and play play  buttons in the main desktop toolbar.

On each iteration an update occurs, which essentially means all the components and couplings are updated.   The workspace time is iterated, the components are all updated, and the couplings are updated.   There are various types of update, and you have some control over how the update happens

Time: When a simulation is run iterations or "simulation time" are tracked.   This time is represented in the toolbar, and can be reset to 0 by double clicking on the text label.

Updating From Terminal
An alternative method is to use a  terminal component  or in the terminal tab at the bottom of the desktop.  The command workspace.iterate(n) can be use to iterate the workspace n times. 

Managing and Customizing Workspace Update

Workspace updates occur according to a default buffered update strategy, but this can be customized in various ways.  Sometimes it is important that components and couplings be updated in a very specific way over time.

On any update the actions listed in the current update sequence panel will be instantiated in the order shown.   To customize the way update happens, open the workspace dialog and click on the update tab.  This is what you will see:

Update Panel



Current Update Sequence: The current list of update actions.  On a given iteration of the workspace the actions in this list will be fired in the order they are listed.   The order can be changed by dragging the actions around in the subpanel.

Unused update actions:  Actions you can add to the update sequence.You can move actions between the current and unused panels by selecting actions in the unused panel and clicking "add selected actions"

Add selected action(s):  Adds any selected actions in the unused update actions to the  current update sequence.

Remove selected actions(s): For selected actions in the current update sequence, move them to unused update actions.  For actions in the unused update actions, remove them altogether.

Add Custom action:  Create  a custom update action.   A script editor opens up, with comments that indicate how to go about creating the custom updater.  Users have access to the underlying workspace object and the gui desktop.  See scripting for more on how to create these scripts.  To edit a custom action just double click on it.

Changing update order.  To change the order of update actions, drag them around in the update sequence panel.

Types of Update Action

There are four kinds of action currently.

Buffered Update of all components and couplings

Update order does not matter. The default sequence of events is:

In this scheme, the impact of a coupling is "felt" after an iteration of the workspace, since coupling's producer value must first update to a buffer, then the consumer is updated on the next iteration.

Update Component

This action updates a single component.

Update Coupling

This action updates a coupling, pulling the producer value and applying it to the consumer.  By combining component and coupling updates in specific orders sequences of actions can be created that are not asynchronous and do not have a time lag in the way buffered update does.   But care must be taken since when new componentss and couplings are added they will not automatically be put in the current update sequence.

Custom Update Action

See add custom update action above.