Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "How scenarios are structured"
(→Downloadable Templates) |
(→Scenario Structure) |
||
Line 18: | Line 18: | ||
In summary, the order is population initializers before population models, population models before disease models, and disease models before infectors/inoculators. | In summary, the order is population initializers before population models, population models before disease models, and disease models before infectors/inoculators. | ||
− | [[Image: STEM_Nesting_Models.png]] | + | [[Image: STEM_Nesting_Models.png | Caption figure 1: Basic Scenario Structure]] |
==Download the Templates== | ==Download the Templates== |
Revision as of 07:00, 19 August 2012
Scenario Structure
At the beginning of a simulation, STEM allows decorators such as population models, population initializers and disease models to initialize themselves. For instance, when a disease model is initialized, it creates the disease model labels necessary to track the state of the disese in a population. A disease model depends on the population model labels created by a population model to be able to create the disease model labels. Furthermore, a population model depends on the existance of static population labels, created either by a population initializers or by dragging population data into your model from the STEM library.
Consequently, the order of initialization becomes important, and the order is controlled by nesting models inside models. Decorators that are deeper in the model tree are initialized before decorators higher up in the tree. See the figure below for an example. Deepest in the tree is a population initializer that creates the static population labels needed by the demographic population model one level up. The demographic population model subdivides the population into subgroups needed by the disease model in the level above.
In summary, the order is population initializers before population models, population models before disease models, and disease models before infectors/inoculators.
Download the Templates
This tutorial shows users how to compose a basic disease model scenario and a basic foodborne disease scenario using a project containing prepared templates. Please begin by downloading the template scenario project from the download page unzip it and import it into your workspace.
Template for a Basic Scenario with a Human Disease
After you successfully download, extract, and import the scenario (archive file Templates.zip), open the 'Templates project' in the designer perspective. Double click on the Disease Model scenario and you should see a series of empty nested project (see figure 2 above).