NChooserEventCoordinator¶
The NChooserEventCoordinator coordinator class is used to distribute an individuallevel intervention to exactly N people of a targeted demographic. This contrasts with other event coordinators that distribute an intervention to a percentage of the population, not to an exact count. See the following JSON example and table, which shows all available parameters for this event coordinator.
Note
Parameters are casesensitive. For Boolean parameters, set to 1 for true or 0 for false. Minimum, maximum, or default values of “NA” indicate that those values are not applicable for that parameter.
EMOD does not use true defaults; that is, if the dependency relationships indicate that a parameter is required, you must supply a value for it. However, many of the tools used to work with EMOD will use the default values provided below.
JSON does not permit comments, but you can add “dummy” parameters to add contextual information to your files.
The table below describes all possible parameters with which this class can be configured. The JSON example that follows shows one potential configuration.
Parameter 
Data type 
Minimum 
Maximum 
Default 
Description 
Example 

Age_Ranges_Years 
array of JSON objects 
NA 
NA 
NA 
A list of age ranges that individuals must be in to qualify for an intervention. Each age range is a JSON object with a minimum and a maximum property. An individual is considered in range if their age is greater than or equal to the minimum age and less than the maximum age, in floating point years of age. It must have the same number of objects as Num_Targeted_XXX has elements. 
{
"Age_Ranges_Years": [
{
"Min": 10,
"Max": 19
},
{
"Min": 30,
"Max": 39
},
{
"Min": 50,
"Max": 59
}
],
"Num_Targeted_Males": [
600000,
400000,
200000
],
"Num_Targeted_Females": [
500000,
300000,
100000
]
}

Distribution_Constant 
array of JSON objects 
NA 
NA 
NA 
The value to assign to all individuals. 

Distribution_Dual_Constant_Peak_2_Value 
array of JSON objects 
NA 
NA 
NA 
The value to assign to the remaining individuals. 

Distribution_Dual_Constant_Proportion_0 
array of JSON objects 
NA 
NA 
NA 
The proportion of individuals to assign a value of zero. 

Distribution_DualExponential_Mean_1 
array of JSON objects 
NA 
NA 
NA 
The mean of the first exponential distribution. 

Distribution_DualExponential_Mean_2 
array of JSON objects 
NA 
NA 
NA 
The mean of the second exponential distribution. 

Distribution_DualExponential_Proportion_1 
array of JSON objects 
NA 
NA 
NA 
The proportion of individuals in the first exponential distribution. 

Distribution_Exponential 
array of JSON objects 
NA 
NA 
NA 
The mean for an exponential distribution. 

Distribution_Gaussian_Mean 
array of JSON objects 
NA 
NA 
NA 
The mean for a Gaussian distribution. 

Distribution_Gaussian_Std_Dev 
array of JSON objects 
NA 
NA 
NA 
The standard deviation for a Gaussian distribution. 

Distribution_LogNormal_Mu 
array of JSON objects 
NA 
NA 
NA 
The mean for a lognormal distribution. 

Distribution_LogNormal_Sigma 
array of JSON objects 
NA 
NA 
NA 
The width for a lognormal distribution. 

Distribution_PiecewiseConstant 
array of JSON objects 
NA 
NA 
NA 
TBD 

Distribution_PiecewiseLinear 
array of JSON objects 
NA 
NA 
NA 
TBD 

Distribution_Poisson_Mean 
array of JSON objects 
NA 
NA 
NA 
The mean for a Poisson distribution. 

Distributions 
array of JSON objects 
NA 
NA 
NA 
The ordered list of elements defining when, to whom, and how many interventions to distribute. 
{
"Distributions": {
"Start_Day": 10,
"End_Day": 20,
"Property_Restrictions_Within_Node": [],
"Age_Ranges_Years": [
{
"Min": 10,
"Max": 19
},
{
"Min": 40,
"Max": 49
}
],
"Num_Targeted": [
100,
300
]
}
}

Distribution_Uniform_Max 
array of JSON objects 
NA 
NA 
NA 
The maximum of the uniform distribution. 

Distribution_Uniform_Min 
array of JSON objects 
NA 
NA 
NA 
The minimum of the uniform distribution. 

Distribution_Weibull_Kappa 
array of JSON objects 
NA 
NA 
NA 
The shape value in a Weibull distribution. 

Distribution_Weibull_Lambda 
array of JSON objects 
NA 
NA 
NA 
The scale value in a Weibull distribution. 

End_Day 
float 
0 
3.40E+3 
3.40E+38 
The day to stop distributing the intervention. No interventions are distributed on this day or going forward. 
{
"Start_Day": 10,
"End_Day": 20
}

Intervention_Config 
JSON object 
NA 
NA 
NA 
The nested JSON of the actual intervention to be distributed by this event coordinator. 
{
"Intervention_Config": {
"class": "OutbreakIndividual",
"Antigen": 0,
"Genome": 0,
"Outbreak_Source": "PrevalenceIncrease",
"Incubation_Period_Override": 1
}
}

