Using Modules to Re-use a Common Structure

The following procedure describes the overall process for using an already-built structure in your model to provide input values to the model. For more information about each step, click the links provided.

  1. Create and test a model for the process that you want to re-use in other models.

    The Smooth3 model is an example of a process that you might want to build once to use as a part of other models.

  2. Define the inputs and outputs of the model.

    In the Smooth3 example, there are two inputs: the converter named "input" (shown below) and the converter named "averaging time".

    The output is the stock named "Smooth3".

  3. When you're finished creating the process model, save it.
  4. Create or open the model that will use the process model.
  5. Use the building block to add a module to the model.
  6. Import the process model as a module by selecting module and clicking the Import button on the Module Properties panel.
  7. Use connectors to create connections between the model variables and the module.

    In the Smooth3 example, the module is defined as having two inputs and one output, so we could draw the connections this way, with "demand" and "perception delay" providing the input value to Smooth3, and "perceived demand" accepting the returned output value from Smooth3:

  8. Assign the parameters and return values in the model to the defined module inputs and module outputs.

    In the Smooth3 example, the two module inputs ("input" and "averaging time") are the variables available to assign to the "demand" and "perception delay" variables in the model.

    Similarly, the module output "Smooth3" is the only variable available to be assigned to "perceived demand".

    This is what the model looks like with all variables assigned:

Concept Link IconSee Also