gams | R Documentation |
Launch GAMS from command line
gams(gmsfile, options = list(), save, restart, gdx, envvar, wd, ...)
gmsfile |
path to one gms file |
options |
list of options |
save |
path to restart file |
restart |
path to restart file |
gdx |
path to gdx file |
envvar |
list of environmental variables |
wd |
working directory from which to launch the file (default to current working directory) |
... |
further argument to be passed to 'system' |
A 'tibble()' with three columns: 'gmsfile' containing the name of the gms file that was launched, 'return_code' containing the return code following the call, and 'status' a list column containing a 'tibble()' of solver and model status. The most standard return codes are
0 for normal return
2 for compilation error
3 for execution error
see https://www.gams.com/latest/docs/UG_GAMSReturnCodes.html#UG_GAMSReturnCodes_ListOfErrorCodes for the full list of GAMS return codes. For solver status codes, see https://www.gams.com/latest/docs/UG_GAMSOutput.html#UG_GAMSOutput_SolverStatus and for model status, see https://www.gams.com/latest/docs/UG_GAMSOutput.html#UG_GAMSOutput_ModelStatus.
system()
for the list of options of the command used to launch
GAMS.
fpath <- file.path(
sub(";.*$", "", Sys.getenv("GAMSDIR")),
"gamslib_ml", "trnsport.1"
)
gams(fpath, options = list(output = "NUL", lp = "cplex"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.