LHMSpec_Factor 
array of JSON objects 
NA 
NA 
NA 
The value by which to scale the larval habitat availability 

LHMSpec_Habitat 
array of JSON objects 
NA 
NA 
NA 
The name of the habitat for which to specify a larval habitat multiplier 

LHMSpec_Species 
array of JSON objects 
NA 
NA 
NA 
The name of the species for which to specify a larval habitat multiplier 

Max 
float 
0 
125 
125 
This parameter determines the maximum age, in years for individuals to be included in the targeted population. An individual is considered in range if their age is greater than or equal to the minimum age and less than the maximum age, in floating point years of age. 
{
"Age_Ranges_Years": [
{
"Min": 20,
"Max": 29
},
{
"Min": 50,
"Max": 59
}
]
}

Min 
float 
0 
125 
0 
This parameter determines the minimum age, in years for individuals to be included in the targeted population. An individual is considered in range if their age is greater than or equal to the minimum age and less than the maximum age, in floating point years of age. 
{
"Age_Ranges_Years": [
{
"Min": 20,
"Max": 29
},
{
"Min": 50,
"Max": 59
}
]
}

Num_Targeted 
array of integers 
0 
2.15E+0 
0 
The number of individuals to target with the intervention. Note that this value will be scaled up by the population scaling factor equal to Base_Population_Scale_Factor. If using this parameter, Num_Targeted_Males and Num_Targeted_Females must be empty. 
{
"Age_Ranges_Years": [
{
"Min": 10,
"Max": 19
},
{
"Min": 40,
"Max": 49
}
],
"Num_Targeted": [
100,
300
]
}

Num_Targeted_Females 
array of integers 
0 
2.15E+0 
0 
The number of female individuals to distribute interventions to during this time period. If using this parameter with Num_Targeted_Males to target specific genders, they both must be the same length, and Num_Targeted must be empty. 
{
"Age_Ranges_Years": [
{
"Min": 10,
"Max": 19
},
{
"Min": 30,
"Max": 39
},
{
"Min": 50,
"Max": 59
}
],
"Num_Targeted_Males": [
600000,
400000,
200000
],
"Num_Targeted_Females": [
500000,
300000,
100000
]
}

Num_Targeted_Males 
array of integers 
0 
2.15E+0 
0 
The number of male individuals to distribute interventions to during this time period. If using this parameter with Num_Targeted_Females to target specific genders, they both must be the same length, and Num_Targeted must be empty. 
{
"Age_Ranges_Years": [
{
"Min": 10,
"Max": 19
},
{
"Min": 30,
"Max": 39
},
{
"Min": 50,
"Max": 59
}
],
"Num_Targeted_Males": [
600000,
400000,
200000
],
"Num_Targeted_Females": [
500000,
300000,
100000
]
}

Property_Restrictions_Within_Node 
array of JSON objects 
NA 
NA 
NA 
A list of the IndividualProperty key:value pairs, as defined in the demographics file, that individuals must have to be targeted by this intervention. See NodeProperties and IndividualProperties parameters for more information. This parameter allows you to specify AND and OR combinations of key:value pairs. You may specify individual property restrictions using either this parameter or Property_Restrictions, but not both. 
The following example restricts the intervention to individuals who are urban and high risk or urban and medium risk. {
"Property_Restrictions_Within_Node": [
{
"Risk": "HIGH",
"Geographic": "URBAN"
},
{
"Risk": "MEDIUM",
"Geographic": "URBAN"
}
]
}

Start_Day 
float 
0 
3.40E+3 
0 
The day to start distributing the intervention. 
{
"Start_Day": 0,
"End_Day": 100
}

{
"Use_Defaults": 1,
"Events": [{
"class": "CampaignEvent",
"Start_Day": 1,
"Nodeset_Config": {
"class": "NodeSetAll"
},
"Event_Coordinator_Config__KP1": "",
"Event_Coordinator_Config": {
"class": "NChooserEventCoordinator",
"Distributions": [{
"Start_Day": 10,
"End_Day": 11,
"Property_Restrictions_Within_Node": [{
"QualityOfCare": "Bad"
}],
"Age_Ranges_Years": [{
"Min": 20,
"Max": 40
}],
"Num_Targeted": [
99999999
]
}],
"Intervention_Config": {
"class": "ControlledVaccine",
"Cost_To_Consumer": 10,
"Vaccine_Type": "AcquisitionBlocking",
"Vaccine_Take": 1.0,
"Waning_Config": {
"class": "WaningEffectMapLinear",
"Initial_Effect": 1.0,
"Expire_At_Durability_Map_End": 1,
"Durability_Map": {
"Times": [
0,
50,
100
],
"Values": [
1.0,
1.0,
0.0
]
}
},
"Distributed_Event_Trigger": "Vaccinated",
"Expired_Event_Trigger": "VaccineExpired",
"Duration_To_Wait_Before_Revaccination": 0
}
}
}]
}