#include <OSBonminSolver.h>
Inheritance diagram for BonminSolver:
Public Member Functions | |
BonminSolver () | |
the BonminSolver class constructor | |
~BonminSolver () | |
the IpoptSolver class destructor | |
virtual void | solve () throw (ErrorClass) |
solve results in an instance being read into the Bonmin data structrues and optimized | |
virtual void | buildSolverInstance () throw (ErrorClass) |
buildSolverInstance is a virtual function -- the actual solvers will implement their own solve method -- the solver instance is the instance the individual solver sees in its api | |
void | dataEchoCheck () |
use this for debugging, print out the instance that the solver thinks it has and compare this with the OSiL file | |
Public Attributes | |
SmartPtr< BonminProblem > | tminlp |
OSiLReader * | m_osilreader |
m_osilreader is an OSiLReader object used to create an osinstance from an osil string if needed | |
Private Attributes | |
OSrLWriter * | osrlwriter |
std::string | bonminErrorMsg |
Definition at line 240 of file OSBonminSolver.h.
BonminSolver::BonminSolver | ( | ) |
the BonminSolver class constructor
Definition at line 33 of file OSBonminSolver.cpp.
References bonminErrorMsg, m_osilreader, DefaultSolver::osresult, and osrlwriter.
BonminSolver::~BonminSolver | ( | ) |
the IpoptSolver class destructor
Definition at line 41 of file OSBonminSolver.cpp.
References m_osilreader, DefaultSolver::osresult, and osrlwriter.
void BonminSolver::solve | ( | ) | throw (ErrorClass) [virtual] |
solve results in an instance being read into the Bonmin data structrues and optimized
Implements DefaultSolver.
Definition at line 602 of file OSBonminSolver.cpp.
References buildSolverInstance(), ErrorClass::errormsg, OSInstance::getNumberOfNonlinearExpressions(), OSInstance::getNumberOfQuadraticTerms(), OSInstance::getObjectiveNumber(), OSInstance::getVariableNumber(), Bonmin::BonminSetup::initialize(), Bonmin::BabSetupBase::initializeOptionsAndJournalist(), OSInstance::instanceData, Objective::maxOrMin, Objectives::obj, InstanceData::objectives, Bonmin::BabSetupBase::options(), DefaultSolver::osinstance, DefaultSolver::osresult, DefaultSolver::osrl, osrlwriter, Bonmin::BabSetupBase::readOptionsFile(), Bonmin::BabSetupBase::readOptionsString(), Bonmin::BabSetupBase::roptions(), OSResult::setGeneralMessage(), OSResult::setGeneralStatusType(), tminlp, and OSrLWriter::writeOSrL().
void BonminSolver::buildSolverInstance | ( | ) | throw (ErrorClass) [virtual] |
buildSolverInstance is a virtual function -- the actual solvers will implement their own solve method -- the solver instance is the instance the individual solver sees in its api
Implements DefaultSolver.
Definition at line 577 of file OSBonminSolver.cpp.
References DefaultSolver::bCallbuildSolverInstance, ErrorClass::errormsg, m_osilreader, DefaultSolver::osil, DefaultSolver::osinstance, DefaultSolver::osresult, DefaultSolver::osrl, osrlwriter, OSiLReader::readOSiL(), OSResult::setGeneralMessage(), OSResult::setGeneralStatusType(), tminlp, and OSrLWriter::writeOSrL().
Referenced by solve().
void BonminSolver::dataEchoCheck | ( | ) |
use this for debugging, print out the instance that the solver thinks it has and compare this with the OSiL file
Definition at line 717 of file OSBonminSolver.cpp.
References QuadraticTerms::coefficients, OSInstance::getConstraintLowerBounds(), OSInstance::getConstraintNames(), OSInstance::getConstraintNumber(), OSInstance::getConstraintUpperBounds(), OSInstance::getDenseObjectiveCoefficients(), OSInstance::getInstanceDescription(), OSInstance::getInstanceName(), OSInstance::getInstanceSource(), OSInstance::getLinearConstraintCoefficientNumber(), OSInstance::getLinearConstraintCoefficientsInColumnMajor(), OSInstance::getNumberOfQuadraticTerms(), OSInstance::getObjectiveMaxOrMins(), OSInstance::getQuadraticTerms(), OSInstance::getVariableLowerBounds(), OSInstance::getVariableNames(), OSInstance::getVariableNumber(), OSInstance::getVariableTypes(), OSInstance::getVariableUpperBounds(), SparseMatrix::indexes, OSInstance::instanceData, Objectives::numberOfObjectives, Objectives::obj, InstanceData::objectives, DefaultSolver::osinstance, QuadraticTerms::rowIndexes, SparseMatrix::starts, SparseMatrix::values, QuadraticTerms::varOneIndexes, and QuadraticTerms::varTwoIndexes.
SmartPtr<BonminProblem> BonminSolver::tminlp |
m_osilreader is an OSiLReader object used to create an osinstance from an osil string if needed
Definition at line 282 of file OSBonminSolver.h.
Referenced by BonminSolver(), buildSolverInstance(), and ~BonminSolver().
OSrLWriter* BonminSolver::osrlwriter [private] |
Definition at line 286 of file OSBonminSolver.h.
Referenced by BonminSolver(), buildSolverInstance(), solve(), and ~BonminSolver().
std::string BonminSolver::bonminErrorMsg [private] |