Loading...
Searching...
No Matches

#include <gamsworkspace.h>

Public Member Functions

 GAMSWorkspace ()
 Constructor.
 
 GAMSWorkspace (const std::string &workingDir, const std::string &systemDir, GAMSEnum::DebugLevel debug)
 
 GAMSWorkspace (const std::string &workingDir, const std::string &systemDir="")
 
 GAMSWorkspace (const std::string &workingDir, GAMSEnum::DebugLevel debug)
 
 GAMSWorkspace (GAMSEnum::DebugLevel debug)
 
 GAMSWorkspace (const GAMSWorkspace &other)
 Copy Constructor.
 
 GAMSWorkspace (const GAMSWorkspaceInfo &wsInfo)
 
 ~GAMSWorkspace ()
 Destructor.
 
GAMSWorkspaceoperator= (const GAMSWorkspace &other)
 
std::string version ()
 Get the required GAMS version.
 
int majorRelNumber ()
 Get the required GAMS major version number.
 
int minorRelNumber ()
 Get the required GAMS minor version number.
 
int goldRelNumber ()
 Get the GAMS GOLD release number.
 
std::string scratchFilePrefix () const
 Get the string used to prefix automatically generated files.
 
void setScratchFilePrefix (std::string prefix)
 
double myEPS ()
 
void setMyEPS (double eps)
 
GAMSDatabase addDatabaseFromGDX (const std::string &gdxFileName, const std::string &databaseName, const std::string &inModelName)
 
GAMSDatabase addDatabaseFromGDX (const std::string &gdxFileName, const std::string &databaseName)
 
GAMSDatabase addDatabaseFromGDX (const std::string &gdxFileName)
 
GAMSDatabase addDatabaseFromGMD (void *gmdPtr)
 
GAMSDatabase addDatabase (const std::string &databaseName="", const std::string &inModelName="")
 
GAMSDatabase addDatabase (const GAMSDatabase &sourceDatabase, const std::string &databaseName="", const std::string &inModelName="")
 
GAMSCheckpoint addCheckpoint (const std::string &checkpointName="")
 
GAMSJob addJobFromFile (const std::string &fileName, const std::string &jobName="")
 
GAMSJob addJobFromFile (const std::string &fileName, const GAMSCheckpoint &checkpoint, const std::string &jobName="")
 
GAMSJob addJobFromString (const std::string &gamsSource, const std::string &jobName="")
 
GAMSJob addJobFromString (const std::string &gamsSource, const GAMSCheckpoint &checkpoint, const std::string &jobName="")
 
GAMSJob addJobFromGamsLib (const std::string &model, const std::string &jobName="")
 
GAMSJob addJobFromGamsLib (const std::string &model, const GAMSCheckpoint &checkpoint, const std::string &jobName="")
 
GAMSJob addJobFromApiLib (const std::string &model, const std::string &jobName="")
 
GAMSJob addJobFromApiLib (const std::string &model, const GAMSCheckpoint &checkpoint, const std::string &jobName="")
 
GAMSJob addJobFromTestLib (const std::string &model, const std::string &jobName="")
 
GAMSJob addJobFromTestLib (const std::string &model, const GAMSCheckpoint &checkpoint, const std::string &jobName="")
 
GAMSJob addJobFromEmpLib (const std::string &model, const std::string &jobName="")
 
GAMSJob addJobFromEmpLib (const std::string &model, const GAMSCheckpoint &checkpoint, const std::string &jobName="")
 
GAMSJob addJobFromDataLib (const std::string &model, const std::string &jobName="")
 
GAMSJob addJobFromDataLib (const std::string &model, const GAMSCheckpoint &checkpoint, const std::string &jobName="")
 
GAMSJob addJobFromFinLib (const std::string &model, const std::string &jobName="")
 
GAMSJob addJobFromFinLib (const std::string &model, const GAMSCheckpoint &checkpoint, const std::string &jobName="")
 
GAMSJob addJobFromNoaLib (const std::string &model, const std::string &jobName="")
 
