GAMS Namespace Reference

Classes

class  GAMSCheckpoint
 A GAMSCheckpoint class captures the state of a GAMSJob after the GAMSJob.Run method has been carried out. Another GAMSJob can continue (or restart) from a GAMSCheckpoint. A GAMSCheckpoint constructed with a file name will create a file (extension .g00) for permanent storage when supplied as parameter on the GAMSJob.Run method. Moreover, a GAMSModelInstance is also initialized from a checkpoint that contains the model definition of the model instance. More...
 
class  GAMSDatabase
 
class  GAMSDatabaseDomainViolation
 This class describes a domain violation of a GAMSDatabase. More...
 
class  GAMSEquation
 This is the representation of an equation symbol in GAMS. It exists in a GAMSDatabase and contains GAMSEquationRecords which one can iterate through. More...
 
class  GAMSEquationRecord
 This is the representation of a single record of a GAMSEquation. More...
 
class  GAMSException
 Exception class thrown for GAMS exceptions More...
 
class  GAMSExceptionExecution
 Exception class thrown for GAMS execution exceptions More...
 
class  GAMSJob
 
class  GAMSModelInstance
 
class  GAMSModelInstanceOpt
 The GAMSModelInstanceOpt can be used to customize the GAMSModelInstance.Solve() routine. More...
 
class  GAMSModifier
 Instances of this class are input to GAMSModelInstance.Instatiate. A GAMSModifier consists either of a GAMSParameter or a triple: A GAMSVariable or GAMSEquation to be modified, the modification action (e.g. . Upper, Lower or Fixed for updating bounds of a variable, or Primal/Dual for updating the level/marginal of a variable or equation mainly used for starting non-linear models from different starting points), and a GAMSParameter that holds the data for modification. In addition the UpdateType can be defined (if ommitted the type defined in the Solve call is used). More...
 
class  GAMSOptions
 
class  GAMSParameter
 This is the representation of a parameter symbol in GAMS. It exists in a GAMSDatabase and contains GAMSParameterRecords which one can iterate through. More...
 
class  GAMSParameterRecord
 This is the representation of a single record of a GAMSParameter. More...
 
class  GAMSSet
 This is the representation of a set symbol in GAMS. It exists in a GAMSDatabase and contains GAMSSetRecords which one can iterate through. More...
 
class  GAMSSetRecord
 This is the representation of a single record of a GAMSSet. More...
 
class  GAMSSymbol
 This is the representation of a symbol in GAMS. It exists in a GAMSDatabase and contains GAMSSymbolRecords which one can iterate through. Derived classes are GAMSEquation, GAMSParameter, GAMSSet and GAMSVariable. More...
 
class  GAMSSymbolDomainViolation
 This class describes a domain violation of a GAMSSymbol. More...
 
class  GAMSSymbolEnumerator
 Enumerator for iterating through the records of a specific symbol. This class can be used with all GAMS symbol types. More...
 
class  GAMSSymbolRecord
 This is the representation of a single record of a GAMSSymbol. Derived classes are GAMSEquationRecord, GAMSParameterRecord, GAMSSetRecord and GAMSVariableRecord More...
 
class  GAMSVariable
 This is the representation of a variable symbol in GAMS. It exists in a GAMSDatabase and contains GAMSVariableRecords which one can iterate through. More...
 
class  GAMSVariableRecord
 This is the representation of a single record of a GAMSVariable. More...
 
class  GAMSWorkspace
 
class  GAMSWorkspaceInfo
 The GAMSWorkspaceInfo can be used input parameter for the GAMSWorkspace constructor. More...
 

Enumerations

enum  EquType {
  EquType.E, EquType.G, EquType.L, EquType.N,
  EquType.X, EquType.C
}
 Equation subtype More...
 
enum  VarType {
  VarType.Unknown, VarType.Binary, VarType.Integer, VarType.Positive,
  VarType.Negative, VarType.Free, VarType.SOS1, VarType.SOS2,
  VarType.SemiCont, VarType.SemiInt
}
 Variable subtype More...
 
enum  SolveStat {
  SolveStat.Normal = 1, SolveStat.Iteration, SolveStat.Resource, SolveStat.Solver,
  SolveStat.EvalError, SolveStat.Capability, SolveStat.License, SolveStat.User,
  SolveStat.SetupErr, SolveStat.SolverErr, SolveStat.InternalErr, SolveStat.Skipped,
  SolveStat.SystemErr
}
 Solver termination condition More...
 
