BioeconomicSim: Constructor for the 'BioeconomicSim' class

View source: R/BioeconomicSim-class.R

BioeconomicSimR Documentation

Constructor for the BioeconomicSim class

Description

A constructor for the BioeconomicSim class. This need not be called directly, as this class is generated automatically via the project() function.

Usage

BioeconomicSim(
  params,
  R,
  t_start,
  t_end,
  R_init = NULL,
  CLim_func = NULL,
  CLim_alloc = NULL
)

Arguments

params

An object of class BioeconomicParams.

R

The recruitment across the simulation. This is either a numeric giving the recruitment at each time step, or a function of the previous years adult stock abundance.

t_start

An integer specifying the start time for the simulation. The default is 1

t_end

An integer specifying the end time for the simulation. The default is 1 + length(R)

R_init

A numeric giving the initial recruitment value. Only required if R is a function of stock size.

CLim_func

The catch limit function. This should be a function of the current stock size that returns the total catch limit across both fleets. The default value is NULL which corresponds to no management of the stock.

CLim_alloc

The catch allocation across both fleets. This should be a numeric of length 2 that sums to 1. The first element should be the proportion of total catch assigned to the commercial fleet, while the second element should be the proportion of total catch assigned to the recreational fleet. The default is NULL - no management.

Value

An object of type BioeconomicSim

Examples

data("seabass")
recruitment_fun <- function(stock){
 return(
       1.492*stock/(7.2e-4 + 1.87e-07*stock)*exp(rnorm(1,mean=0,sd=0.9))
       )
}
sim <- BioeconomicSim(params, recruitment_fun, t_start = 1980, t_end = 2020, R_init = 1e5)

CefasRepRes/FishRAM documentation built on Feb. 1, 2023, 1:15 a.m.