gams::GAMSModelInstanceOpt Class Reference

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. More...
 
GAMSModelInstanceOptoperator= (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. More...
 
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
solverGAMS Solver.
optfileGAMS option file number.
noMatchLimitControls the maximum number of accepted unmatched scenario records before terminating the solve.
debugDebug 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; otherwise false.

◆ 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
otherAnother GAMSModelInstanceOpt to compare to.
Returns
Returns true if the two GAMSModelInstanceOpt are different; otherwise false.

◆ operator=()

GAMSModelInstanceOpt& gams::GAMSModelInstanceOpt::operator= ( const GAMSModelInstanceOpt other)

Assigns a GAMSModelInstanceOpt.

Parameters
otherAnother 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
otherAnother GAMSModelInstanceOpt to compare to.
Returns
Returns true if the two GAMSModelInstanceOpt are equal; otherwise false.

◆ 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
debugtrue if the convert solver is called; otherwise false.

◆ 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
noMatchLimitThe match limit.

◆ setOptFile()

void gams::GAMSModelInstanceOpt::setOptFile ( const int  optfile)

Set the GAMS Optionfile number

Parameters
optfileGAMS option file number.

◆ setSolver()

void gams::GAMSModelInstanceOpt::setSolver ( const std::string &  solver)

Set a solver for use.

Parameters
solverSolver name.

◆ solver()

std::string gams::GAMSModelInstanceOpt::solver ( )

Retrieve the specified solver.

Returns
Get the solver name.