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)
 Constructor with Passed in journalist, registered options, options.
virtual Ipopt::SmartPtr< TNLPSolverclone ()
 virtual copy 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 turnOffOutput ()
 turn off all output from the solver
virtual void turnOnOutput ()
 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::IpoptApplicationgetIpoptApp ()
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 CoinWarmStartgetUsedWarmStart (Ipopt::SmartPtr< TMINLP2TNLP > tnlp) const
 Get warm start used in last optimization.
virtual CoinWarmStartgetWarmStart (Ipopt::SmartPtr< Bonmin::TMINLP2TNLP > tnlp) const
 Get the warm start form the solver.
virtual CoinWarmStartgetEmptyWarmStart () 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
 get Bonmin return status from Ipopt one.

Private Attributes

Ipopt::SmartPtr< Ipopt::IpoptApplicationapp_
 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_

Classes

class  UnsolvedIpoptError

Detailed Description

Definition at line 18 of file BonIpoptSolver.hpp.


Constructor & Destructor Documentation

Bonmin::IpoptSolver::IpoptSolver ( bool  createEmpty = false  ) 

Constructor.

Bonmin::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.

virtual Bonmin::IpoptSolver::~IpoptSolver (  )  [virtual]

Virtual destructor.


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.

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

virtual copy constructor

Implements Bonmin::TNLPSolver.

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

Initialize the TNLPSolver (read options from params_file).

Implements Bonmin::TNLPSolver.

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

Initialize the TNLPSolver (read options from istream is).

Implements Bonmin::TNLPSolver.

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

Solves a problem expresses as a TNLP.

Implements Bonmin::TNLPSolver.

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

Resolves a problem expresses as a TNLP.

Implements Bonmin::TNLPSolver.

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

Set the warm start in the solver.

Implements Bonmin::TNLPSolver.

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

Get warm start used in last optimization.

Implements Bonmin::TNLPSolver.

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

Get the warm start form the solver.

Implements Bonmin::TNLPSolver.

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

Solves a problem expresses as a TNLP.

Implements Bonmin::TNLPSolver.

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

Check that warm start object is valid.

Implements Bonmin::TNLPSolver.

virtual void Bonmin::IpoptSolver::enableWarmStart (  )  [virtual]

Enable the warm start options in the solver.

Implements Bonmin::TNLPSolver.

virtual void Bonmin::IpoptSolver::disableWarmStart (  )  [virtual]

Disable the warm start options in the solver.

Implements Bonmin::TNLPSolver.

virtual double Bonmin::IpoptSolver::CPUTime (  )  [virtual]

Get the CpuTime of the last optimization.

Implements Bonmin::TNLPSolver.

virtual int Bonmin::IpoptSolver::IterationCount (  )  [virtual]

Get the iteration count of the last optimization.

Implements Bonmin::TNLPSolver.

virtual void Bonmin::IpoptSolver::turnOffOutput (  )  [virtual]

turn off all output from the solver

Implements Bonmin::TNLPSolver.

virtual void Bonmin::IpoptSolver::turnOnOutput (  )  [virtual]

turn on all output from the solver

Implements Bonmin::TNLPSolver.

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

Get the solver name.

Implements Bonmin::TNLPSolver.

Definition at line 115 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 121 of file BonIpoptSolver.hpp.

References Ipopt::GetRawPtr(), Ipopt::IpoptApplication::RegisterAllIpoptOptions(), and Bonmin::TNLPSolver::roptions().

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

Return status of last optimization.

Definition at line 129 of file BonIpoptSolver.hpp.

References optimizationStatus_.

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

Definition at line 134 of file BonIpoptSolver.hpp.

References app_.

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

Error code (solver specific).

Implements Bonmin::TNLPSolver.

Definition at line 139 of file BonIpoptSolver.hpp.

References optimizationStatus_.

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

Set default Ipopt parameters for use in a MINLP.

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

get Bonmin return status from Ipopt one.


Member Data Documentation

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

Ipopt application.

Definition at line 151 of file BonIpoptSolver.hpp.

Referenced by getIpoptApp().

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

return status of last optimization.

Definition at line 153 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 158 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 167 of file BonIpoptSolver.hpp.

bool Bonmin::IpoptSolver::enable_warm_start_ [private]

flag remembering if we want to use warm start option

Definition at line 170 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 174 of file BonIpoptSolver.hpp.

std::string Bonmin::IpoptSolver::solverName_ [static, private]

Definition at line 176 of file BonIpoptSolver.hpp.

Referenced by solverName().


The documentation for this class was generated from the following file:
Generated on Thu Jun 26 03:21:41 2008 for Bonmin by  doxygen 1.4.7