The GAMSModelInstanceOpt can be used to customize the GAMSModelInstance.solve() routine. More...
#include <gamsmodelinstanceopt.h>
Public Member Functions | |
GAMSModelInstanceOpt (std::string solver="", int optfile=-1, int noMatchLimit=0, bool debug=false) | |
~GAMSModelInstanceOpt () | |
Destructor. | |
GAMSModelInstanceOpt & | operator= (const GAMSModelInstanceOpt &other) |
bool | operator!= (const GAMSModelInstanceOpt &other) const |
bool | operator== (const GAMSModelInstanceOpt &other) const |
std::string | solver () |
void | setSolver (const std::string &solver) |
int | optFile () |
Get the GAMS Optionfile number. | |
void | setOptFile (const int optfile) |
int | noMatchLimit () |
void | setNoMatchLimit (const int noMatchLimit) |
bool | debug () |
void | setDebug (const bool debug) |
Detailed Description
The GAMSModelInstanceOpt can be used to customize the GAMSModelInstance.solve() routine.
Definition at line 38 of file gamsmodelinstanceopt.h.
Constructor & Destructor Documentation
◆ GAMSModelInstanceOpt()
gams::GAMSModelInstanceOpt::GAMSModelInstanceOpt | ( | std::string | solver = "" , |
int | optfile = -1 , |
||
int | noMatchLimit = 0 , |
||
bool | debug = false |
||
) |
Constructor.
- Parameters
-
solver GAMS Solver. optfile GAMS option file number. noMatchLimit Controls the maximum number of accepted unmatched scenario records before terminating the solve. debug Debug Flag.
◆ ~GAMSModelInstanceOpt()
gams::GAMSModelInstanceOpt::~GAMSModelInstanceOpt | ( | ) |
Destructor.
Member Function Documentation
◆ debug()
bool gams::GAMSModelInstanceOpt::debug | ( | ) |
Get the debug flag.
- Remarks
- This value triggers the convert solver to write additional debug information (debug models). These files are located in the GAMS workspace.
- Returns
true
if the convert solver is called; otherwisefalse
.
◆ noMatchLimit()
int gams::GAMSModelInstanceOpt::noMatchLimit | ( | ) |
Get the no match limit. This number controls the maximum number of accepted unmatched scenario records before terminating the solve.
◆ operator!=()
bool gams::GAMSModelInstanceOpt::operator!= | ( | const GAMSModelInstanceOpt & | other | ) | const |
Compares two GAMSModelInstanceOpt objects.
- Parameters
-
other Another GAMSModelInstanceOpt to compare to.
- Returns
- Returns
true
if the two GAMSModelInstanceOpt are different; otherwisefalse
.
◆ operator=()
GAMSModelInstanceOpt & gams::GAMSModelInstanceOpt::operator= | ( | const GAMSModelInstanceOpt & | other | ) |
Assigns a GAMSModelInstanceOpt.
- Parameters
-
other Another GAMSModelInstanceOpt used as data source.
- Returns
- Returns the assigned GAMSModelInstanceOpt (*this).
◆ operator==()
bool gams::GAMSModelInstanceOpt::operator== | ( | const GAMSModelInstanceOpt & | other | ) | const |
Compares two GAMSModelInstanceOpt objects.
- Parameters
-
other Another GAMSModelInstanceOpt to compare to.
- Returns
- Returns
true
if the two GAMSModelInstanceOpt are equal; otherwisefalse
.
◆ optFile()
int gams::GAMSModelInstanceOpt::optFile | ( | ) |
Get the GAMS Optionfile number.
◆ setDebug()
void gams::GAMSModelInstanceOpt::setDebug | ( | const bool | debug | ) |
Set the debug flag.
- Remarks
- This value triggers the convert solver to write additional debug information (debug models). These files are located in the GAMS workspace.
- Parameters
-
debug true
if the convert solver is called; otherwisefalse
.
◆ setNoMatchLimit()
void gams::GAMSModelInstanceOpt::setNoMatchLimit | ( | const int | noMatchLimit | ) |
Set the no match limit. This number controls the maximum number of accepted unmatched scenario records before terminating the solve.
- Parameters
-
noMatchLimit The match limit.
◆ setOptFile()
void gams::GAMSModelInstanceOpt::setOptFile | ( | const int | optfile | ) |
Set the GAMS Optionfile number
- Parameters
-
optfile GAMS option file number.
◆ setSolver()
void gams::GAMSModelInstanceOpt::setSolver | ( | const std::string & | solver | ) |
Set a solver for use.
- Parameters
-
solver Solver name.
◆ solver()
std::string gams::GAMSModelInstanceOpt::solver | ( | ) |
Retrieve the specified solver.
- Returns
- Get the solver name.