Make an xds model object:

  • Define the dynamical components:

    • \(\cal XH\) - a model for human / host infection dynamics of class Xname with trivial demographics

    • \(\cal MYZ\) - a model for adult mosquito ecology and infection dynamics of class MYZname

    • \(\cal L\) - a model for aquatic mosquito ecology of class Lname

  • Define basic structural parameters for a single host and vector population:

    • \(n_p\) or nPatches - the number of patches

    • \(n_q\) or nHabitats <- length(membership) - the number and locations of aquatic habitats

    • \(n_h\) or nStrata <- length(residence) - the number of human / host population strata and basic demographic information

  • Configure some of the basic elements

    • Search weights for human population strata

    • Search weights for aquatic habitats

    • The mosquito dispersal matrix, \(\cal K\)

    • The time spent matrix \(\Theta\)

  • Configure runtime parameters for discrete-time systems

Advanced options can be configured after basic setup.

xds_setup(
  xds = "ode",
  Xname = "SIS",
  Xopts = list(),
  MYZname = "macdonald",
  MYZopts = list(),
  Lname = "trivial",
  Lopts = list(),
  nPatches = 1,
  HPop = 1000,
  residence = 1,
  membership = 1,
  searchB = 1,
  TimeSpent = list(),
  calK = list(),
  searchQ = 1,
  Xday = 1,
  MYZday = 1,
  Lday = 1,
  BFopts = list(),
  model_name = "unnamed"
)

Arguments

xds

is ode or dde or dts for ordinary OR delay differential OR difference equations

Xname

a character string defining a \(\cal X\) model

Xopts

a list to configure the X model

MYZname

a character string defining a \(\cal MYZ\) model

MYZopts

a list to configure the MYZ model

Lname

a character string defining a \(\cal L\) model

Lopts

a list to configure the L model

nPatches

is the number of patches

HPop

is the number of humans in each patch

residence

is a vector that describes the patch where each human stratum lives

membership

is a vector that describes the patch where each aquatic habitat is found

searchB

is a vector of search weights for blood feeding

TimeSpent

is either a TimeSpent matrix or a string to call a function that sets it up

calK

is either a calK matrix or a string that defines how to set it up

searchQ

is a vector of search weights for egg laying

Xday

is the run-time time step for X component (in days): integer or 1/integer

MYZday

is the run-time time step for MYZ component (in days): integer or 1/integer

Lday

is the run-time time step for L component (in days): integer or 1/integer

BFopts

a list to configure the blood feeding model

model_name

is a name for the model (arbitrary)

Value

an xds object

Details

  1. Using the basic structural parameters, a basic template is created by make_xds_template with a properly configured interface for blood feeding and egg laying, and pars$frame = class(pars$frame) = 'full' .

    • nPatches is passed as a parameter

    • nHabitats is configured by passing the habitat membership vector, and nHabitats <- length(membership)

    • nStrata is configured by passing a vector of human population densities and a residence vector, and nStrata <- length(residence) <- length(HPop)

    • nHosts=1 -- basic setup handles the first host species

    • nVectors=1 -- basic setup handles the first vector species

  2. Each one of the dynamical components is configured.

    • pars$Xpar[[1]] defines a model for human / host infection dynamics of class Xname (the \(\cal XH\) dynamical component). The parameter values passed in a named list, Xopts.

    • pars$MYZpar[[1]] defines a model for adult mosquito ecology & infection dynamics of class MYZname (the \(\cal MYZ\) dynamical component). The parameter values are passed in a named list, MYZopts.

    • pars$Lpar[[1]] defines a model for aquatic mosquito ecology of class Lname (The \(\cal L\) dynamical component). The parameter values are passed in a named list, Lopts.

  3. After configuring the dynamical components, several structural parameters can be configured at the command line:

    • Habitat search weights can be set

    • Host population search weights can be set

    • A mosquito dispersal matrix, \(\cal K\), can be set

    • A time spent matrix, \(\Theta\), can be set

    • Runtime parameters for dts models can be configured by passing values: Xday, MYZday, and Lday

Advanced features must be configured later, including:

  • multiple-host species or multiple-vector species

  • exogenous forcing by weather, resources, or other factors

  • vector control, vaccines, or other mass

Note

If \(\cal MYZ\) is the trivial model, consider using xds_setup_aquatic or xds_setup_human or xds_setup_cohort. Models for mosquito ecology need not include states describing infection status (see xds_setup_mosy).