Bonmin::IpoptSolver Class Reference

#include <BonIpoptSolver.hpp>

Inheritance diagram for Bonmin::IpoptSolver:

Inheritance graph
[legend]
Collaboration diagram for Bonmin::IpoptSolver:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual UnsolvedError * newUnsolvedError (int num, Ipopt::SmartPtr< TMINLP2TNLP > problem, std::string name)
 IpoptSolver (bool createEmpty=false)
 Constructor.
 IpoptSolver (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions, Ipopt::SmartPtr< Ipopt::OptionsList > options, Ipopt::SmartPtr< Ipopt::Journalist > journalist, const std::string &prefix)
 Constructor with Passed in journalist, registered options, options.
 IpoptSolver (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions, Ipopt::SmartPtr< Ipopt::OptionsList > options, Ipopt::SmartPtr< Ipopt::Journalist > journalist)
 Constructor with Passed in journalist, registered options, options.
 IpoptSolver (const IpoptSolver &other)
 Copy constructor.
virtual Ipopt::SmartPtr< TNLPSolverclone ()
 virtual constructor
virtual ~IpoptSolver ()
 Virtual destructor.
virtual bool Initialize (std::string params_file)
 Initialize the TNLPSolver (read options from params_file).
virtual bool Initialize (std::istream &is)
 Initialize the TNLPSolver (read options from istream is).
virtual double CPUTime ()
 Get the CpuTime of the last optimization.
virtual int IterationCount ()
 Get the iteration count of the last optimization.
virtual void setOutputToDefault ()
 turn off all output from the solver
virtual void forceSolverOutput (int log_level)
 turn on all output from the solver
virtual std::string & solverName ()
 Get the solver name.
Ipopt::ApplicationReturnStatus getOptStatus () const
 Return status of last optimization.
Ipopt::IpoptApplication & getIpoptApp ()
virtual int errorCode () const
 Error code (solver specific).
Solve methods
virtual TNLPSolver::ReturnStatus OptimizeTNLP (const Ipopt::SmartPtr< Ipopt::TNLP > &tnlp)
 Solves a problem expresses as a TNLP.
virtual TNLPSolver::ReturnStatus ReOptimizeTNLP (const Ipopt::SmartPtr< Ipopt::TNLP > &tnlp)
 Resolves a problem expresses as a TNLP.
virtual bool setWarmStart (const CoinWarmStart *warm, Ipopt::SmartPtr< TMINLP2TNLP > tnlp)
 Set the warm start in the solver.
virtual CoinWarmStart * getUsedWarmStart (Ipopt::SmartPtr< TMINLP2TNLP > tnlp) const
 Get warm start used in last optimization.
virtual CoinWarmStart * getWarmStart (Ipopt::SmartPtr< Bonmin::TMINLP2TNLP > tnlp) const
 Get the warm start form the solver.
virtual CoinWarmStart * getEmptyWarmStart () const
 Solves a problem expresses as a TNLP.
virtual bool warmStartIsValid (const CoinWarmStart *ws) const
 Check that warm start object is valid.
virtual void enableWarmStart ()
 Enable the warm start options in the solver.
virtual void disableWarmStart ()
 Disable the warm start options in the solver.

Static Public Member Functions

static void RegisterOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
 Register this solver options into passed roptions.

Private Member Functions

void setMinlpDefaults (Ipopt::SmartPtr< Ipopt::OptionsList > Options)
 Set default Ipopt parameters for use in a MINLP.
TNLPSolver::ReturnStatus solverReturnStatus (Ipopt::ApplicationReturnStatus optimization_status) const
 Are there a numerical difficulties?

Private Attributes

Ipopt::SmartPtr< Ipopt::IpoptApplication > app_
 Ipopt application.
Ipopt::ApplicationReturnStatus optimizationStatus_
 return status of last optimization.
bool problemHadZeroDimension_
 Flag to indicate if last problem solved had 0 dimension.
int warmStartStrategy_
 Warm start strategy :.
bool enable_warm_start_
 flag remembering if we want to use warm start option
bool optimized_before_
 flag remembering if we have call the Optimize method of the IpoptInterface before

Static Private Attributes

static std::string solverName_ = "Ipopt"

Classes

class  UnsolvedIpoptError

Detailed Description

Definition at line 18 of file BonIpoptSolver.hpp.


Constructor & Destructor Documentation

IpoptSolver::IpoptSolver ( bool  createEmpty = false  ) 

Constructor.

Definition at line 27 of file BonIpoptSolver.cpp.

References app_, Bonmin::TNLPSolver::journalist_, Bonmin::TNLPSolver::options_, and Bonmin::TNLPSolver::roptions_.

