GAMSlinks
0.4
|
Forwards requests for output, point transformations, dictionary files, and other things to a GAMS I/O library. More...
#include <GamsHandler.hpp>
Public Types | |
enum | PrintMask { LogMask = 0x1, StatusMask = 0x2, AllMask = LogMask|StatusMask, LastPrintMask } |
Distinguishing between message types. More... | |
Public Member Functions | |
GamsHandler () | |
Constructor. More... | |
virtual | ~GamsHandler () |
Destructor. More... | |
virtual void | print (PrintMask mask, const char *msg) const =0 |
Prints the given message into the GAMS output channels (log and/or status file). More... | |
virtual void | println (PrintMask mask, const char *msg) const =0 |
Prints the given message plus an extra newline into the GAMS output channels (log and/or status file). More... | |
virtual void | flush (PrintMask mask=AllMask) const =0 |
Flushes the buffer of a GAMS output channel. More... | |
virtual void | translateToGamsSpaceX (const double *x_, double objval_, double *x) const =0 |
Translates a given point as seem by the GamsModel or smag user into the original gams space. More... | |
virtual void | translateToGamsSpaceLB (const double *lb_, double *lb) const =0 |
Translates a given lower bound as seem by the GamsModel or smag user into the original gams space. More... | |
virtual void | translateToGamsSpaceUB (const double *ub_, double *ub) const =0 |
Translates a given upper bound as seem by the GamsModel or smag user into the original gams space. More... | |
virtual void | translateFromGamsSpaceX (const double *x_, double *x) const =0 |
Translates a given point from the original gams space into what the user sees in a GamsModel or smag. More... | |
virtual bool | translateFromGamsSpaceCol (const int *indices_, int *indices, int nr) const =0 |
Translates given column indices from the original gams space into what the user sees in a GamsModel or smag. More... | |
virtual int | translateToGamsSpaceCol (int colindex) const =0 |
Translates given column index into the original gams space. More... | |
virtual int | translateToGamsSpaceRow (int rowindex) const =0 |
Translates given row index into the original gams space. More... | |
virtual double | getMInfinity () const =0 |
GAMS value for minus infinity. More... | |
virtual double | getPInfinity () const =0 |
GAMS value for plus infinity. More... | |
virtual int | getObjSense () const =0 |
Objective sense: +1 for min, -1 for max. More... | |
virtual int | getColCount () const =0 |
The number of columns in the possibly transformed problem space. More... | |
virtual int | getColCountGams () const =0 |
The number of columns in the original gams space. More... | |
virtual int | getObjVariable () const =0 |
The index of the objective variable in the original gams space. More... | |
virtual int | getObjRow () const =0 |
The index of the objective row in the original gams space. More... | |
virtual const char * | getSystemDir () const =0 |
Path to GAMS system. More... | |
virtual bool | isDictionaryWritten () const =0 |
Indicates whether GAMS has written a dictionary file. More... | |
virtual const char * | dictionaryFile () const =0 |
Gives the name of a dictionary file, if any. More... | |
virtual int | dictionaryVersion () const =0 |
Gives the dictionary version. More... | |
Forwards requests for output, point transformations, dictionary files, and other things to a GAMS I/O library.
The use of this class is to provide a uniformed interface to some operations for different GAMS I/O libraries (iolib and smag). It is not meant to become a layer that allows an exchangable use of smag and iolib.
Definition at line 18 of file GamsHandler.hpp.
Distinguishing between message types.
Enumerator | |
---|---|
LogMask | |
StatusMask | |
AllMask | |
LastPrintMask |
Definition at line 23 of file GamsHandler.hpp.
|
inline |
Constructor.
Definition at line 34 of file GamsHandler.hpp.
|
inlinevirtual |
Destructor.
Definition at line 38 of file GamsHandler.hpp.
|
pure virtual |
Prints the given message into the GAMS output channels (log and/or status file).
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
|
pure virtual |
Prints the given message plus an extra newline into the GAMS output channels (log and/or status file).
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
Flushes the buffer of a GAMS output channel.
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
|
pure virtual |
Translates a given point as seem by the GamsModel or smag user into the original gams space.
These are different because GamsModel and SMAG reformulate the objective function, if possible.
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
|
pure virtual |
Translates a given lower bound as seem by the GamsModel or smag user into the original gams space.
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
|
pure virtual |
Translates a given upper bound as seem by the GamsModel or smag user into the original gams space.
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
|
pure virtual |
Translates a given point from the original gams space into what the user sees in a GamsModel or smag.
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
|
pure virtual |
Translates given column indices from the original gams space into what the user sees in a GamsModel or smag.
Here, input and output are allowed to be the same array.
indices_ | Array of column indices of length nr (input). |
indices | Array of length nr to store column indices (output). |
nr | Length of arrays. |
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
|
pure virtual |
Translates given column index into the original gams space.
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
|
pure virtual |
Translates given row index into the original gams space.
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
|
pure virtual |
GAMS value for minus infinity.
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
|
pure virtual |
GAMS value for plus infinity.
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
|
pure virtual |
Objective sense: +1 for min, -1 for max.
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
|
pure virtual |
The number of columns in the possibly transformed problem space.
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
Referenced by GamsBCH::getNumCols().
|
pure virtual |
The number of columns in the original gams space.
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
|
pure virtual |
The index of the objective variable in the original gams space.
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
|
pure virtual |
The index of the objective row in the original gams space.
Returns -1 if the problem has not been reformulated and thus the objective has not been lifted.
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
|
pure virtual |
Path to GAMS system.
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
|
pure virtual |
Indicates whether GAMS has written a dictionary file.
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
|
pure virtual |
Gives the name of a dictionary file, if any.
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.
|
pure virtual |
Gives the dictionary version.
Implemented in GamsHandlerSmag, and GamsHandlerIOLib.