No Matches
matlab.gams.control.Options Class Reference

Manages GAMS options. More...

Public Member Functions

void defines (string name, string value)
 set the definition of GAMS Dash options
void dispose ()
 Release external resources hold by non-java library.
void export (string filePath)
 Write Options into a parameter file.
string getDefinitionOf (string name)
 get the definition of GAMS Dash options
string getIDir (integer index)
 get an input file directory of specified index
string getSelectedSolvers (integer index)
 get selected solvers
logical isDefinitionEmpty ()
 check if the list of GAMS Dash options dictionaries is empty
logical isIDirEmpty ()
 check if the list of input file directories is empty
void readFromStr (string str)
 read from string
void ResetToDefault ()
 Reset all GAMS options to default.
void setAllModelTypes (string solver)
 Set default solver for all model types which the solver can handle.
void setModelTypesForSolvers ()
 Set default solver for all model types which the solver can handle.
void setSolversOptions ({string} solvers)
 set all selected solvers
integer writeParameterFile (string fileName)
 write parameter file

Public Attributes

gams.control.options.Action action
 GAMS processing request.
cell allSelectedSolvers
 all selected solvers
cell allSolversOptions
 (read only) all selected solvers
gams.control.options.AppendExpand appendExpand
 Expand file append option.
gams.control.options.AppendOut appendOut
 Output file append option.
gams.control.options.AsyncSolLst asyncSolLst
 Print solution listing when asynchronous solve (Grid or Threads) is used.
double bratio
 Basis detection threshold.
gams.control.options.CaptureModelInstance captureModelInstance
 Switch to capture all model instances within a run.
integer CErr
 Compile time error limit.
gams.control.options.CharSet charSet
 Character set flag.
gams.control.options.CheckErrorLevel checkErrorLevel
 Check errorLevel automatically after executing external program.
string CNS
 Default CNS solver.
string decryptKey
 Key to decrypt a text file that was encrypted via $encrypt.
containers.Map definitions
 Dictionaries for GAMS Dash options.
gams.control.options.DFormat DFormat
 Date format.
gams.control.options.Digit digit
 Switch default for "$on/offDigit".
string DNLP
 Default DNLP solver.
integer domLim
 Domain violation limit solver default.
gams.control.options.DumpOpt dumpOpt
 Writes preprocessed input to the file input.dmp.
string dumpOptGDX
 Defines a GDX file name stem created when using DumpOpt.
gams.control.options.DumpParms dumpParms
 GAMS parameter logging.
string dumpParmsLogPrefix
 Prefix of lines triggered by DumpParms>1.
gams.control.options.ECImplicitLoad ECImplicitLoad
 Allow implicit loading of symbols from embedded code or not.
string EMP
 Default EMP solver.
gams.control.options.Empty empty
 Switch default for "$on/offEmpty".
string encryptKey
 Key to encrypt a text file using $encrypt.
string eolCom
 Switch default for "$on/offEolCom" and "$eolCom".
gams.control.options.ErrMsg errMsg
 Placing of compilation error messages.
integer errorLog
 Max error message lines written to the log for each error.
double ETLim
 Elapsed time limit in seconds.
gams.control.options.ExecMode execMode
 Limits on external programs that are allowed to be executed.
string expand
 Expanded (include) input file name.
double FDDelta
 Step size for finite differences.
gams.control.options.FDOpt FDOpt
 Options for finite differences.
string FErr
 Alternative error message file.
gams.control.options.FileCase fileCase
 Casing of file names and paths (put, gdx, ref, $include, etc.)
string fileStem
 Sets the file stem for output files which use the input file name as stem by default.
string fileStemApFromEnv
 Append a string read from an environment variable to the "FileStem".
gams.control.options.Filtered filtered
 Switch between filtered and domain-checked read from GDX.
integer forceOptFile
 Overwrites other option file section mechanism.
gams.control.options.ForceWork forceWork
 Force GAMS to process a save file created with a newer GAMS version or with execution errors.
integer forLim
 GAMS looping limit.
gams.control.options.FreeEmbeddedPython freeEmbeddedPython
 Free external resources at the end of each embedded Python code blocks.
string GDX
 GAMS data exchange file name.
gams.control.options.gdxCompress gdxCompress
 Compression of generated GDX file.
gams.control.options.gdxConvert gdxConvert
 Version of GDX files generated (for backward compatibility)
gams.control.options.gdxUels gdxUels
 Unload labels or UELs to GDX either squeezed or full.
string gridDir
 Grid file directory.
string gridScript
 Grid submission script.
double heapLimit
 Maximum Heap size allowed in MB.
gams.control.options.HoldFixed holdFixed
 Treat fixed variables as constants.
gams.control.options.HoldFixedAsync holdFixedAsync
 Allow HoldFixed for models solved asynchronously as well.
