BonminSolver Class Reference

The BonminSolver class solves problems using Ipopt. More...

#include <OSBonminSolver.h>

Inheritance diagram for BonminSolver:

Inheritance graph
[legend]
Collaboration diagram for BonminSolver:

Collaboration graph
[legend]
List of all members.

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< BonminProblemtminlp
OSiLReaderm_osilreader
 m_osilreader is an OSiLReader object used to create an osinstance from an osil string if needed

Private Attributes

OSrLWriterosrlwriter
std::string bonminErrorMsg

Detailed Description

The BonminSolver class solves problems using Ipopt.

Author:
Jun Ma, Guss Gassmann, Kipp Martin
Version:
1.0, 07/05/2008
Since:
OS 1.0
Remarks:
this class takes an OSiL instance and optimizes it using the COIN-OR Ipopt solver

Definition at line 240 of file OSBonminSolver.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.


Member Data Documentation

SmartPtr<BonminProblem> BonminSolver::tminlp

Definition at line 256 of file OSBonminSolver.h.

Referenced by buildSolverInstance(), and solve().

OSiLReader* BonminSolver::m_osilreader

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]

Definition at line 289 of file OSBonminSolver.h.

Referenced by BonminSolver().


The documentation for this class was generated from the following files:
Generated on Tue Sep 30 03:02:28 2008 by  doxygen 1.4.7