Creates and returns structured template for an
xds
object. The returned object has set up generic features
and placeholders for options that must be configured
to fully define an xds
object
Arguments
- xds
is used to dispatch various functions to set up and solve systems of differential equations. 'xde' for ordinary or delay differential equations; 'dts' for "discrete time systems"
- frame
model component subset
- nPatches
is the number of patches
- membership
is the habitat membership vector
- residence
is the strata residence vector
Details
This function sets up the basic structures required to configure and run a basic model. The returned object is a list with various required elements attached and configured, but without specifying the dynamical components or any advanced features.
First, the function sets up some short text strings (assigned to the same S3
class)
to dispatch various cases of of various S3
functions:
xds
is either "ode" or "dde" for ordinary / delay differential equations; or "dts" for difference equations;frame
is one of several cases:"full" includes all three dynamical components: a human/host dynamical component, \(\cal XH\); and adult mosquito dynamical component, \(\cal MYZ\); and an aquatic mosquito dynamical component, \(\cal L\). in some form (possibly the trivial case) (see
xds_setup()
)"mozy" is for mosquito ecology models (see
xds_setup_mosy()
), including models without pathogen infection dynamics in mosquitoes"aquatic" is for aquatic mosquito ecology models (see
xds_setup_aquatic()
), forced by a function describing egg laying"human" is for human/host infection dynamics(see
xds_setup_human()
), forced by the infective density of adult mosquitoes, \(fqZ\)"cohort" is for human/host cohort infection dynamics (see
xds_setup_cohort()
), forced by a functionF_eir
forcing
is set to "static"
Second, the function sets the values of the structural parameters:
nVectors
or \(n_s\), the number of vector species is set to 1;nHosts
or \(n_i\), the number of host species is set to 1;nPatches
or \(n_p\) is the number of patchesnHabitats
or \(n_q\), the number of aquatic habitats, is set tolength(membership)
nStrata
or \(n_h\), the number of human/ host population strata, is set tolength(HPop)
Next, the function sets up empty lists to hold the objects that define components:
Xpar
Transmission calls
setup_TRANSMISSION()
andsetup_visitors_static()
sets up a static
model for the availability of visitors; by default, there are no visitors Next, the function sets up egg laying, blood feeding, and transmission:
Egg Laying calls
create_habitat_matrix()
, thensetup_EGG_LAYING()
Blood Feeding calls
create_residence_matrix()
, thensetup_BLOOD_FEEDING()
Transmission calls
setup_TRANSMISSION()
andsetup_visitors_static()
sets up a static model for the availability of visitors; by default, there are no visitors
Finally, the function sets up a few other miscellaneous options:
Exposure is called after Transmission to compute environmentally heterogeneous exposure and malaria importation through travel:
setup_exposure_pois sets up a Poisson model for environmental heterogeneity
setup_no_travel sets up a model with no exposure through travel
See also
Related: xds_setup and setup_no_forcing. Illustrated in a vignette: 5-3-4 Example