glpkWrapper Class Reference

Wrapper class for the GLPK 4.0 linear programming kit. More...

#include <glpkWrapper.h>

Inheritance diagram for glpkWrapper:

mipInstance managedObject goblinRootObject

Public Member Functions

 glpkWrapper (TRestr=0, TVar=0, TIndex=0, TObjectSense=MINIMIZE, goblinController &=goblinDefaultContext) throw ()
 glpkWrapper (const char *, goblinController &=goblinDefaultContext) throw (ERFile,ERParse)
 ~glpkWrapper () throw ()
unsigned long Allocated () const throw ()
unsigned long Size () const throw ()
void Resize (TRestr, TVar, TIndex) throw (ERRange)
void Strip () throw ()
void ReadMPSFile (char *) throw ()
void ReadCPLEX_LP (char *) throw ()
void ReadBASFile (char *) throw (ERParse,ERRejected)
void WriteMPSFile (char *, TLPFormat=MPS_CPLEX) const throw (ERFile,ERRejected)
void WriteBASFile (char *, TLPFormat=BAS_CPLEX) const throw (ERFile,ERRejected)
TVar AddVar (TFloat lb, TFloat ub, TFloat cost, TVarType=VAR_FLOAT) throw (ERRejected)
TRestr AddRestr (TFloat lb, TFloat ub) throw (ERRejected)
void DeleteVar (TVar) throw (ERRange,ERRejected)
void DeleteRestr (TRestr) throw (ERRange)
void SetURange (TVar, TFloat) throw (ERRange)
void SetLRange (TVar, TFloat) throw (ERRange)
void SetUBound (TRestr, TFloat) throw (ERRange)
void SetLBound (TRestr, TFloat) throw (ERRange)
void SetCost (TVar, TFloat) throw (ERRange)
void SetVarType (TVar, TVarType) throw (ERRange)
void SetVarLabel (TVar, char *, TOwnership=OWNED_BY_SENDER) throw (ERRange,ERRejected)
void SetRestrLabel (TRestr, char *, TOwnership=OWNED_BY_SENDER) throw (ERRange,ERRejected)
void SetObjectSense (TObjectSense dd) throw ()
void SetCoeff (TRestr, TVar, TFloat) throw (ERRange)
void SetRow (TRestr i, TVar len, TVar *index, double *val) throw (ERRange)
void SetColumn (TVar j, TRestr len, TRestr *index, double *val) throw (ERRange)
TRestr K () const throw ()
TVar L () const throw ()
TIndex NZ () const throw ()
TFloat Cost (TVar) const throw (ERRange)
TFloat URange (TVar) const throw (ERRange)
TFloat LRange (TVar) const throw (ERRange)
TFloat UBound (TRestr) const throw (ERRange)
TFloat LBound (TRestr) const throw (ERRange)
TVarType VarType (TVar) const throw (ERRange)
char * VarLabel (TVar, TOwnership=OWNED_BY_RECEIVER) const throw (ERRange)
char * RestrLabel (TRestr, TOwnership=OWNED_BY_RECEIVER) const throw (ERRange)
TObjectSense ObjectSense () const throw ()
TFloat Coeff (TRestr, TVar) const throw (ERRange)
TVar GetRow (TRestr i, TVar *index, double *val) const throw (ERRange)
TRestr GetColumn (TVar j, TRestr *index, double *val) const throw (ERRange)
void SetRestrType (TRestr, TLowerUpper) throw (ERRange,ERRejected)
void SetIndex (TRestr, TVar, TLowerUpper) throw (ERRange,ERRejected)
void InitIndex () const throw ()
void ReleaseIndex () const throw ()
TRestr Index (TVar) const throw (ERRange)
TRestr RowIndex (TRestr) const throw (ERRange)
TVar RevIndex (TRestr) const throw (ERRange)
TRestrType RestrType (TRestr) const throw (ERRange)
void InitBasis () const throw ()
TFloat X (TVar) const throw (ERRange)
TFloat Y (TRestr, TLowerUpper) const throw (ERRange)
TFloat Tableau (TIndex, TIndex) const throw (ERRange,ERRejected)
TFloat BaseInverse (TIndex, TIndex) const throw (ERRange,ERRejected)
void Pivot (TIndex, TIndex, TLowerUpper) throw (ERRange,ERRejected)
TFloat SolveLP () throw (ERRejected)
TFloat SolveMIP () throw (ERRejected)
void ReadGNU_MP_Model (char *, char *, char *) throw ()
void WriteCPLEX_LP (char *) const throw ()
void WriteSimplexSolution (char *) const throw ()
TIndex TableauRow (TIndex k, TIndex *index, double *val) const throw (ERRange)
TIndex TableauColumn (TIndex k, TIndex *index, double *val) const throw (ERRange)
TIndex TransformRow (TIndex len, TIndex *index, double *val)
void ResetParameters ()
void SetIntegerParameter (int parameter, int value)
void SetRealParameter (int parameter, double value)
int GetIntegerParameter (int parameter)
double GetRealParameter (int parameter)
bool CCost () const throw ()
bool CURange () const throw ()
bool CLRange () const throw ()
bool CUBound () const throw ()
bool CLBound () const throw ()
bool CVarType () const throw ()
bool Initial () const throw ()
bool StartPrimal () throw ()
TFloat SolvePrimal () throw ()
bool StartDual () throw ()
TFloat SolveDual () throw ()
TVar PricePrimal () throw (ERRejected)
TRestr QTestPrimal (TVar) throw (ERRejected)
TRestr PriceDual () throw (ERRejected)
TVar QTestDual (TRestr) throw (ERRejected)

