individual_intervention
BroadcastEvent
Bases: IndividualIntervention
The BroadcastEvent intervention class is an individual-level class that immediately broadcasts the event trigger you specify. This campaign event is typically used with other classes that monitor for a broadcast event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
broadcast_event
|
(str, required)
|
The name of the event to be broadcasted. See Campaign event list for events already used in EMOD or use your own custom event. |
required |
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 4 common parameters: disqualifying_properties, new_property_value, intervention_name, dont_allow_duplicates. The following parameters are not valid for this intervention:
Default value: None |
None
|
Source code in emodpy/campaign/individual_intervention.py
BroadcastEventToOtherNodes
Bases: IndividualIntervention
The BroadcastEventToOtherNodes intervention class allows events to be sent from one node to another. For example, if an individual in one node has been diagnosed, drugs may be distributed to individuals in surrounding nodes.
When this intervention is updated, the event to be broadcast is cached to be distributed to the nodes. After the people have migrated, the event information is distributed to the nodes. NOTE: it does support multi-core. During the next time step, the nodes will update their node-level interventions and then broadcast the events from other nodes to ALL the people in the node. This is different from interventions that only broadcast the event in the current node for the person who had the intervention. Distances between nodes use the Longitude and Latitude defined in the demographics file, and use the Haversine Formula for calculating the great-circle distance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
broadcast_event
|
(str, required)
|
The name of the event to broadcast to the people of 'nearby' nodes. For example, if a house is found to have malaria, broadcast an event to the people in the nearby houses so that they can get treatment. For HIV, see Campaign event list, and for malaria, Campaign event list for events already used in EMOD or use your own custom event. |
required |
node_selection_type
|
NodeSelectionType
|
The method by which to select nodes to receive the event. Possible values are:
Default value: DISTANCE_ONLY |
DISTANCE_ONLY
|
max_distance_to_other_nodes_km
|
float
|
The maximum distance, in kilometers, to the destination node for the node to be selected. The location values used are those entered in the demographics file. Used only if Node_Selection_Type is either DISTANCE_ONLY or DISTANCE_AND_MIGRATION. Minimum value: 0 Maximum value: 3.40282e+38 Default value: 3.40282e+38 |
3.40282e+38
|
include_my_node
|
bool
|
Set to True to broadcast the event to the current node. Default value: False |
False
|
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 4 common parameters: intervention_name, new_property_value, dont_allow_duplicates, disqualifying_properties. The following parameters are not valid for this intervention:
Default value: None |
None
|
Source code in emodpy/campaign/individual_intervention.py
ControlledVaccine
Bases: IndividualIntervention
The ControlledVaccine intervention class is a subclass of SimpleVaccine so it contains all functionality of SimpleVaccine, but provides more control over additional events and event triggers. This intervention can be configured so that specific events are broadcast when individuals receive an intervention or when the intervention expires. Further, individuals can be re-vaccinated, using a configurable wait time between vaccinations.
Note that one of the controls of this intervention is to not allow a person to receive an additional dose if they received a dose within a certain amount of time. This applies only to ControlledVaccine interventions with the same Intervention_Name, so people can be given multiple vaccines as long as each vaccine has a different value for Intervention_Name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
waning_config
|
(AbstractWaningConfig, required)
|
The configuration of the vaccine's efficacy and waning over time. Specify how this effect decays over time using one of the Waning Config classes in emodpy.campaign.waning_config. |
required |
vaccine_type
|
VaccineType
|
The type of vaccine to distribute in a vaccine intervention. Possible values are:
Default value: Generic |
Generic
|
vaccine_take
|
float
|
The rate at which delivered vaccines will successfully stimulate an immune response and achieve the desired efficacy. For example, if it is set to 0.9, there will be a 90 percent chance that the vaccine will start with the specified efficacy, and a 10 percent chance that it will have no efficacy at all. Minimum value: 0 Maximum value: 1 Default value: 1 |
1
|
expired_event_trigger
|
str
|
The name of the event to be broadcast when the intervention expires. See Campaign event list for events already used in EMOD or use your own custom event. Default value: None |
None
|
efficacy_is_multiplicative
|
bool
|
The overall vaccine efficacy when individuals receive more than one vaccine. When set to True, the vaccine efficacies are multiplied together; when set to False, the efficacies are additive. Default value: True |
True
|
duration_to_wait_before_revaccination
|
float
|
The length of time, in days, to wait before revaccinating an individual. After this time has passed, the individual can be revaccinated. If the first vaccine has not expired, the individual can receive the effect from both doses of the vaccine. Minimum value: 0 Maximum value: 3.40282e+38 Default value: 3.40282e+38 |
3.40282e+38
|
distributed_event_trigger
|
str
|
The name of the event to be broadcast when the intervention is distributed to an individual. See Campaign event list for events already used in EMOD or use your own custom event. Default value: None |
None
|
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 5 common parameters: cost, new_property_value, intervention_name, disqualifying_properties, dont_allow_duplicates. Default value: None |
None
|
Source code in emodpy/campaign/individual_intervention.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | |
DelayedIntervention
Bases: IndividualIntervention
The DelayedIntervention intervention class introduces a delay between when the intervention is distributed to the individual and when they receive the actual intervention. This is due to the frequent occurrences of time delays as individuals seek care and receive treatment. This intervention allows configuration of the distribution type for the delay.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
delay_period_distribution
|
(BaseDistribution, required)
|
The distribution type to use for assigning the delay period for distributing interventions. Each assigned value is a random draw from the distribution. Please use the following distribution classes from emodpy.utils.distributions to define the distribution:
|
required |
intervention_to_distribute_at_delay_completion
|
(Union[IndividualIntervention, list[IndividualIntervention]], required)
|
An Individual Intervention or an array of nested Individual Interventions to be distributed at the end of the delay period. Either intervention_to_broadcast_at_delay_completion or event_to_broadcast_at_delay_completion must be set. |
required |
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 4 common parameters: intervention_name, new_property_value, dont_allow_duplicates, disqualifying_properties. The following parameters are not valid for this intervention:
Default value: None |
None
|
Source code in emodpy/campaign/individual_intervention.py
FemaleContraceptive
Bases: IndividualIntervention
The FemaleContraceptive intervention class models contraceptive use among women. It is an individual-level intervention that reduces fertility for a configurable duration with a configurable waning efficacy. The usage_duration_distribution determines how long each woman uses the contraceptive, and the waning_config controls how the efficacy changes over that period. When a woman stops using the contraceptive, the usage_expiration_event is broadcast. This intervention can only be distributed to females, and ignores the waning condition expiration (as women could still use a contraceptive, even if it is ineffective).
This intervention applies only when Birth_Rate_Dependence in config.json is set to
INDIVIDUAL_PREGNANCIES or INDIVIDUAL_PREGNANCIES_BY_AGE_AND_YEAR.
At a glance:
- Distributed to: Individuals (females only)
- Serialized: Yes. It will be preserved when starting from a serialized file.
- Time-based expiration: Yes. Expires when the usage duration expires, which is determined by the usage_duration_distribution.
- Purge existing: No. Adding a new intervention of this class will not remove any existing interventions and efficacies will combine as birth_modifier *= new_birth_modifier.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
waning_config
|
(AbstractWaningConfig, required)
|
Waning effect for contraceptive efficacy. Available types are defined in emodpy.campaign.waning_config. |
required |
usage_expiration_event
|
(str, required)
|
An individual-level event to broadcast when the contraceptive expires. |
required |
usage_duration_distribution
|
(BaseDistribution, required)
|
The distribution type to use for setting the duration of contraceptive use. Each intervention gets a usage duration by doing a random draw from the distribution. This is independent of how long the contraceptive is effective. Please use the following distribution classes from emodpy.utils.distributions to define the distribution: * ConstantDistribution * UniformDistribution * GaussianDistribution * ExponentialDistribution * PoissonDistribution * LogNormalDistribution * DualConstantDistribution * WeibullDistribution * DualExponentialDistribution |
required |
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 5 common parameters: cost, intervention_name, new_property_value, disqualifying_properties, dont_allow_duplicates. Default value: None |
None
|
Source code in emodpy/campaign/individual_intervention.py
1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 | |
IVCalendar
Bases: IndividualIntervention
The IVCalendar intervention class contains a list of ages when an individual will receive the actual intervention. In IVCalendar, there is a list of actual interventions where the distribution is dependent on whether the individual's age matches the next date in the calendar. This implies that at a certain age, the list of actual interventions will be distributed according to a given probability. While a typical use case might involve the distribution of calendars due to a Births event in the context of a routine vaccination schedule, calendars may also be distributed directly to individuals at times other than birth.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
intervention_list
|
(list[IndividualIntervention], required)
|
An array of interventions that will be distributed as specified by the calendar. Each time the calendar says it is time for the intervention, this list of interventions will be distributed to the person with this intervention. |
required |
dropout
|
bool
|
If set to true, when an intervention distribution is missed, all subsequent interventions are also missed. If set to false, all calendar dates/doses are applied independently of each other. Default value: True |
False
|
calendar
|
list[AgeAndProbability]
|
An array of JSON objects where each object specifies the age and probability of receiving the interventions. The parameters of the Calendar objects are Age and Probability. Default value: None |
None
|
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 4 common parameters: intervention_name, new_property_value, disqualifying_properties, dont_allow_duplicates. The following parameters are not valid for this intervention:
Default value: None |
None
|
Source code in emodpy/campaign/individual_intervention.py
302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 | |
AgeAndProbability
This class defines a single entry into the calendar of when an individual is to get a collection of interventions. When IVCalendar is distributed to the individual, the 'probability' is used to determine if the person will get the interventions as this age. If the person gets IVCalendar after 'age', they will not get the interventions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
age_days
|
(float, optional)
|
As a parameter of a Calendar object, this parameter determines the age (in days) that the individual must be in order to receive the list of actual interventions. Minimum value: 0 Maximum value: 125 * 365 = 45,625 Default value: 0 |
0.0
|
probability
|
(float, optional)
|
As a parameter of a Calendar object, this parameter determines the probability of an individual receiving the list of actual interventions at the corresponding age. Minimum value: 0 Maximum value: 1 Default value: 1 |
1.0
|
Source code in emodpy/campaign/individual_intervention.py
to_schema_dict(campaign)
A function that converts the AgeAndProbability object to a schema dictionary.
Source code in emodpy/campaign/individual_intervention.py
IndividualImmunityChanger
Bases: IndividualIntervention
The IndividualImmunityChanger intervention class acts essentially as a MultiEffectVaccine, with the exception of how the behavior is implemented. Rather than attaching a persistent vaccine intervention object to an individual's intervention list (as a campaign-individual-multieffectboostervaccine does), the IndividualImmunityChanger directly alters the immune modifiers of the individual's susceptibility object and is then immediately disposed of. Any immune waning is not governed by Waning effect classes, as MultiEffectVaccine is, but rather by the immunity waning parameters in the configuration file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
prime_transmit
|
float
|
Specifies the priming effect on transmission immunity for naive individuals (without natural or vaccine-derived immunity) for a multi-effect booster vaccine. Minimum value: 0 Maximum value: 1 Default value: 0 |
0
|
prime_mortality
|
float
|
Specifies the priming effect on mortality immunity for naive individuals (without natural or vaccine-derived immunity) for a multi-effect booster vaccine. Minimum value: 0 Maximum value: 1 Default value: 0 |
0
|
prime_acquire
|
float
|
Specifies the priming effect on acquisition immunity for naive individuals (without natural or vaccine-derived immunity) for a multi-effect booster vaccine. Minimum value: 0 Maximum value: 1 Default value: 0 |
0
|
boost_transmit
|
float
|
Specifies the boosting effect on transmission immunity for naive individuals (without natural or vaccine-derived immunity) for a multi-effect booster vaccine. This does not replace current immunity, it builds multiplicatively on top of it. Minimum value: 0 Maximum value: 1 Default value: 0 |
0
|
boost_threshold_transmit
|
float
|
Specifies how much transmission immunity is required before the vaccine changes from a prime to a boost. Minimum value: 0 Maximum value: 1 Default value: 0 |
0
|
boost_threshold_mortality
|
float
|
Specifies how much mortality immunity is required before the vaccine changes from a prime to a boost. Minimum value: 0 Maximum value: 1 Default value: 0 |
0
|
boost_threshold_acquire
|
float
|
Specifies how much acquisition immunity is required before the vaccine changes from a prime to a boost. Minimum value: 0 Maximum value: 1 Default value: 0 |
0
|
boost_mortality
|
float
|
Specifies the boosting effect on mortality immunity for naive individuals (without natural or vaccine-derived immunity) for a multi-effect booster vaccine. This does not replace current immunity, it builds multiplicatively on top of it. Minimum value: 0 Maximum value: 1 Default value: 0 |
0
|
boost_acquire
|
float
|
Specifies the boosting effect on acquisition immunity for naive individuals (without natural or vaccine-derived immunity) for a multi-effect booster vaccine. This does not replace current immunity, it builds multiplicatively on top of it. Minimum value: 0 Maximum value: 1 Default value: 0 |
0
|
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 1 common parameter: cost. The following parameters are not valid for this intervention:
Default value: None |
None
|
Source code in emodpy/campaign/individual_intervention.py
503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 | |
IndividualNonDiseaseDeathRateModifier
Bases: IndividualIntervention
The IndividualNonDiseaseDeathRateModifier intervention class provides a method of modifying an individual's non-disease mortality rate over time, until an expiration event is reached. For example, this intervention could be given to people who have access to health care to model that they have a different life expectancy than those who do not. Different distribution patterns can be designated, and linear interpolation will be used to calculate values between time points.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
duration_to_modifier
|
(ValueMap, required)
|
An array of Times and Values used to specify different modifiers over the duration of the intervention. Linear interpolation is used to find the values between time points. If the duration exceeds the max time, then the last modifier value will be used. |
required |
expiration_event
|
str
|
When the person stops using the intervention (intervention expires), this event will be broadcast. See Campaign event list for events already used in EMOD or use your own custom event. Default value: None |
None
|
expiration_duration_distribution
|
BaseDistribution
|
For the distribution of each intervention, a randomly selected duration from this distribution will determine when the person stops using the intervention. This is independent of how long the intervention is effective. Please use the following distribution classes from emodpy.utils.distributions to define the distribution:
Default value: None |
None
|
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 5 common parameters: cost, new_property_value, intervention_name, disqualifying_properties, dont_allow_duplicates. Default value: None |
None
|
Source code in emodpy/campaign/individual_intervention.py
MigrateIndividuals
Bases: IndividualIntervention
The MigrateIndividuals intervention class is an individual-level intervention used to force migration and is separate from the normal migration system. However, it does require that human migration is enabled by setting the configuration parameters Migration_Model to FIXED_RATE_MIGRATION and Migration_Pattern to SINGLE_ROUND_TRIP.
As individuals migrate, there are three ways to categorize nodes:
- Home: the node where the individuals reside; each individual has a single home node.
- Origin: the "starting point" node for each leg of the migration. The origin updates as individuals move between nodes.
- Destination: the node the individual is traveling to. The destination updates as individuals move between nodes.
For example, Individual 1 has a home node of Node A. They migrate from Node A to Node B. Node A is both the home node and the origin node, and Node B is the destination node. If Individual 1 migrates from Node B to Node C, Node A remains the home node, but now Node B is the origin node, and Node C is the destination node. If Individual 1 migrates from Node C back to Node A, Node C is the origin node, and Node A becomes the destination node and still remains the home node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
nodeid_to_migrate_to
|
int
|
The destination node ID for intervention-based migration. Minimum value: 0 Maximum value: 4294970000.0 Default value: 0 |
0
|
is_moving
|
bool
|
Set to True to indicate the individual is permanently moving to a new home node for intervention-based migration. Once at the new home node, trips will be made with this node as the root (i.e. round trips come back to this node). Default value: False |
False
|
duration_before_leaving_distribution
|
BaseDistribution
|
The distribution type to use for assigning the duration of time an individual waits before migrating to the destination node after intervention-based migration. Each assigned value is a random draw from the distribution. Please use the following distribution classes from emodpy.utils.distributions to define the distribution:
Default value: None |
None
|
duration_at_node_distribution
|
BaseDistribution
|
The distribution type to use for assigning the duration of time an individual or family spends at a destination node after intervention-based migration. Each assigned value is a random draw from the distribution. Please use the following distribution classes from emodpy.utils.distributions to define the distribution:
Default value: None |
None
|
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 4 common parameters: intervention_name, new_property_value, dont_allow_duplicates, disqualifying_properties. The following parameters are not valid for this intervention:
Default value: None |
None
|
Source code in emodpy/campaign/individual_intervention.py
694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 | |
MultiEffectBoosterVaccine
Bases: IndividualIntervention
The MultiEffectBoosterVaccine intervention class is derived from MultiEffectVaccine and preserves many of the same parameters. Upon distribution and successful take, the vaccine's effect in each immunity compartment (acquisition, transmission, and mortality) is determined by the recipient's immune state. If the recipient's immunity modifier in the corresponding compartment is above a user-specified threshold, then the vaccine's initial effect will be equal to the corresponding priming parameter. If the recipient's immune modifier is below this threshold, then the vaccine's initial effect will be equal to the corresponding boost parameter. After distribution, the effect wanes, just like a MultiEffectVaccine. The behavior is intended to mimic biological priming and boosting.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
transmit_config
|
(AbstractWaningConfig, required)
|
The configuration for multi-effect vaccine transmission. Specify how this effect decays over time using one of the Waning Config classes in emodpy.campaign.waning_config. |
required |
mortality_config
|
(AbstractWaningConfig, required)
|
The configuration for multi-effect vaccine mortality. Specify how this effect decays over time using one of the Waning Config classes in emodpy.campaign.waning_config. |
required |
acquire_config
|
(AbstractWaningConfig, required)
|
The configuration for multi-effect vaccine acquisition. Specify how this effect decays over time using one of the Waning Config classes in emodpy.campaign.waning_config. |
required |
vaccine_take
|
float
|
The rate at which delivered vaccines will successfully stimulate an immune response and achieve the desired efficacy. For example, if it is set to 0.9, there will be a 90 percent chance that the vaccine will start with the specified efficacy, and a 10 percent chance that it will have no efficacy at all. Minimum value: 0 Maximum value: 1 Default value: 1 |
1
|
prime_transmit
|
float
|
Specifies the priming effect on transmission immunity for naive individuals (without natural or vaccine-derived immunity) for a multi-effect booster vaccine. Minimum value: 0 Maximum value: 1 Default value: 0 |
0
|
prime_mortality
|
float
|
Specifies the priming effect on mortality immunity for naive individuals (without natural or vaccine-derived immunity) for a multi-effect booster vaccine. Minimum value: 0 Maximum value: 1 Default value: 0 |
0
|
prime_acquire
|
float
|
Specifies the priming effect on acquisition immunity for naive individuals (without natural or vaccine-derived immunity) for a multi-effect booster vaccine. Minimum value: 0 Maximum value: 1 Default value: 0 |
0
|
boost_transmit
|
float
|
Specifies the boosting effect on transmission immunity for naive individuals (without natural or vaccine-derived immunity) for a multi-effect booster vaccine. This does not replace current immunity, it builds multiplicatively on top of it. Minimum value: 0 Maximum value: 1 Default value: 0 |
0
|
boost_threshold_transmit
|
float
|
Specifies how much transmission immunity is required before the vaccine changes from a prime to a boost. Minimum value: 0 Maximum value: 1 Default value: 0 |
0
|
boost_threshold_mortality
|
float
|
Specifies how much mortality immunity is required before the vaccine changes from a prime to a boost. Minimum value: 0 Maximum value: 1 Default value: 0 |
0
|
boost_threshold_acquire
|
float
|
Specifies how much acquisition immunity is required before the vaccine changes from a prime to a boost. Minimum value: 0 Maximum value: 1 Default value: 0 |
0
|
boost_mortality
|
float
|
Specifies the boosting effect on mortality immunity for naive individuals (without natural or vaccine-derived immunity) for a multi-effect booster vaccine. This does not replace current immunity, it builds multiplicatively on top of it. Minimum value: 0 Maximum value: 1 Default value: 0 |
0
|
boost_acquire
|
float
|
Specifies the boosting effect on acquisition immunity for naive individuals (without natural or vaccine-derived immunity) for a multi-effect booster vaccine. This does not replace current immunity, it builds multiplicatively on top of it. Minimum value: 0 Maximum value: 1 Default value: 0 |
0
|
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 5 common parameters: cost, new_property_value, intervention_name, disqualifying_properties, dont_allow_duplicates. Default value: None |
None
|
Source code in emodpy/campaign/individual_intervention.py
798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 | |
MultiEffectVaccine
Bases: IndividualIntervention
The MultiEffectVaccine intervention class implements vaccine campaigns in the simulation. Vaccines can affect all of the following:
- Reduce the likelihood of acquiring an infection
- Reduce the likelihood of transmitting an infection
- Reduce the likelihood of death
After distribution, the effect wanes over time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
transmit_config
|
(AbstractWaningConfig, required)
|
The configuration for multi-effect vaccine transmission. Specify how this effect decays over time using one of the Waning Config classes in emodpy.campaign.waning_config. |
required |
mortality_config
|
(AbstractWaningConfig, required)
|
The configuration for multi-effect vaccine mortality. Specify how this effect decays over time using one of the Waning Config classes in emodpy.campaign.waning_config. |
required |
acquire_config
|
(AbstractWaningConfig, required)
|
The configuration for multi-effect vaccine acquisition. Specify how this effect decays over time using one of the Waning Config classes in emodpy.campaign.waning_config. |
required |
vaccine_take
|
float
|
The rate at which delivered vaccines will successfully stimulate an immune response and achieve the desired efficacy. For example, if it is set to 0.9, there will be a 90 percent chance that the vaccine will start with the specified efficacy, and a 10 percent chance that it will have no efficacy at all. Minimum value: 0 Maximum value: 1 Default value: 1 |
1
|
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 5 common parameters: cost, new_property_value, intervention_name, disqualifying_properties, dont_allow_duplicates. Default value: None |
None
|
Source code in emodpy/campaign/individual_intervention.py
MultiInterventionDistributor
Bases: IndividualIntervention
The MultiInterventionDistributor intervention class allows you to input a list of interventions, rather than just a single intervention, to be distributed simultaneously to the same individuals.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
intervention_list
|
(list[IndividualIntervention], required)
|
The list of individual interventions that is distributed by MultiInterventionDistributor. |
required |
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 4 common parameters: intervention_name, new_property_value, dont_allow_duplicates, disqualifying_properties. The following parameters are not valid for this intervention
Default value: None |
None
|
Source code in emodpy/campaign/individual_intervention.py
OutbreakIndividual
Bases: IndividualIntervention
The OutbreakIndividual intervention class introduces contagious diseases that are compatible with the simulation type to existing individuals using the individual targeted features configured in the appropriate event coordinator. To instead add new infection individuals, use Outbreak.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
incubation_period_override
|
int
|
The incubation period, in days, that infected individuals will go through before becoming infectious. This value overrides the incubation period set in the configuration file. Note for HIV simulations only: If set to 0, infection is assumed to be part of an outbreak event and a random duration until death is determined. For all other simulation types: Set to -1 to honor the configuration parameter settings. Minimum value: -1 Maximum value: 2147480000.0 Default value: -1 |
-1
|
ignore_immunity
|
bool
|
Individuals will be force-infected (with a specific strain) regardless of actual immunity level when set to True. Default value: True |
True
|
genome
|
int
|
The genetic substrain ID of the outbreak infection. Together with Antigen, they are a unitary object representing a strain of infection, which allows for differentiation among infections. Minimum value: -1 Maximum value: 16777200.0 Default value: 0 |
0
|
antigen
|
int
|
The antigenic base strain ID of the outbreak infection. Minimum value: 0 Maximum value: 10 Default value: 0 |
0
|
Source code in emodpy/campaign/individual_intervention.py
1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 | |
PropertyValueChanger
Bases: IndividualIntervention
The PropertyValueChanger intervention class assigns new individual property values to individuals You must update one property value and have the option to update another using New_Property_Value. This parameter is generally used to move patients from one intervention state in the health care cascade (InterventionStatus/CascadeState) to another, though it can be used for any individual property. Individual property values are user-defined in the demographics file (see NodeProperties and IndividualProperties for more information). Note that the HINT feature does not need to be enabled to use this intervention. To instead change node properties, use NodePropertyValueChanger.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
target_property_value
|
(str, required)
|
The user-defined value of the individual property that will be assigned to the individual. |
required |
target_property_key
|
(str, required)
|
The name of the individual property type whose value will be updated by the intervention. |
required |
revert
|
float
|
The number of days to keep the value (Target_Property_Value) of the property (Target_Property_Key) set by the intervention for the individual. When the time has expired, the intervention will reset the property back to the value it had when the intervention was first applied. Minimum value: 0 Maximum value: 3.40282e+38 Default value: 0 |
0
|
maximum_duration
|
float
|
The maximum amount of time individuals have to move to a new group. This timing works in conjunction with Daily_Probability. Minimum value: -1 Maximum value: 3.40282e+38 Default value: 3.40282e+38 |
3.40282e+38
|
daily_probability
|
float
|
The daily probability that an individual's property value changes to the Target_Property_Value. Minimum value: 0 Maximum value: 1 Default value: 1 |
1
|
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 4 common parameters: intervention_name, new_property_value, dont_allow_duplicates, disqualifying_properties. The following parameters are not valid for this intervention:
Default value: None |
None
|
Source code in emodpy/campaign/individual_intervention.py
1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 | |
SimpleBoosterVaccine
Bases: IndividualIntervention
The SimpleBoosterVaccine intervention class is derived from SimpleVaccine and preserves many of the same parameters. The behavior is much like SimpleVaccine, except that upon distribution and successful take, the vaccine's effect is determined by the recipient's immune state. If the recipient’s immunity modifier in the corresponding channel (acquisition, transmission, or mortality) is above a user-specified threshold, then the vaccine's initial effect will be equal to the corresponding priming parameter. If the recipient's immune modifier is below this threshold, then the vaccine's initial effect will be equal to the corresponding boosting parameter. After distribution, the effect wanes, just like SimpleVaccine. In essence, this intervention provides a SimpleVaccine intervention with one effect to all naive (below- threshold) individuals, and another effect to all primed (above-threshold) individuals; this behavior is intended to mimic biological priming and boosting.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
waning_config
|
(AbstractWaningConfig, required)
|
The configuration of the vaccine's efficacy and waning over time. Specify how this effect decays over time using one of the Waning Config classes in emodpy.campaign.waning_config. |
required |
vaccine_type
|
VaccineType
|
The type of vaccine to distribute in a vaccine intervention. Possible values are:
Default value: Generic |
Generic
|
vaccine_take
|
float
|
The rate at which delivered vaccines will successfully stimulate an immune response and achieve the desired efficacy. For example, if it is set to 0.9, there will be a 90 percent chance that the vaccine will start with the specified efficacy, and a 10 percent chance that it will have no efficacy at all. Minimum value: 0 Maximum value: 1 Default value: 1 |
1
|
prime_effect
|
float
|
Specifies the priming effect on [acquisition/transmission/mortality] immunity for naive individuals (without natural or vaccine-derived immunity). Minimum value: 0 Maximum value: 1 Default value: 1 |
1
|
efficacy_is_multiplicative
|
bool
|
The overall vaccine efficacy when individuals receive more than one vaccine. When set to True, the vaccine efficacies are multiplied together; when set to False, the efficacies are additive. Default value: True |
True
|
boost_threshold
|
float
|
Specifies how much immunity is required before the vaccine changes from a priming effect to a boosting effect. Minimum value: 0 Maximum value: 1 Default value: 0 |
0
|
boost_effect
|
float
|
Specifies the boosting effect on [acquisition/transmission/mortality] immunity for previously exposed individuals (either natural or vaccine-derived). This does not replace current immunity, it builds multiplicatively on top of it. Minimum value: 0 Maximum value: 1 Default value: 1 |
1
|
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 5 common parameters: cost, new_property_value, intervention_name, disqualifying_properties, dont_allow_duplicates. Default value: None |
None
|
Source code in emodpy/campaign/individual_intervention.py
1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 | |
SimpleVaccine
Bases: IndividualIntervention
The SimpleVaccine intervention class implements vaccine campaigns in the simulation. Vaccines can have an effect on one of the following:
- Reduce the likelihood of acquiring an infection
- Reduce the likelihood of transmitting an infection
- Reduce the likelihood of death
To configure vaccines that have an effect on more than one of these, use MultiEffectVaccine instead.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
waning_config
|
(AbstractWaningConfig, required)
|
The configuration of the vaccine's efficacy and waning over time. Specify how this effect decays over time using one of the Waning Config classes in emodpy.campaign.waning_config. |
required |
vaccine_type
|
VaccineType
|
The type of vaccine to distribute in a vaccine intervention. Possible values are:
Default value: Generic |
Generic
|
vaccine_take
|
float
|
The rate at which delivered vaccines will successfully stimulate an immune response and achieve the desired efficacy. For example, if it is set to 0.9, there will be a 90 percent chance that the vaccine will start with the specified efficacy, and a 10 percent chance that it will have no efficacy at all. Minimum value: 0 Maximum value: 1 Default value: 1 |
1
|
efficacy_is_multiplicative
|
bool
|
The overall vaccine efficacy when individuals receive more than one vaccine. When set to True, the vaccine efficacies are multiplied together; when set to False, the efficacies are additive. Default value: True |
True
|
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 5 common parameters: cost, new_property_value, intervention_name, disqualifying_properties, dont_allow_duplicates. Default value: None |
None
|
Source code in emodpy/campaign/individual_intervention.py
1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 | |
StandardDiagnostic
Bases: IndividualIntervention
The StandardDiagnostic intervention class identifies infected individuals, regardless of disease state, based on specified diagnostic sensitivity and specificity. Diagnostics are a key component of modern disease control efforts, whether used to identify high-risk individuals, infected individuals, or drug resistance. The individual receives the diagnostic test immediately when the intervention is distributed, but there may be a delay in receiving a positive result. This intervention class distributes a specified intervention to a fraction of individuals who test positive.
1 2 | |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
|
required |
positive_diagnosis_config
|
IndividualIntervention
|
|
None
|
negative_diagnosis_config
|
IndividualIntervention
|
|
None
|
positive_diagnosis_event
|
str
|
|
None
|
negative_diagnosis_event
|
str
|
|
None
|
treatment_fraction
|
float
|
|
1
|
enable_is_symptomatic
|
bool
|
|
False
|
days_to_diagnosis
|
float
|
|
0
|
base_specificity
|
float
|
|
1
|
base_sensitivity
|
float
|
|
1
|
common_intervention_parameters
|
CommonInterventionParameters
|
|
None
|
Source code in emodpy/campaign/individual_intervention.py
1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 | |