Make Transitions (T) For a Network (Mosquitoes only)
Source:R/PN-lifecycle-network-T.R
spn_T_lifecycle_network.RdThis function makes the set of transitions (T) for a SPN model of a
metapopulation network. It is the network version of spn_T_lifecycle_node.
Arguments
- spn_P
set of places produced by
spn_P_lifecycle_network- params
a named list of parameters (see details)
- cube
an inheritance cube from the
MGDrivEpackage (e.g.cubeMendelian)- n
an integer giving the number of nodes
- m_move
binary adjacency matrix indicating if movement of mosquitoes between nodes is possible or not
Value
a list with two elements: T contains transitions packets as lists,
v is the character vector of transitions (T)
Details
This function takes the places produced from spn_P_lifecycle_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, and nP parameters to be specified. For more details, see
equilibrium_lifeycle
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 matrix (m_move) is NOT a
stochastic matrices, just a binary matrix that say if i,j can exchange population.
Diagonal elements must be FALSE.
At least one of the arguments n and m_move must be provided. If both are provided
n is ignored.
For examples of using this function, see:
vignette("lifecycle-network", package = "MGDrivE2")