GAMSJob addJobFromNoaLib (const std::string &model, const GAMSCheckpoint &checkpoint, const std::string &jobName="")
 
GAMSJob addJobFromPsoptLib (const std::string &model, const std::string &jobName="")
 
GAMSJob addJobFromPsoptLib (const std::string &model, const GAMSCheckpoint &checkpoint, const std::string &jobName="")
 
GAMSOptions addOptions ()
 
GAMSOptions addOptions (const GAMSOptions &optFrom)
 
GAMSOptions addOptions (const std::string &optFile)
 
void gamsLib (std::string model)
 
void testLib (std::string model)
 
void empLib (std::string model)
 
void dataLib (std::string model)
 
void apiLib (std::string model)
 
void finLib (std::string model)
 
void noaLib (std::string model)
 
void psoptLib (std::string model)
 
std::string workingDirectory () const
 
std::string systemDirectory () const
 
bool operator== (const GAMSWorkspace &other) const
 
bool operator!= (const GAMSWorkspace &other) const
 
GAMSEnum::DebugLevel debug ()
 Get GAMS debug level.
 
LogId logID () const
 
double * specValues () const
 Get all special values related to a system.
 
bool hasError () const
 
void setHasError (bool newHasError)
 

Static Public Member Functions

static std::string apiVersionDetail ()
 
static std::string apiVersion ()
 
static int apiMajorRelNumber ()
 Get the GAMS C++ API major release number.
 
static int apiMinorRelNumber ()
 Get the GAMS C++ API minor release number.
 
static int apiGoldRelNumber ()
 Get the GAMS C++ API GOLD release number.
 

Detailed Description

The GAMSWorkspace is the base class in the GAMS namespace. Most objects of the GAMS namespace (e.g. GAMSDatabase and GAMSJob) have to be created by an "Add" method of GAMSWorkspace.

Unless a GAMS system directory is specified during construction of GAMSWorkspace, GAMSWorkspace determines the location of the GAMS installation automatically. This is a source of potential problems if more than one GAMS installation exist on the machine (see below).

Furthermore, a working directory (the anchor into the file system) can be provided when constructing the GAMSWorkspace instance. All file based operation inside a GAMS model should be relative to this location (e.g. $GDXIN and $include). There are options to add input search paths (e.g. addInputDir) and output path (e.g. putDir) to specify other file system locations. If no working directory is supplied, GAMSWorkspace creates a temporary folder and on instance destruction removes this temporary folder.

In a typical C++ solution a single instance of GAMSWorkspace will suffice, since the class is thread-safe.

Note: If you use multiple instances of the GAMSWorkspace in parallel, you should avoid using the same WorkingDirectory. Otherwise you may end up with conflicting file names.

Working with different GAMS Versions on one Machine

When creating a new instance of GAMSWorkspace, one way of defining the GAMS system directory is setting the systemDirectory parameter of the constructor accordingly. If it is not set, it is tried to be defined automatically. However, this can be tricky if there is more than on version of GAMS installed on a machine and especially if there are different applications running with different GAMS versions.

The automatic identification relies on information left in the Windows registry by the GAMS installer. Hence the system directory of the last GAMS installation will be found in this automatic identification step. One way of resetting the information in the registry is running the executable "findthisgams.exe" from the directory that should be detected automatically. While this can be done from the outside of the application it is not much more convenient than the SystemDirectory argument in the GAMSWorkspace constructor. With MONO, first the PATH and then the (DY)LD_LIBRARY_PATH instead of the registry is checked for a valid GAMS system directory.

If one has a very structured way of organizing the GAMS installations (e.g. following the GAMS default installation location) one can construct from the GAMS assembly information enough information to point to the best matching GAMS system directory:

string sysdir; <br/>
if (IntPtr.Size == 4) <br/>
sysdir = @"c:\\GAMS\\win32\\" + GAMSWorkspace.apiMajorRelNumber + "." + GAMSWorkspace.apiMinorRelNumber; <br/>
else <br/>
sysdir = @"c:\\GAMS\\win64\\" + GAMSWorkspace.apiMajorRelNumber + "." + GAMSWorkspace.apiMinorRelNumber; <br/>
static int apiMajorRelNumber()
Get the GAMS C++ API major release number.
static int apiMinorRelNumber()
Get the GAMS C++ API minor release number.

