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 "Triggering interventions"
(→Interventions in STEM) |
(→Interventions in STEM) |
||
Line 16: | Line 16: | ||
* Elapsed Time Test - Used to modify a simulation after a given period of time has elapsed in a simulation | * 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 | * 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). | ||
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: | 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: | ||
Line 28: | Line 30: | ||
[[Image: NumberOfDays.png|400px]] | [[Image: NumberOfDays.png|400px]] | ||
+ | |||
+ | 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": | ||
+ | |||
+ | [[Image: CreateModifierMenu.png]] |
Revision as of 18:17, 15 July 2011
Contents |
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).
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:
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":
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:
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":