CoinSolver Class Reference

Implements a solve method for the Coin solvers. More...

#include <CoinSolver.h>

Inheritance diagram for CoinSolver:

Inheritance graph
[legend]
Collaboration diagram for CoinSolver:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CoinSolver ()
 The class contructor.
 ~CoinSolver ()
 The class destructor.
virtual void solve () throw (ErrorClass)
 The implementation of the virtual functions.
bool optimize ()
 This function calls solver->loadProblem.
bool setCoinPackedMatrix ()
 Create a CoinPackedMatrix.
std::string getCoinSolverType (std::string osol_)
void dataEchoCheck ()
 Print out problem parameters.

Private Attributes

OsiSolverInterface * m_OsiSolver
 m_OsiSolver is the osi solver object -- in this case clp, glpk, cbc, or cplex
CoinPackedMatrix * m_CoinPackedMatrix
 m_CoinPackedMatrix is a Coin Packed Matrix ojbect
OSrLWriterosrlwriter
 osrlwriter object used to write osrl from and OSResult object

Detailed Description

Implements a solve method for the Coin solvers.

This class implements a solve method for the Coin solvers It reads an OSInstance object and puts into the Coin OSI format

Definition at line 58 of file CoinSolver.h.


Constructor & Destructor Documentation

CoinSolver::CoinSolver (  ) 

The class contructor.

Definition at line 42 of file CoinSolver.cpp.

References osrlwriter.

CoinSolver::~CoinSolver (  ) 

The class destructor.

Definition at line 49 of file CoinSolver.cpp.

References m_CoinPackedMatrix, m_OsiSolver, and osrlwriter.


Member Function Documentation

void CoinSolver::solve (  )  throw (ErrorClass) [virtual]

The implementation of the virtual functions.

Returns:
void.

Implements DefaultSolver.

Definition at line 64 of file CoinSolver.cpp.

References ErrorClass::errormsg, OSInstance::getConstraintNumber(), OSInstance::getLinearConstraintCoefficientNumber(), OSInstance::getNumberOfBinaryVariables(), OSInstance::getNumberOfIntegerVariables(), OSInstance::getNumberOfNonlinearExpressions(), OSInstance::getNumberOfQuadraticTerms(), OSInstance::getObjectiveNumber(), OSInstance::getVariableNumber(), m_OsiSolver, optimize(), DefaultSolver::osil, DefaultSolver::osinstance, DefaultSolver::osresult, DefaultSolver::osrl, osrlwriter, OSiLReader::readOSiL(), setCoinPackedMatrix(), OSResult::setGeneralMessage(), OSResult::setGeneralStatusType(), DefaultSolver::sSolverName, and OSrLWriter::writeOSrL().

string CoinSolver::optimize (  ) 

This function calls solver->loadProblem.

Returns:
true if there was not an optimization error.

Definition at line 203 of file CoinSolver.cpp.

References ErrorClass::errormsg, OSInstance::getConstraintLowerBounds(), OSInstance::getConstraintNumber(), OSInstance::getConstraintUpperBounds(), OSInstance::getDenseObjectiveCoefficients(), OSInstance::getInstanceName(), OSInstance::getNumberOfBinaryVariables(), OSInstance::getNumberOfIntegerVariables(), OSInstance::getObjectiveConstants(), OSInstance::getObjectiveMaxOrMins(), OSInstance::getObjectiveNumber(), OSInstance::getVariableLowerBounds(), OSInstance::getVariableNumber(), OSInstance::getVariableTypes(), OSInstance::getVariableUpperBounds(), m_CoinPackedMatrix, m_OsiSolver, DefaultSolver::osinstance, DefaultSolver::osresult, DefaultSolver::osrl, osrlwriter, OSResult::setAnOtherVariableResult(), OSResult::setConstraintNumber(), OSResult::setDualVariableValues(), OSResult::setGeneralMessage(), OSResult::setGeneralStatusType(), OSResult::setInstanceName(), OSResult::setNumberOfOtherVariableResult(), OSResult::setObjectiveNumber(), OSResult::setObjectiveValues(), OSResult::setPrimalVariableValues(), OSResult::setServiceName(), OSResult::setSolutionNumber(), OSResult::setSolutionStatus(), OSResult::setVariableNumber(), DefaultSolver::sSolverName, and OSrLWriter::writeOSrL().

Referenced by solve().

bool CoinSolver::setCoinPackedMatrix (  ) 

Create a CoinPackedMatrix.

Returns:
true if a CoinPackedMatrix successfully created.

Definition at line 179 of file CoinSolver.cpp.

References ErrorClass::errormsg, OSInstance::getConstraintNumber(), OSInstance::getLinearConstraintCoefficientMajor(), OSInstance::getLinearConstraintCoefficientNumber(), OSInstance::getLinearConstraintCoefficientsInColumnMajor(), OSInstance::getLinearConstraintCoefficientsInRowMajor(), OSInstance::getVariableNumber(), SparseMatrix::indexes, m_CoinPackedMatrix, DefaultSolver::osinstance, DefaultSolver::osresult, DefaultSolver::osrl, osrlwriter, OSResult::setGeneralMessage(), OSResult::setGeneralStatusType(), SparseMatrix::starts, SparseMatrix::values, and OSrLWriter::writeOSrL().

Referenced by solve().

std::string CoinSolver::getCoinSolverType ( std::string  osol_  ) 

Definition at line 347 of file CoinSolver.cpp.

References ErrorClass::errormsg, DefaultSolver::osresult, DefaultSolver::osrl, osrlwriter, OSResult::setGeneralMessage(), OSResult::setGeneralStatusType(), and OSrLWriter::writeOSrL().

string CoinSolver::dataEchoCheck (  ) 

Print out problem parameters.

Returns:
void

Definition at line 378 of file CoinSolver.cpp.

References OSInstance::getConstraintLowerBounds(), OSInstance::getConstraintNames(), OSInstance::getConstraintNumber(), OSInstance::getConstraintUpperBounds(), OSInstance::getDenseObjectiveCoefficients(), OSInstance::getInstanceDescription(), OSInstance::getInstanceName(), OSInstance::getInstanceSource(), OSInstance::getObjectiveMaxOrMins(), OSInstance::getVariableLowerBounds(), OSInstance::getVariableNames(), OSInstance::getVariableNumber(), OSInstance::getVariableTypes(), OSInstance::getVariableUpperBounds(), OSInstance::instanceData, m_CoinPackedMatrix, Objectives::numberOfObjectives, Objectives::obj, InstanceData::objectives, and DefaultSolver::osinstance.


Member Data Documentation

OsiSolverInterface* CoinSolver::m_OsiSolver [private]

m_OsiSolver is the osi solver object -- in this case clp, glpk, cbc, or cplex

Definition at line 112 of file CoinSolver.h.

Referenced by optimize(), solve(), and ~CoinSolver().

CoinPackedMatrix* CoinSolver::m_CoinPackedMatrix [private]

m_CoinPackedMatrix is a Coin Packed Matrix ojbect

Definition at line 117 of file CoinSolver.h.

Referenced by dataEchoCheck(), optimize(), setCoinPackedMatrix(), and ~CoinSolver().

OSrLWriter* CoinSolver::osrlwriter [private]

osrlwriter object used to write osrl from and OSResult object

Definition at line 120 of file CoinSolver.h.

Referenced by CoinSolver(), getCoinSolverType(), optimize(), setCoinPackedMatrix(), solve(), and ~CoinSolver().


The documentation for this class was generated from the following files:
Generated on Thu May 15 22:15:32 2008 by  doxygen 1.4.7