Skip to contents

Bloodmeal

The bloodmeal function computes bites taken by mosquitoes on hosts relevant for pathogen transmission between species over a time step. After it is computed, the various components can be updated independently.

compute_bloodmeal()
Compute bloodmeals taken by mosquitoes on hosts
compute_bloodmeal_simple()
Compute bloodmeals taken by mosquitoes on hosts in simple models

Adult mosquito component

The adult mosquito component is responsible for updating mosquito populations of the adult (flying) life stage, and handling pathogen dynamics in adult populations. Any model of adult mosquitoes in MicroMoB is required to implement the following interface methods. It is stored and dispatches on the object in model$mosquito.

output_mosquitoes()
Get output for mosquito populations
step_mosquitoes()
Update mosquito population
compute_f()
Compute mosquito feeding rate (\(f\))
compute_q()
Compute human blood feeding fraction (\(q\))
compute_Z()
Compute density of infective mosquitoes (\(Z\))
compute_oviposit()
Compute number of eggs laid from oviposition for each patch

Ross-Macdonald (RM) mosquito model

This model implements the generalized RM mosquito model.

setup_mosquito_RM()
Setup generalized Ross-Macdonald mosquito model
get_config_mosquito_RM()
Get parameters for generalized Ross-Macdonald mosquito model
output_mosquitoes(<RM>)
Get output for Ross-Macdonald mosquito populations
step_mosquitoes(<RM>)
Update Ross-Macdonald mosquitoes
step_mosquitoes(<RM_deterministic>)
Update Ross-Macdonald mosquitoes (deterministic)
step_mosquitoes(<RM_stochastic>)
Update Ross-Macdonald mosquitoes (stochastic)
compute_f(<RM>)
Compute mosquito feeding rate for RM model (\(f\))
compute_q(<RM>)
Compute human blood feeding fraction for RM model (\(q\))
compute_Z(<RM>)
Compute density of infective mosquitoes for RM model (\(Z\))
compute_oviposit(<RM>)
Compute number of eggs laid from oviposition for each patch for RM model
compute_oviposit(<RM_deterministic>)
Compute number of eggs laid from oviposition for each patch for deterministic RM model
compute_oviposit(<RM_stochastic>)
Compute number of eggs laid from oviposition for each patch for stochastic RM model

Behavioral state mosquito model

This is a behavioral state model of mosquitoes which transition between oviposition and blood feeding. It also implements infection and incubation.

setup_mosquito_BQ()
Setup blood feeding & oviposition (BQ) behavioral state mosquito model
step_mosquitoes(<BQ>)
Update blood feeding & oviposition (BQ) behavioral state mosquitoes
step_mosquitoes(<BQ_deterministic>)
Update blood feeding & oviposition (BQ) behavioral state mosquitoes (deterministic)
step_mosquitoes(<BQ_stochastic>)
Update blood feeding & oviposition (BQ) behavioral state mosquitoes (stochastic)
compute_f(<BQ>)
Compute mosquito feeding rate for BQ model (\(f\))
compute_q(<BQ>)
Compute human blood feeding fraction for BQ model (\(q\))
compute_Z(<BQ>)
Compute density of infective mosquitoes for BQ model (\(Z\))
compute_oviposit(<BQ>)
Compute number of eggs laid from oviposition for each aquatic habitat for BQ model
compute_oviposit(<BQ_deterministic>)
Compute number of eggs laid from oviposition for each patch for deterministic RM model
compute_oviposit(<BQ_stochastic>)
Compute number of eggs laid from oviposition for each patch for stochastic RM model

Trace (forced) mosquito model

This is a null mosquito component used to test aquatic models.

setup_mosquito_trace()
Setup null mosquito model
get_config_mosquito_trace()
Get parameters for null mosquito model
output_mosquitoes(<trace>)
Get output for null mosquito populations
step_mosquitoes(<trace>)
Update null mosquito population
compute_f(<trace>)
Compute null mosquito feeding rate (\(f\))
compute_q(<trace>)
Compute null human blood feeding fraction (\(q\))
compute_Z(<trace>)
Compute null density of infective mosquitoes (\(Z\))
compute_oviposit(<trace>)
Compute number of eggs laid from oviposition for each patch for null model

Aquatic (immature) mosquito component

The aquatic mosquito component is responsible for updating aquatic mosquito populations which live in aquatic habitats. It must calculate how many eggs are oviposited by adults per day, add them to aquatic habitats, update the aquatic life stages, and calculate the number of emerging adults. Any model of immature mosquitoes in MicroMoB is required to implement the following interface methods. It is stored and dispatches on the object in model$aqua.

output_aqua()
Get output for aquatic (immature) mosquito populations
step_aqua()
Update aquatic (immature) mosquito populations
compute_emergents()
Compute number of newly emerging adults (\(\lambda\))

Trace (forced) aquatic model

This is a model of aquatic mosquitoes where emergence is passed as a trace (forcing) term and it is not affected by endogenous dynamics.