This avoids the automatic identification of the GAMS system directory but might be the most convenient solution for systems running multiple applications using different versions of the GAMS C++ API together with different versions of GAMS.

Definition at line 88 of file gamsworkspace.h.

Constructor & Destructor Documentation

◆ GAMSWorkspace() [1/7]

gams::GAMSWorkspace::GAMSWorkspace ( )

Constructor.

◆ GAMSWorkspace() [2/7]

gams::GAMSWorkspace::GAMSWorkspace ( const std::string &  workingDir,
const std::string &  systemDir,
GAMSEnum::DebugLevel  debug 
)

Constructor.

Parameters
workingDirGAMS working directory, anchor for all file-based operations (determined automatically if omitted, in user's temporary folder).
systemDirGAMS system directory (determined automatically if omitted).
debugGAMS debug level.

◆ GAMSWorkspace() [3/7]

gams::GAMSWorkspace::GAMSWorkspace ( const std::string &  workingDir,
const std::string &  systemDir = "" 
)

Constructor.

Parameters
workingDirGAMS working directory, anchor for all file-based operations (determined automatically if omitted, in user's temporary folder).
systemDirGAMS system directory (determined automatically if omitted).

◆ GAMSWorkspace() [4/7]

gams::GAMSWorkspace::GAMSWorkspace ( const std::string &  workingDir,
GAMSEnum::DebugLevel  debug 
)

Constructor.

Parameters
workingDirGAMS working directory, anchor for all file-based operations (determined automatically if omitted, in user's temporary folder).
debugGAMS debug level.

◆ GAMSWorkspace() [5/7]

gams::GAMSWorkspace::GAMSWorkspace ( GAMSEnum::DebugLevel  debug)

Constructor.

Parameters
debugGAMS debug level.

◆ GAMSWorkspace() [6/7]

gams::GAMSWorkspace::GAMSWorkspace ( const GAMSWorkspace other)

Copy Constructor.

◆ GAMSWorkspace() [7/7]

gams::GAMSWorkspace::GAMSWorkspace ( const GAMSWorkspaceInfo wsInfo)

Constructor.

Parameters
wsInfoGAMSWorkspaceInfo defining GAMS working directory, GAMS system directory and GAMS debug level.

◆ ~GAMSWorkspace()

gams::GAMSWorkspace::~GAMSWorkspace ( )

Destructor.

Member Function Documentation

◆ addCheckpoint()

GAMSCheckpoint gams::GAMSWorkspace::addCheckpoint ( const std::string &  checkpointName = "")

Create GAMSCheckpoint.

Parameters
checkpointNameIdentifier of GAMSCheckpoint or filename for existing checkpoint (determined automatically if omitted).
Returns
Return the GAMSCheckpoint.

◆ addDatabase() [1/2]

GAMSDatabase gams::GAMSWorkspace::addDatabase ( const GAMSDatabase sourceDatabase,
const std::string &  databaseName = "",
const std::string &  inModelName = "" 
)

Database creation from existing database.

Parameters
sourceDatabaseSource GAMSDatabase to initialize Database from.
databaseNameIdentifier of GAMSDatabase (determined automatically if omitted).
inModelNameGAMS string constant that is used to access this database.
Returns
Returns the GAMSDatabase.

◆ addDatabase() [2/2]

GAMSDatabase gams::GAMSWorkspace::addDatabase ( const std::string &  databaseName = "",
const std::string &  inModelName = "" 
)

Empty database creation.

Parameters
databaseNameIdentifier of GAMSDatabase (determined automatically if omitted).
inModelNameGAMS string constant that is used to access this database.
Returns
Returns the GAMSDatabase.

◆ addDatabaseFromGDX() [1/3]

GAMSDatabase gams::GAMSWorkspace::addDatabaseFromGDX ( const std::string &  gdxFileName)

Database creation from an existing GDX file.

Parameters
gdxFileNameFile to initialize Database from.
Returns
Returns the GAMSDatabase.
Exceptions
GAMSExceptionif GAMSDatabase could not be successfully created.

◆ addDatabaseFromGDX() [2/3]

GAMSDatabase gams::GAMSWorkspace::addDatabaseFromGDX ( const std::string &  gdxFileName,
const std::string &  databaseName 
)

Database creation from an existing GDX file.

Parameters
gdxFileNameFile to initialize Database from
databaseNameIdentifier of GAMSDatabase (determined automatically if null).
Returns
Returns the GAMSDatabase.
Exceptions
GAMSExceptionif GAMSDatabase could not be successfully created.

◆ addDatabaseFromGDX() [3/3]

GAMSDatabase gams::GAMSWorkspace::addDatabaseFromGDX ( const std::string &  gdxFileName,
const std::string &  databaseName,
const std::string &  inModelName 
)

Database creation from an existing GDX file.

Parameters
gdxFileNameFile to initialize Database from.
databaseNameIdentifier of GAMSDatabase (determined automatically if null).
inModelNameGAMS string constant that is used to access this database.
Returns
Returns the GAMSDatabase.
Exceptions
GAMSExceptionif GAMSDatabase could not be successfully created.

◆ addDatabaseFromGMD()

GAMSDatabase gams::GAMSWorkspace::addDatabaseFromGMD ( void *  gmdPtr)

Database creation from an GMD handle.

Parameters
gmdPtrGMD low level handle
Remarks
This is an experimental call.
Returns
Returns the GAMSDatabase.

◆ addJobFromApiLib() [1/2]

GAMSJob gams::GAMSWorkspace::addJobFromApiLib ( const std::string &  model,
const GAMSCheckpoint checkpoint,
const std::string &  jobName = "" 
)

Create GAMSJob from GAMS API Library.

Parameters
modelModel name.
checkpointGAMSCheckpoint to initialize GAMSJob from.
jobNameJob name (determined automatically if omitted.)
Returns
Returns the GAMSJob.

◆ addJobFromApiLib() [2/2]

GAMSJob gams::GAMSWorkspace::addJobFromApiLib ( const std::string &  model,
const std::string &  jobName = "" 
)

Create GAMSJob from GAMS API Library.

Parameters
modelModel name.
jobNameJob name (determined automatically if omitted).
Returns
Returns the GAMSJob.

◆ addJobFromDataLib() [1/2]

GAMSJob gams::GAMSWorkspace::addJobFromDataLib ( const std::string &  model,
const GAMSCheckpoint checkpoint,
const std::string &  jobName = "" 
)

Create GAMSJob from GAMS Data Utilities Library.

Parameters
modelModel name.
checkpointGAMSCheckpoint to initialize GAMSJob from.
jobNameJob name (determined automatically if omitted).
Returns
Returns the GAMSJob.

◆ addJobFromDataLib() [2/2]

GAMSJob gams::GAMSWorkspace::addJobFromDataLib ( const std::string &  model,
const std::string &  jobName = "" 
)

Create GAMSJob from GAMS Data Utilities Library.

Parameters
modelModel name.
jobNameJob name (determined automatically if omitted).
Returns
Returns the GAMSJob.

◆ addJobFromEmpLib() [1/2]

GAMSJob gams::GAMSWorkspace::addJobFromEmpLib ( const std::string &  model,
const GAMSCheckpoint checkpoint,
const std::string &  jobName = "" 
)

Create GAMSJob from Extended Math Programming Library.

Parameters
modelModel name.
checkpointGAMSCheckpoint to initialize GAMSJob from.
jobNameJob name (determined automatically if omitted).
Returns
Returns the GAMSJob.

◆ addJobFromEmpLib() [2/2]

GAMSJob gams::GAMSWorkspace::addJobFromEmpLib ( const std::string &  model,
const std::string &  jobName = "" 
)

Create GAMSJob rom Extended Math Programming Library.

Parameters
modelModel name.
jobNameJob name (determined automatically if omitted).
Returns
Returns the GAMSJob.

◆ addJobFromFile() [1/2]

GAMSJob gams::GAMSWorkspace::addJobFromFile ( const std::string &  fileName,
const GAMSCheckpoint checkpoint,
const std::string &  jobName = "" 
)

Create GAMSJob from model file.

Parameters
fileNameGAMS source file name.
checkpointGAMSCheckpoint to initialize GAMSJob from.
jobNameJob name (determined automatically if omitted).
Returns
Returns the GAMSJob.

◆ addJobFromFile() [2/2]

GAMSJob gams::GAMSWorkspace::addJobFromFile ( const std::string &  fileName,
const std::string &  jobName = "" 
)

Create GAMSJob from model file.

Parameters
fileNameGAMS source file name.
jobNameJob name (determined automatically if omitted).
Returns
Returns the GAMSJob.

◆ addJobFromFinLib() [1/2]

GAMSJob gams::GAMSWorkspace::addJobFromFinLib ( const std::string &  model,
const GAMSCheckpoint checkpoint,
const std::string &  jobName = "" 
)

Create GAMSJob from Practical Financial Optimization Library

Parameters
modelModel name.
checkpointGAMSCheckpoint to initialize GAMSJob from.
jobNameJob name (determined automatically if omitted).
Returns
Returns the GAMSJob.

◆ addJobFromFinLib() [2/2]

GAMSJob gams::GAMSWorkspace::addJobFromFinLib ( const std::string &  model,
const std::string &  jobName = "" 
)

Create GAMSJob from Practical Financial Optimization Library.

Parameters
modelModel name.
jobNameJob name (determined automatically if omitted).
Returns
Returns the GAMSJob.

◆ addJobFromGamsLib() [1/2]

GAMSJob gams::GAMSWorkspace::addJobFromGamsLib ( const std::string &  model,
const GAMSCheckpoint checkpoint,
const std::string &  jobName = "" 
)

Create GAMSJob from GAMS Model Library.

Parameters
modelModel name.
checkpointGAMSCheckpoint to initialize GAMSJob from.
jobNameJob name (determined automatically if omitted).
Returns
Returns the GAMSJob.

◆ addJobFromGamsLib() [2/2]

GAMSJob gams::GAMSWorkspace::addJobFromGamsLib ( const std::string &  model,
const std::string &  jobName = "" 
)

Create GAMSJob from GAMS Model Library.

Parameters
modelModel name.
jobNameJob name (determined automatically if omitted).
Returns
Returns the GAMSJob.

◆ addJobFromNoaLib() [1/2]

GAMSJob gams::GAMSWorkspace::addJobFromNoaLib ( const std::string &  model,
const GAMSCheckpoint checkpoint,
const std::string &  jobName = "" 
)

Create GAMSJob from GAMS Non-linear Optimization Applications Library.

Parameters
modelModel name.
checkpointGAMSCheckpoint to initialize GAMSJob from.
jobNameJob name (determined automatically if omitted).
Returns
Returns the GAMSJob.

◆ addJobFromNoaLib() [2/2]

GAMSJob gams::GAMSWorkspace::addJobFromNoaLib ( const std::string &  model,
const std::string &  jobName = "" 
)

Create GAMSJob from GAMS Non-linear Optimization Applications Library.

Parameters
modelModel name.
jobNameJob name (determined automatically if omitted).
Returns
Returns the GAMSJob.

◆ addJobFromPsoptLib() [1/2]

GAMSJob gams::GAMSWorkspace::addJobFromPsoptLib ( const std::string &  model,
const GAMSCheckpoint checkpoint,
const std::string &  jobName = "" 
)

Create GAMSJob from GAMS Power System Optimization Modelling Library.

Parameters
modelModel name.
checkpointGAMSCheckpoint to initialize GAMSJob from.
jobNameJob name (determined automatically if omitted).
Returns
Returns the GAMSJob.

◆ addJobFromPsoptLib() [2/2]

GAMSJob gams::GAMSWorkspace::addJobFromPsoptLib ( const std::string &  model,
const std::string &  jobName = "" 
)

Create GAMSJob from GAMS Power System Optimization Modelling Library.

Parameters
modelModel name.
jobNameJob name (determined automatically if omitted).
Returns
Returns the GAMSJob.

◆ addJobFromString() [1/2]

GAMSJob gams::GAMSWorkspace::addJobFromString ( const std::string &  gamsSource,
const GAMSCheckpoint checkpoint,
const std::string &  jobName = "" 
)

Create GAMSJob from string model source.

Parameters
gamsSourceGAMS model as string.
checkpointGAMSCheckpoint to initialize GAMSJob from.
jobNameJob name (determined automatically if omitted).
Returns
Returns the GAMSJob.

◆ addJobFromString() [2/2]

GAMSJob gams::GAMSWorkspace::addJobFromString ( const std::string &  gamsSource,
const std::string &  jobName = "" 
)

Create GAMSJob from string model source.

Parameters
gamsSourceGAMS model as string.
jobNameJob name (determined automatically if omitted).
Returns
Returns the GAMSJob.

◆ addJobFromTestLib() [1/2]

GAMSJob gams::GAMSWorkspace::addJobFromTestLib ( const std::string &  model,
const GAMSCheckpoint checkpoint,
const std::string &  jobName = "" 
)

Create GAMSJob from GAMS Test Library.

Parameters
modelModel name.
checkpointGAMSCheckpoint to initialize GAMSJob from.
jobNameJob name (determined automatically if omitted).
Returns
Returns the GAMSJob.

◆ addJobFromTestLib() [2/2]

GAMSJob gams::GAMSWorkspace::addJobFromTestLib ( const std::string &  model,
const std::string &  jobName = "" 
)

Create GAMSJob from GAMS Test Library.

Parameters
modelModel name.
jobNameJob name (determined automatically if omitted).
Returns
Returns the GAMSJob.

◆ addOptions() [1/3]

GAMSOptions gams::GAMSWorkspace::addOptions ( )

Create a default GAMSOptions instance.

Returns
Returns default GAMSOptions.
Exceptions
GAMSExceptionIf GAMSOptions could not be successfully created.

◆ addOptions() [2/3]

GAMSOptions gams::GAMSWorkspace::addOptions ( const GAMSOptions optFrom)

Create GAMSOptions.

Parameters
optFromGAMSOptions used to initialize the new options object.
Returns
Returns the GAMSOptions.
Exceptions
GAMSExceptionIf GAMSOptions could not be successfully created.

◆ addOptions() [3/3]

GAMSOptions gams::GAMSWorkspace::addOptions ( const std::string &  optFile)

Create GAMSOptions from an option file.

Parameters
optFileOption file name.
Returns
Returns the GAMSOptions.
Exceptions
GAMSExceptionIf GAMSOptions could not be successfully created.

◆ apiGoldRelNumber()

static int gams::GAMSWorkspace::apiGoldRelNumber ( )
static

Get the GAMS C++ API GOLD release number.

◆ apiLib()

void gams::GAMSWorkspace::apiLib ( std::string  model)

Retrieves model from GAMS API Library.

Parameters
modelModel name.

◆ apiMajorRelNumber()

static int gams::GAMSWorkspace::apiMajorRelNumber ( )
static

Get the GAMS C++ API major release number.

◆ apiMinorRelNumber()

static int gams::GAMSWorkspace::apiMinorRelNumber ( )
static

Get the GAMS C++ API minor release number.

◆ apiVersion()

static std::string gams::GAMSWorkspace::apiVersion ( )
static

Get the GAMS C++ API version.

Returns
Returns the API information, including major and minor version number and build number.

◆ apiVersionDetail()

static std::string gams::GAMSWorkspace::apiVersionDetail ( )
static

Get the detailed GAMS C++ API version.

Returns
Returns the detailed API information, including major and minor version number, build number as well as the build time stamp.

◆ dataLib()

void gams::GAMSWorkspace::dataLib ( std::string  model)

Retrieves model from GAMS Data Utilities Library.

Parameters
modelModel name.

◆ debug()

GAMSEnum::DebugLevel gams::GAMSWorkspace::debug ( )

Get GAMS debug level.

◆ empLib()

void gams::GAMSWorkspace::empLib ( std::string  model)

Retrieves model from Extended Math Programming Library.

Parameters
modelModel name.

◆ finLib()

void gams::GAMSWorkspace::finLib ( std::string  model)

Retrieves model from Practical Financial Optimization Library.

Parameters
modelModel name.

◆ gamsLib()

void gams::GAMSWorkspace::gamsLib ( std::string  model)

Retrieves model from GAMS Model Library.

Parameters
modelModel name.

◆ goldRelNumber()

int gams::GAMSWorkspace::goldRelNumber ( )

Get the GAMS GOLD release number.

◆ hasError()

bool gams::GAMSWorkspace::hasError ( ) const

Get error status.

Returns
Returns the error status.

◆ logID()

LogId gams::GAMSWorkspace::logID ( ) const

Get the GAMS log ID.

Returns
Returns the GAMS log ID.

◆ majorRelNumber()

int gams::GAMSWorkspace::majorRelNumber ( )

Get the required GAMS major version number.

◆ minorRelNumber()

int gams::GAMSWorkspace::minorRelNumber ( )

Get the required GAMS minor version number.

◆ myEPS()

double gams::GAMSWorkspace::myEPS ( )

Get value to be stored in and read from GAMSDatabase for Epsilon.

Remarks
Default is numeric_limits<double>::min().

◆ noaLib()

void gams::GAMSWorkspace::noaLib ( std::string  model)

Retrieves model from Nonlinear Optimization Applications Library.

Parameters
modelModel name.

◆ operator!=()

bool gams::GAMSWorkspace::operator!= ( const GAMSWorkspace other) const

Compares two GAMSWorkspace objects.

Parameters
otherAnother GAMSWorkspace to compare to.
Returns
Returns true if the two GAMSWorkspace are different; otherwise false.

◆ operator=()

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

Assigns a GAMSWorkspace.

Parameters
otherAnother GAMSWorkspace used as data source.
Returns
Returns the assigned GAMSDatabase (*this).

◆ operator==()

bool gams::GAMSWorkspace::operator== ( const GAMSWorkspace other) const

Compares two GAMSWorkspace objects.

Parameters
otherAnother GAMSWorkspace to compare to.
Returns
Returns true if the two GAMSWorkspace are equal; otherwise false.

◆ psoptLib()

void gams::GAMSWorkspace::psoptLib ( std::string  model)

Retrieves model from Power System Optimization Modelling Library.

Parameters
modelModel name.

◆ scratchFilePrefix()

std::string gams::GAMSWorkspace::scratchFilePrefix ( ) const

Get the string used to prefix automatically generated files.

◆ setHasError()

void gams::GAMSWorkspace::setHasError ( bool  newHasError)

Set error status.

Parameters
newHasErrorNew error status.

◆ setMyEPS()

void gams::GAMSWorkspace::setMyEPS ( double  eps)

Set value to be stored in and read from GAMSDatabase for Epsilon.

Remarks
Default is numeric_limits<double>::min().

◆ setScratchFilePrefix()

void gams::GAMSWorkspace::setScratchFilePrefix ( std::string  prefix)

Set the string used to prefix automatically generated files.

Parameters
prefixString used to prefix automatically generated files.

◆ specValues()

double * gams::GAMSWorkspace::specValues ( ) const

Get all special values related to a system.

◆ systemDirectory()

std::string gams::GAMSWorkspace::systemDirectory ( ) const

Get GAMS system directory.

Returns
GAMS system directory.

◆ testLib()

void gams::GAMSWorkspace::testLib ( std::string  model)

Retrieves model from GAMS Test Library.

Parameters
modelModel name.

◆ version()

std::string gams::GAMSWorkspace::version ( )

Get the required GAMS version.

◆ workingDirectory()

std::string gams::GAMSWorkspace::workingDirectory ( ) const

Get GAMS working directory, anchor for all file-based operations.

Returns
GAMS working directory.