This function allows one to build the GMACS executable, run GMACS and make comparisons if several versions of GMACS are considered in the analysis. For each stock considered in the analysis, this function will copy all the input files required by GMACS from a specific directory (which can be the directory where the input files used for the last assessment are stored, or some other).

Do_GMACS(
  Spc = NULL,
  GMACS_version = NULL,
  ASS = NULL,
  AssMod_names = NULL,
  Dir = NULL,
  compile = NULL,
  run = NULL,
  LastAssDat = NULL,
  ADMBpaths = NULL,
  make.comp = NULL,
  verbose = NULL,
  cleanRun = NULL
)

Arguments

Spc

vector of strings specifying the name(s) of the stock considered in the analysis.

GMACS_version

vector of strings holding the name(s) of the GMACS versions that is/are used in the analysis.

ASS

Logical. If TRUE, the outputs of the last assessment will be compared to the GMACS version(s) currently used in this analysis.

AssMod_names

vector of strings specifying the names of the models used in the last assessment (e.g., model_16_0)

Dir

vector of strings containing the directories for all elements of GMACS_version used in this analysis

compile

(0/1). If 0, GMACS is not compiled. This assumes that an executable already exists in the directory of the version(s) used in the analysis. If 1, the code will be compiled before a new run.

run

Logical. If TRUE the model will be executed.

LastAssDat

Logical. If TRUE, the latest available data will be used for the analysis i.e. the model will be executed using the data stored in the the "Assessment_data" folder.

ADMBpaths

string name of 2-column text file that details the relevant paths for the R variables admbpath, gccpath, and editor.

make.comp

Logical. If TRUE, comparisons will be made between the various GMACS_versions considered in the analysis.

verbose

logical: if TRUE, report the shell call an its messages to the R console.

cleanRun

(logical) - Specify if the `Dir` has to be cleaned after the run. See the clean_bat() function.

Value

Depending on the option chose, it can return all the output files from GMACS, an error if something happened during the run or a list of comparison between the various GMACS version used for each stock considered in the analysis.

See also

Do_Comp for comparisons, createGmacsExe for building the executable.