runMSE: Function to run the TCSAM02 MSE for one harvest strategy

View source: R/runMSE.R

runMSER Documentation

Function to run the TCSAM02 MSE for one harvest strategy

Description

This functions runs the TCSAM02 MSE for one harvest strategy.

Usage

runMSE(
  os = "osx",
  topLevelFolder = ".",
  model = "tcsam02",
  path2model = "",
  HCR = 1,
  numRuns = 3,
  minRunID = 1,
  firstYr = 2018,
  numYrs = 10,
  iSeeds = NULL,
  runBaseModel = TRUE,
  baseModelInfo = list(path = ".", configFile = "ModelConfig.inp", datasets = list(file =
    "Datasets.inp", components = list(Bio = "Info", Fishery = c("TCF", "SCF", "GTF",
    "RKF"), Survey = "NMFS", Growth = "EBS", ChelaHeights = NULL)), pin = TRUE, pinFile =
    "tcsam02.pin", minPhase = 1, jitter = FALSE, iSeed = NULL, calcTAC = TRUE, HCR = 1),
  opModInfo = list(path = ".", configFile = "OpMod.Configuration.inp", optsFile =
    "OpMod.Options.inp", mpiFile = "OpMod.ParametersInfo,inp", pinFile = "opMod.pin",
    minPhase = 5, maxPhase = 6),
  estModInfo = list(path = ".", configFile = "EstMod.Configuration.inp", optsFile =
    "EstMod.Options.inp", minPhase = 5),
  keepFiles = c("tmp.sh", "tcsam02.par"),
  cleanupAll = FALSE,
  test = TRUE,
  verbose = TRUE
)

Arguments

os
  • 'win', 'mac', 'osx', or 'linux'

topLevelFolder
  • path to top-level folder for MSE model runs

model
  • TCSAM02 model executable name

path2model
  • path to model executable

HCR
  • integer identifying harvest control rule to use

numRuns
  • number of complete MSE runs to make

minRunID
  • integer identifying first run label for the series of runs (default=1)

firstYr
  • first year for projection (i.e., the assessment year, or max year + 1, of base model)

numYrs
  • number of years to run model forward

iSeeds
  • matrix (number of total possible runs) x (number of years) of random number seed values (or NULL)

runBaseModel
  • flag to run base model to calculate TAC and create operating model state for first projection year

baseModelInfo
  • list of parameters to run base model (if necessary)

opModInfo
  • list of parameters to run operating model

estModInfo
  • list of parameters to run estimation model

keepFiles
  • vector of file names to keep after model run, if cleanupAll is true

cleanupAll
  • T/F to clean up ALMOST ALL model output files after each run

test
  • flag (T/F) to run in "test" mode

verbose
  • flag (T/F) to print diagnostic messages

configFile
  • path to model configuration file

Details

numRuns is the number of successful iterations the MSE is to complete before stopping. If a model run fails for some reason during an iteration in the MSE, the iteration is restarted from the firstYr with a new seed for the random number generator (RNG). If the input matrix iSeeds is NULL, then the new RNG seed is based on the system clock. However, if the matrix is supplied, the seed is taken from the first element in the "next" row of the matrix (a counter for the total number of MSE iterations is used to track this; a separate counter tracks the number of successful iterations). Thus, if iSeeds is supplied, the number of rows in the matrix needs to be larger than (or equal to) the total number of MSE iterations actually undergone to achieve numRuns successful iterations.

Value

  • NULL


wStockhausen/rTCSAM02 documentation built on April 16, 2024, 6:25 a.m.