Creating a Variable Alias (Ghost)

A variable alias (also called a ghost) is a copy of a stock, flow, or converter that lets you use the original variable elsewhere in your model. The variable alias isn't a new, separate variable. Instead, it's a shortcut to the original variable.

Variable aliases help you keep your diagrams tidy by letting you use the same variable in separate locations in your model. This helps you keep connections neat, as the following pictures illustrate.

Note: You can also use the ghost tool to connect variables across modules and to assign module inputs and outputs automatically.

A ghost of a variable has no independent identity; it's just an image of the building block that it was ghosted from. The ghosted replica has no equation of its own. When you double-click a ghosted replica, the Equation panel that opens belongs to the original variable that the replica copies. No matter how many ghosted replicas of a given building block you create, only one equation exists, because only one building block exists. You can change the styles for each ghost separately, but nothing else.

A ghost adds no real structure to a model. Ghosted stocks have no inflows or outflows; ghosted flows and ghosted converters (when you "ghost" a flow, its ghost appears as a converter) have no input connectors. Ghosts are read-only information holders. You can draw connectors from them. Nothing can go into them.

To Create an Alias

  1. In Edit mode, navigate to the stock, flow, or converter you want to create an alias for.
  2. On the Build toolbar, click the ghost tool .
  3. Click once on the stock, flow, or converter that you want to ghost.

    The mouse pointer changes from the ghost pointer to a small image of the type of building block you're ghosting.

  4. Click the diagram where you want to place the ghost.

  5. Use the ghosted variable by adding connections between it and other model variables as needed.

Concept Link IconSee Also