DART  6.7.3
dart::optimizer::IpoptSolver Class Reference

class IpoptSolver More...

#include <IpoptSolver.hpp>

Inheritance diagram for dart::optimizer::IpoptSolver:
dart::optimizer::Solver

Public Member Functions

 IpoptSolver (const Solver::Properties &_properties=Solver::Properties())
 Default constructor. More...
 
 IpoptSolver (std::shared_ptr< Problem > _problem)
 Alternative Constructor. More...
 
virtual ~IpoptSolver ()
 Destructor. More...
 
bool solve () override
 Solve optimization problem. More...
 
std::string getType () const override
 Get the type (implementation) of this Solver. More...
 
std::shared_ptr< Solverclone () const override
 Create an identical clone of this Solver. More...
 
const Ipopt::SmartPtr< Ipopt::IpoptApplication > & getApplication ()
 Get the application interface for this IpoptSolver. More...
 
Ipopt::SmartPtr< const Ipopt::IpoptApplication > getApplication () const
 Get a const application interface for this IpoptSolver. More...
 
void setProperties (const Properties &_properties)
 Set the generic Properties of this Solver. More...
 
const PropertiesgetSolverProperties () const
 Get the generic Properties of this Solver. More...
 
void copy (const Solver &_otherSolver)
 Copy the generic Properties of another Solver. More...
 
virtual void setProblem (std::shared_ptr< Problem > _newProblem)
 Set the nonlinear optimization problem. More...
 
std::shared_ptr< ProblemgetProblem () const
 Get nonlinear optimization problem. More...
 
virtual void setTolerance (double _newTolerance)
 Set the maximum step size allowed for the Problem to be considered converged. More...
 
double getTolerance () const
 Get the maximum step size allowed for the Problem to be considered converged. More...
 
virtual void setNumMaxIterations (std::size_t _newMax)
 Set the maximum number of iterations that the Solver should use. More...
 
std::size_t getNumMaxIterations () const
 Get the maximum number of iterations that the Solver should use. More...
 
virtual void setIterationsPerPrint (std::size_t _newRatio)
 Set the number of iterations that should pass between printing progress to the terminal. More...
 
std::size_t getIterationsPerPrint () const
 Get the number of iterations that should pass between printing progress to the terminal. More...
 
virtual void setOutStream (std::ostream *_os)
 Set the output stream that prints the Solver's progress. More...
 
std::ostream * getOutStream () const
 Get the output stream that prints the Solver's progress. More...
 
virtual void setPrintFinalResult (bool _print)
 Set to true if the final result should be printed to the terminal. More...
 
bool getPrintFinalResult () const
 Returns true if the final result should be printed to the terminal. More...
 
virtual void setResultFileName (const std::string &_resultFile)
 Set the name of the file that results should be printed to. More...
 
const std::string & getResultFileName () const
 Get the name of the file that results should be printed to. More...
 

Protected Attributes

Properties mProperties
 

Private Member Functions

 IpoptSolver (const Properties &_properties, const Ipopt::SmartPtr< Ipopt::IpoptApplication > &_app)
 Constructor used during cloning. More...
 

Private Attributes

Ipopt::SmartPtr< Ipopt::TNLP > mNlp
 IPOPT nonlinear programming problem. More...
 
Ipopt::SmartPtr< Ipopt::IpoptApplication > mIpoptApp
 Main application class for making calls to Ipopt. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ IpoptSolver() [1/3]

dart::optimizer::IpoptSolver::IpoptSolver ( const Solver::Properties _properties = Solver::Properties())

Default constructor.

◆ IpoptSolver() [2/3]

dart::optimizer::IpoptSolver::IpoptSolver ( std::shared_ptr< Problem _problem)
explicit

Alternative Constructor.

◆ ~IpoptSolver()

dart::optimizer::IpoptSolver::~IpoptSolver ( )
virtual

Destructor.

◆ IpoptSolver() [3/3]

dart::optimizer::IpoptSolver::IpoptSolver ( const Properties _properties,
const Ipopt::SmartPtr< Ipopt::IpoptApplication > &  _app 
)
private

Constructor used during cloning.

Member Function Documentation

◆ clone()

std::shared_ptr< Solver > dart::optimizer::IpoptSolver::clone ( ) const
overridevirtual

Create an identical clone of this Solver.