setup_aqua_trace()
Setup aquatic (immature) mosquito model with trace (forced) emergence
get_config_aqua_trace()
Get parameters for aquatic (immature) model with forced emergence
output_aqua(<trace>)
Get output for aquatic (immature) mosquito populations with forced emergence
step_aqua(<trace>)
Update aquatic (immature) mosquito populations for forced emergence
compute_emergents(<trace>)
Compute number of newly emerging adults from forcing term
compute_emergents(<trace_deterministic>)
Compute number of newly emerging adults from forcing term (deterministic)
compute_emergents(<trace_stochastic>)
Compute number of newly emerging adults from forcing term (stochastic)

Beverton-Holt aquatic model

This is a simple non-linear model of aquatic (immature) dynamics with a single compartment.

setup_aqua_BH()
Setup aquatic (immature) mosquito model with Beverton-Holt dynamics
get_config_aqua_BH()
Get parameters for aquatic (immature) model with Beverton-Holt dynamics
output_aqua(<BH>)
Get output for aquatic (immature) mosquito populations with Beverton-Holt dynamics
step_aqua(<BH>)
Update aquatic (immature) mosquito populations for Beverton-Holt dynamics
step_aqua(<BH_deterministic>)
Update aquatic (immature) mosquito populations for deterministic Beverton-Holt dynamics
step_aqua(<BH_stochastic>)
Update aquatic (immature) mosquito populations for stochastic Beverton-Holt dynamics
compute_emergents(<BH>)
Compute number of newly emerging adults from Beverton-Holt dynamics

Human component

The human component is responsible for updating human populations and their pathogen dynamics. Any model of humans in MicroMoB is required to implement the following interface methods. It is stored and dispatches on the object in model$human.

step_humans()
Update human population
compute_wf()
Compute human biting weights (\(w_{f}\))
compute_x()
Compute net infectiousness of humans (\(x\))
compute_H()
Compute human population strata sizes (\(H\))
compute_Psi()
Compute time at risk matrix (\(\Psi\))
observe_pfpr()
Observe PfPR in human strata

SIS human model

This model implements a simple SIS (Susceptible-Infected-Susceptible) model of humans with risk distributed according to time at risk matrices.

setup_humans_SIS()
Setup humans with SIS pathogen model
get_config_humans_SIS()
Get parameters for SIS human model
step_humans(<SIS>)
Update SIS human model
step_humans(<SIS_deterministic>)
Update SIS human model (deterministic)
step_humans(<SIS_stochastic>)
Update SIS human model (stochastic)
compute_wf(<SIS>)
Compute human biting weights for SIS model (\(w_{f}\))
compute_x(<SIS>)
Compute net infectiousness for SIS model (\(x\))
compute_H(<SIS>)
Compute human population strata sizes for SIS model (\(H\))
compute_Psi(<SIS>)
Compute time at risk matrix for SIS model (\(\Psi\))
observe_pfpr(<SIS>)
Observe PfPR in human strata for SIS model

SIP human model

The SIP (Susceptible-Infected-Protected) model is a simple extension of the SIS model that adds a class “Protected” for those who have recieved treatment and are temporarily protected from infection until prophylaxis decays

setup_humans_SIP()
Setup humans with SIP pathogen model
step_humans(<SIP>)
Update SIP human model
step_humans(<SIP_deterministic>)
Update SIP human model (deterministic)
step_humans(<SIP_stochastic>)
Update SIP human model (stochastic)
compute_wf(<SIP>)
Compute human biting weights for SIP model (\(w_{f}\))
compute_x(<SIP>)
Compute net infectiousness for SIP model (\(x\))
compute_H(<SIP>)
Compute human population strata sizes for SIP model (\(H\))
compute_Psi(<SIP>)
Compute time at risk matrix for SIP model (\(\Psi\))
observe_pfpr(<SIP>)
Observe PfPR in human strata for SIP model

MOI human model

The MOI (multiplicity of infection) human model is a queueing model for superinfection, where persons can be infected by multiple distinct parasite broods.

setup_humans_MOI()
Setup humans with MOI (multiplicity of infection) pathogen model
get_config_humans_MOI()
Get parameters for MOI human model
step_humans(<MOI>)
Update MOI human model
step_humans(<MOI_deterministic>)
Update MOI human model (deterministic)
step_humans(<MOI_stochastic>)
Update MOI human model (stochastic)
compute_wf(<MOI>)
Compute human biting weights for MOI model (\(w_{f}\))
compute_x(<MOI>)
Compute net infectiousness for MOI model (\(x\))
compute_H(<MOI>)
Compute human population strata sizes for MOI model (\(H\))
compute_Psi(<MOI>)
Compute time at risk matrix for MOI model (\(\Psi\))

SIR human model

The SIR (Susceptible-Infected-Recovered) model is a simple model for many strongly immunizing arboviruses.

setup_humans_SIR()
Setup humans with SIR infection model
get_config_humans_SIR()
Get parameters for SIR human model
step_humans(<SIR>)
Update SIR human model
step_humans(<SIR_deterministic>)
Update SIR human model (deterministic)
step_humans(<SIR_stochastic>)
Update SIR human model (stochastic)
compute_wf(<SIR>)
Compute human biting weights for SIR model (\(w_{f}\))
compute_x(<SIR>)
Compute net infectiousness for SIR model (\(x\))
compute_H(<SIR>)
Compute human population strata sizes for SIR model (\(H\))
compute_Psi(<SIR>)
Compute time at risk matrix for SIR model (\(\Psi\))

