Loading...
Searching...
No Matches
gamsenum.h
1
26#ifndef GAMSENUM_H
27#define GAMSENUM_H
28// TODO(jm) generator-change-request: #pragma once in some cases behaves differently to standard IFDEF guard
29// TODO(JM) generator-change-request: XML-Tags in comments -> no c++ style
30// TODO(JM) generator-change-request: add static functions to get enums as string
31
32#include <string>
33#include "gamslib_global.h" // LIBSPEC
34
35namespace gams {
36
38class LIBSPEC GAMSEnum
39{
40public:
41
44 {
45 SymTypeSet = 0,
48 SymTypeEqu
49 };
50
52 static std::string text(GAMSEnum::SymbolType type);
53
54
55 // TODO(AF) difference gmomcc.h/gmoEquType(=> B) and gclgms.h/GMS_EQUTYPE_MAX(=> MAX)?
58 {
59 E = 0,
60 G = 1,
61 L = 2,
62 N = 3,
63 X = 4,
64 C = 5,
65 MAX = 6
66 };
67
69 static std::string text(GAMSEnum::EquType type);
70
73 {
75 Singleton
76 };
77
79 static std::string text(GAMSEnum::SetType type);
80
83 {
93 SemiInt
94 };
95
97 static std::string text(GAMSEnum::VarType type);
98
101 {
102 Normal = 1,
114 SystemErr
115 };
116
119 {
120 OptimalGlobal = 1,
138 InfeasibleNoSolution
139 };
140
143 {
144 NormalReturn = 0,
156 CouldNotCreateScratchDir = 109,
157 TooManyScratchDirs = 110,
158 CouldNotDeleteScratchDir = 112,
159 CouldNotWriteGamsNext = 113,
160 CouldNotWriteParamFile = 114,
161 CouldNotReadEnvVar = 115,
162 CouldNotSpawnGAMScmex = 400,
163 CurDirNotFound = 401,
164 CurDirNotSet = 402,
165 BlankInSysDir = 404,
166 BlankInCurDir = 405,
167 BlankInScrExt = 406,
168 UnexpectedCmexRC = 407,
169 ProcDirNotFound = 408,
170 CmexLibNotFound = 409,
171 CmexLibEPNotFound = 410,
172 BlankInProcDir = 411,
173 BlankInScrDir = 412,
174 CannotAddPath = 909,
175 MissingCommandLineParameter = 1000,
176 CannotInstallInterrupt = 2000,
177 CouldNotGetCurrentDir = 3000,
178 CmexNotFound = 4000,
179 OptNotFound = 5000
180 };
181
183 static std::string text(GAMSEnum::GAMSExitCode type);
184
187 {
188 Param = 0,
189 Upper = 1,
190 Lower = 2,
191 Fixed = 3,
192 Primal = 4,
193 Dual = 5
194 };
195
198 {
199 Off = 0,
203 Verbose
204 };
205
208 {
209 Default = 0,
210 BaseCase = 1,
211 Accumulate = 2,
212
213 Inherit = 3
214 // // TODO(AF): this is not part of the C API (gmdUpdateType)!
215 };
216
219 {
220 RestartAfterSolve = 0,
225 TraceReport
226 };
227
229 static std::string text(GAMSEnum::EAction type);
230
232 static std::string code(GAMSEnum::EAction type);
233
235 static EAction eActionFromCode(std::string str);
236
237};
238
239}
240#endif // GAMSENUM_H
The collection of all common GAMS enumerations.
Definition: gamsenum.h:39
static std::string text(GAMSEnum::EAction type)
Get a GAMSEnum::EAction as text.
VarType
Variable subtype.
Definition: gamsenum.h:83
@ Negative
Negative variable.
Definition: gamsenum.h:88
@ Free
Free variable.
Definition: gamsenum.h:89
@ Unknown
Unknown variable type.
Definition: gamsenum.h:84
@ SemiCont
Semi-continuous variable.
Definition: gamsenum.h:92
@ Positive
Positive variable.
Definition: gamsenum.h:87
@ Integer
Integer Variable.
Definition: gamsenum.h:86
@ SOS1
Special Ordered Set 1.
Definition: gamsenum.h:90
@ SOS2
Special Ordered Set 2.
Definition: gamsenum.h:91
@ Binary
Binary variable.
Definition: gamsenum.h:85
DebugLevel
GAMS Debug Level.
Definition: gamsenum.h:198
@ KeepFilesOnError
Keep temporary files only if GamsExceptionExecution was raised in GamsJob.run() or GamsJob....
Definition: gamsenum.h:200
@ KeepFiles
Keep temporary files.
Definition: gamsenum.h:201
@ ShowLog
Send GAMS log to stdout and keep temporary files.
Definition: gamsenum.h:202
EquType
Equation subtype.
Definition: gamsenum.h:58
static EAction eActionFromCode(std::string str)
Get a GAMSEnum::EAction from a std::string.
static std::string text(GAMSEnum::SetType type)
Get a GAMSEnum::SetType as string.
static std::string text(GAMSEnum::SymbolType type)
Get a GAMSEnum::SymbolType as string.
static std::string text(GAMSEnum::EquType type)
Get a GAMSEnum::EquType as string.
GAMSExitCode
GAMS exit code.
Definition: gamsenum.h:143
@ ExecutionError
There was an execution error.
Definition: gamsenum.h:147
@ CompilationError
There was a compilation error.
Definition: gamsenum.h:146
@ GAMSSystemError
There was a GAMS system error.
Definition: gamsenum.h:152
@ OutOfMemory
Out of memory.
Definition: gamsenum.h:154
@ FileError
There was a file error.
Definition: gamsenum.h:149
@ ParameterError
There was a parameter error.
Definition: gamsenum.h:150
@ GAMSCouldNotBeStarted
GAMS cold not be started.
Definition: gamsenum.h:153
@ SolverToBeCalled
Solver is to be called, the system should never return this number.
Definition: gamsenum.h:145
@ SystemLimitsReached
System limits were reached.
Definition: gamsenum.h:148
@ LicensingError
There was a licensing error.
Definition: gamsenum.h:151
@ OutOfDisk
Out of disk.
Definition: gamsenum.h:155
SymbolUpdateType
Symbol update type.
Definition: gamsenum.h:208
EAction
GAMS processing requests.
Definition: gamsenum.h:219
@ CompileAndExecute
Compile and Execute.
Definition: gamsenum.h:223
@ CompileOnly
CompileOnly.
Definition: gamsenum.h:221
@ ExecuteOnly
ExecuteOnly.
Definition: gamsenum.h:222
@ GlueCodeGeneration
Glue Code Generation.
Definition: gamsenum.h:224
SetType
Set subtype.
Definition: gamsenum.h:73
@ Multi
Multi Set - default.
Definition: gamsenum.h:74
ModelStat
Model Solution Status.
Definition: gamsenum.h:119
@ Unbounded
Unbounded model found.
Definition: gamsenum.h:122
@ IntegerInfeasible
No feasible integer solution could be found.
Definition: gamsenum.h:129
@ NoSolutionReturned
No solution returned.
Definition: gamsenum.h:133
@ InfeasibleGlobal
Infeasible model found.
Definition: gamsenum.h:123
@ OptimalLocal
Local optimal solution achieved.
Definition: gamsenum.h:121
@ LicenseError
Licensing problem.
Definition: gamsenum.h:130
@ IntegerSolution
Integer solution found.
Definition: gamsenum.h:127
@ InfeasibleIntermed
Solver terminated early and model was still infeasible.
Definition: gamsenum.h:125
@ SolvedUnique
Unique solution in a CNS models.
Definition: gamsenum.h:134
@ InfeasibleLocal
Locally infeasible model found.
Definition: gamsenum.h:124
@ Solved
Feasible solution in a CNS models.
Definition: gamsenum.h:135
@ Feasible
Feasible solution.
Definition: gamsenum.h:126
@ ErrorUnknown
Error - No cause known.
Definition: gamsenum.h:131
@ ErrorNoSolution
Error - No solution attained.
Definition: gamsenum.h:132
@ NonIntegerIntermed
Solver terminated early with a non integer solution found.
Definition: gamsenum.h:128
@ SolvedSingular
Singular in a CNS models.
Definition: gamsenum.h:136
@ UnboundedNoSolution
Unbounded - no solution.
Definition: gamsenum.h:137
static std::string code(GAMSEnum::EAction type)
Get a GAMSEnum::EAction as code.
SymbolType
This enum defines the type of a symbol (The type Alias is not supported and shows as Set).
Definition: gamsenum.h:44
@ SymTypeVar
Symbol type is a Variable.
Definition: gamsenum.h:47
@ SymTypePar
Symbol type is a Parameter.
Definition: gamsenum.h:46
static std::string text(GAMSEnum::VarType type)
Get a GAMSEnum::VarType as string.
SymbolUpdateAction
What field to update.
Definition: gamsenum.h:187
SolveStat
Solver termination condition.
Definition: gamsenum.h:101
@ License
Solver terminated with a license error.
Definition: gamsenum.h:108
@ InternalErr
Solver terminated with error.
Definition: gamsenum.h:112
@ Iteration
Solver ran out of iterations.
Definition: gamsenum.h:103
@ Resource
Solver exceeded time limit.
Definition: gamsenum.h:104
@ Skipped
Solve skipped.
Definition: gamsenum.h:113
@ SetupErr
Solver terminated on setup error.
Definition: gamsenum.h:110
@ EvalError
Solver quit with nonlinear term evaluation errors.
Definition: gamsenum.h:106
@ User
Solver terminated on users request (e.g. Ctrl-C)
Definition: gamsenum.h:109
@ Solver
Solver quit with a problem.
Definition: gamsenum.h:105
@ SolverErr
Solver terminated with error.
Definition: gamsenum.h:111
@ Capability
Solver terminated because the model is beyond the solvers capabilities.
Definition: gamsenum.h:107
static std::string text(GAMSEnum::GAMSExitCode type)
Get a GAMSEnum::GAMSExitCode as text.
Definition: gams.h:91