11#ifndef BonBqpdSolver_H
12#define BonBqpdSolver_H
31 const std::string &name):
41 static std::string errorNames_[1];
42 static std::string solverName_;
98 throw CoinError(__PRETTY_FUNCTION__,
"",
"Not implemented");
136 if (
Ipopt::IsValid(cached_)) cached_->iprint = default_log_level_;
169 Times(): numsolve(0), create(0), solve(0), resolve(0), warm_start(0), pivots(0){
172 Times & operator +=(Times &rhs){
173 numsolve += rhs.numsolve;
174 create += rhs.create;
176 resolve += rhs.resolve;
177 warm_start += rhs.warm_start;
178 pivots += rhs.pivots;
196 double fillin_factor_;
202 static int reinit_freq_;
240 fint kk,ll,mxws,mxlws;
248 fint irh1,na,na1,nb,nb1,ka1,kb1,kc1,irg1,lu1,lv,lv1,ll1;
261 fint ns,ns1,nt,nt1,nu,nu1,nx,nx1,np,np1,nprof,lc;
262 fint lc1,li,li1,lm,lm1,lp_,lp1,lq,lq1,lr,lr1,ls_,ls1,lt,lt1;
264 fint m1,m2,mp,mq,lastr,irow;
294 bool use_warm_start_in_cache_;
295 bool bad_warm_start_info_;
303 double* fillin_factor_;
327 haveHotStart_(false),
339 use_warm_start_in_cache_(false),
340 bad_warm_start_info_(false),
347 int kmax_ipt,
int mlp_ipt,
double* fillin_factor):
362 haveHotStart_(false),
375 use_warm_start_in_cache_(false),
376 bad_warm_start_info_(false),
380 initialize(tqp,
options, kmax_ipt, mlp_ipt, fillin_factor);
386 int kmax_ipt,
int mlp_ipt,
double* fillin_factor);
388 void re_initialize();
396 void unmarkHotStart();
399 void copyFromHotStart();
409 static std::string solverName_;
412 int default_log_level_;
417 Times ×(){
return cached_->times_;}
IPOPT_DEPRECATED typedef ipindex ipfint
virtual ~UnsolvedBqpdError()
UnsolvedBqpdError(int errorNum, Ipopt::SmartPtr< TMINLP2TNLP > model, const std::string &name)
virtual const std::string & errorName() const
Get the string corresponding to error.
virtual const std::string & solverName() const
Return the name of the solver.
virtual Ipopt::SmartPtr< TNLPSolver > clone()
Virtual copy constructor.
virtual UnsolvedError * newUnsolvedError(int num, Ipopt::SmartPtr< TMINLP2TNLP > problem, std::string name)
virtual CoinWarmStart * getEmptyWarmStart() const
virtual void enableWarmStart()
Enable the warm start options in the solver.
virtual int errorCode() const
Error code (solver specific).
virtual bool Initialize(std::string params_file)
Initialize the TNLPSolver (read options from params_file)
void registerOptions()
Register this solver options into passed roptions.
virtual double CPUTime()
Get the CpuTime of the last optimization.
static void registerOptions(Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
Register this solver options into passed roptions.
virtual void forceSolverOutput(int log_level)
turn on all output from the solver
virtual ReturnStatus OptimizeTNLP(const Ipopt::SmartPtr< Ipopt::TNLP > &tnlp)
Solves a problem expresses as a TNLP.
virtual CoinWarmStart * getUsedWarmStart(Ipopt::SmartPtr< TMINLP2TNLP > tnlp) const
Get warm start used in last optimization.
ipfint fint
Fortran type for integer used in filter.
virtual ReturnStatus ReOptimizeTNLP(const Ipopt::SmartPtr< Ipopt::TNLP > &tnlp)
Resolves a problem expresses as a TNLP.
virtual bool Initialize(std::istream &is)
Initialize the TNLPSolver (read options from istream is)
virtual bool setWarmStart(const CoinWarmStart *warm, Ipopt::SmartPtr< TMINLP2TNLP > tnlp)
Set the warm start in the solver.
BqpdSolver(bool createEmpty=false)
Default constructor.
virtual CoinWarmStart * getWarmStart(Ipopt::SmartPtr< TMINLP2TNLP > tnlp) const
Get the warm start form the solver.
virtual bool warmStartIsValid(const CoinWarmStart *ws) const
Check that warm start object is valid.
virtual void disableWarmStart()
Disable the warm start options in the solver.
virtual void setOutputToDefault()
turn off all output from the solver
virtual bool markHotStart()
Safe the current state (after most recent solve that must have been successful) as hot start informat...
virtual int IterationCount()
Get the iteration count of the last optimization.
BqpdSolver(Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions, Ipopt::SmartPtr< Ipopt::OptionsList > options, Ipopt::SmartPtr< Ipopt::Journalist > journalist, const std::string &prefix)
Constructor with passed journalist, roptions, options.
virtual std::string & solverName()
Get the solver name.
double real
Fortran type for double.used in filter.
virtual ~BqpdSolver()
destructor
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< Bonmin::RegisteredOptions > roptions_
Registered Options.
Ipopt::SmartPtr< Ipopt::Journalist > journalist()
Get a pointer to a journalist.
Ipopt::SmartPtr< const Ipopt::OptionsList > options() const
Get the options (for getting their values).
Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions()
Get a pointer to RegisteredOptions (generally used to add new ones)
const char * prefix()
Get the prefix.
(C) Copyright International Business Machines Corporation 2007
bool IsValid(const SmartPtr< U > &smart_ptr)