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