- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# IpoptSolver Class Reference

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

`#include <OSIpoptSolver.h>`

Inheritance diagram for IpoptSolver:

[legend]
Collaboration diagram for IpoptSolver:

[legend]
List of all members.

## Public Member Functions
| IpoptSolver ()
| the IpoptSolver class constructor
| ~IpoptSolver ()
| the IpoptSolver class destructor
virtual void | solve () throw (ErrorClass)
| solve results in an instance being read into the Ipopt data structrues and optimized
virtual void | buildSolverInstance () throw (ErrorClass)
| The implementation of the virtual functions.
virtual void | setSolverOptions () throw (ErrorClass)
| The implementation of the virtual functions.
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< TNLP > | nlp
SmartPtr< IpoptApplication > | app
OSiLReader * | m_osilreader
| m_osilreader is an OSiLReader object used to create an osinstance from an osil string if needed
OSoLReader * | m_osolreader
| m_osolreader is an OSoLReader object used to create an osoption from an osol string if needed
## Private Attributes
OSrLWriter * | osrlwriter
std::string * | ipoptErrorMsg

## Detailed Description

The IpoptSolver class solves problems using Ipopt.

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 COIN-OR Ipopt solver

Definition at line 196 of file OSIpoptSolver.h.

## Constructor & Destructor Documentation

IpoptSolver::IpoptSolver | ( |  | ) |

the IpoptSolver class constructor

Definition at line 33 of file OSIpoptSolver.cpp.

References ipoptErrorMsg, m_osilreader, m_osolreader, DefaultSolver::osresult, and osrlwriter.

IpoptSolver::~IpoptSolver | ( |  | ) |

the IpoptSolver class destructor

Definition at line 41 of file OSIpoptSolver.cpp.

References ipoptErrorMsg, m_osilreader, m_osolreader, DefaultSolver::osresult, and osrlwriter.

## Member Function Documentation

void IpoptSolver::solve | ( |  | ) | throw (ErrorClass)`[virtual]`

solve results in an instance being read into the Ipopt data structrues and optimized

Implements DefaultSolver.

Definition at line 820 of file OSIpoptSolver.cpp.

References app, buildSolverInstance(), ErrorClass::errormsg, ipoptErrorMsg, nlp, DefaultSolver::osresult, DefaultSolver::osrl, osrlwriter, OSResult::setGeneralMessage(), OSResult::setGeneralStatusType(), setSolverOptions(), and OSrLWriter::writeOSrL().

Referenced by OSMatlab::solve().

void IpoptSolver::buildSolverInstance | ( |  | ) | throw (ErrorClass)`[virtual]`

The implementation of the virtual functions.

Returns:
  void.

Implements DefaultSolver.

Definition at line 793 of file OSIpoptSolver.cpp.

References app, DefaultSolver::bCallbuildSolverInstance, ErrorClass::errormsg, ipoptErrorMsg, m_osilreader, nlp, DefaultSolver::osil, DefaultSolver::osinstance, DefaultSolver::osoption, DefaultSolver::osresult, DefaultSolver::osrl, osrlwriter, OSiLReader::readOSiL(), OSResult::setGeneralMessage(), OSResult::setGeneralStatusType(), and OSrLWriter::writeOSrL().

Referenced by solve().

void IpoptSolver::setSolverOptions | ( |  | ) | throw (ErrorClass)`[virtual]`

The implementation of the virtual functions.

Returns:
  void.

Implements DefaultSolver.

Definition at line 728 of file OSIpoptSolver.cpp.

References app, DefaultSolver::bSetSolverOptions, ErrorClass::errormsg, OSInstance::getNumberOfQuadraticTerms(), OSOption::getNumberOfSolverOptions(), OSInstance::getObjectiveNumber(), OSOption::getSolverOptions(), OSInstance::instanceData, m_osolreader, Objective::maxOrMin, Objectives::obj, InstanceData::objectives, os_strtod(), DefaultSolver::osinstance, DefaultSolver::osol, DefaultSolver::osoption, DefaultSolver::osresult, DefaultSolver::osrl, osrlwriter, OSoLReader::readOSoL(), OSResult::setGeneralMessage(), OSResult::setGeneralStatusType(), and OSrLWriter::writeOSrL().

Referenced by solve().

void IpoptSolver::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 865 of file OSIpoptSolver.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<TNLP> IpoptSolver::nlp

Definition at line 207 of file OSIpoptSolver.h.

Referenced by buildSolverInstance(), and solve().

SmartPtr<IpoptApplication> IpoptSolver::app

Definition at line 209 of file OSIpoptSolver.h.

Referenced by buildSolverInstance(), setSolverOptions(), and solve().

OSiLReader* IpoptSolver::m_osilreader

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

Definition at line 239 of file OSIpoptSolver.h.

Referenced by buildSolverInstance(), IpoptSolver(), and ~IpoptSolver().

OSoLReader* IpoptSolver::m_osolreader

m_osolreader is an OSoLReader object used to create an osoption from an osol string if needed

Definition at line 245 of file OSIpoptSolver.h.

Referenced by IpoptSolver(), setSolverOptions(), and ~IpoptSolver().

OSrLWriter* IpoptSolver::osrlwriter`[private]`

Definition at line 249 of file OSIpoptSolver.h.

Referenced by buildSolverInstance(), IpoptSolver(), setSolverOptions(), solve(), and ~IpoptSolver().

std::string* IpoptSolver::ipoptErrorMsg`[private]`

Definition at line 267 of file OSIpoptSolver.h.

Referenced by buildSolverInstance(), IpoptSolver(), solve(), and ~IpoptSolver().

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

- /home/coin/SVN-release/OS-2.3.5/OS/src/OSSolverInterfaces/OSIpoptSolver.h
- /home/coin/SVN-release/OS-2.3.5/OS/src/OSSolverInterfaces/OSIpoptSolver.cpp
- /home/coin/SVN-release/OS-2.3.5/OS/v2.0/OSIpoptSolver.cpp