Visitor component

The visitor component is responsible for modeling human populations that are not part of the resident population of the geographic area being simulated. It is stored and dispatches on the object in model$visitor.

compute_Wd()
Compute available visitors (\(W_{\delta}\))
compute_xd()
Compute net infectiousness of visitors (\(x_{\delta}\))

Trace visitor model

This is a simple trace driven visitor model.

setup_visitor_trace()
Setup trace driven visitors
get_config_visitor_trace()
Get parameters for trace driven visitors
compute_Wd(<trace>)
Compute available visitors for trace model (\(W_{\delta}\))
compute_xd(<trace>)
Compute net infectiousness of visitors for trace model (\(x_{\delta}\))

Alternative blood hosts component

The alternative blood hosts component is responsible for modeling other blood host populations (livestock, dogs, etc.). It is stored and dispatches on the object in model$alternative.

compute_O()
Compute available alternative blood hosts (\(O\))

Trace alternative blood hosts model

This is a simple trace driven alternative blood hosts model.

setup_alternative_trace()
Setup trace driven alternative blood hosts
get_config_alternative_trace()
Get parameters for trace driven alternative blood hosts
compute_O(<trace>)
Compute available alternative blood hosts for trace model (\(O\))

Utility and global methods

Utilities for users

These are utilities which are intended for typical users to access.

MicroMoB MicroMoB-package
MicroMoB: Microsimulation for mosquito-borne pathogens
make_MicroMoB()
Make a model object
get_tnow()
Get current time of simulation from model object
get_tmax()
Get maximum time of simulation from model object
api_config_global()
Read global configuration options
sample_stochastic_vector()
Sample a stochastic vector
sample_stochastic_matrix()
Sample a stochastic matrix
draw_multinom()
Draw a multinomially distributed random vector
strata_to_residency_proportion()
Helper function for lumped population strata (proportional assignment)
strata_to_residency_counts()
Helper function for lumped population strata (counts)
time_patch_varying_parameter()
Input parameters that may vary by time and patch
time_varying_parameter()
Input parameters that may vary by time

Internal utilities

These are lower-level utilities. They are exported and documented because other packages which extend Micro-MoB may want to use them.

is_binary()
Does a numeric object consist of only zeros and ones?
approx_equal()
Check if two numeric values are approximately equal
divmod()
Division of integers
distribute()
Distribute items into bins as evenly as possible

Parameter getters and setters

For interfacing with other APIs it is useful for models to have setter functions to modify parameters after a model has been set up (e.g; during a simulation).

Ross-Macdonald (RM) mosquito model

set_f_mosquito_RM()
Set feeding rate for Ross-Macdonald mosquito model
get_f_mosquito_RM()
Get feeding rate for Ross-Macdonald mosquito model
set_q_mosquito_RM()
Set human blood feeding fraction for Ross-Macdonald mosquito model
get_q_mosquito_RM()
Get human blood feeding fraction for Ross-Macdonald mosquito model
set_eip_mosquito_RM()
Set extrinsic incubation period for Ross-Macdonald mosquito model
get_eip_mosquito_RM()
Get extrinsic incubation period for Ross-Macdonald mosquito model
set_p_mosquito_RM()
Set daily survival probability for Ross-Macdonald mosquito model
get_p_mosquito_RM()
Get daily survival probability for Ross-Macdonald mosquito model
set_psi_mosquito_RM()
Set mosquito dispersal matrix for Ross-Macdonald mosquito model
get_psi_mosquito_RM()
Get mosquito dispersal matrix for Ross-Macdonald mosquito model
set_nu_mosquito_RM()
Set number of eggs laid per oviposition for Ross-Macdonald mosquito model
get_nu_mosquito_RM()
Get number of eggs laid per oviposition for Ross-Macdonald mosquito model
set_kappa_mosquito_RM()
Set kappa for Ross-Macdonald mosquito model
get_kappa_mosquito_RM()
Get kappa for Ross-Macdonald mosquito model

Beverton-Holt aquatic model

set_molt_aqua_BH()
Set daily maturation probability for Beverton-Holt aquatic mosquito model
get_molt_aqua_BH()
Get daily maturation probability for Beverton-Holt aquatic mosquito model
set_surv_aqua_BH()
Set daily survival probability for Beverton-Holt aquatic mosquito model
get_surv_aqua_BH()
Get daily survival probability for Beverton-Holt aquatic mosquito model
set_K_aqua_BH()
Set carrying capacity for Beverton-Holt aquatic mosquito model
get_K_aqua_BH()
Get carrying capacity for Beverton-Holt aquatic mosquito model

Trace (forced) aquatic model

set_lambda_aqua_trace()
Set daily emergence for trace (forced) aquatic mosquito model
get_lambda_aqua_trace()
Get daily emergence for Beverton-Holt aquatic mosquito model