Running Modules

You can run modules in three ways:

Note: A model that contains modules won't run until all inputs in each of its modules have been assigned to variables in the model. If the model is marked invalid, check all connections for the modules and make sure that all inputs are assigned and that there are no unused connectors. For more information, see Testing and Troubleshooting Modules.

The following procedure describes how to run selected modules within a model.

To Run One or More Modules in a Model

  1. In Edit mode, open the Model Settings Properties Panel by clicking an empty area in the diagram (or slide the panel out by clicking on the at the right of the window if you've closed the panel).

  2. Select the Partial Simulation tab.

  3. Select the modules that you want to run:

  4. Note: Modules whose names are grayed out can't run because they're not fully defined (don't have all variables defined), or have errors.

  5. When you've finished making your selections, click on the button at the bottom right of the panel.
  6. Run the model from the Menu or the Run Toolbar. Notice that on the Run toolbar the normal button to run the model changes to to indicate that run by module is active.

To Change Running Modules

Once you have specified Run by Module on the properties panel, it is possible to change which modules and which do not either before a run is made, or while the model is paused.

In the Model Window

When you enter analyze mode on a model set up to run by module each module will have a checkbox to indicate whether or not it is running. You can click on the checkbox to turn the module on or off. Then you make a change in this manner it will have the same effect as changing from the properties panel.

Note Name only modules will not display the checkbox.

Note When you change the running status of the module that change will stay, and will be reflected in the partial model simulation panel.

Note Restoring inputs does not have any impact on which modules run in the model window unless they have been changed from the interface.

On the interface

On the interface you can use either buttons (see Button (Interface)), or Switches (see Switch (Interface)) to turn modules on or off. If you set the module to have the value 0 it will not run. If you set it to have a nonzero value (typically 1) it will run.

Note changing module values on the interface will have an effect only if run by module is set. If it is not set, then changing module values will simply be ignored.

Note Modules controlled on the interface are treated like variables controlled. When you close the interface the on/off settings will be retained for runs until you restore inputs or change modules in the

Note Restoring inputs will switch modules back to match the settings made in the Partial Simulation Setup panel.

In Storytelling

In stories, the running state of a module is determined by its visibility. If a module is visible, that module, and any modules contained within it, will run. If it is not visible, it will not run.

Module running is determined only by the module visibility, and is independent of the visibility of any connectors into the module.

The setting of modules for running or not running before storytelling starts does not affect behavior in storytelling.

Note If you have not selected Run by Module in the properties panel then modules will not run, whether they are visible or not (only visible stocks, flows, and converters will run).

Concept Link IconSee Also