Special Cases Requiring Special Care

Two special situations, each requiring special care, can arise as you engage in the process of linking a Sub-model stock/flow structure to its associated main level structure. Each arises when there is a mismatch between flows on the main level, and the flows in the Sub-model. First, we'll look at the case in which an outflow from the Sub-model stock/flow structure has not been rolled up into an outflow from the Sub-model icon. Second, we'll look at the case in which there is not a one to one correspondence between the number of inflows to the Sub-model icon, and the number of flows to the Sub-model stock/flow structure.

Case 1: The un-rolled up outflow: Consider the Sub-model configuration shown in Figure 9-20.

Figure 9-20
Sub-model Stock/Flow Structure with Undefined/Unassigned Outflow

In this configuration, the stock/flow structure has been rolled up to the Sub-model icon. The flow exit process' has been rolled up to the main level outflow exit process. Finally, the main level inflow enter process has been rolled down to the Sub-model inflow enter process'. Note, however, the "?" in the outflow from the stock/flow structure, Noname 1. This outflow has not been rolled up to the main level. Nor has it been defined in its own right.

A natural response to the "?" would be to open Noname 1 and define its logic. Doing so leads to a somewhat puzzling result, as shown in Figure 9-21. Although the "?" is (correctly) extinguished for Noname 1, a new "?" has appeared in the Sub-model icon. At this point, you might ask, "What's going on here?"

Figure 9-21
A ? in the Sub-model Icon -- Unassigned Flow

What's going on is this: The Sub-model stock/flow structure has not been completely assigned to the main level structure. Specifically, not all outflows from the stock/flow structure have been rolled up into outflows from the Sub-model icon.

Control-double-clicking (Windows) or command-double-clicking (Macintosh) on the Sub-model icon, after attempting to run the model, would bring forth an alert which summarizes the problem. To remedy it, you have two options. First, you could control-double-click (Windows) or command-double-click (Macintosh) on the exit process flow. Within the dialog, you could add Noname 1 to the roll-up definition. Second, as illustrated in Figure 9-22, you could create a second outflow from the Sub-model icon, and use it to roll up the Noname 1 flow. Exercising either option would put the model into a runnable state.

Figure 9-22
Adding a Second Outflow to the Main Level

Case 2: The mismatched inflows: A second case requiring special care can occur when there is a mismatch between the number of inflows to a Sub-model icon, and the number of flows into the corresponding stock/flow structure. As an illustration of this phenomenon, consider Figure 9-23.

Figure 9-23
A Simple Sub-model Configuration

This configuration has been completely defined, with all roll-ups and roll-downs assigned. Watch what happens, however, when a second inflow is drawn into the Sub-model icon on the main level. Figure 9-24 shows the result.

Figure 9-24
Adding a Second Inflow to the Main Level

Again, the question mark which appears in the Sub-model icon is an indication that your work is not finished. (You'll receive an alert to this effect if you open the Sub-model icon, or if you try to run the model.) The software requires that each inflow to the Sub-model icon is rolled down to a unique inflow in the stock/flow structure. This means that you must draw another inflow into the Sub-model stock/flow structure, if you wish to retain the second inflow to the Sub-model icon. The inflow to the stock/flow structure may be drawn into Stage 1. Or, as shown in Figure 9-25, you can draw the required inflow into Stage 2.

Figure 9-25
Rolling Down a Second Inflow to the Sub-model Stock/Flow Structure

See Also