Using Ghosts to Assign Module Inputs and Outputs

Using the Ghost tool is the simplest and fastest way to assign module inputs and outputs. When you use the Ghost tool to define which module variables are inputs and outputs to other modules, the software automatically defines the appropriate module connections (that is, which modules are connected to which other modules) and assigns the appropriate variables as either module inputs or module outputs.

To Assign Module Inputs and Outputs with the Ghost Tool

  1. In a model that contains one or more modules, navigate into a module that contains a variable whose value will be output to another module. In the following example, the model contains two modules: Customers and Fleet.

    In this example, the Customers module contains a stock called "Customers" that will serve as an input to the Fleet module. We'll begin by navigating into the Customers module:

  2. On the Model toolbar, select the Ghost tool .
  3. Click the center of the variable that will serve as a module input to another variable or module. The cursor changes to a small version of the ghosted building block's icon.

    In this example, we'll be defining the "Customers" stock as an input to the Fleet module, so we'll click the center of the "Customers" stock and the cursor will change to a small stock icon.

  4. Navigate to the module you want to create the ghosted variable in (either by double clicking on a module you want to enter, or by using the or buttons in the Model Window Mode Toolbar). In our example, we'll navigate up one level () and then into the Fleet module.
  5. Click anywhere on the module diagram to place the ghosted variable. The ghosted variable will appear and its name will include the name of the module that's providing the value. In our example, the ghosted variable is the "Customers.Customers" variable (that is, the "Customers" stock from the Customers module):

  6. Use a connector to draw the connection between the new module input and the variable it provides an input value to. In our example, we'll draw a connection between the new "Customers.Customers" variable and the "customer to plane ratio" converter:

  7. If you right-click the "Customers.Customers" variable and choose the Module command, you'll see that it's been automatically set to Accept Input. When you navigate back out of the module, you'll see the connection between the modules has been automatically drawn:

    If you navigate into the module that's providing the input value to the module (the Customers module in this example), right-click the variable that you ghosted into the other module, and choose the Module command, you'll see that it's been automatically set to Provide Output.

  8. Repeat steps 1 - 6 to assign module inputs and outputs between modules in your model.

Note: If you delete a ghosted variable and it isn't being used anywhere else in the model, the variable that served as the module output no longer serves as a module output. If there are no other variables shared between the modules (in the same direction), the software also automatically deletes the connection between modules.

Concept Link IconSee Also