node_intervention
BroadcastCoordinatorEventFromNode
Bases: NodeIntervention
The BroadcastCoordinatorEventFromNode is a node-level intervention that broadcasts an event for coordinators. For example, if a death occurs in a node, an event can be broadcasted that will trigger some sort of response by the healthcare system. NodeLevelHealthTriggeredIV could be used to listen for the death of an individual and distribute this intervention to the node. The node intervention could then broadcast its event that another coordinator is listening for. One can use ReportCoordinatorEventRecorder to report on the events broadcasted by this intervention. Note, this coordinator class must be used with listeners that are operating on the same core. For more information, see Simulation core components.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
broadcast_event
|
(str, required)
|
The Coordinator Event to be broadcast by this node. An Event Coordinator could be activated from this event. Default value: None |
required |
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 4 common parameters: disqualifying_properties, dont_allow_duplicates, intervention_name, new_property_value. The following parameters are not valid for this intervention: cost Default value: None |
None
|
Source code in emodpy/campaign/node_intervention.py
BroadcastNodeEvent
Bases: NodeIntervention
The BroadcastNodeEvent node intervention class broadcasts node-level events. This can be used with the campaign class, SurveillanceEventCoordinator, that can monitor and listen for events received from BroadcastNodeEvent and then perform an action based on the broadcasted event. You can also use this for the reporting, by recording broadcasted events with ReportNodeEventRecorder or ReportSurveillanceEventRecorder. You must use this intervention with listeners that are operating on the same core. You can also use NLHTIVNode. For more information, see Simulation core components.
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 Node Event to broadcast. Default value: None |
required |
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 5 common parameters: intervention_name, new_property_value, disqualifying_properties, dont_allow_duplicates, cost. Default value: None |
None
|
Source code in emodpy/campaign/node_intervention.py
ImportPressure
Bases: NodeIntervention
The ImportPressure intervention class extends the ImportCases outbreak event. Rather than importing a deterministic number of cases on a scheduled day, ImportPressure applies a set of per-day rates of importation of infected individuals, over a corresponding set of durations. ImportPressure inherits from Outbreak; the Antigen and Genome parameters are defined as they are for all Outbreak events.
WARNING
Be careful when configuring import pressure in multi-node simulations. Daily_Import_Pressures defines a rate of per-day importation for each node that the intervention is distributed to. In a 10 node simulation with Daily_Import_Pressures = [0.1, 5.0], the total importation rate summed over all nodes will be 1/day and 50/day during the two time periods. You must divide the per-day importation rates by the number of nodes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
durations
|
(list[int], required)
|
The durations over which to apply import pressure. Must be a non-empty list and must have the same length as daily_import_pressures. |
required |
daily_import_pressures
|
(list[float], required)
|
The rate of per-day importation for each node that the intervention is distributed to. Must be a non-empty list and must have the same length as durations. |
required |
import_age
|
float
|
The age (in days) of infected import cases. Minimum value: 0 Maximum value: 43800 Default value: 365 |
365
|
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/node_intervention.py
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 | |
MigrateFamily
Bases: NodeIntervention
The MigrateFamily intervention class tells family groups of residents of the targeted node to go on a round trip migration ("family trip"). The duration of time residents wait before migration and the time spent at the destination node can be configured; the pre-migration waiting timer does not start until all residents are at the home node.
Use of this intervention does require that human migration be enabled by setting the configuration parameters Migration_Model to FIXED_RATE_MIGRATION and Migration_Pattern to SINGLE_ROUND_TRIP.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
duration_before_leaving_distribution
|
(BaseDistribution, required)
|
The distribution type to use for assigning the duration of time a family waits before migrating to the destination node after all residents are home. Each assigned value is a random draw from the distribution. Please use the following distribution classes from emodpy.utils.distributions to define the distribution: * ConstantDistribution * UniformDistribution * GaussianDistribution * ExponentialDistribution * PoissonDistribution * LogNormalDistribution * DualConstantDistribution * WeibullDistribution * DualExponentialDistribution |
required |
duration_at_node_distribution
|
(BaseDistribution, required)
|
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: * ConstantDistribution * UniformDistribution * GaussianDistribution * ExponentialDistribution * PoissonDistribution * LogNormalDistribution * DualConstantDistribution * WeibullDistribution * DualExponentialDistribution |
required |
nodeid_to_migrate_to
|
(int, required)
|
The destination node ID for intervention-based migration. Minimum value: 0 Maximum value: 4294970000.0 Default value: 0 |
required |
is_moving
|
bool
|
Set to true (1) to indicate all the individuals of the family are 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
|
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 4 common parameters: disqualifying_properties, dont_allow_duplicates, intervention_name, new_property_value. The following parameters are not valid for this intervention: cost Default value: None |
None
|
Source code in emodpy/campaign/node_intervention.py
477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 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 | |
MultiNodeInterventionDistributor
Bases: NodeIntervention
The MultiNodeInterventionDistributor intervention class is a node-level intervention that distributes multiple other node-level interventions when the distributor only allows specifying one intervention. This class can be thought of as an "adapter", where it can adapt interventions or coordinators that were designed to distribute one intervention to instead distribute many.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
node_intervention_list
|
(list[NodeIntervention], required)
|
A list of NodeIntervention objects for the multi-node-level interventions to be distributed by this intervention. |
required |
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 4 common parameters: intervention_name, dont_allow_duplicates, new_property_value, disqualifying_properties. The following parameters are not valid for this intervention: cost Default value: None |
None
|
Source code in emodpy/campaign/node_intervention.py
NodePropertyValueChanger
Bases: NodeIntervention
The NodePropertyValueChanger intervention class sets a given node property to a new value. You can also define a duration in days before the node property reverts back to its original value, the probability that a node will change its node property to the target value, and the number of days over which nodes will attempt to change their node properties to the target value. This node-level intervention functions in a similar manner as the individual-level intervention, PropertyValueChanger.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
target_np_key_value
|
(str, required)
|
The NodeProperty key:value pair, as defined in the demographics file, to assign to the node. |
required |
revert
|
float
|
The number of days to keep the value of the property/key, specified in Target_NP_Key_Value and set by the intervention, for the node. When the time has expired, the intervention will reset the property/key back to the value it had when the intervention was first applied. Minimum value: 0 Maximum value: 3.40282e+38 Default value: 3.40282e+38 |
3.40282e+38
|
maximum_duration
|
float
|
The maximum amount of time in days nodes have to update the property value. 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 the node's property value changes to the Target_NP_Key_Value. Minimum value: 0 Maximum value: 1 Default value: 1 |
1
|
common_intervention_parameters
|
CommonInterventionParameters
|
The CommonInterventionParameters object that contains the 4 common parameters: disqualifying_properties, dont_allow_duplicates, intervention_name, new_property_value. The following parameters are not valid for this intervention: cost Default value: None |
None
|
Source code in emodpy/campaign/node_intervention.py
Outbreak
Bases: NodeIntervention
The Outbreak class allows the introduction of a disease outbreak event by the addition of new infected or susceptible individuals to a node. Outbreak is a node-level intervention; to distribute an outbreak to specific categories of existing individuals within a node, use OutbreakIndividual.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
campaign
|
(campaign, required)
|
An instance of the emod_api.campaign module. |
required |
probability_of_infection
|
float
|
The probability that new individuals are infected. 1.0 implies all new individuals are infected while 0.0 adds all of the people as susceptible individuals. Minimum value: 0 Maximum value: 1 Default value: 1 |
1
|
number_cases_per_node
|
int
|
The number of new imported individuals. .. note:: This will increase the population with demographics of 50/50 male/female and user-defined ages Minimum value: 0 Maximum value: 2147480000.0 Default value: 1 |
1
|
import_age
|
float
|
The age (in days) of infected import cases. Minimum value: 0 Maximum value: 43800 Default value: 365 |
365
|
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
|