string IDCGDXInput
 GDX file name with data for implicit input.
string IDCGDXOutput
 GDX file name for data for implicit output.
cell IDir
 Input file directories (up to 40 are allowed)
gams.control.options.ImplicitAssign implicitAssign
 Switch default for "$on/offImplicitAssign".
string inlineCom
 Switch default for "$on/offInline" and "$inlineCom".
cell inputDirectories
 (read only) Input file directories
integer integer1
 Integer communication cell N.
integer integer2
 Integer communication cell N.
integer integer3
 Integer communication cell N.
integer integer4
 Integer communication cell N.
integer integer5
 Integer communication cell N.
gams.control.options.InteractiveSolver interactiveSolver
 Allow solver to interact via command line input.
gams.control.options.IntVarUp intVarUp
 Set mode for default upper bounds on integer variables.
integer iterLim
 Iteration limit of solver.
string jobTrace
 Job trace string to be written to the trace file at the end of a GAMS job.
gams.control.options.Keep keep
 Controls keeping or deletion of process directory and scratch files.
string libIncDir
 LibInclude directory.
string license
 Use alternative license file.
integer limCol
 Maximum number of columns listed in one variable block.
integer limRow
 Maximum number of rows listed in one equation block.
gams.control.options.Listing listing
 Switch default for "$on/offListing".
gams.control.options.LogLine logLine
 Amount of line tracing to the log file.
string LP
 Default LP solver.
gams.control.options.LstCase lstCase
 Output case option for LST file.
gams.control.options.LstTitleLeftAligned lstTitleLeftAligned
 Write title of LST file all left aligned.
integer maxExecError
 Execution time error limit.
integer maxProcDir
 Maximum number of 225* process directories.
string MCP
 Default MCP solver.
gams.control.options.MIIMode MIIMode
 Model Instance Mode.
string MINLP
 Default MINLP solver.
string MIP
 Default MIP solver.
string MIQCP
 Default MIQCP solver.
string MPEC
 Default MPEC solver.
string multi
 Switch default for "$on/offMulti[R]".
string NLP
 Default NLP solver.
integer nodLim
 Node limit in branch and bound tree.
gams.control.options.NoNewVarEqu noNewVarEqu
 Triggers a compilation error when new equations or variable symbols are introduced.
gams.control.options.On115 on115
 Generate errors for unknown unique element in an equation.
double optCA
 Absolute Optimality criterion solver default.
double optCR
 Relative Optimality criterion solver default.
string optDir
 Option file directory.
integer optFile
 Default option file.
string output
 Listing file name.
gams.control.options.PageContr pageContr
 Output file page control option.
integer pageSize
 Output file page size (=0 no paging)
integer pageWidth
 Output file page width.
string PLicense
 Privacy license file name.
gams.control.options.PrefixLoadPath prefixLoadPath
 Prepend GAMS system directory to library load path.
gams.control.options.PreviousWork previousWork
 Indicator for writing workfile with previous workfile version.
gams.control.options.ProcTreeMemMonitor procTreeMemMonitor
 Monitor the memory used by the GAMS process tree.
integer procTreeMemTicks
 Set wait interval between memory monitor checks: ticks = milliseconds.
integer profile
 Execution profiling.
string profileFile
 Write profile information to this file.
double profileTol
 Minimum time a statement must use to appear in profile generated output.
string putDir
 Put file directory.
integer putND
 Number of decimals for put files.
gams.control.options.PutNR putNR
 Numeric round format for put files.
integer putPS
 Page size for put files.
integer putPW
 Page width for put files.
string QCP
 Default QCP solver.
string reference
 Symbol reference file.
gams.control.options.ReferenceLineNo referenceLineNo
 Controls the line numbers written to a reference file.
gams.control.options.Replace replace
 Switch between merge and replace when reading from GDX into non-empty symbol.
double resLim
 Wall-clock time limit for solver.
string RMINLP
 Default RMINLP solver.
string RMIP
 Default RMIP solver.
string RMIQCP
 Default RMIQCP solver.
string RMPEC
 Default RMPEC solver.
gams.control.options.SavePoint savePoint
 Save solver point in GDX file.
string scriptExit
 Program or script to be executed at the end of a GAMS run.
integer seed
 Random number seed.
gams.control.options.ShowOSMemory showOSMemory
 Show the memory usage reported by the Operating System instead of the internal counting.
gams.control.options.SolPrint solPrint
 Solution report print option.
gams.control.options.SolveLink solveLink
 Solver link option.
gams.control.options.SolveOpt solveOpt
 Multiple solve management.
gams.control.options.StepSum stepSum
 Summary of computing resources used by job steps.
gams.control.options.strictSingleton strictSingleton
 Error if assignment to singleton set has multiple elements.