enum  ModelStat {
  ModelStat.OptimalGlobal = 1, ModelStat.OptimalLocal, ModelStat.Unbounded, ModelStat.InfeasibleGlobal,
  ModelStat.InfeasibleLocal, ModelStat.InfeasibleIntermed, ModelStat.Feasible, ModelStat.Integer,
  ModelStat.NonIntegerIntermed, ModelStat.IntegerInfeasible, ModelStat.LicenseError, ModelStat.ErrorUnknown,
  ModelStat.ErrorNoSolution, ModelStat.NoSolutionReturned, ModelStat.SolvedUnique, ModelStat.Solved,
  ModelStat.SolvedSingular, ModelStat.UnboundedNoSolution, ModelStat.InfeasibleNoSolution
}
 Model Solution Status More...
 
enum  GAMSExitCode {
  GAMSExitCode.NormalReturn = 0, GAMSExitCode.SolverToBeCalled, GAMSExitCode.CompilationError, GAMSExitCode.ExecutionError,
  GAMSExitCode.SystemLimitsReached, GAMSExitCode.FileError, GAMSExitCode.ParameterError, GAMSExitCode.LicensingError,
  GAMSExitCode.GAMSSystemError, GAMSExitCode.GAMSCouldNotBeStarted, GAMSExitCode.OutOfMemory, GAMSExitCode.OutOfDisk,
  GAMSExitCode.CouldNotCreateScratchDir = 109, GAMSExitCode.TooManyScratchDirs = 110, GAMSExitCode.CouldNotDeleteScratchDir = 112, GAMSExitCode.CouldNotWriteGamsNext = 113,
  GAMSExitCode.CouldNotWriteParamFile = 114, GAMSExitCode.CouldNotSpawnGAMScmex = 400, GAMSExitCode.CurDirNotFound = 401, GAMSExitCode.CurDirNotSet = 402,
  GAMSExitCode.BlankInSysDir = 404, GAMSExitCode.BlankInCurDir = 405, GAMSExitCode.BlankInScrExt = 406, GAMSExitCode.UnexpectedCmexRC = 407,
  GAMSExitCode.ProcDirNotFound = 408, GAMSExitCode.CmexLibNotFound = 409, GAMSExitCode.CmexLibEPNotFound = 410, GAMSExitCode.BlankInProcDir = 411,
  GAMSExitCode.BlankInScrDir = 412, GAMSExitCode.CannotAddPath = 909, GAMSExitCode.MissingCommandLineParameter = 1000, GAMSExitCode.CannotInstallInterrupt = 2000,
  GAMSExitCode.CouldNotGetCurrentDir = 3000, GAMSExitCode.CmexNotFound = 4000, GAMSExitCode.OptNotFound = 5000
}
 GAMS exit code More...
 
enum  UpdateAction {
  UpdateAction.Upper = 1, UpdateAction.Lower, UpdateAction.Fixed, UpdateAction.Primal,
  UpdateAction.Dual
}
 What field to update More...
 
enum  DebugLevel { DebugLevel.Off = 0, DebugLevel.KeepFiles, DebugLevel.ShowLog, DebugLevel.Verbose }
 GAMS Debug Level More...
 

Enumeration Type Documentation

◆ DebugLevel

enum GAMS.DebugLevel
strong

GAMS Debug Level

Enumerator
Off 

No Debug

KeepFiles 

Keep temporary files

ShowLog 

Send GAMS log to stdout and keep temporary files

Verbose 

Send highly technical info and GAMS log to stdout and keep temporary file

◆ EquType

enum GAMS.EquType
strong

Equation subtype

Enumerator

Equality - =E=

Greater or equal than inequality - =G=

Less or equal than inequality - =L=

Non-binding equation - =N=

External equation - =X=

Cone equation - =C=

◆ GAMSExitCode

enum GAMS.GAMSExitCode
strong

GAMS exit code

Enumerator
NormalReturn 

Normal Return

SolverToBeCalled 

Solver is to be called, the system should never return this number

CompilationError 

There was a compilation error

ExecutionError 

There was an execution error

SystemLimitsReached 

System limits were reached

FileError 

There was a file error

ParameterError 

There was a parameter error

LicensingError 

There was a licensing error

