Assigning Module Inputs
In order to use a module in a hierarchy, you need to assign each module input to an actual variable. You can assign module inputs to:
- Variables that are directly connected to this
module with an incoming connector.
- Variables that are defined as module outputs in any module that's connected to
this module via an incoming connector.
- Variables defined as module outputs in any submodule that has a connector
into the module input.
There are two ways to assign module inputs:
- From within a module, by selecting an available variable that's outside the module.
- From outside of a module, by selecting a variable that has a connector into or out of a module and assigning it to a variable that's inside the module.
Assigning module inputs from inside the module is possible only when you have access to the module. If the module is locked, you can only assign module inputs from outside the module.
To Assign Module Inputs from Inside a Module
- Navigate into a module where you want to assign inputs by double-clicking
the module variable on the Map or Model layer.
-
In the module, right-click the variable you want to assign
an input to and then choose Assign Input
to. A list of variables that can be assigned to this
variable will appear.
- If the module input has already been assigned, a check mark appears next to the variable assigned to it (“Quality.normal_service_quality”,
in the above example).
- If a variable is assigned to another
variable in the module, it appears grayed out (“Quality.Service_Quality”
in the above example).
- If a variable is a flow, it can only be assigned to a flow if the module output flows into a cloud (sink) and the module input originates from a cloud (source). If these conditions aren't met, the variable's name appears grayed out.
-
If a variable is a flow and has already been assigned to a flow in the model, it appears grayed out for all other flows in the model.
Note: Although module outputs that are flows can only be assigned to one other flow in the model, they can still be assigned to as many converters as you want.
- All other listed outputs haven't been
assigned yet and can be assigned to inputs.
- Choose an available variable to assign to the module input. When
an input is already assigned, choosing a different variable reassigns
the input to the new variable. When you assign a module input, the variable's name
is automatically changed to the name of the output in the source module or model.
To Assign Module Inputs from Outside a Module
When you're assigning module inputs from outside a module, you can assign input variables to the connected module, as well as return values from within the module.
-
To assign a variable as an input value to a module input in a connected module, right-click the variable and then choose Assign to. A list of module inputs to which you can assign the variable appears:
- If the variable has already been assigned to the module input, a check mark appears next to it.
- If the variable is assigned to another
variable, its name appears grayed out.
- All other listed module inputs haven't yet been
assigned and can be assigned to the variable.
- Select an available module input to assign to the variable. When
a variable is already assigned to a module input, choosing a different module input reassigns
the variable to the new choice.
-
To assign a module output as a return value to a variable connected to the module, right-click the variable and then choose Assign Input to. A list of module outputs that can be assigned to the
variable will appear.
- Select an available module output to assign to the variable. When
a variable is already assigned to a module output, choosing a different module output reassigns
the variable to the new choice. When you assign a variable to a module output, the variable's name is automatically changed to the name of the output in the source module or model.
See Also