OS 2.10.2
Loading...
Searching...
No Matches
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
 
 ~LindoSolver ()
 the LindoSolver class destructor
 
virtual void solve ()
 solve results in an instance being read into the Lindo data structures and optimized
 
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
 
virtual void setSolverOptions () throw (ErrorClass)
 The implementation of the virtual functions.
 
bool optimize ()
 invoke the Lindo API solver
 
bool processVariables ()
 read the OSiL instance variables and put these into the LINDO API variables
 
bool processConstraints ()
 read the OSiL instance constraints and put these into the LINDO API constraints
 
bool generateLindoModel ()
 create the LINDO environment and read the problem into the internal LINDO data structures
 
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.
 
bool processQuadraticTerms ()
 read the quadratic terms in the model
 
bool processNonlinearExpressions ()
 read the nonlinear terms in the model
 
void dataEchoCheck ()
 use this for debugging, print out the instance that the solver thinks it has and compare this with the OSiL file
 
- Public Member Functions inherited from DefaultSolver
virtual void solve ()=0
 solve is a virtual function – the actual solvers will implement their own solve method
 
virtual void buildSolverInstance ()=0
 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
 
virtual void setSolverOptions ()=0
 setSolverOptions is a virtual function – the actual solvers will implement their own setSolverOptions method – the solver options are the options the individual solver sees in its API
 
 DefaultSolver ()
 default constructor.
 
virtual ~DefaultSolver ()=0
 default destructor.
 

Public Attributes

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

Protected Member Functions

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

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::LindoSolver ( )

the LindoSolver class constructor

◆ ~LindoSolver()

LindoSolver::~LindoSolver ( )

the LindoSolver class destructor

Member Function Documentation

◆ solve()

virtual void LindoSolver::solve ( )
virtual

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

Implements DefaultSolver.

◆ buildSolverInstance()

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.

◆ setSolverOptions()

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

The implementation of the virtual functions.

Returns
void.

Implements DefaultSolver.

◆ optimize()

bool LindoSolver::optimize ( )

invoke the Lindo API solver

Returns
true if an exception is not thrown.

◆ processVariables()

bool LindoSolver::processVariables ( )

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

Returns
true if an exception is not thrown.

◆ processConstraints()

bool LindoSolver::processConstraints ( )

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

Returns
true if an exception is not thrown.

◆ generateLindoModel()

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.

◆ addSlackVars()

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.

◆ processQuadraticTerms()

bool LindoSolver::processQuadraticTerms ( )

read the quadratic terms in the model

Returns
true if an exception is not thrown.

◆ processNonlinearExpressions()

bool LindoSolver::processNonlinearExpressions ( )

read the nonlinear terms in the model

Returns
true if an exception is not thrown.

◆ dataEchoCheck()

void LindoSolver::dataEchoCheck ( )

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

◆ lindoAPIErrorCheck()

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

Lindo's generalized error Reporting function.

Member Data Documentation

◆ m_osilreader

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: