emodpy_hiv.campaign.event_coordinator module#
- class emodpy_hiv.campaign.event_coordinator.StandardEventCoordinator(campaign: <module 'emod_api.campaign' from '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emod_api/campaign.py'>, intervention_list: list[emodpy.campaign.base_intervention.IndividualIntervention] | list[emodpy.campaign.base_intervention.NodeIntervention], target_demographics_config: ~emodpy_hiv.campaign.common.TargetDemographicsConfig | None = None, repetition_config: ~emodpy_hiv.campaign.common.RepetitionConfig | None = None, property_restrictions: ~emodpy_hiv.campaign.common.PropertyRestrictions | None = None, targeting_config: ~emodpy_hiv.utils.targeting_config.AbstractTargetingConfig | None = None)#
Bases:
InterventionDistributorEventCoordinator
The StandardEventCoordinator coordinator class distributes an individual-level or node-level intervention to a specified fraction of individuals or nodes within a node set. Recurring campaigns can be created by specifying the number of times distributions should occur and the time between repetitions.
Demographic restrictions such as Demographic_Coverage and Target_Gender do not apply when distributing node-level interventions. The node-level intervention must handle the demographic restrictions.
- class emodpy_hiv.campaign.event_coordinator.NChooserEventCoordinatorHIV(campaign: <module 'emod_api.campaign' from '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emod_api/campaign.py'>, intervention_list: list[emodpy.campaign.base_intervention.IndividualIntervention], targeted_distributions: list[emodpy_hiv.campaign.common.NChooserTargetedDistributionHIV])[source]#
Bases:
InterventionDistributorEventCoordinator
The NChooserEventCoordinatorHIV coordinator class distributes individual-level interventions to exactly N people of a targeted demographic in HIV simulations. This contrasts with other event coordinators that distribute an intervention to a percentage of the population, not to an exact count. This event coordinator is similar to the NChooserEventCoordinator for other simulation types, but replaces start and end days in TargetedDistribution with start and end years in TargetedDistributionHIV and includes HIV-specific restrictions that individuals must have in order to qualify for the intervention.
- Parameters:
campaign (api_campaign, required) –
The campaign object to which the event will be added.
intervention_list (list[IndividualIntervention], required) –
A list of individual-level interventions to be distributed.
targeted_distributions (list[TargetedDistributionHIV], required) –
A list of TargetedDistributionHIV objects specifying when, to whom, and how many interventions are distributed.
- class emodpy_hiv.campaign.event_coordinator.ReferenceTrackingEventCoordinatorTrackingConfig(campaign: <module 'emod_api.campaign' from '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emod_api/campaign.py'>, intervention_list: list[emodpy.campaign.base_intervention.IndividualIntervention], time_value_map: ~emodpy_hiv.campaign.common.ValueMap, targeting_config: ~emodpy_hiv.utils.targeting_config.AbstractTargetingConfig, tracking_config: ~emodpy_hiv.utils.targeting_config.AbstractTargetingConfig, end_year: float = 2200, update_period: float = 365, target_demographics_config: ~emodpy_hiv.campaign.common.TargetDemographicsConfig = <emodpy_hiv.campaign.common.TargetDemographicsConfig object>, property_restrictions: ~emodpy_hiv.campaign.common.PropertyRestrictions | None = None)[source]#
Bases:
InterventionDistributorEventCoordinator
The ReferenceTrackingEventCoordinatorTrackingConfig coordinator class defines a particular prevalence of an individual-level attribute that should be present in a population over time, and a corresponding intervention that will cause individuals to acquire that attribute. The coordinator tracks the actual prevalence of that attribute against the desired prevalence; it will poll the population of nodes it has been assigned to determine how many people have the attribute. When coverage is less than the desired prevalence, it will distribute enough of the designated intervention to reach the desired prevalence. This coordinator is similar to the ReferenceTrackingEventCoordinator, but allows an attribute in the population to be polled, not only the intervention itself having been received. This allows for tracking overall coverage when, potentially, multiple routes exist for individuals to have acquired the same target attribute.
- Parameters:
campaign (api_campaign, required) –
The campaign object to which the event will be added.
intervention_list (list[IndividualIntervention], required) –
A list of individual-level interventions to be distributed.
time_value_map (ValueMap, required) –
A ValueMap object to map coverages over a defined range of time.
tracking_config (AbstractTargetingConfig, required) –
An AbstractTargetingConfig to define the attribute to be tracked within the targeted group.
The number of people that have this attribute is the numerator while the other targeting parameters define the denominator of the coverage.
The intervention will be distributed to people without the attribute, if coverage is below the target level the time of polling.
end_year (float, optional) –
The year to stop distributing the intervention.
Defines the time period to distribute the intervention along with start_year. The intervention is evenly distributed between each time step in the time period.
Minimum value: 1900,
Maximum value: 2200,
Default value: 2200.
update_period (float, optional) –
The time period in days between updates to the intervention distribution.
Minimum value: 1,
Maximum value: 3650,
Default value: 365.
target_demographics_config (TargetDemographicsConfig, optional) –
A TargetDemographicsConfig to define the demographic characteristics of individuals targeted by the intervention.
Please refer to the emodpy_hiv.campaign.common.TargetDemographicsConfig module for more information.
Please note that the demographic_coverage is not used in this coordinator. Use TargetDemographicsConfig(demographic_coverage=None) to avoid errors.
Default value: TargetDemographicsConfig(demographic_coverage=None).
property_restrictions (PropertyRestrictions, optional) –
A PropertyRestrictions to define the individual-level or node-level property restrictions in the coordinator.
Default value: None.
targeting_config (AbstractTargetingConfig, optional) –
An AbstractTargetingConfig to define who to target individuals with the intervention besides the target_demographics_config and property_restrictions.
Please refer to the emodpy_hiv.utils.targeting_config module for more information.
Default value: None.