GAMSSystemError 

There was a GAMS system error

GAMSCouldNotBeStarted 

GAMS cold not be started

OutOfMemory 

Out of memory

OutOfDisk 

Out of disk

CouldNotCreateScratchDir 

Could not create process/scratch directory

TooManyScratchDirs 

Too many process/scratch directories

CouldNotDeleteScratchDir 

Could not delete process/scratch directory

CouldNotWriteGamsNext 

Could not write the "gamsnext" script

CouldNotWriteParamFile 

Could not write the "parameter" file

CouldNotSpawnGAMScmex 

Could not spawn the GAMS language compiler (gamscmex)

CurDirNotFound 

Current directory (curdir) does not exist

CurDirNotSet 

Cannot set current directory (curdir)

BlankInSysDir 

Blank in system directory (UNIX only)

BlankInCurDir 

Blank in current directory (UNIX only)

BlankInScrExt 

Blank in scratch extension (scrext)

UnexpectedCmexRC 

Unexpected cmexRC

ProcDirNotFound 

Could not find the process directory (procdir)

CmexLibNotFound 

CMEX library not found (experimental)

CmexLibEPNotFound 

Entry point in CMEX library not found (experimental)

BlankInProcDir 

Blank in process directory (UNIX only)

BlankInScrDir 

Blank in scratch directory (UNIX only)

CannotAddPath 

Cannot add path / Unknown UNIX environment / Cannot set environment variable

MissingCommandLineParameter 

Driver error: Missing command line parameter for gams.exe

CannotInstallInterrupt 

Driver error: Internal error: Cannot install interrupt handler

CouldNotGetCurrentDir 

Driver error: Problems getting current directory (sometimes caused by specifying the current directory in Microsoft UNC format)

CmexNotFound 

Driver error: Internal error: GAMS compile and execute module not found

OptNotFound 

Driver error: Internal error: Cannot load option handling library

◆ ModelStat

enum GAMS.ModelStat
strong

Model Solution Status

Enumerator
OptimalGlobal 

Optimal solution achieved

OptimalLocal 

Local optimal solution achieved

Unbounded 

Unbounded model found

InfeasibleGlobal 

Infeasible model found

InfeasibleLocal 

Locally infeasible model found

InfeasibleIntermed 

Solver terminated early and model was still infeasible

Feasible 

Feasible solution

Integer 

Integer solution found

NonIntegerIntermed 

Solver terminated early with a non integer solution found

IntegerInfeasible 

No feasible integer solution could be found

LicenseError 

Licensing problem

ErrorUnknown 

Error – No cause known

ErrorNoSolution 

Error – No solution attained

NoSolutionReturned 

No solution returned

SolvedUnique 

Unique solution in a CNS models

Solved 

Feasible solution in a CNS models

SolvedSingular 

Singular in a CNS models

UnboundedNoSolution 

Unbounded – no solution

InfeasibleNoSolution 

Infeasible – no solution

◆ SolveStat

enum GAMS.SolveStat
strong

Solver termination condition

Enumerator
Normal 

Normal termination

Iteration 

Solver ran out of iterations

Resource 

Solver exceeded time limit

Solver 

Solver quit with a problem

EvalError 

Solver quit with nonlinear term evaluation errors

Capability 

Solver terminated because the model is beyond the solvers capabilities

License 

Solver terminated with a license error

User 

Solver terminated on users request (e.g. Ctrl-C)

SetupErr 

Solver terminated on setup error

SolverErr 

Solver terminated with error

InternalErr 

Solver terminated with error

Skipped 

Solve skipped

SystemErr 

Other error

◆ UpdateAction

enum GAMS.UpdateAction
strong

What field to update

Enumerator
Upper 

Supplies upper bounds for a variable

Lower 

Supplies lower bounds for a variable

Fixed 

Supplies fixed bounds for a variable

Primal 

Supplies level for a variable or equation

Dual 

Supplies marginal for a variable or equation

◆ VarType

enum GAMS.VarType
strong

Variable subtype

Enumerator
Unknown 

Unknown variable type

Binary 

Binary variable

Integer 

Integer Variable

Positive 

Positive variable

Negative 

Negative variable

Free 

Free variable

SOS1 

Special Ordered Set 1

SOS2 

Special Ordered Set 2

SemiCont 

Semi-continuous variable

SemiInt 

Semi-integer variable