My Project
IpoptSolver Class Reference

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

#include <OSIpoptSolver.h>

Inheritance diagram for IpoptSolver:
DefaultSolver

Public Member Functions

 IpoptSolver ()
 the IpoptSolver class constructor
 
 ~IpoptSolver ()
 the IpoptSolver class destructor
 
virtual void solve ()
 solve results in an instance being read into the Ipopt data structures and optimize
 
virtual void buildSolverInstance ()
 The implementation of the virtual functions.
 
virtual void setSolverOptions ()
 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 Member Functions inherited from DefaultSolver
 DefaultSolver ()
 default constructor.
 
virtual ~DefaultSolver ()=0
 default destructor.
 

Public Attributes

Ipopt::SmartPtr< Ipopt::TNLP > nlp
 
Ipopt::SmartPtr< Ipopt::IpoptApplication > app
 
OSiLReaderm_osilreader
 m_osilreader is an OSiLReader object used to create an osinstance from an osil string if needed
 
OSoLReaderm_osolreader
 m_osolreader is an OSoLReader object used to create an osoption from an osol 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
 

Private Attributes

OSrLWriterosrlwriter
 
Methods to block default compiler methods.

The compiler automatically generates the following three methods.

Since the default compiler implementation is generally not what you want (for all but the most simple classes), we usually put the declarations of these methods in the private section and never implement them. This prevents the compiler from implementing an incorrect "default" behavior without us knowing. (See Scott Meyers book, "Effective C++")

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 167 of file OSIpoptSolver.h.

Constructor & Destructor Documentation

◆ IpoptSolver()

IpoptSolver::IpoptSolver ( )

the IpoptSolver class constructor

Definition at line 32 of file OSIpoptSolver.cpp.

◆ ~IpoptSolver()

IpoptSolver::~IpoptSolver ( )

the IpoptSolver class destructor

Definition at line 45 of file OSIpoptSolver.cpp.

Member Function Documentation

◆ solve()

void IpoptSolver::solve ( )
virtual

solve results in an instance being read into the Ipopt data structures and optimize

Implements DefaultSolver.

Definition at line 1010 of file OSIpoptSolver.cpp.

◆ buildSolverInstance()

void IpoptSolver::buildSolverInstance ( )
virtual

The implementation of the virtual functions.

Returns
void.

Implements DefaultSolver.

Definition at line 856 of file OSIpoptSolver.cpp.

◆ setSolverOptions()

void IpoptSolver::setSolverOptions ( )
virtual

The implementation of the virtual functions.

Returns
void.

Implements DefaultSolver.

Definition at line 895 of file OSIpoptSolver.cpp.

◆ dataEchoCheck()

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 1041 of file OSIpoptSolver.cpp.

Member Data Documentation

◆ nlp

Ipopt::SmartPtr<Ipopt::TNLP> IpoptSolver::nlp

Definition at line 177 of file OSIpoptSolver.h.

◆ app

Ipopt::SmartPtr<Ipopt::IpoptApplication> IpoptSolver::app

Definition at line 179 of file OSIpoptSolver.h.

◆ m_osilreader

OSiLReader* IpoptSolver::m_osilreader

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

Definition at line 210 of file OSIpoptSolver.h.

◆ m_osolreader

OSoLReader* IpoptSolver::m_osolreader

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

Definition at line 216 of file OSIpoptSolver.h.

◆ osrlwriter

OSrLWriter* IpoptSolver::osrlwriter
private

Definition at line 220 of file OSIpoptSolver.h.

◆ ipoptErrorMsg

std::string* IpoptSolver::ipoptErrorMsg
private

Definition at line 238 of file OSIpoptSolver.h.


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