IpoptSolver::IpoptSolver ( Ipopt::SmartPtr< Bonmin::RegisteredOptions roptions,
Ipopt::SmartPtr< Ipopt::OptionsList >  options,
Ipopt::SmartPtr< Ipopt::Journalist >  journalist,
const std::string &  prefix 
)

Constructor with Passed in journalist, registered options, options.

Definition at line 39 of file BonIpoptSolver.cpp.

References app_, and Bonmin::TNLPSolver::roptions_.

IpoptSolver::IpoptSolver ( Ipopt::SmartPtr< Bonmin::RegisteredOptions roptions,
Ipopt::SmartPtr< Ipopt::OptionsList >  options,
Ipopt::SmartPtr< Ipopt::Journalist >  journalist 
)

Constructor with Passed in journalist, registered options, options.

Definition at line 54 of file BonIpoptSolver.cpp.

References app_, and Bonmin::TNLPSolver::roptions_.

IpoptSolver::IpoptSolver ( const IpoptSolver other  ) 

Copy constructor.

Definition at line 70 of file BonIpoptSolver.cpp.

References app_, Bonmin::TNLPSolver::journalist_, Bonmin::TNLPSolver::options_, and Bonmin::TNLPSolver::roptions_.

IpoptSolver::~IpoptSolver (  )  [virtual]

Virtual destructor.

Definition at line 67 of file BonIpoptSolver.cpp.


Member Function Documentation

virtual UnsolvedError* Bonmin::IpoptSolver::newUnsolvedError ( int  num,
Ipopt::SmartPtr< TMINLP2TNLP problem,
std::string  name 
) [inline, virtual]

Implements Bonmin::TNLPSolver.

Definition at line 39 of file BonIpoptSolver.hpp.

Ipopt::SmartPtr< TNLPSolver > IpoptSolver::clone (  )  [virtual]

virtual constructor

Implements Bonmin::TNLPSolver.

Definition at line 82 of file BonIpoptSolver.cpp.

References IpoptSolver::IpoptSolver().

bool IpoptSolver::Initialize ( std::string  params_file  )  [virtual]

Initialize the TNLPSolver (read options from params_file).

Implements Bonmin::TNLPSolver.

Definition at line 92 of file BonIpoptSolver.cpp.

References prefix.

bool IpoptSolver::Initialize ( std::istream &  is  )  [virtual]

Initialize the TNLPSolver (read options from istream is).

Implements Bonmin::TNLPSolver.

Definition at line 106 of file BonIpoptSolver.cpp.

References prefix.

TNLPSolver::ReturnStatus IpoptSolver::OptimizeTNLP ( const Ipopt::SmartPtr< Ipopt::TNLP > &  tnlp  )  [virtual]

Solves a problem expresses as a TNLP.

Implements Bonmin::TNLPSolver.

Definition at line 120 of file BonIpoptSolver.cpp.

References BonminAbortAll.

TNLPSolver::ReturnStatus IpoptSolver::ReOptimizeTNLP ( const Ipopt::SmartPtr< Ipopt::TNLP > &  tnlp  )  [virtual]

Resolves a problem expresses as a TNLP.

Implements Bonmin::TNLPSolver.

Definition at line 165 of file BonIpoptSolver.cpp.

References BonminAbortAll.

bool IpoptSolver::setWarmStart ( const CoinWarmStart *  warm,
Ipopt::SmartPtr< TMINLP2TNLP tnlp 
) [virtual]

Set the warm start in the solver.

Implements Bonmin::TNLPSolver.

Definition at line 350 of file BonIpoptSolver.cpp.

References ws.

CoinWarmStart * IpoptSolver::getUsedWarmStart ( Ipopt::SmartPtr< TMINLP2TNLP tnlp  )  const [virtual]

Get warm start used in last optimization.

Implements Bonmin::TNLPSolver.

Definition at line 327 of file BonIpoptSolver.cpp.

virtual CoinWarmStart* Bonmin::IpoptSolver::getWarmStart ( Ipopt::SmartPtr< Bonmin::TMINLP2TNLP tnlp  )  const [virtual]

Get the warm start form the solver.

CoinWarmStart * IpoptSolver::getEmptyWarmStart (  )  const [virtual]

Solves a problem expresses as a TNLP.

Implements Bonmin::TNLPSolver.

Definition at line 393 of file BonIpoptSolver.cpp.

bool IpoptSolver::warmStartIsValid ( const CoinWarmStart *  ws  )  const [virtual]

Check that warm start object is valid.

Implements Bonmin::TNLPSolver.

Definition at line 384 of file BonIpoptSolver.cpp.

References Bonmin::IpoptWarmStart::empty().