Detailed Description

Wrapper class for the GLPK 4.0 linear programming kit.


Constructor & Destructor Documentation

glpkWrapper TRestr  = 0,
TVar  = 0,
TIndex  = 0,
TObjectSense  = MINIMIZE,
goblinController = goblinDefaultContext
throw ()
 

glpkWrapper const char *  ,
goblinController = goblinDefaultContext
throw (ERFile,ERParse)
 

~glpkWrapper  )  throw ()
 


Member Function Documentation

TRestr AddRestr TFloat  lb,
TFloat  ub
throw (ERRejected) [virtual]
 

Implements mipInstance.

TVar AddVar TFloat  lb,
TFloat  ub,
TFloat  cost,
TVarType  = VAR_FLOAT
throw (ERRejected)
 

unsigned long Allocated  )  const throw ()
 

Reimplemented from mipInstance.

TFloat BaseInverse TIndex  ,
TIndex 
const throw (ERRange,ERRejected) [virtual]
 

Implements mipInstance.

bool CCost  )  const throw ()
 

bool CLBound  )  const throw ()
 

bool CLRange  )  const throw ()
 

TFloat Coeff TRestr  ,
TVar 
const throw (ERRange) [virtual]
 

Implements mipInstance.

TFloat Cost TVar   )  const throw (ERRange) [virtual]
 

Implements mipInstance.

bool CUBound  )  const throw ()
 

bool CURange  )  const throw ()
 

bool CVarType  )  const throw ()
 

void DeleteRestr TRestr   )  throw (ERRange) [virtual]
 

Implements mipInstance.

void DeleteVar TVar   )  throw (ERRange,ERRejected) [virtual]
 

Implements mipInstance.

TRestr GetColumn TVar  j,
TRestr index,
double *  val
const throw (ERRange) [virtual]
 

Implements mipInstance.

int GetIntegerParameter int  parameter  ) 
 

double GetRealParameter int  parameter  ) 
 

TVar GetRow TRestr  i,
TVar index,
double *  val
const throw (ERRange) [virtual]
 

Implements mipInstance.

TRestr Index TVar   )  const throw (ERRange) [virtual]
 

Implements mipInstance.

void InitBasis  )  const throw () [virtual]
 

Implements mipInstance.

bool Initial  )  const throw () [virtual]
 

Implements mipInstance.

void InitIndex  )  const throw ()
 

TRestr K  )  const throw () [virtual]
 

Implements mipInstance.

TVar L  )  const throw () [virtual]
 

Implements mipInstance.

TFloat LBound TRestr   )  const throw (ERRange) [virtual]
 

Implements mipInstance.

TFloat LRange TVar   )  const throw (ERRange) [virtual]
 

Implements mipInstance.

TIndex NZ  )  const throw () [virtual]
 

Implements mipInstance.

TObjectSense ObjectSense  )  const throw () [virtual]
 

Implements mipInstance.

void Pivot TIndex  ,
TIndex  ,
TLowerUpper 
throw (ERRange,ERRejected)
 

TRestr PriceDual  )  throw (ERRejected) [virtual]
 

Implements mipInstance.

TVar PricePrimal  )  throw (ERRejected) [virtual]
 

Implements mipInstance.

TVar QTestDual TRestr   )  throw (ERRejected) [virtual]
 

Implements mipInstance.

TRestr QTestPrimal TVar   )  throw (ERRejected) [virtual]
 

Implements mipInstance.

void ReadBASFile char *   )  throw (ERParse,ERRejected)
 

void ReadCPLEX_LP char *   )  throw ()
 

void ReadGNU_MP_Model char *  ,
char *  ,
char * 
throw ()
 

void ReadMPSFile char *   )  throw ()
 

void ReleaseIndex  )  const throw ()
 

