10 #ifndef FilterSolver_H
11 #define FilterSolver_H
31 const std::string &name):
34 virtual const std::string&
errorName()
const;
83 virtual bool Initialize(std::string params_file);
329 void load_ws(Coin::SmartPtr<FilterWarmStart>);
342 const Ipopt::Index* iCol,
int * permutation2,
343 fint *
lws,
int nnz_offset,
int n_offset,
344 Ipopt::TNLP::IndexStyleEnum index_style);
virtual const std::string & errorName() const
Get the string corresponding to error.
void fint fint fint real fint real real real real real real real real real fint real fint fint fint real fint * lws
Coin::SmartPtr< FilterWarmStart > warmF_
cachedInfo(const Ipopt::SmartPtr< Ipopt::TNLP > &tnlp, Ipopt::SmartPtr< Ipopt::OptionsList > &options)
Ipopt::SmartPtr< Ipopt::Journalist > journalist()
Get a pointer to a journalist.
TNLPSolver::ReturnStatus callOptimizer()
Perform optimization using data structure in cache.
Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions()
Get a pointer to RegisteredOptions (generally used to add new ones)
virtual CoinWarmStart * getUsedWarmStart(Ipopt::SmartPtr< TMINLP2TNLP > tnlp) const
Get warm start used in last optimization.
UnsolvedFilterError(int errorNum, Ipopt::SmartPtr< TMINLP2TNLP > model, const std::string &name)
int default_log_level_
To record default log level.
static std::string solverName_
This is a generic class for calling an NLP solver to solve a TNLP.
void optimize()
Optimize problem described by cache with filter.
virtual double CPUTime()
Get the CpuTime of the last optimization.
virtual int IterationCount()
Get the iteration count of the last optimization.
void initialize(const Ipopt::SmartPtr< Ipopt::TNLP > &tnlp, Ipopt::SmartPtr< Ipopt::OptionsList > &options)
Fill data structures for filter with info from tnlp.
virtual bool Initialize(std::string params_file)
Initialize the TNLPSolver (read options from params_file)
virtual ~UnsolvedFilterError()
virtual int errorCode() const
Error code (solver specific).
int errorNum() const
Return error number.
double cpuTime_
Elapsed CPU time in last optimization.
virtual ReturnStatus OptimizeTNLP(const Ipopt::SmartPtr< Ipopt::TNLP > &tnlp)
Solves a problem expresses as a TNLP.
virtual void enableWarmStart()
Solves a problem expresses as a TNLP.
FilterSolver(bool createEmpty=false)
Default constructor.
Warm start for filter interface.
FilterTypes::real real
Fortran type for double.used in filter.
static void TMat2RowPMat(bool symmetric, fint n, fint m, int nnz, const Ipopt::Index *iRow, const Ipopt::Index *iCol, int *permutation2, fint *lws, int nnz_offset, int n_offset, Ipopt::TNLP::IndexStyleEnum index_style)
Converting TMatrices into row-ordered matrices.
virtual CoinWarmStart * getWarmStart(Ipopt::SmartPtr< TMINLP2TNLP > tnlp) const
Get the warm start form the solver.
Cached information for reoptimizing.
virtual bool setWarmStart(const CoinWarmStart *warm, Ipopt::SmartPtr< TMINLP2TNLP > tnlp)
Set the warm start in the solver.
virtual void setOutputToDefault()
turn off all output from the solver
void load_ws(Coin::SmartPtr< FilterWarmStart >)
Load warm-start info into cache with filter.
virtual void disableWarmStart()
Solves a problem expresses as a TNLP.
Coin::SmartPtr< cachedInfo > cached_
Cached information on last problem optimized for reoptimization.
Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions_
Registered Options.
void fint fint fint real fint real real real real real real real real real fint real fint fint fint real * ws
virtual Ipopt::SmartPtr< TNLPSolver > clone()
Virtual copy constructor.
ReturnStatus
Standard return statuses for a solver.
FORTRAN_INTEGER_TYPE fint
Fortran type for integer used in filter.
bool use_warm_start_in_cache_
flag remembering if warm start information has been put into cache
static std::string errorNames_[1]
Ipopt::SmartPtr< const Ipopt::OptionsList > options() const
Get the options (for getting their values).
double real
Fortran type for double.used in filter.
virtual ReturnStatus ReOptimizeTNLP(const Ipopt::SmartPtr< Ipopt::TNLP > &tnlp)
Resolves a problem expresses as a TNLP.
We will throw this error when a problem is not solved.
void registerOptions()
Register this solver options into passed roptions.
virtual std::string & solverName()
Get the solver name.
virtual CoinWarmStart * getEmptyWarmStart() const
Solves a problem expresses as a TNLP.
virtual const std::string & solverName() const
Return the name of the solver.
int nnz
ATTENTION: Filter expect the jacobian to be ordered by row.
virtual void forceSolverOutput(int log_level)
turn on all output from the solver
Cached information for reoptimizing.
virtual UnsolvedError * newUnsolvedError(int num, Ipopt::SmartPtr< TMINLP2TNLP > problem, std::string name)
static std::string solverName_
const char * prefix()
Get the prefix.
virtual ~FilterSolver()
destructor
virtual bool warmStartIsValid(const CoinWarmStart *ws) const
Check that warm start object is valid.
FilterTypes::fint fint
Fortran type for integer used in filter.