Bonmin
1.7
|
#include <BonIpoptSolver.hpp>
Classes | |
class | UnsolvedIpoptError |
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 < TNLPSolver > | clone () |
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 | 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 |
get Bonmin return status from Ipopt one. | |
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_ |
Definition at line 18 of file BonIpoptSolver.hpp.
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, | ||
const std::string & | prefix | ||
) |
Constructor with Passed in journalist, registered options, options.
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.
Bonmin::IpoptSolver::IpoptSolver | ( | const IpoptSolver & | other | ) |
Copy constructor.
virtual Bonmin::IpoptSolver::~IpoptSolver | ( | ) | [virtual] |
Virtual destructor.
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.
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::setOutputToDefault | ( | ) | [virtual] |
turn off all output from the solver
Implements Bonmin::TNLPSolver.
virtual void Bonmin::IpoptSolver::forceSolverOutput | ( | int | log_level | ) | [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 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 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] |
Ipopt::SmartPtr<Ipopt::IpoptApplication> Bonmin::IpoptSolver::app_ [private] |
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 :
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 Bonmin::IpoptSolver::solverName_ [static, private] |
Definition at line 184 of file BonIpoptSolver.hpp.
Referenced by solverName().