OS  2.9.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
LindoSolver Class Reference

the LindoSolver class solves problems using Lindo. More...

#include <OSLindoSolver.h>

+ Inheritance diagram for LindoSolver:
+ Collaboration diagram for LindoSolver:

Public Member Functions

 LindoSolver ()
 the LindoSolver class constructor More...
 
 ~LindoSolver ()
 the LindoSolver class destructor More...
 
virtual void solve ()
 solve results in an instance being read into the Lindo data structures and optimized More...
 
virtual void buildSolverInstance () throw (ErrorClass)
 buildSolverInstance is a virtual function – the actual solvers will implement their own buildSolverInstance method – the solver instance is the instance the individual solver sees in its API More...
 
virtual void setSolverOptions () throw (ErrorClass)
 The implementation of the virtual functions. More...
 
bool optimize ()
 invoke the Lindo API solver More...
 
bool processVariables ()
 read the OSiL instance variables and put these into the LINDO API variables More...
 
bool processConstraints ()
 read the OSiL instance constraints and put these into the LINDO API constraints More...
 
bool generateLindoModel ()
 create the LINDO environment and read the problem into the internal LINDO data structures More...
 
bool addSlackVars ()
 LINDO does not handle constraints with upper and lower bounds this method is part of kludge where we add a new variable to handle the bounds. More...
 
bool processQuadraticTerms ()
 read the quadratic terms in the model More...
 
bool processNonlinearExpressions ()
 read the nonlinear terms in the model More...
 
void dataEchoCheck ()
 use this for debugging, print out the instance that the solver thinks it has and compare this with the OSiL file More...
 
- Public Member Functions inherited from DefaultSolver
 DefaultSolver ()
 default constructor. More...
 
virtual ~DefaultSolver ()=0
 default destructor. More...
 

Public Attributes

OSiLReaderm_osilreader
 m_osilreader is an OSiLReader object used to create an osinstance from an osil string if needed More...
 
- Public Attributes inherited from DefaultSolver
std::string osil
 osil holds the problem instance as a std::string More...
 
std::string osol
 osol holds the options for the solver More...
 
std::string osrl
 osrl holds the solution or result of the model More...
 
OSInstanceosinstance
 osinstance holds the problem instance in-memory as an OSInstance object More...
 
OSOptionosoption
 osoption holds the solver options in-memory as an OSOption object More...
 
OSResultosresult
 osresult holds the solution or result of the model in-memory as an OSResult object More...
 
std::string sSolverName
 sSolverName is the name of the Coin solver used, e.g. More...
 
bool bCallbuildSolverInstance
 bCallbuildSolverInstance is set to true if buildSolverService has been called More...
 
bool bSetSolverOptions
 bSetSolverOptions is set to true if setSolverOptions has been called, false otherwise More...
 

Protected Member Functions

void lindoAPIErrorCheck (std::string errormsg)
 Lindo's generalized error Reporting function. More...
 

Detailed Description

the LindoSolver class solves problems using Lindo.

Author
Robert Fourer, Jun Ma, Kipp Martin
Version
1.0, 03/14/2004
Since
OS 1.0
Remarks
this class takes an OSiL instance and optimizes it using the Lindo API

Definition at line 49 of file OSLindoSolver.h.

Constructor & Destructor Documentation

LindoSolver::LindoSolver ( )

the LindoSolver class constructor

LindoSolver::~LindoSolver ( )

the LindoSolver class destructor

Member Function Documentation

virtual void LindoSolver::solve ( )
virtual

solve results in an instance being read into the Lindo data structures and optimized

Implements DefaultSolver.

virtual void LindoSolver::buildSolverInstance ( )
throw (ErrorClass
)
virtual

buildSolverInstance is a virtual function – the actual solvers will implement their own buildSolverInstance method – the solver instance is the instance the individual solver sees in its API

Implements DefaultSolver.

void LindoSolver::setSolverOptions ( )
throw (ErrorClass
)
virtual

The implementation of the virtual functions.

Returns
void.

Implements DefaultSolver.

bool LindoSolver::optimize ( )

invoke the Lindo API solver

Returns
true if an exception is not thrown.
bool LindoSolver::processVariables ( )

read the OSiL instance variables and put these into the LINDO API variables

Returns
true if an exception is not thrown.
bool LindoSolver::processConstraints ( )

read the OSiL instance constraints and put these into the LINDO API constraints

Returns
true if an exception is not thrown.
bool LindoSolver::generateLindoModel ( )

create the LINDO environment and read the problem into the internal LINDO data structures

Returns
true if an exception is not thrown.
bool LindoSolver::addSlackVars ( )

LINDO does not handle constraints with upper and lower bounds this method is part of kludge where we add a new variable to handle the bounds.

Returns
true if an exception is not thrown.
bool LindoSolver::processQuadraticTerms ( )

read the quadratic terms in the model

Returns
true if an exception is not thrown.
bool LindoSolver::processNonlinearExpressions ( )

read the nonlinear terms in the model

Returns
true if an exception is not thrown.
void LindoSolver::dataEchoCheck ( )

use this for debugging, print out the instance that the solver thinks it has and compare this with the OSiL file

void LindoSolver::lindoAPIErrorCheck ( std::string  errormsg)
protected

Lindo's generalized error Reporting function.

Member Data Documentation

OSiLReader* LindoSolver::m_osilreader

m_osilreader is an OSiLReader object used to create an osinstance from an osil string if needed

Definition at line 129 of file OSLindoSolver.h.


The documentation for this class was generated from the following file: