#include <BonBqpdSolver.hpp>
Inheritance diagram for Bonmin::BqpdSolver:
Public Types | |
typedef ipfint | fint |
Fortran type for integer used in filter. | |
typedef double | real |
Fortran type for double.used in filter. | |
Public Member Functions | |
virtual UnsolvedError * | newUnsolvedError (int num, Ipopt::SmartPtr< TMINLP2TNLP > problem, std::string name) |
BqpdSolver (bool createEmpty=false) | |
Default constructor. | |
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 | ~BqpdSolver () |
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 SmartPtr< TNLPSolver > | clone () |
Virtual copy constructor. | |
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. | |
void | registerOptions () |
Register this solver options into passed roptions. | |
virtual int | errorCode () const |
Error code (solver specific). | |
Solve methods | |
virtual ReturnStatus | OptimizeTNLP (const Ipopt::SmartPtr< Ipopt::TNLP > &tnlp) |
Solves a problem expressed as a TQP. | |
virtual ReturnStatus | ReOptimizeTNLP (const Ipopt::SmartPtr< Ipopt::TNLP > &tnlp) |
Solves a problem expresses as a TNLP. | |
virtual bool | setWarmStart (const CoinWarmStart *warm, Ipopt::SmartPtr< TMINLP2TNLP > tnlp) |
Set the warm start in the solver. | |
virtual bool | markHotStart () |
Safe the current state (after most recent solve that must have been successful) as hot start information and use that for all further solves, until unmarkHotStart is called. | |
virtual CoinWarmStart * | getUsedWarmStart (Ipopt::SmartPtr< TMINLP2TNLP > tnlp) const |
Get warm start used in last optimization. | |
virtual CoinWarmStart * | getWarmStart (Ipopt::SmartPtr< TMINLP2TNLP > tnlp) const |
Get the warm start form the solver. | |
virtual CoinWarmStart * | getEmptyWarmStart () const |
Solves a problem expressed as a TQP. | |
virtual bool | warmStartIsValid (const CoinWarmStart *ws) const |
Check that warm start object is valid. | |
virtual void | enableWarmStart () |
Solves a problem expressed as a TQP. | |
virtual void | disableWarmStart () |
Solves a problem expressed as a TQP. | |
Static Public Member Functions | |
static void | registerOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions) |
Register this solver options into passed roptions. | |
Private Member Functions | |
Private function members. | |
TNLPSolver::ReturnStatus | callOptimizer () |
Solves a problem expresses as a TNLP. | |
Private Attributes | |
Ipopt::SmartPtr< cachedInfo > | cached_ |
Cached information on last problem optimized for reoptimization. | |
int | default_log_level_ |
To record default log level. | |
User options | |
double | fillin_factor_ |
Fill-in factor for QP factorization. | |
int | kmax_ipt_ |
Fill-in factor for QP factorization. | |
int | mlp_ipt_ |
Fill-in factor for QP factorization. | |
Static Private Attributes | |
static std::string | solverName_ = "Bqpd QP" |
Friends | |
class | FilterSolver |
Classes | |
struct | cachedInfo |
Cached information for reoptimizing. More... | |
class | UnsolvedBqpdError |
Definition at line 19 of file BonBqpdSolver.hpp.
typedef ipfint Bonmin::BqpdSolver::fint |
typedef double Bonmin::BqpdSolver::real |
Bonmin::BqpdSolver::BqpdSolver | ( | bool | createEmpty = false |
) |
Bonmin::BqpdSolver::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.
Definition at line 122 of file BonBqpdSolver.cpp.
References default_log_level_, fillin_factor_, kmax_ipt_, mlp_ipt_, and Bonmin::TNLPSolver::options_.
Bonmin::BqpdSolver::~BqpdSolver | ( | ) | [virtual] |
virtual UnsolvedError* Bonmin::BqpdSolver::newUnsolvedError | ( | int | num, | |
Ipopt::SmartPtr< TMINLP2TNLP > | problem, | |||
std::string | name | |||
) | [inline, virtual] |
bool Bonmin::BqpdSolver::Initialize | ( | std::string | params_file | ) | [virtual] |
Initialize the TNLPSolver (read options from params_file).
Implements Bonmin::TNLPSolver.
Definition at line 157 of file BonBqpdSolver.cpp.
References default_log_level_, Bonmin::TNLPSolver::journalist_, and Bonmin::TNLPSolver::options_.
bool Bonmin::BqpdSolver::Initialize | ( | std::istream & | is | ) | [virtual] |
Initialize the TNLPSolver (read options from istream is).
Implements Bonmin::TNLPSolver.
Definition at line 184 of file BonBqpdSolver.cpp.
References Bonmin::TNLPSolver::journalist_, and Bonmin::TNLPSolver::options_.
TNLPSolver::ReturnStatus Bonmin::BqpdSolver::OptimizeTNLP | ( | const Ipopt::SmartPtr< Ipopt::TNLP > & | tnlp | ) | [virtual] |
Solves a problem expressed as a TQP.
Implements Bonmin::TNLPSolver.
Definition at line 194 of file BonBqpdSolver.cpp.
References cached_, callOptimizer(), fillin_factor_, kmax_ipt_, mlp_ipt_, and Bonmin::TNLPSolver::options_.
TNLPSolver::ReturnStatus Bonmin::BqpdSolver::ReOptimizeTNLP | ( | const Ipopt::SmartPtr< Ipopt::TNLP > & | tnlp | ) | [virtual] |
Solves a problem expresses as a TNLP.
Implements Bonmin::TNLPSolver.
Definition at line 211 of file BonBqpdSolver.cpp.
References cached_, callOptimizer(), m, and n.
bool Bonmin::BqpdSolver::setWarmStart | ( | const CoinWarmStart * | warm, | |
Ipopt::SmartPtr< TMINLP2TNLP > | tnlp | |||
) | [virtual] |
Set the warm start in the solver.
Implements Bonmin::TNLPSolver.
Definition at line 764 of file BonBqpdSolver.cpp.
References cached_, Bonmin::FilterWarmStart::istat(), Bonmin::FilterWarmStart::lwsArray(), Bonmin::FilterWarmStart::lwsSize(), Bonmin::TNLPSolver::options_, and x.
virtual bool Bonmin::BqpdSolver::markHotStart | ( | ) | [inline, virtual] |
Safe the current state (after most recent solve that must have been successful) as hot start information and use that for all further solves, until unmarkHotStart is called.
Definition at line 92 of file BonBqpdSolver.hpp.
References cached_.
virtual CoinWarmStart* Bonmin::BqpdSolver::getUsedWarmStart | ( | Ipopt::SmartPtr< TMINLP2TNLP > | tnlp | ) | const [inline, virtual] |
Get warm start used in last optimization.
Implements Bonmin::TNLPSolver.
Definition at line 95 of file BonBqpdSolver.hpp.
CoinWarmStart * Bonmin::BqpdSolver::getWarmStart | ( | Ipopt::SmartPtr< TMINLP2TNLP > | tnlp | ) | const [virtual] |
Get the warm start form the solver.
Implements Bonmin::TNLPSolver.
Definition at line 792 of file BonBqpdSolver.cpp.
References cached_.
CoinWarmStart * Bonmin::BqpdSolver::getEmptyWarmStart | ( | ) | const [virtual] |
Solves a problem expressed as a TQP.
Implements Bonmin::TNLPSolver.
Definition at line 804 of file BonBqpdSolver.cpp.
bool Bonmin::BqpdSolver::warmStartIsValid | ( | const CoinWarmStart * | ws | ) | const [virtual] |
Check that warm start object is valid.
Implements Bonmin::TNLPSolver.
Definition at line 815 of file BonBqpdSolver.cpp.
References Bonmin::BqpdWarmStart::empty().
virtual void Bonmin::BqpdSolver::enableWarmStart | ( | ) | [inline, virtual] |
Solves a problem expressed as a TQP.
Implements Bonmin::TNLPSolver.
Definition at line 107 of file BonBqpdSolver.hpp.
virtual void Bonmin::BqpdSolver::disableWarmStart | ( | ) | [inline, virtual] |
Solves a problem expressed as a TQP.
Implements Bonmin::TNLPSolver.
Definition at line 110 of file BonBqpdSolver.hpp.
Ipopt::SmartPtr< TNLPSolver > Bonmin::BqpdSolver::clone | ( | ) | [virtual] |
Virtual copy constructor.
Implements Bonmin::TNLPSolver.
Definition at line 139 of file BonBqpdSolver.cpp.
References BqpdSolver(), default_log_level_, fillin_factor_, Bonmin::TNLPSolver::journalist_, kmax_ipt_, mlp_ipt_, Bonmin::TNLPSolver::options_, Bonmin::TNLPSolver::prefix_, and Bonmin::TNLPSolver::roptions_.
virtual double Bonmin::BqpdSolver::CPUTime | ( | ) | [inline, virtual] |
Get the CpuTime of the last optimization.
Implements Bonmin::TNLPSolver.
Definition at line 119 of file BonBqpdSolver.hpp.
References cached_.
virtual int Bonmin::BqpdSolver::IterationCount | ( | ) | [inline, virtual] |
Get the iteration count of the last optimization.
Implements Bonmin::TNLPSolver.
Definition at line 125 of file BonBqpdSolver.hpp.
virtual void Bonmin::BqpdSolver::setOutputToDefault | ( | ) | [inline, virtual] |
turn off all output from the solver
Implements Bonmin::TNLPSolver.
Definition at line 132 of file BonBqpdSolver.hpp.
References cached_, and default_log_level_.
virtual void Bonmin::BqpdSolver::forceSolverOutput | ( | int | log_level | ) | [inline, virtual] |
turn on all output from the solver
Implements Bonmin::TNLPSolver.
Definition at line 137 of file BonBqpdSolver.hpp.
References cached_.
virtual std::string& Bonmin::BqpdSolver::solverName | ( | ) | [inline, virtual] |
Get the solver name.
Implements Bonmin::TNLPSolver.
Definition at line 143 of file BonBqpdSolver.hpp.
References solverName_.
void Bonmin::BqpdSolver::registerOptions | ( | ) | [inline] |
Register this solver options into passed roptions.
Definition at line 149 of file BonBqpdSolver.hpp.
References Bonmin::TNLPSolver::roptions_.
Referenced by Bonmin::BabSetupBase::registerAllOptions().
virtual int Bonmin::BqpdSolver::errorCode | ( | ) | const [inline, virtual] |
Error code (solver specific).
Implements Bonmin::TNLPSolver.
Definition at line 155 of file BonBqpdSolver.hpp.
void Bonmin::BqpdSolver::registerOptions | ( | Ipopt::SmartPtr< Bonmin::RegisteredOptions > | roptions | ) | [static] |
Register this solver options into passed roptions.
Definition at line 108 of file BonBqpdSolver.cpp.
References Bonmin::RegisteredOptions::BqpdCategory.
TNLPSolver::ReturnStatus Bonmin::BqpdSolver::callOptimizer | ( | ) | [private] |
Solves a problem expresses as a TNLP.
Definition at line 381 of file BonBqpdSolver.cpp.
References cached_, Bonmin::TNLPSolver::exception, ifail, Bonmin::TNLPSolver::provenInfeasible, Bonmin::TNLPSolver::solvedOptimal, and Bonmin::TNLPSolver::unbounded.
Referenced by OptimizeTNLP(), and ReOptimizeTNLP().
friend class FilterSolver [friend] |
Definition at line 22 of file BonBqpdSolver.hpp.
double Bonmin::BqpdSolver::fillin_factor_ [private] |
Fill-in factor for QP factorization.
Definition at line 171 of file BonBqpdSolver.hpp.
Referenced by BqpdSolver(), clone(), and OptimizeTNLP().
int Bonmin::BqpdSolver::kmax_ipt_ [private] |
Fill-in factor for QP factorization.
Definition at line 172 of file BonBqpdSolver.hpp.
Referenced by BqpdSolver(), clone(), and OptimizeTNLP().
int Bonmin::BqpdSolver::mlp_ipt_ [private] |
Fill-in factor for QP factorization.
Definition at line 173 of file BonBqpdSolver.hpp.
Referenced by BqpdSolver(), clone(), and OptimizeTNLP().
Ipopt::SmartPtr<cachedInfo> Bonmin::BqpdSolver::cached_ [private] |
Cached information on last problem optimized for reoptimization.
Definition at line 362 of file BonBqpdSolver.hpp.
Referenced by callOptimizer(), CPUTime(), forceSolverOutput(), getWarmStart(), markHotStart(), OptimizeTNLP(), ReOptimizeTNLP(), setOutputToDefault(), and setWarmStart().
std::string Bonmin::BqpdSolver::solverName_ = "Bqpd QP" [static, private] |
int Bonmin::BqpdSolver::default_log_level_ [private] |
To record default log level.
Reimplemented from Bonmin::TNLPSolver.
Definition at line 368 of file BonBqpdSolver.hpp.
Referenced by BqpdSolver(), clone(), Initialize(), and setOutputToDefault().