void IpoptSolver::enableWarmStart (  )  [virtual]

Enable the warm start options in the solver.

Implements Bonmin::TNLPSolver.

Definition at line 399 of file BonIpoptSolver.cpp.

void IpoptSolver::disableWarmStart (  )  [virtual]

Disable the warm start options in the solver.

Implements Bonmin::TNLPSolver.

Definition at line 406 of file BonIpoptSolver.cpp.

double IpoptSolver::CPUTime (  )  [virtual]

Get the CpuTime of the last optimization.

Implements Bonmin::TNLPSolver.

Definition at line 209 of file BonIpoptSolver.cpp.

int IpoptSolver::IterationCount (  )  [virtual]

Get the iteration count of the last optimization.

Implements Bonmin::TNLPSolver.

Definition at line 229 of file BonIpoptSolver.cpp.

void IpoptSolver::setOutputToDefault (  )  [virtual]

turn off all output from the solver

Implements Bonmin::TNLPSolver.

Definition at line 414 of file BonIpoptSolver.cpp.

void IpoptSolver::forceSolverOutput ( int  log_level  )  [virtual]

turn on all output from the solver

Implements Bonmin::TNLPSolver.

Definition at line 421 of file BonIpoptSolver.cpp.

virtual std::string& Bonmin::IpoptSolver::solverName (  )  [inline, virtual]

Get the solver name.

Implements Bonmin::TNLPSolver.

Definition at line 123 of file BonIpoptSolver.hpp.

References solverName_.

static void Bonmin::IpoptSolver::RegisterOptions ( Ipopt::SmartPtr< Bonmin::RegisteredOptions roptions  )  [inline, static]

Register this solver options into passed roptions.

Reimplemented from Bonmin::TNLPSolver.

Definition at line 129 of file BonIpoptSolver.hpp.

Ipopt::ApplicationReturnStatus Bonmin::IpoptSolver::getOptStatus (  )  const [inline]

Return status of last optimization.

Definition at line 137 of file BonIpoptSolver.hpp.

References optimizationStatus_.

Ipopt::IpoptApplication& Bonmin::IpoptSolver::getIpoptApp (  )  [inline]

Definition at line 142 of file BonIpoptSolver.hpp.

References app_.

virtual int Bonmin::IpoptSolver::errorCode (  )  const [inline, virtual]

Error code (solver specific).

Implements Bonmin::TNLPSolver.

Definition at line 147 of file BonIpoptSolver.hpp.

References optimizationStatus_.

void IpoptSolver::setMinlpDefaults ( Ipopt::SmartPtr< Ipopt::OptionsList >  Options  )  [private]

Set default Ipopt parameters for use in a MINLP.

Definition at line 250 of file BonIpoptSolver.cpp.

References e.

TNLPSolver::ReturnStatus IpoptSolver::solverReturnStatus ( Ipopt::ApplicationReturnStatus  optimization_status  )  const [private]

Are there a numerical difficulties?

Definition at line 284 of file BonIpoptSolver.cpp.


Member Data Documentation

Ipopt::SmartPtr<Ipopt::IpoptApplication> Bonmin::IpoptSolver::app_ [private]

Ipopt application.

Definition at line 159 of file BonIpoptSolver.hpp.

Referenced by getIpoptApp(), and IpoptSolver().

Ipopt::ApplicationReturnStatus Bonmin::IpoptSolver::optimizationStatus_ [private]

return status of last optimization.

Definition at line 161 of file BonIpoptSolver.hpp.

Referenced by errorCode(), and getOptStatus().

bool Bonmin::IpoptSolver::problemHadZeroDimension_ [private]

Flag to indicate if last problem solved had 0 dimension.

(in this case Ipopt was not called).

Definition at line 166 of file BonIpoptSolver.hpp.

int Bonmin::IpoptSolver::warmStartStrategy_ [private]

Warm start strategy :.

  1. no warm start,
  2. simple warm start (optimal point),
  3. more elaborate strategies (interior point...).

Definition at line 175 of file BonIpoptSolver.hpp.

bool Bonmin::IpoptSolver::enable_warm_start_ [private]

flag remembering if we want to use warm start option

Definition at line 178 of file BonIpoptSolver.hpp.

bool Bonmin::IpoptSolver::optimized_before_ [private]

flag remembering if we have call the Optimize method of the IpoptInterface before

Definition at line 182 of file BonIpoptSolver.hpp.

std::string IpoptSolver::solverName_ = "Ipopt" [static, private]

Definition at line 184 of file BonIpoptSolver.hpp.

Referenced by solverName().


The documentation for this class was generated from the following files:
Generated on Thu Sep 22 03:14:44 2011 by  doxygen 1.4.7