Skip to contents

Carries out the numerical integration of the Rsim alogrithms.

Usage

rsim.run(Rsim.scenario, method = "RK4", years = 1:100)

Arguments

Rsim.scenario

Scenario object that contains all of the rsim rates and forcing functions generated by rsim.scenario().

method

Numerical integration method. Either 'AB' for Adams-Bashforth or 'RK4' for 4th order Runge-Kutta.

years

A vector of each year of the simulation.

Value

S3 object class Rsim.output, a list of 16 objects:

  • out_Biomass, numeric matrix of monthly (rows) output biomass values by biomass group (columns) for model run

  • out_Catch, numeric matrix of monthly (rows) output catch values by biomass group (columns) for model run

  • out_Gear_Catch, numeric matrix of monthly (rows) output catch by species/gear/disposition (columns) for model run

  • annual_Catch, numeric matrix of annual (rows) output catch values by biomass group (columns) for model run

  • annual_Biomass, numeric matrix of annual (rows) output biomass values by biomass group (columns) for model run

  • annual_QB, numeric matrix of annual (rows) output consumption:biomass values by biomass group (columns) for model run

  • annual_Qlink, numeric matrix of annual (rows) output consumption values by predator-prey pair (columns) for model run

  • end_state, list of 9 final value vectors for biomass groups, same components as those produced by rsim.state()

  • crash_year, integer flag; -1 no crash or year of model crash

  • pred, named character vector of predators in each predator prey pair

  • prey, named character vector of prey in each predator prey pair

  • Gear_Catch_sp, named character vector of species caught in gears for each disposition

  • Gear_Catch_gear, named character vector of gear types for each species and disposition

  • Gear_Catch_disp, character vector of catch disposition (Landing or Discard) for each species and gear

  • start_state, list of 9 initial value vectors for biomass groups, see output of rsim.state()

  • params, list of 4; 3 dimensioning parameters and 1 biomass group and fleet name vector

See also

Other Rsim functions: extract.node(), rsim.params(), rsim.plot(), rsim.scenario(), rsim.step(), write.Rsim()

Examples

# Read in Rpath parameter file and generate model object
Rpath <- rpath(AB.params)
# Create a 50 yr Rsim scenario
Rsim.scenario <- rsim.scenario(Rpath, AB.params, years = 1:50)
# Run the Rsim simulation
Rsim.output <- rsim.run(Rsim.scenario, method = "RK4", years = 1:50)