10 #ifndef IpoptSolver_HPP
11 #define IpoptSolver_HPP
35 static std::string errorNames [17];
36 static std::string solverName_;
55 const std::string &
prefix);
139 return optimizationStatus_;
149 return (
int) optimizationStatus_;
161 Ipopt::ApplicationReturnStatus optimizationStatus_;
166 bool problemHadZeroDimension_;
175 int warmStartStrategy_;
178 bool enable_warm_start_;
182 bool optimized_before_;
184 static std::string solverName_;
virtual ~UnsolvedIpoptError()
virtual const std::string & solverName() const
Return the name of the solver.
virtual const std::string & errorName() const
Get the string corresponding to error.
UnsolvedIpoptError(int errorNum, Ipopt::SmartPtr< TMINLP2TNLP > problem, std::string name)
virtual CoinWarmStart * getUsedWarmStart(Ipopt::SmartPtr< TMINLP2TNLP > tnlp) const
Get warm start used in last optimization.
virtual bool Initialize(std::istream &is)
Initialize the TNLPSolver (read options from istream is)
virtual int errorCode() const
Error code (solver specific).
virtual TNLPSolver::ReturnStatus ReOptimizeTNLP(const Ipopt::SmartPtr< Ipopt::TNLP > &tnlp)
Resolves a problem expresses as a TNLP.
virtual void forceSolverOutput(int log_level)
turn on all output from the solver
virtual bool setWarmStart(const CoinWarmStart *warm, Ipopt::SmartPtr< TMINLP2TNLP > tnlp)
Set the warm start in the solver.
IpoptSolver(bool createEmpty=false)
Constructor.
IpoptSolver(const IpoptSolver &other)
Copy constructor.
virtual CoinWarmStart * getEmptyWarmStart() const
Ipopt::IpoptApplication & getIpoptApp()
virtual Ipopt::SmartPtr< TNLPSolver > clone()
virtual copy constructor
virtual bool Initialize(std::string params_file)
Initialize the TNLPSolver (read options from params_file)
virtual UnsolvedError * newUnsolvedError(int num, Ipopt::SmartPtr< TMINLP2TNLP > problem, std::string name)
virtual std::string & solverName()
Get the solver name.
static void RegisterOptions(Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
Register this solver options into passed roptions.
virtual int IterationCount()
Get the iteration count of the last optimization.
virtual void disableWarmStart()
Disable the warm start options in the solver.
virtual void setOutputToDefault()
turn off all output from the solver
virtual TNLPSolver::ReturnStatus OptimizeTNLP(const Ipopt::SmartPtr< Ipopt::TNLP > &tnlp)
Solves a problem expresses as a TNLP.
Ipopt::ApplicationReturnStatus getOptStatus() const
Return status of last optimization.
virtual bool warmStartIsValid(const CoinWarmStart *ws) const
Check that warm start object is valid.
virtual double CPUTime()
Get the CpuTime of the last optimization.
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 ~IpoptSolver()
Virtual destructor.
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.
virtual void enableWarmStart()
Enable the warm start options in the solver.
virtual CoinWarmStart * getWarmStart(Ipopt::SmartPtr< Bonmin::TMINLP2TNLP > tnlp) const
Get the warm start form the solver.
We will throw this error when a problem is not solved.
int errorNum() const
Return error number.
This is a generic class for calling an NLP solver to solve a TNLP.
ReturnStatus
Standard return statuses for a solver.
Ipopt::SmartPtr< const Ipopt::OptionsList > options() const
Get the options (for getting their values).
Ipopt::SmartPtr< Ipopt::Journalist > journalist()
Get a pointer to a journalist.
const char * prefix()
Get the prefix.
Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions()
Get a pointer to RegisteredOptions (generally used to add new ones)
static void RegisterAllIpoptOptions(const SmartPtr< RegisteredOptions > &roptions)
(C) Copyright International Business Machines Corporation 2007
U * GetRawPtr(const SmartPtr< U > &smart_ptr)