def sample_anthrop_and_outdoor(cb, species, anthropophily, outdoor) :

    update_species_param(cb, species, 'Anthropophily', anthropophily)
    update_species_param(cb, species, 'Indoor_Feeding_Fraction', 1-outdoor)

    return { '%s_Anthropophily' % species : anthropophily,
             '%s_Outdoor_Fraction' % species : outdoor}
def update_vector_params(cb):

    set_params_by_species(cb.params, ['minimus', 'dirus'])
    update_species_param(cb,
                         'minimus',
                         'Larval_Habitat_Types', {'WATER_VEGETATION': 2e7},
                         overwrite=True)
    update_species_param(cb,
                         'minimus',
                         'Acquire_Modifier',
                         0.8,
                         overwrite=False)
    update_species_param(cb,
                         'minimus',
                         'Adult_Life_Expectancy',
                         25,
                         overwrite=False)  # target: 12
    update_species_param(cb,
                         'dirus',
                         'Larval_Habitat_Types', {
                             'CONSTANT': 1e7,
                             'TEMPORARY_RAINFALL': 7e7
                         },
                         overwrite=True)
    update_species_param(cb,
                         'dirus',
                         'Adult_Life_Expectancy',
                         30,
                         overwrite=False)  # target: 14
    update_species_param(cb, 'minimus', 'Anthropophily', 0.5, overwrite=False)
    update_species_param(cb, 'dirus', 'Anthropophily', 0.5, overwrite=False)

    capacity_dist_per_year = {
        "Times": [0, 1, 245, 275, 364],
        "Values": [0.2, 0.2, 0.7, 3, 3]
    }
    linear_spline = {
        "LINEAR_SPLINE": {
            "Capacity_Distribution_Number_Of_Years": 1,
            "Capacity_Distribution_Over_Time": capacity_dist_per_year,
            "Max_Larval_Capacity": 3e7
        }
    }
    update_species_param(cb,
                         'minimus',
                         'Larval_Habitat_Types',
                         linear_spline,
                         overwrite=False)
Exemple #3
0
from dtk.vector.species import set_larval_habitat
from simtools.SetupParser import SetupParser
from spline_functions import *
# from .spline_functions import get_spline_values_for_all_params, get_annual_representative_spline, \
#     get_representative_spline_multipiers
from dtk.interventions.novel_vector_control import add_ATSB

from ATSBEntoCalibSite import ATSBEntoCalibSite

# Which simtools.ini block to use for this calibration
SetupParser.default_block = 'HPC'

# Start from a base MALARIA_SIM config builder
# This config builder will be modify by the different sites defined below
cb = DTKConfigBuilder.from_defaults('MALARIA_SIM')
update_species_param(cb, 'gambiae', 'Indoor_Feeding_Fraction', 0.5)
update_species_param(cb, 'funestus', 'Indoor_Feeding_Fraction', 0.9)
update_species_param(cb, 'gambiae', 'Vector_Sugar_Feeding_Frequency', 'VECTOR_SUGAR_FEEDING_EVERY_DAY', overwrite=False)
update_species_param(cb, 'gambiae', 'Anthropophily', 0.8)
update_species_param(cb, 'gambiae', 'Adult_Life_Expectancy', 20)

datadir = 'C:\\Users\\jkurlander\\Dropbox (IDM)'

# List of sites we want to calibrate on
throwaway = 1
species  = 'gambiae'
reference_fname = 'cluster_mosquito_counts_per_house_by_month.csv'
reference_spline = 'Multi_year_calibration_by_HFCA_180404/best_180409/Panjane_funestus.csv'
irs_fn = os.path.join(datadir,
                      'Malaria Team Folder/projects/Mozambique/entomology_calibration/cluster_all_irs_events_pyrethroid_2014.csv')
itn_fn = os.path.join(datadir,
Exemple #4
0
exp_name = 'atsb_killing_coverage_test'
cb = DTKConfigBuilder.from_defaults('VECTOR_SIM')
configure_site(cb, 'Namawala')

species = 'gambiae'

cb.update_params({
    'Config_Name': 'ATSB_Test_Namawala',
    'Simulation_Duration': 365,
    'Vector_Species_Names': [species]
})

update_species_param(cb,
                     species,
                     'Vector_Sugar_Feeding_Frequency',
                     'VECTOR_SUGAR_FEEDING_EVERY_DAY',
                     overwrite=False)


def atsb_fn(cb, coverage, killing):

    killing_cfg = [{
        "Species": 'funestus',
        "Killing_Config": {
            "class": "WaningEffectMapLinearSeasonal",
            "Initial_Effect": 1.0,
            "Durability_Map": {
                "Times": [0.0, 90.0, 91.0, 300.0, 301.0, 365.0],
                "Values": [1.0, 1.0, 0.01, 0.01, 1.0, 1.0]
            }