void ResetParameters  ) 
 

void Resize TRestr  ,
TVar  ,
TIndex 
throw (ERRange) [virtual]
 

Implements mipInstance.

char* RestrLabel TRestr  ,
TOwnership  = OWNED_BY_RECEIVER
const throw (ERRange) [virtual]
 

Reimplemented from mipInstance.

TRestrType RestrType TRestr   )  const throw (ERRange) [virtual]
 

Implements mipInstance.

TVar RevIndex TRestr   )  const throw (ERRange) [virtual]
 

Implements mipInstance.

TRestr RowIndex TRestr   )  const throw (ERRange) [virtual]
 

Implements mipInstance.

void SetCoeff TRestr  ,
TVar  ,
TFloat 
throw (ERRange) [virtual]
 

Implements mipInstance.

void SetColumn TVar  j,
TRestr  len,
TRestr index,
double *  val
throw (ERRange) [virtual]
 

Implements mipInstance.

void SetCost TVar  ,
TFloat 
throw (ERRange) [virtual]
 

Implements mipInstance.

void SetIndex TRestr  ,
TVar  ,
TLowerUpper 
throw (ERRange,ERRejected)
 

void SetIntegerParameter int  parameter,
int  value
 

void SetLBound TRestr  ,
TFloat 
throw (ERRange) [virtual]
 

Implements mipInstance.

void SetLRange TVar  ,
TFloat 
throw (ERRange) [virtual]
 

Implements mipInstance.

void SetObjectSense TObjectSense  dd  )  throw () [virtual]
 

Implements mipInstance.

void SetRealParameter int  parameter,
double  value
 

void SetRestrLabel TRestr  ,
char *  ,
TOwnership  = OWNED_BY_SENDER
throw (ERRange,ERRejected) [virtual]
 

Implements mipInstance.

void SetRestrType TRestr  ,
TLowerUpper 
throw (ERRange,ERRejected)
 

void SetRow TRestr  i,
TVar  len,
TVar index,
double *  val
throw (ERRange) [virtual]
 

Implements mipInstance.

void SetUBound TRestr  ,
TFloat 
throw (ERRange) [virtual]
 

Implements mipInstance.

void SetURange TVar  ,
TFloat 
throw (ERRange) [virtual]
 

Implements mipInstance.

void SetVarLabel TVar  ,
char *  ,
TOwnership  = OWNED_BY_SENDER
throw (ERRange,ERRejected) [virtual]
 

Implements mipInstance.

void SetVarType TVar  ,
TVarType 
throw (ERRange)
 

unsigned long Size  )  const throw () [virtual]
 

Implements goblinRootObject.

TFloat SolveDual  )  throw () [virtual]
 

Implements mipInstance.

TFloat SolveLP  )  throw (ERRejected) [virtual]
 

Reimplemented from mipInstance.

TFloat SolveMIP  )  throw (ERRejected) [virtual]
 

Reimplemented from mipInstance.

TFloat SolvePrimal  )  throw () [virtual]
 

Implements mipInstance.

bool StartDual  )  throw () [virtual]
 

Implements mipInstance.

bool StartPrimal  )  throw () [virtual]
 

Implements mipInstance.

void Strip  )  throw () [virtual]
 

Implements mipInstance.

TFloat Tableau TIndex  ,
TIndex 
const throw (ERRange,ERRejected) [virtual]
 

Implements mipInstance.

TIndex TableauColumn TIndex  k,
TIndex index,
double *  val
const throw (ERRange)
 

TIndex TableauRow TIndex  k,
TIndex index,
double *  val
const throw (ERRange)
 

TIndex TransformRow TIndex  len,
TIndex index,
double *  val
 

TFloat UBound TRestr   )  const throw (ERRange) [virtual]
 

Implements mipInstance.

TFloat URange TVar   )  const throw (ERRange) [virtual]
 

Implements mipInstance.

char* VarLabel TVar  ,
TOwnership  = OWNED_BY_RECEIVER
const throw (ERRange) [virtual]
 

Reimplemented from mipInstance.

TVarType VarType TVar   )  const throw (ERRange) [virtual]
 

Implements mipInstance.

void WriteBASFile char *  ,
TLPFormat  = BAS_CPLEX
const throw (ERFile,ERRejected)
 

void WriteCPLEX_LP char *   )  const throw ()
 

void WriteMPSFile char *  ,
TLPFormat  = MPS_CPLEX
const throw (ERFile,ERRejected)
 

void WriteSimplexSolution char *   )  const throw ()
 

TFloat X TVar   )  const throw (ERRange) [virtual]
 

Implements mipInstance.

TFloat Y TRestr  ,
TLowerUpper 
const throw (ERRange)