This function takes care of calling SS3. Importantly, it parses whether the
user is on Unix or Windows and calls the binary correctly. This lower-level
function is meant to be called by higher level functions such as
run_ss3sim
, ss3sim_base
, or your own custom
function.
run_ss3model(scenarios, iterations, type = c("om", "em"), admb_options = "",
hess = FALSE, ignore.stdout = TRUE, admb_pause = 0.05,
ss_mode = c("safe", "optimized"), show.output.on.console = FALSE, ...)
Which scenarios to run. Controls which folder contains the model that SS3 should run on.
Which iterations to run. Controls which folder contains the model that SS3 should run on.
Are you running the operating or estimation models?
Any additional options to pass to the SS3 command.
Calculate the Hessian on estimation model runs?
Passed to system
. If TRUE
then ADMB
output is not printed on screen. This will be slightly faster. Set to
FALSE
to help with debugging.
A length of time (in seconds) to pause after running the
simulation model. This can be necessary on certain computers where file
writing can be slightly delayed. For example, on computers where the files
are written over a network connection. If the output files haven't
finished writing before R starts looking for the output then the
simulation will crash with an error about missing files. The default
value is set to 0.01
seconds, just to be safe.
Which version of the SS3 executable should be run?
"safe"
or "optimized"
? Safe mode is useful for model building
and testing. Optimized will be slightly faster for running simulations.
Default is safe mode.
Logical: passed on to
system
.
Anything else to pass to system
.
ss3sim requires you to place the SS3 executable(s) in your
path. See the vignette vignette("ss3sim-vignette")
for details on
this process. The executables themselves can be downloaded from:
https://www.dropbox.com/sh/zg0sec6j20sfyyz/AACQiuk787qW882U2euVKoPna
There are two versions of the executables: safe and optimized
(opt
). Safe mode is best used during model development and testing.
Optimized mode will be slightly faster and can be used for simulation if
desired. The default is safe mode. ss3sim assumes that you at least
have the safe-mode SS3 binary in your path. If you wish to use optimized
mode then you must also have the opt
executable version in your path.
These executables must be named exactly as they are at the link above. You
can choose the SS mode by setting the argument ss_mode
to
"safe"
or "optimized"
.