R/PN-epiSEIR-network-T.R
spn_T_epiSEIR_network.Rd
This function makes the set of transitions (T) for a SPN model of a
metapopulation network for simulation of coupled SEI-SEIR dynamics. It is the
network version of spn_T_epiSEIR_node
.
spn_T_epiSEIR_network(node_list, spn_P, params, cube, h_move, m_move)
node_list | a character vector specifying what type of nodes to create; (m = a node with only mosquitoes, h = a node with only humans, b = a node with both humans and mosquitoes) |
---|---|
spn_P | set of places produced by |
params | a named list of parameters (see details) |
cube | an inheritance cube from the |
h_move | binary adjacency matrix indicating if movement of humans between nodes is possible or not |
m_move | binary adjacency matrix indicating if movement of mosquitoes between nodes is possible or not |
a list with two elements: T
contains transitions packets as lists,
v
is the character vector of transitions (T)
This function takes the places produced from spn_P_epiSEIR_network
and builds all possible transitions between subsets of those places.
The params
argument supplies all of the ecological parameters necessary
to calculate equilibrium values. This function requires the nE
,
nL
, nP
, and nEIP
parameters to be specified. For more details, see
equilibrium_SEI_SEIR
While this function produces all structural information related to transitions,
hazards are produced by a separate function, spn_hazards
.
For larger networks, this function may take some time to return, please be patient; the Petri Net modeling formalism trades additional computation time at model initialization for faster sampling of trajectories within a simulation.
Please note, the movement matrices (h_move
and m_move
) are NOT
stochastic matrices, just binary matrices that say if i,j can exchange population.
Diagonal elements must be FALSE
, and both matrices are checked for validity; the
function will stop with errors if the adjacency matrix specifies illegal movement
rules (e.g.; mosquito movement from a "h" node to a "b" node)
For examples of using this function, see:
vignette("seir-dynamics", package = "MGDrivE2")