gams.control.options.StringChk stringChk
 String substitution options.
gams.control.options.SuffixAlgebraVars suffixAlgebraVars
 Switch default for "$on/offSuffixAlgebraVars".
gams.control.options.SuffixDLVars suffixDLVars
 Switch default for "$on/offSuffixDLVars".
gams.control.options.Suppress suppress
 Compiler listing option.
string symbol
 Symbol table file.
string symPrefix
 Prefix all symbols encountered during compilation by the specified string in work file.
gams.control.options.Sys10 sys10
 Changes rpower to ipower when the exponent is constant and within 1e-12 of an integer.
gams.control.options.Sys11 sys11
 Dynamic resorting if indices in assignment/data statements are not in natural order.
integer sys12
 Pass model with generation errors to solver.
string sysIncDir
 SysInclude directory.
gams.control.options.SysOut sysOut
 Solver Status file reporting option.
integer tabIn
 Tab spacing.
gams.control.options.TFormat TFormat
 Time format.
integer threads
 Number of processors to be used by a solver.
integer threadsAsync
 Limit on number of threads to be used for asynchronous solves (solveLink=6)
integer timer
 Instruction timer threshold in milli seconds.
string trace
 Trace file name.
integer traceLevel
 Modelstat/Solvestat threshold used in conjunction with action=GT.
gams.control.options.TraceOpt traceOpt
 Trace file format option.
string user1
 User string N.
string user2
 User string N.
string user3
 User string N.
string user4
 User string N.
string user5
 User string N.
integer warnings
 Number of warnings permitted before a run terminates.
double workFactor
 Memory Estimate multiplier for some solvers.
double workSpace
 Work space for some solvers in MB.
double zeroRes
 The results of certain operations will be set to zero if abs(result) LE ZeroRes.
gams.control.options.ZeroResRep zeroResRep
 Report underflow as a warning when abs(results) LE ZeroRes and result set to zero.

Detailed Description

Manages GAMS options.

The Options class manages GAMS options (sometimes also called GAMS parameter, since they correspond to the command line parameters of the GAMS executable) for a Job and ModelInstance. There are integer (e.g. NodLim), double (e.g. ResLim), and string (e.g. PutDir) valued options. There are also a few list options (Defines to set string macros inside GAMS and IDir provide multiple search paths for include files) and a power option to set a solver for all suitable model types (allModelTypes).

Some options known from other interfaces to GAMS that are of limited use or could even create problematic situations in the Matlab environment are not settable through the Options class.

For some options (e.g. LstCase) other GAMS interfaces use numeric values (e.g. 0,1) while the Options class has enumerated types with proper names (e.g. MixedCase, UpperCase).

See also
Workspace, Workspace.addOptions

Member Function Documentation

◆ defines()

void matlab.gams.control.Options.defines ( string  name,
string  value 

set the definition of GAMS Dash options


  • name: dash option name
  • value: dash option value

◆ dispose()

void matlab.gams.control.Options.dispose ( )

Release external resources hold by non-java library.

A subsequent call on the object after disposed potentially causes an unexpected error or exception. Call this method either when the object is no longer needed and/or when resource management is a critical issue in the application.

◆ export()

void matlab.gams.control.Options.export ( string  filePath)

Write Options into a parameter file.


  • filePath: The file path used to write the parameter file. A relative path is relative to the GAMS working directory

◆ getDefinitionOf()

string matlab.gams.control.Options.getDefinitionOf ( string  name)

get the definition of GAMS Dash options


  • name: dash option name

Return: dash option value of definition that matches argument

◆ getIDir()

string matlab.gams.control.Options.getIDir ( integer  index)

get an input file directory of specified index


  • index: index of input file directory

Return: input file directory of specified index

◆ getSelectedSolvers()

string matlab.gams.control.Options.getSelectedSolvers ( integer  index)

get selected solvers


  • index: solver index

◆ isDefinitionEmpty()

logical matlab.gams.control.Options.isDefinitionEmpty ( )

check if the list of GAMS Dash options dictionaries is empty

Return: true if empty

◆ isIDirEmpty()

logical matlab.gams.control.Options.isIDirEmpty ( )

check if the list of input file directories is empty

Return: true if empty

◆ readFromStr()

void matlab.gams.control.Options.readFromStr ( string  str)

read from string


  • str: string

◆ setAllModelTypes()

void matlab.gams.control.Options.setAllModelTypes ( string  solver)

Set default solver for all model types which the solver can handle.


  • solver: name of default solver

◆ setSolversOptions()

void matlab.gams.control.Options.setSolversOptions ( {string}  solvers)

set all selected solvers


  • solvers: name of solvers

◆ writeParameterFile()

integer matlab.gams.control.Options.writeParameterFile ( string  fileName)

write parameter file


  • fileName: name of parameter file