streambugs.get.sys.def: Get system definition of the streambugs ODE model

View source: R/streambugs_aux.r

streambugs.get.sys.defR Documentation

Get system definition of the streambugs ODE model

Description

Get a structured representation of the streambugs ODE system definition.

Usage

streambugs.get.sys.def(y.names, par, inp = NA)

Arguments

y.names

state variables names, either as a vector encoded in the form "Reach_Habitat_Taxon" or "Reach_Habitat_Taxon_Group", or a list as returned by decode.statevarnames function

par

vector with constant parameters and model inputs

inp

list with time-dependent parameters or model inputs with one list element for each parameter or input that includes a matrix where first column is the time and second the corresponding parameter or input value

Value

List with definition of the model including input state variables, parameters, and inputs, as well as the derived model structure including global parameters, environmental conditions of reaches and habitats, initial conditions, taxa properties, stoichiometric coefficients of all processes, and process definitions for each state variable.

Examples

m <- streambugs.example.model.toy()
sys.def <- streambugs.get.sys.def(y.names=m$y.names, par=m$par, inp=m$inp)
# Get inital conditions for all state variables
sys.def$par.initcond$parvals
# Get stoichiometric coefficients of consumption within the food web
sys.def$par.stoich.web$Cons
# Get stoichiometric coefficients of death process for each taxon
# (transforming them into a dead organic matter "POM")
sys.def$par.stoich.taxon$Death


streambugs documentation built on Feb. 16, 2023, 9:48 p.m.