#include <BonOaNlpOptim.hpp>
Collaboration diagram for Bonmin::OaNlpOptim:
Public Member Functions | |
OaNlpOptim (OsiTMINLPInterface *si=NULL, int maxDepth=10, bool addOnlyViolated=false, bool globalCuts=true) | |
Default constructor. | |
OaNlpOptim (BabSetupBase &b) | |
Constructor with basic setup. | |
OaNlpOptim (const OaNlpOptim ©) | |
Copy constructor. | |
void | passInMessageHandler (const CoinMessageHandler *handler) |
virtual CglCutGenerator * | clone () const |
Abstract constructor. | |
virtual | ~OaNlpOptim () |
Desctructor. | |
void | assignInterface (OsiTMINLPInterface *si) |
Assign an OsiTMINLPInterface. | |
virtual void | generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info) const |
cut generation method | |
void | setMaxDepth (int value) |
void | setAddOnlyViolated (bool yesno) |
void | setGlobalCuts (bool yesno) |
int | getNSolve () |
void | setLogLevel (int value) |
set log level | |
Static Public Member Functions | |
static void | registerOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions) |
Register OaNlpOptim options. | |
Private Attributes | |
OsiTMINLPInterface * | nlp_ |
Pointer to the Ipopt interface. | |
int | maxDepth_ |
maximum depth at which generate cuts | |
int | nSolve_ |
Number of NLP resolution done. | |
CoinMessageHandler * | handler_ |
messages handler. | |
CoinMessages | messages_ |
handler | |
bool | addOnlyViolated_ |
Add only violated cuts? | |
bool | global_ |
Add cuts as global? | |
double | solves_per_level_ |
Average number of nodes per level in tree. |
Definition at line 19 of file BonOaNlpOptim.hpp.
Bonmin::OaNlpOptim::OaNlpOptim | ( | OsiTMINLPInterface * | si = NULL , |
|
int | maxDepth = 10 , |
|||
bool | addOnlyViolated = false , |
|||
bool | globalCuts = true | |||
) |
Default constructor.
Definition at line 21 of file BonOaNlpOptim.cpp.
References handler_, messages_, and setLogLevel().
Referenced by clone().
Bonmin::OaNlpOptim::OaNlpOptim | ( | BabSetupBase & | b | ) |
Constructor with basic setup.
Definition at line 36 of file BonOaNlpOptim.cpp.
References addOnlyViolated_, global_, handler_, maxDepth_, messages_, Bonmin::BabSetupBase::options(), Bonmin::BabSetupBase::prefix(), setLogLevel(), and solves_per_level_.
Bonmin::OaNlpOptim::OaNlpOptim | ( | const OaNlpOptim & | copy | ) | [inline] |
Copy constructor.
Definition at line 30 of file BonOaNlpOptim.hpp.
References handler_, messages_, and setLogLevel().
virtual Bonmin::OaNlpOptim::~OaNlpOptim | ( | ) | [inline, virtual] |
void Bonmin::OaNlpOptim::passInMessageHandler | ( | const CoinMessageHandler * | handler | ) | [inline] |
Definition at line 44 of file BonOaNlpOptim.hpp.
References handler_.
Referenced by Bonmin::BonminSetup::initializeBHyb().
virtual CglCutGenerator* Bonmin::OaNlpOptim::clone | ( | ) | const [inline, virtual] |
void Bonmin::OaNlpOptim::assignInterface | ( | OsiTMINLPInterface * | si | ) |
void Bonmin::OaNlpOptim::generateCuts | ( | const OsiSolverInterface & | si, | |
OsiCuts & | cs, | |||
const CglTreeInfo | info | |||
) | const [virtual] |
cut generation method
Definition at line 63 of file BonOaNlpOptim.cpp.
References addOnlyViolated_, Bonmin::BabInfo::babPtr(), e, Bonmin::OsiTMINLPInterface::getColLower(), Bonmin::OsiTMINLPInterface::getColSolution(), Bonmin::OsiTMINLPInterface::getColUpper(), Bonmin::OsiTMINLPInterface::getNumCols(), Bonmin::OsiTMINLPInterface::getObjValue(), Bonmin::OsiTMINLPInterface::getOuterApproximation(), global_, handler_, Bonmin::OsiTMINLPInterface::isAbandoned(), Bonmin::OsiTMINLPInterface::isInteger(), Bonmin::OsiTMINLPInterface::isIterationLimitReached(), Bonmin::OsiTMINLPInterface::isProvenOptimal(), Bonmin::LP_ERROR, maxDepth_, messages_, Bonmin::Bab::model(), nlp_, nSolve_, Bonmin::OsiTMINLPInterface::resolve(), solves_per_level_, and Bonmin::txt_id.
void Bonmin::OaNlpOptim::setMaxDepth | ( | int | value | ) | [inline] |
void Bonmin::OaNlpOptim::setAddOnlyViolated | ( | bool | yesno | ) | [inline] |
void Bonmin::OaNlpOptim::setGlobalCuts | ( | bool | yesno | ) | [inline] |
int Bonmin::OaNlpOptim::getNSolve | ( | ) | [inline] |
void Bonmin::OaNlpOptim::setLogLevel | ( | int | value | ) | [inline] |
set log level
Definition at line 87 of file BonOaNlpOptim.hpp.
References handler_.
Referenced by OaNlpOptim().
void Bonmin::OaNlpOptim::registerOptions | ( | Ipopt::SmartPtr< Bonmin::RegisteredOptions > | roptions | ) | [static] |
Register OaNlpOptim options.
Definition at line 177 of file BonOaNlpOptim.cpp.
References Bonmin::RegisteredOptions::BonminCategory.
Referenced by Bonmin::BonminSetup::registerAllOptions().
OsiTMINLPInterface* Bonmin::OaNlpOptim::nlp_ [private] |
Pointer to the Ipopt interface.
Definition at line 97 of file BonOaNlpOptim.hpp.
Referenced by assignInterface(), and generateCuts().
int Bonmin::OaNlpOptim::maxDepth_ [private] |
maximum depth at which generate cuts
Definition at line 100 of file BonOaNlpOptim.hpp.
Referenced by generateCuts(), OaNlpOptim(), and setMaxDepth().
int Bonmin::OaNlpOptim::nSolve_ [mutable, private] |
Number of NLP resolution done.
Definition at line 103 of file BonOaNlpOptim.hpp.
Referenced by generateCuts(), and getNSolve().
CoinMessageHandler* Bonmin::OaNlpOptim::handler_ [private] |
messages handler.
Definition at line 105 of file BonOaNlpOptim.hpp.
Referenced by generateCuts(), OaNlpOptim(), passInMessageHandler(), setLogLevel(), and ~OaNlpOptim().
CoinMessages Bonmin::OaNlpOptim::messages_ [private] |
handler
Definition at line 107 of file BonOaNlpOptim.hpp.
Referenced by generateCuts(), and OaNlpOptim().
bool Bonmin::OaNlpOptim::addOnlyViolated_ [private] |
Add only violated cuts?
Definition at line 109 of file BonOaNlpOptim.hpp.
Referenced by generateCuts(), OaNlpOptim(), and setAddOnlyViolated().
bool Bonmin::OaNlpOptim::global_ [private] |
Add cuts as global?
Definition at line 111 of file BonOaNlpOptim.hpp.
Referenced by generateCuts(), OaNlpOptim(), and setGlobalCuts().
double Bonmin::OaNlpOptim::solves_per_level_ [private] |
Average number of nodes per level in tree.
Definition at line 113 of file BonOaNlpOptim.hpp.
Referenced by generateCuts(), and OaNlpOptim().