R/Simulation_module_functions.R
GenSimFiles.Rd
Generates the input files for each of the Nsim simulations.
Specifically, this function re-write the original input files in the True
folder
and:
allows for considering random variation in recruitment (either by adding random variations (normally distributed) to the original recruitment deviations or by generating "new deviations",
Set the maximum number of function calls to 1,
call the gmacs.exe (with no estimation) to generate a new gmacsall.out file that will be used for the simulations.
The function is called for each simulation so it will generate Nsim gmacsall.out
which are copy and paste in the Run
folder.
GenSimFiles(
Isim = NULL,
OrigFiles = NULL,
Ndev_Rec = NULL,
SigmaR = NULL,
DoRecDev = NULL,
verbose = NULL,
FunCall = TRUE,
Dir_TPL = NULL
)
(integer)- simulation number (1 to Nsim)
(named list)- Output of the prepSim()
function.
(integer)- Number of year to which apply a deviation in recruitment
(numeric)- Standard deviation used in the stats::rnorm()
function
(logical)- if FALSE
: add deviation to the original ones,
if TRUE
generate new deviations.
(logical)- flag to print processing information.
(logical)- Run the executable (with no estimation) ?
(character string)- the directory where the gmacsbase.TPL file you are using for the stock assessment is hold.
the SimData.out file as a named list for each simulation.