A function that runs a Management Strategy Evaluation (closed-loop simulation) for a specified operating model
runMSE(OM = DLMtool::testOM, MPs = c("AvC", "DCAC", "FMSYref", "curE",
"matlenlim", "MRreal"), CheckMPs = FALSE, timelimit = 1, Hist = FALSE,
ntrials = 50, fracD = 0.05, CalcBlow = TRUE, HZN = 2, Bfrac = 0.5,
AnnualMSY = TRUE, silent = FALSE, PPD = FALSE, parallel = FALSE,
save_name = NULL, checks = FALSE, control = NULL)runMSErobust(OM = DLMtool::testOM, MPs = c("AvC", "DCAC", "FMSYref", "curE",
"matlenlim", "MRreal"), timelimit = 1, CheckMPs = FALSE, Hist = FALSE,
ntrials = 50, fracD = 0.05, CalcBlow = FALSE, HZN = 2, Bfrac = 0.5,
AnnualMSY = TRUE, maxsims = 64, name = NULL, unique = FALSE,
maxCrash = 10, saveMSE = TRUE, savePack = FALSE)
An operating model object (class 'OM')
A vector of methods (character string) of class MP
Logical to indicate if Can function should be used to check if MPs can be run.
Maximum time taken for a method to carry out 10 reps (methods are ignored that take longer)
Should model stop after historical simulations? Returns a list containing all historical data
Maximum of times depletion and recruitment deviations are resampled to optimize for depletion. After this the model stops if more than percent of simulations are not close to the required depletion
Maximum allowed proportion of simulations where depletion is not close to sampled depletion from OM before model stops with error
Should low biomass be calculated where this is the spawning biomass at which it takes HZN mean generation times of zero fishing to reach Bfrac fraction of SSBMSY
The number of mean generation times required to reach Bfrac SSBMSY in the Blow calculation
The target fraction of SSBMSY for calculating Blow
Logical. Should MSY statistics be calculated for each projection year? May differ from MSY statistics from last historical year if there are changes in productivity
Should messages be printed out to the console?
Logical. Should posterior predicted data be included in the MSE object Misc slot?
Logical. Should the MSE be run using parallel processing?
Character. Optional name to save parallel MSE list
Logical. Run tests?
control options for testing and debugging
Maximum number of simulations per packet
Character string for name of saved MSE packets (if savePack=TRUE
)
and final MSE object. If none provided, it uses the first five letters from the OM
name
Logical. Should the name be unique? Current date and time appended to name.
Maximum number of consecutive crashes before the MSE stops
Logical to indicate if final MSE object should be saved to current working directory (this is probably a good idea)
Logical to indicate if packets should be save to current working directory
Arguments to runMSE function
runMSE
: Default function to use.
runMSErobust
: Save out the results to a Rdata
file. To increase speed and efficiency, particulary for runs with a large
number simulations (nsim
), the simulations are split into a number of
packets. The functions loops over the packets and combines the output into
a single MSE object. If the MSE model crashes during a run, the MSE is run
again until it is successfully completed. The MSE is stopped if the number
of consecutive crashes exceeds maxCrash
. There is an option to save
the packets as Rdata files to the current working directory (default is
FALSE). By default, the functions saves the completed MSE object as a Rdata
file (to the current working directory).