4.3. Creating Submodels
69
DISEASE
FIGURE 4.15
Use the same specifications as in the previous section of this chapter to arrive at the model as in Figure 4.16. Collapse the submodel structure into the
submodel icon by clicking on the upward-pointing arrow . Then create inflows and outflows to and from the submodel as in Figure 4.17. Notice that
you cannot create these flows as long as the submodel is still open.
In Figure 4.17, the variable NOT INFECTED is simply the sum of the stocks
SUSCEPTIBLE and IMMUNE, and the flow NET BIRTHS is specified as before,
but using NOT INFECTED and DISEASE as the inputs. The latter is the sum of
the stocks in the submodel , and thus corresponds to the total population.
While the submodel is closed, click on the DEATHS flow pipe and you will
see that it lists as an allowable input the "Noname 2" flow of the submodel
(see also Figure 4.16). Select it to specify the deaths because of disease.
Open your submodel by double-clicking on the submodel icon. Notice
that the flow previously called "Noname 2" has been renamed DEATHS' to
indicate that it is specified on the basis of the DEATH flow outside the submodel. While the submodel is open, specify the "Noname 3" flow by selecting the "Allowable Input " NET BIRTHS. Click OK and notice that the
flow in the submodel has been renamed NET BIRTHS'. Your model should
now look like Figure 4.18.
Create graphs of the state variables of this system, make an educated
guess of the system's dynamics , run the model for 400 periods at a DT= 1,
and observe the results. Figure 4.19 shows what you should get. The results
in that figure are the same as those in the previous section of this chapter.
Précédent

- 86/461

Suivant