Skip to contents

Creates a list of stanza indices and parameters to be used by rsim.run.

Usage

rsim.stanzas(Rpath.params, state, params)

Arguments

Rpath.params

R object containing the parameters needed to create a Rpath model. This is generated either by the create.rpath.params() or read.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 stanzas

  • Nstanzas, numeric vector length Nsplit+1, leading 0 for indexing followed by the number of age groups for each model group with stanzas

  • EcopathCode, numeric matrix of Rpath group numbers with Nsplit+1 species rows and Nstanzas+1 age group columns, first column and row empty for indexing

  • Age1, numeric matrix of age in months of first age group with Nsplit+1 species rows, first column and row empty for indexing, second column earliest age in months (0), third column max age in months

  • Age2, numeric matrix of age in months of last age group with Nsplit+1 species rows, first column and row empty for indexing, second column earliest age in months, third column max age in months

  • baseWageS, numeric matrix with rows of monthly weight relative to weight at infinity (Winf) calculated in rpath.stanzas with Nsplit+1 species columns

  • baseNageS, numeric matrix with rows of monthly numbers surviving, calculated in rpath.stanzas with Nsplit+1 species columns

  • baseQageS, numeric matrix with rows of monthly consumption, calculated as WageS^VBGFd in rpath.stanzas with Nsplit+1 species columns

  • Wmat, numeric vector length Nsplit+1, leading 0 for indexing followed by weight at 50% maturity relative to Winf for each model group with stanzas

  • RecPower, numeric vector length Nsplit+1, leading 0 for indexing followed by recruitment power parameter for each model group with stanzas

  • recruits, numeric vector length Nsplit+1, leading 0 for indexing followed by recruits per spawner entered as input to rpath.stanzas

  • VBGFd, numeric vector length Nsplit+1, leading 0 for indexing followed by von Bertalanffy d (default = 2/3) for each model group with stanzas

  • RzeroS, numeric vector length Nsplit+1, leading 0 for indexing followed by recruits per spawner entered as input to rpath.stanzas

  • vBM, numeric vector length Nsplit+1, leading 0 for indexing followed by von Bertalanffy growth coefficient for each model group with stanzas

  • SplitAlpha, numeric matrix of initial monthly (rows) growth coefficients for each model group with stanzas (Nsplit+1 species columns)

  • SpawnX, numeric vector length Nsplit+1, leading 0 for indexing followed by relative strength of spawner-recruit relationship for each model group with stanzas, currently set to 10000, no relationship

  • SpawnEnergy, numeric vector length Nsplit+1, leading 0 for indexing followed by relative energy going to recruitment rather than growth for each model group with stanzas, currently set to 1

  • baseEggsStanza, numeric vector length Nsplit+1, leading 0 for indexing followed by initial estimate of egg output for each model group with stanzas

  • baseSpawnBio, numeric vector length Nsplit+1, leading 0 for indexing followed by initial estimate of spawning biomass (=egg output) for each model group with stanzas

  • RscaleSplit, numeric vector length Nsplit+1, leading 0 for indexing followed by adult to juvenile metric scaling parameter for each model group with stanzas, currently set to 1

  • baseStanzaPred, numeric vector length NUM_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)