vignettes/MY-BQ.Rmd
MY-BQ.RmdHere, we describe two closely-related modules for the adult mosquito component, called BQm (Figure 1) and BQ (Figure 2). Both are implemented as systems of ordinary differential equations.
MYname = "BQ"
xds_setup_mosy().Mname = "BQm"
BQm is simpler than BQ, and the two modules are equivalent when and the initial conditions for BQ do not include any infected mosquitoes.
In this vignette, we explain behavioral state dynamics first (BQm). Next, then we extend the model to include infection dynamics (BQ).
Most of the models developed to model malaria parasite infections in mosquitoes look at the infection states: for example, uninfected; infected but not infectious; or infected and infectious. A different class of models tracks the behavioral / physiological state of mosquitoes, so we call them behavioral state models. A model with both infection states and behavioral states was first published by Le Menach, et al. (2005)1.
In behavioral state models for mosquito ecology, we assume that a mosquitoes is in a physiological state that is accompanied by a set of behavioral algorithms: in these two modules, a mosquito is either trying to blood feed or lay eggs. These models are thus ignored mating, sugar feeding, and post-prandial resting. (Other modules have been developed to model these conditions.)
Two state variables in BQm describe the density of mosquitoes:
- the population density mosquitoes in a blood feeding state
- the population density of mosqutioes in an egg laying state
These equations are defined for patch-based models with patches. We thus assume that all the parameters, variables, and terms are of length except for and , which are matrices.
Two parameters describe the behavioral state transitions:
- the blood feeding rate(s)
- the egg laying rate(s)
In these models, patterns can emerge as mosquitoes respond to the availability of resources. Both parameters are thus implemented as ports: the default implementation is a model with no forcing, but the parameters could also be a function of resource availability, weather, or something else. In these models, the parameters affecting mosquito survival and dispersal. To compute these, we formulate demographic matrices for each behavioral state that are, potentially, site-specific: and
The Demographic Matrices
- the mosquito per-capita death rates while in each behavioral state
- behavioral state-specific patch emigration rates for blood-feeding or egg-laying mosquitoes
- behavioral state-specific emigration loss rate: excess mortality associated with migration
- are Dipsersal Matrices - Each one of the following parameters can take on a unique value in each patch. Each dispersal matrix has the form: The diagonal elements are all , and other elements, , are the fraction of blood feeding mosquitoes leaving patch that end up in patch ; the notation should be read as , or to from . Notably, the form of is constrained such that
is the demographic matrix for blood feeding mosquitoes:
is the demographic matrix for egg laying mosquitoes:
The emergence rate of adult mosquitoes is denoted which is computed in the L Component. Here, we assume that all emerging mosquitoes are added to the blood feeding population. (For mosquito biologists, these modules thus lack the skill to model autogeny.)
We can now define the dynamical system as a system of coupled ordinary differential equations:

There are three mutually exclusive and collectively exhaustive infection states: uninfected, infected but not yet infectious, and infected and infectious.
In extending the model to include infection states, we must define two additional parameters:
- the human blood feeding fraction
- the rate that infected mosquitoes become infective (it is inverse of the EIP)
In addition, the dynamical term passed from the transmission module, is net infectiousness: the probability a mosquito becomes infected after blood feeding on a human.
The infection states are orthogonol to the behavioral states, so each behavioral state is replicated for each infection state, yielding variables:
- uninfected, blood feeding mosquitoes
- uninfected, egg laying mosquitoes
- infected but not infective, blood feeding mosquitoes
- infected but not infective, egg laying mosquitoes
- infective, blood feeding mosquitoes
- infective, egg laying mosquitoes
Behavioral state transitions proceed as in the model lacking infected states. Infected states affect two other state transitions:
Mosquitoes emerge uninfected and blood feeding.
A fraction of uninfected, blood feeding mosquitoes become infected and transition from to (instead of )
Mosquitoes in both states transition to states at the rate

The xds_setup() utilities allow the user to pass a
single version of the dispersal matrix K_matrix. During
xds_setup(), Omega_b and Omega_q
are identical.
HPop = rep(1000, 3)
residence = c(1:3)
model <- xds_setup(MYname="BQ", Lname="trivial", Xname = "trivial", residence=residence, HPop =HPop, nPatches=3)
model <- xds_solve(model)
xds_plot_M(model)
xds_plot_Y(model, add = T)
xds_plot_Z(model, add = T)
xds_plot_Y_fracs(model)
xds_plot_Z_fracs(model, add=T)
Menach AL, et al. The unexpected importance of mosquito oviposition behaviour for malaria: non-productive larval habitats can be sources for malaria transmission. Malar J 4, 23 (2005). https://doi.org/10.1186/1475-2875-4-23↩︎