Learn R Programming

DLMtool (version 5.4.5)

CalcMPDynamics: Calculate population dynamics from MP recommendation

Description

An internal function to calculate the population dynamics for the next time step based on the recent MP recommendation

Usage

CalcMPDynamics(
  MPRecs,
  y,
  nyears,
  proyears,
  nsim,
  Biomass_P,
  VBiomass_P,
  LastTAE,
  histTAE,
  LastSpatial,
  LastAllocat,
  LastTAC,
  TACused,
  maxF,
  LR5_P,
  LFR_P,
  Rmaxlen_P,
  retL_P,
  retA_P,
  L5_P,
  LFS_P,
  Vmaxlen_P,
  SLarray_P,
  V_P,
  Fdisc_P,
  DR_P,
  M_ageArray,
  FM_P,
  FM_Pret,
  Z_P,
  CB_P,
  CB_Pret,
  TAC_f,
  E_f,
  SizeLim_f,
  FinF,
  Spat_targ,
  CAL_binsmid,
  Linf,
  Len_age,
  maxage,
  nareas,
  Asize,
  nCALbins,
  qs,
  qvar,
  qinc,
  Effort_pot,
  checks = FALSE
)

Arguments

MPRecs

A named list of MP recommendations. The names are the same as slotNames('Rec'), except for Misc. Each element in the list is a matrix. With the expection of Spatial, all elements in list have nrow=1 and ncol=nsim. Spatial has nrow=nareas. Matrices can be empty matrix, populated with all NAs (both mean no change in management with respect to this element (e.g. Effort)), or populated with a recommendation. MPs must either return a recommendation or no recommendation for every simulation for a particular slot (i.e. cannot have some NA and some values).

y

The projection year

nyears

The number of historical years

proyears

The number of projection years

nsim

The number of simulations

Biomass_P

An array with dimensions nsim, maxage, proyears, and nareas with total biomass in the projection years

VBiomass_P

An array with dimensions nsim, maxage, proyears, and nareas with vulnerable biomass in the projection years

LastTAE

A vector of length nsim with the most recent TAE

LastSpatial

A matrix of nrow=nareas and ncol=nsim with the most recent spatial management arrangements

LastAllocat

A vector of length nsim with the most recent allocation

LastTAC

A vector of length nsim with the most recent TAC

TACused

A vector of length nsim with the most recent TAC

maxF

A numeric value with maximum allowed F. From OM@maxF

LR5_P

A matrix with nyears+proyears rows and nsim columns with the first length at 5 percent retention.

LFR_P

A matrix with nyears+proyears rows and nsim columns with the first length at full retention.

Rmaxlen_P

A matrix with nyears+proyears rows and nsim columns with the retention at maximum length.

retL_P

An array with dimensions nsim, nCALbins and nyears+proyears with retention at length

retA_P

An array with dimensions nsim, maxage and nyears+proyears with retention at age

L5_P

A matrix with nyears+proyears rows and nsim columns with the first length at 5 percent selectivity

LFS_P

A matrix with nyears+proyears rows and nsim columns with the first length at full selectivity

Vmaxlen_P

A matrix with nyears+proyears rows and nsim columns with the selectivity at maximum length.

SLarray_P

An array with dimensions nsim, nCALbins and nyears+proyears with selectivity at length

V_P

An array with dimensions nsim, maxage and nyears+proyears with selectivity at age

Fdisc_P

vector of length nsim with discard mortality. From OM@Fdisc but can be updated by MP (Rec@Fdisc)

DR_P

A matrix with nyears+proyears rows and nsim columns with the fraction discarded.

M_ageArray

An array with dimensions nsim, maxage and nyears+proyears with natural mortality at age

FM_P

An array with dimensions nsim, maxage, proyears, and nareas with total fishing mortality

FM_Pret

An array with dimensions nsim, maxage, proyears, and nareas with fishing mortality of the retained fish

Z_P

An array with dimensions nsim, maxage, proyears, and nareas with total mortality

CB_P

An array with dimensions nsim, maxage, proyears, and nareas with total catch

CB_Pret

An array with dimensions nsim, maxage, proyears, and nareas with retained catch

TAC_f

A matrix with nsim rows and proyears columns with the TAC implementation error

E_f

A matrix with nsim rows and proyears columns with the effort implementation error

SizeLim_f

A matrix with nsim rows and proyears columns with the size limit implementation error

FinF

A numeric vector of length nsim with fishing mortality in the last historical year

Spat_targ

A numeric vector of length nsim with spatial targeting

CAL_binsmid

A numeric vector of length nCALbins with mid-points of the CAL bins

Linf

A numeric vector of length nsim with Linf (from Stock@Linf)

Len_age

An array with dimensions nsim, maxage, and nyears+proyears with length-at-age

maxage

A numeric value with maximum age from Stock@maxage

nareas

A numeric value with number of areas

Asize

A matrix with nsim rows and nareas columns with the relative size of each area

nCALbins

The number of CAL bins. Should be the same as length(CAL_binsmid)

qs

A numeric vector of length nsim with catchability coefficient

qvar

A matrix with nsim rows and proyears columns with catchability variability

qinc

A numeric vector of length nsim with average annual change in catchability

Effort_pot

A numeric vector of potential effort

checks

Logical. Run internal checks? Currently not used.

Value

A named list with updated population dynamics