knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
In MicroWNV the bloodmeal function uses generic interfaces of the human, adult mosquito, and adult bird components to compute quantities used to simulate transmission of pathogens between the species. It is a function (not a method that dispatches) because it enforces mathematical consistency in how transmission is calculated, regardless of the specific models used to implement each component.
The compute_bloodmeal
function which implements this is called after any vector
control functions have been called but before any update
functions which update
model components over a time step have been called.
Here we describe how the calculation works, and how it is implemented in the code.
Using the generic human interface we calculate the following values:
W
: from compute_W
, gives the weighted person time at risk spent at each patchH
: from compute_H
, gives the total population in each stratax
: from compute_x
, gives the net infectiousness from humans in each stratawf
: from compute_wf
, gives the biting weights of each strataPsi
: from compute_Psi
, gives the time at risk matrixLikewise we use the generic bird interface to calculate:
WB
: from compute_WB
, gives the weighted bird time at risk spent at each patchB_pop
: from compute_B_pop
, gives the total bird population in each patchxB
: from compute_xB
, gives the net infectiousness from birds in each patchwfB
: from compute_wfB
, gives the bird biting weights of each patchPsiB
: from compute_PsiB
, gives the bird time at risk matrixTwo biting distribution matrices (from mosquitoes to humans and birds, respectively) are calculated:
\begin{equation} \beta_{H_{n\times p}} = \mbox{diag}(w_{f}) \cdot \Psi \cdot \mbox{diag}(1/W) \ \beta_{B_{p\times p}} = \mbox{diag}(w_{f_{B}}) \cdot \Psi_{B} \cdot \mbox{diag}(1/W_{B}) \ \end{equation}
After these values have been computed we compute $f$, the blood feeding rate, and $q$, the
proportion of blood meals on human hosts. These use the generic interface functions
compute_f
and compute_q
, which dispatch on the adult mosquito type.
Finally the transmission terms which each component uses to independently update over a time step are calculated and sent to each component. These are the EIR (entomological inoculation rate) for humans and birds, and $\kappa$, the net infectiousness of blood hosts (humans and birds) to mosquitoes.
\begin{equation} EIR_{H_{n\times 1}} = \beta_{H} \cdot (fqZ) \ EIR_{B_{p\times 1}} = \beta_{B} \cdot (f(1-q)Z) \ \kappa_{p\times 1} = q \cdot \beta_{H}^{\intercal} \cdot xH + (1 - q) \cdot \beta_{B}^{\intercal} \cdot x_{B} B_{pop} \end{equation}
Once the above terms have been computed, most models will use them in a fairly similar way to compute a force of infection term. For the mosquito component, it is given as $\kappa fq$, the per-capita rate of infection in mosquito population. Humans and birds compute $h = b EIR$. While the specific way that each of these terms is computed and how state is updated using these terms may change between models, all models will use or can be modified to take as input these terms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.