Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Triggering interventions

Revision as of 18:34, 15 July 2011 by Edlund.almaden.ibm.com (Talk | contribs) (Social Distancing Example)

STEM TOP BAR.gif


STEM Contents Page


Interventions in STEM

STEM uses triggers, predicates and modifiers to implement interventions. A trigger contains predicate which, when satisfied, invokes one or more modifiers that changes some aspect of a running simulation. When the predicate is not satisfied any longer, the modified entities are set back to their original values.

STEM currently supports two types of predicate tests, which can be combined using boolean expressions. The tests are:

  • Elapsed Time Test - Used to modify a simulation after a given period of time has elapsed in a simulation
  • Label Value Test - Used to test the value of a disease or population label in a region

Observe that predicates are evaluated at each whole time step (e.g. day), and not during each incremental step when using the integrating solver (Runge Kutta).

Social Distancing Example

In the first example, we want to control an outbreak by implementing some sort of social distancing after a certain period of time has elapsed. We already have a scenario set up of an outbreak occuring in Malaysia, starting in Kuala Lumpur:

BaseScenario.png

First create a new predicate by selecting the 'New predicate' button in the toolbar. Give it a name, e.g. "ElapsedTimePredicate". The editor for the predicate will open in a new window. Right click on the predicate and select "New Child", then "Elapsed Time Test":

PredicateMenus.png

Next, we need to specify the number of days we want to wait. Open the Properties sheet and enter '30' for the 'number of Days' property:

NumberOfDays.png

Now we need to determine what we want to modify in the scenario after 30 days have elapsed. Social distancing (e.g. distributing face masks, closing public buildings) reduces the transmissibility of an outbreak, so changing the transmission rate in the disease makes sense. In this case, reducing the transmission rate from 1.3 to 0.3 ensures that the reproductive number falls below 1.0 and the outbreak should be halted.

To create a modifier for a disease, right click on on the disease in the project explorer and select "Create Modifier":

CreateModifierMenu.png

The wizard for creating modifiers opens up. On the row for "Transmission Rate" (scroll down if needed), and in the column for "Select Modifier Type", press the "Single" option (the "Range" and "Sequence" options are only used in STEM Experiments). Enter 0.3 for the new value of transmission rate and then "Finish":

ModifierWizard.png

Now we need to create a trigger that will contain our predicate and modifier. Select the "New Trigger" button in the toolbar and give it a name (e.g. "SocialDistancingTrigger"). Drag the predicate and the modifier from the project explorer into the trigger:

TriggerWithPredAndMod.png

Finally drag the trigger into the scenario:

ScenarioTrigger.png

Back to the top