Difference between revisions of "Batch Mode (Running Experiments)"
|Line 1:||Line 1:|
[[Image:STEM TOP BAR.gif]]
[[Image:STEM TOP BAR.gif]]
Latest revision as of 18:16, 1 October 2009
The purpose of Experiments is to allow running a set of scenarios, one after another, each modifying some aspect of a "base" scenario. As an example, suppose you do not know the transmission rate for a disease. One can set up an experiment that varies the transmission rate through a range of values and the result for each run can be analyzed (via log files).
STEM uses components called "Modifiers" to modify the base scenario from one run to the next. A modifier is attached to another component in your scenario. for instance a disease model or a infector. The modifier is responsible for changing one or more attributes of the attached component between runs.
An experiment is a collection of modifiers with a link to a scenario, and an experiment can run just like a scenario can run. When you run an experiment it creates a batch that will spawn off (a sequence of) simulations.
Creating an Experiment
1) Create a scenario (follow instructions here).
2) Create one or more modifiers. Modifiers can be created for for models, disease models, infectors, inoculators or graphs. To create a modifier for a disease, for example, find your disease in the STEM Project Explorer. Select it, right click on your disease, and chose create a modifier as shown in Figure 1.
Figure 1a,b: Creating a new modifier for a particular disease in an existing scenario (1a) and the wizard used to specify the features modified by the modifier (1b)
This will launch a new dialog to help you create a modifier that can be added to an experiment (see Figure 1b). In the new modifier dialog, for example, under Transmission rate select "range" (sequence not yet enabled) and specify the range as shown.
3) On top, select "New Experiment" from the toolbar to launch the New Experiment wizard (Figure 2). Specify a name for your experiment and click Finish.
4) Open your new Experiment in the editor and drag the Scenario you created into the experiment.
5) Drag the modifier you created into your new Experiment. You can drag any number of modifiers into the experiment.
5) Save your experiment by hitting ctrl+s
6) To run the experiment, right click on it and select run. It's a good idea to enable logging before you start an experiment, or the results will be lost.
Figure 2: The New Experiment Wizard.
Important clarification: As mentioned, an experiment can contain any number of modifiers. When the experiment runs, all possible combinations of parameter values defined by the modifiers will be enumerated and a scenario will be created and run for each of the combinations. If you look in Figure 1b however, it is also possible to set up a Modifier to modify more than one feature of a disease model. The distinction here is that when a modifier affects more than one feature, the sequence of values for those features will be kept in "locked steps" with each other. For instance, if a modifier steps through two values [1.2, 1.5] for transmission rate and two values [0.2, 0.5] for infectious recovery rate, only two scenarios will be created and run. One with transmission rate 1.2 and infectious recovery rate 0.2, and the other with transmission rate 1.5 and infectious recovery rate 0.5. On the other hand, if you create two modifiers, one for transmission rate and the other for infectious recovery rate and drag into your experiment, all four possible combinations of values will be evaluated.