Implements dart::optimizer::Solver.

◆ copy()

void dart::optimizer::Solver::copy ( const Solver _otherSolver)
inherited

Copy the generic Properties of another Solver.

◆ getApplication() [1/2]

const Ipopt::SmartPtr< Ipopt::IpoptApplication > & dart::optimizer::IpoptSolver::getApplication ( )

Get the application interface for this IpoptSolver.

◆ getApplication() [2/2]

Ipopt::SmartPtr< const Ipopt::IpoptApplication > dart::optimizer::IpoptSolver::getApplication ( ) const

Get a const application interface for this IpoptSolver.

◆ getIterationsPerPrint()

std::size_t dart::optimizer::Solver::getIterationsPerPrint ( ) const
inherited

Get the number of iterations that should pass between printing progress to the terminal.

A value of 0 means there will be no printing.

◆ getNumMaxIterations()

std::size_t dart::optimizer::Solver::getNumMaxIterations ( ) const
inherited

Get the maximum number of iterations that the Solver should use.

◆ getOutStream()

std::ostream * dart::optimizer::Solver::getOutStream ( ) const
inherited

Get the output stream that prints the Solver's progress.

◆ getPrintFinalResult()

bool dart::optimizer::Solver::getPrintFinalResult ( ) const
inherited

Returns true if the final result should be printed to the terminal.

◆ getProblem()

std::shared_ptr< Problem > dart::optimizer::Solver::getProblem ( ) const
inherited

Get nonlinear optimization problem.

◆ getResultFileName()

const std::string & dart::optimizer::Solver::getResultFileName ( ) const
inherited

Get the name of the file that results should be printed to.

An empty string indicates that results should not be printed to a file.

◆ getSolverProperties()

const Solver::Properties & dart::optimizer::Solver::getSolverProperties ( ) const
inherited

Get the generic Properties of this Solver.

◆ getTolerance()

double dart::optimizer::Solver::getTolerance ( ) const
inherited

Get the maximum step size allowed for the Problem to be considered converged.

◆ getType()

std::string dart::optimizer::IpoptSolver::getType ( ) const
overridevirtual

Get the type (implementation) of this Solver.

Implements dart::optimizer::Solver.

◆ setIterationsPerPrint()

void dart::optimizer::Solver::setIterationsPerPrint ( std::size_t  _newRatio)
virtualinherited

Set the number of iterations that should pass between printing progress to the terminal.

Use 0 for no printing.

◆ setNumMaxIterations()

void dart::optimizer::Solver::setNumMaxIterations ( std::size_t  _newMax)
virtualinherited

Set the maximum number of iterations that the Solver should use.

◆ setOutStream()

void dart::optimizer::Solver::setOutStream ( std::ostream *  _os)
virtualinherited

Set the output stream that prints the Solver's progress.

◆ setPrintFinalResult()

void dart::optimizer::Solver::setPrintFinalResult ( bool  _print)
virtualinherited

Set to true if the final result should be printed to the terminal.

◆ setProblem()

void dart::optimizer::Solver::setProblem ( std::shared_ptr< Problem _newProblem)
virtualinherited

Set the nonlinear optimization problem.

◆ setProperties()

void dart::optimizer::Solver::setProperties ( const Properties _properties)
inherited

Set the generic Properties of this Solver.

◆ setResultFileName()

void dart::optimizer::Solver::setResultFileName ( const std::string &  _resultFile)
virtualinherited

Set the name of the file that results should be printed to.

Use an empty string to indicate that results should not be printed to a file.

◆ setTolerance()

void dart::optimizer::Solver::setTolerance ( double  _newTolerance)
virtualinherited

Set the maximum step size allowed for the Problem to be considered converged.

◆ solve()

bool dart::optimizer::IpoptSolver::solve ( )
overridevirtual

Solve optimization problem.

Implements dart::optimizer::Solver.

Member Data Documentation

◆ mIpoptApp

Ipopt::SmartPtr<Ipopt::IpoptApplication> dart::optimizer::IpoptSolver::mIpoptApp
private

Main application class for making calls to Ipopt.

◆ mNlp

Ipopt::SmartPtr<Ipopt::TNLP> dart::optimizer::IpoptSolver::mNlp
private

IPOPT nonlinear programming problem.

◆ mProperties

Properties dart::optimizer::Solver::mProperties
protectedinherited