
Initialize list of age structured group (stanza) parameters for dynamic simulation
Source:R/ecosim.R
rsim.stanzas.Rd
Creates a list of stanza indices and parameters to be used by rsim.run
.
Arguments
- Rpath.params
R object containing the parameters needed to create a
Rpath
model. This is generated either by thecreate.rpath.params()
orread.rpath.params()
functions.- state
List object of state variables generated by
rsim.state
.- params
Rsim parameter object generated by
rsim.params
.
Value
a list of 21 objects:
Nsplit
, number of model groups with stanzasNstanzas
, numeric vector lengthNsplit
+1, leading 0 for indexing followed by the number of age groups for each model group with stanzasEcopathCode
, numeric matrix of Rpath group numbers withNsplit
+1 species rows andNstanzas
+1 age group columns, first column and row empty for indexingAge1
, numeric matrix of age in months of first age group withNsplit
+1 species rows, first column and row empty for indexing, second column earliest age in months (0), third column max age in monthsAge2
, numeric matrix of age in months of last age group withNsplit
+1 species rows, first column and row empty for indexing, second column earliest age in months, third column max age in monthsbaseWageS
, numeric matrix with rows of monthly weight relative to weight at infinity (Winf) calculated inrpath.stanzas
withNsplit
+1 species columnsbaseNageS
, numeric matrix with rows of monthly numbers surviving, calculated inrpath.stanzas
withNsplit
+1 species columnsbaseQageS
, numeric matrix with rows of monthly consumption, calculated as WageS^VBGFd inrpath.stanzas
withNsplit
+1 species columnsWmat
, numeric vector lengthNsplit
+1, leading 0 for indexing followed by weight at 50% maturity relative to Winf for each model group with stanzasRecPower
, numeric vector lengthNsplit
+1, leading 0 for indexing followed by recruitment power parameter for each model group with stanzasrecruits
, numeric vector lengthNsplit
+1, leading 0 for indexing followed by recruits per spawner entered as input torpath.stanzas
VBGFd
, numeric vector lengthNsplit
+1, leading 0 for indexing followed by von Bertalanffy d (default = 2/3) for each model group with stanzasRzeroS
, numeric vector lengthNsplit
+1, leading 0 for indexing followed by recruits per spawner entered as input torpath.stanzas
vBM
, numeric vector lengthNsplit
+1, leading 0 for indexing followed by von Bertalanffy growth coefficient for each model group with stanzasSplitAlpha
, numeric matrix of initial monthly (rows) growth coefficients for each model group with stanzas (Nsplit
+1 species columns)SpawnX
, numeric vector lengthNsplit
+1, leading 0 for indexing followed by relative strength of spawner-recruit relationship for each model group with stanzas, currently set to 10000, no relationshipSpawnEnergy
, numeric vector lengthNsplit
+1, leading 0 for indexing followed by relative energy going to recruitment rather than growth for each model group with stanzas, currently set to 1baseEggsStanza
, numeric vector lengthNsplit
+1, leading 0 for indexing followed by initial estimate of egg output for each model group with stanzasbaseSpawnBio
, numeric vector lengthNsplit
+1, leading 0 for indexing followed by initial estimate of spawning biomass (=egg output) for each model group with stanzasRscaleSplit
, numeric vector lengthNsplit
+1, leading 0 for indexing followed by adult to juvenile metric scaling parameter for each model group with stanzas, currently set to 1baseStanzaPred
, numeric vector lengthNUM_GROUPS
+1, base consumption (sum of QageS*NageS) for each model group with stanzas in full model group order; 0s entered for non-stanza groups
Examples
# Read in Rpath parameter file and generate model object
Rpath <- rpath(REco.params)
# Create default dynamic parameters from Rpath model
Rsim.params <- rsim.params(Rpath)
# Create state vectors with default values
Rsim.state <- rsim.state(Rsim.params)
# Create stanza object
Rsim.stanzas <- rsim.stanzas(REco.params, Rsim.state, Rsim.params)