GamsHandlerIOLib Class Reference

Forwards requests for output and point transformations to the GAMS I/O library iolib. More...

#include <GamsHandlerIOLib.hpp>

Inheritance diagram for GamsHandlerIOLib:

Inheritance graph
[legend]
Collaboration diagram for GamsHandlerIOLib:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GamsHandlerIOLib (bool is_reformulated_)
 Constructor.
void print (PrintMask mask, const char *msg) const
void println (PrintMask mask, const char *msg) const
void flush (PrintMask mask=AllMask) const
void translateToGamsSpaceX (const double *x_, double objval_, double *x) const
 Translates a given point as seem by the GamsModel or smag user into the original gams space.
void translateToGamsSpaceLB (const double *lb_, double *lb) const
 Translates a given lower bound as seem by the GamsModel or smag user into the original gams space.
void translateToGamsSpaceUB (const double *ub_, double *ub) const
 Translates a given upper bound as seem by the GamsModel or smag user into the original gams space.
void translateFromGamsSpaceX (const double *x_, double *x) const
 Translates a given point from the original gams space into what the user sees in a GamsModel or smag.
bool translateFromGamsSpaceCol (const int *indices_, int *indices, int nr) const
 Translates given column indices from the original gams space into what the user sees in a GamsModel or smag.
int translateToGamsSpaceCol (int colindex) const
 Translates given column index into the original gams space.
int translateToGamsSpaceRow (int rowindex) const
 Translates given row index into the original gams space.
double getMInfinity () const
 GAMS value for minus infinity.
double getPInfinity () const
 GAMS value for plus infinity.
int getObjSense () const
 Objective sense: +1 for min, -1 for max.
int getColCount () const
 The number of columns in the possibly transformed problem space.
int getColCountGams () const
 The number of columns in the original gams space.
int getObjVariable () const
 The index of the objective variable in the original gams space.
int getObjRow () const
 The index of the objective row in the original gams space.
const char * getSystemDir () const
 Path to GAMS system.
bool isDictionaryWritten () const
 Indicates whether GAMS has written a dictionary file.
const char * dictionaryFile () const
 Gives the name of a dictionary file, if any.
int dictionaryVersion () const
 Gives the dictionary version.

Private Attributes

bool is_reformulated

Detailed Description

Forwards requests for output and point transformations to the GAMS I/O library iolib.

Definition at line 16 of file GamsHandlerIOLib.hpp.


Constructor & Destructor Documentation

GamsHandlerIOLib::GamsHandlerIOLib ( bool  is_reformulated_  )  [inline]

Constructor.

Parameters:
is_reformulated_ Whether we should assume that the objective row had been moved into the objective function and the objective variable been eliminated.

Definition at line 24 of file GamsHandlerIOLib.hpp.


Member Function Documentation

void GamsHandlerIOLib::print ( PrintMask  mask,
const char *  msg 
) const

void GamsHandlerIOLib::println ( PrintMask  mask,
const char *  msg 
) const

void GamsHandlerIOLib::flush ( PrintMask  mask = AllMask  )  const

void GamsHandlerIOLib::translateToGamsSpaceX ( const double *  x_,
double  objval_,
double *  x 
) const [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.

Implements GamsHandler.

void GamsHandlerIOLib::translateToGamsSpaceLB ( const double *  lb_,
double *  lb 
) const [virtual]

Translates a given lower bound as seem by the GamsModel or smag user into the original gams space.

Implements GamsHandler.

void GamsHandlerIOLib::translateToGamsSpaceUB ( const double *  ub_,
double *  ub 
) const [virtual]

Translates a given upper bound as seem by the GamsModel or smag user into the original gams space.

Implements GamsHandler.

void GamsHandlerIOLib::translateFromGamsSpaceX ( const double *  x_,
double *  x 
) const [virtual]

Translates a given point from the original gams space into what the user sees in a GamsModel or smag.

Implements GamsHandler.

bool GamsHandlerIOLib::translateFromGamsSpaceCol ( const int *  indices_,
int *  indices,
int  nr 
) const [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.

Parameters:
indices_ Array of column indices of length nr (input).
indices Array of length nr to store column indices (output).
nr Length of arrays.
Returns:
False if there was an error, e.g., a column index is given that was reformulated out by GamsModel or smag (e.g., objective variable). True otherwise.

Implements GamsHandler.

int GamsHandlerIOLib::translateToGamsSpaceCol ( int  colindex  )  const [virtual]

Translates given column index into the original gams space.

Returns:
-1 if failure, the column index in gams space otherwise.

Implements GamsHandler.

int GamsHandlerIOLib::translateToGamsSpaceRow ( int  rowindex  )  const [virtual]

Translates given row index into the original gams space.

Returns:
-1 if failure, the row index in gams space otherwise.

Implements GamsHandler.

double GamsHandlerIOLib::getMInfinity (  )  const [virtual]

GAMS value for minus infinity.

Implements GamsHandler.

double GamsHandlerIOLib::getPInfinity (  )  const [virtual]

GAMS value for plus infinity.

Implements GamsHandler.

int GamsHandlerIOLib::getObjSense (  )  const [virtual]

Objective sense: +1 for min, -1 for max.

Implements GamsHandler.

int GamsHandlerIOLib::getColCount (  )  const [virtual]

The number of columns in the possibly transformed problem space.

Implements GamsHandler.

int GamsHandlerIOLib::getColCountGams (  )  const [virtual]

The number of columns in the original gams space.

Implements GamsHandler.

int GamsHandlerIOLib::getObjVariable (  )  const [virtual]

The index of the objective variable in the original gams space.

Implements GamsHandler.

int GamsHandlerIOLib::getObjRow (  )  const [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.

Implements GamsHandler.

const char* GamsHandlerIOLib::getSystemDir (  )  const [virtual]

Path to GAMS system.

Implements GamsHandler.

bool GamsHandlerIOLib::isDictionaryWritten (  )  const [virtual]

Indicates whether GAMS has written a dictionary file.

Returns:
True if dictionary file had been written, False else.

Implements GamsHandler.

const char* GamsHandlerIOLib::dictionaryFile (  )  const [virtual]

Gives the name of a dictionary file, if any.

Returns:
Name of dictionary file, or NULL if none.

Implements GamsHandler.

int GamsHandlerIOLib::dictionaryVersion (  )  const [virtual]

Gives the dictionary version.

Returns:
Version of dictionary.

Implements GamsHandler.


Member Data Documentation

bool GamsHandlerIOLib::is_reformulated [private]

Definition at line 18 of file GamsHandlerIOLib.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Dec 30 03:01:29 2008 for GAMSlinks by  doxygen 1.4.7