A class to have all elements necessary to setup a branch-and-bound. More...
#include <BonBabSetupBase.hpp>
Classes | |
struct | CuttingMethod |
Type for cut generation method with its frequency and string identification. More... | |
struct | HeuristicMethod |
Type for heuristic method with its string identification. More... | |
Public Types | |
enum | NodeComparison { bestBound = 0, DFS, BFS, dynamic, bestGuess } |
Strategies for comparing the nodes on the heap. More... | |
enum | TreeTraversal { HeapOnly =0, DiveFromBest, ProbedDive, DfsDiveFromBest, DfsDiveDynamic } |
Strategies for traversing the tree. More... | |
typedef std::list< CuttingMethod > | CuttingMethods |
typedef std::list < HeuristicMethod > | HeuristicMethods |
Public Member Functions | |
void | gatherParametersValues () |
Get the values of base parameters from the options stored. More... | |
void | gatherParametersValues (Ipopt::SmartPtr< Ipopt::OptionsList > options) |
Get the values of the base parameters from the passed options. More... | |
Ipopt::SmartPtr < Ipopt::Journalist > | journalist () |
Acces storage of Journalist for output. More... | |
Ipopt::SmartPtr < Ipopt::OptionsList > | options () |
Acces list of Options. More... | |
Ipopt::SmartPtr < Bonmin::RegisteredOptions > | roptions () |
Access registered Options. More... | |
const vector< OsiObject * > & | objects () const |
Access to extra objects. More... | |
vector< OsiObject * > & | objects () |
Access to extra objects. More... | |
void | addCutGenerator (CuttingMethod &cg) |
void | set_linearizer (TMINLP2OsiLP *linearizer) |
Methods to initialize algorithm with various inputs. | |
void | use (const OsiTMINLPInterface &nlp) |
use existing TMINLP interface (containing the options). More... | |
void | use (Ipopt::SmartPtr< TMINLP > tminlp) |
Read options (if not done before) and create interface using tminlp. More... | |
void | use (Ipopt::SmartPtr< TMINLP2TNLP > prob) |
use specific instanciation of a TMINLP2TNLP. More... | |
void | setNonlinearSolver (OsiTMINLPInterface *s) |
Set the non-linear solver used. More... | |
Elements of the branch-and-bound setup. | |
OsiTMINLPInterface * | nonlinearSolver () |
Pointer to the non-linear solver used. More... | |
OsiSolverInterface * | continuousSolver () |
Pointer to the continuous solver to use for relaxations. More... | |
CuttingMethods & | cutGenerators () |
list of cutting planes methods to apply with their frequencies. More... | |
HeuristicMethods & | heuristics () |
list of Heuristic methods to use. More... | |
OsiChooseVariable * | branchingMethod () |
branching method to use. More... | |
NodeComparison & | nodeComparisonMethod () |
Method used to compare nodes. More... | |
TreeTraversal | treeTraversalMethod () |
Method used to traverse tree. More... | |
int | getIntParameter (const IntParameter &p) const |
Return value of integer parameter. More... | |
double | getDoubleParameter (const DoubleParameter &p) const |
Return value of double parameter. More... | |
void | setIntParameter (const IntParameter &p, const int v) |
Return value of integer parameter. More... | |
void | setDoubleParameter (const DoubleParameter &p, const double v) |
Return value of double parameter. More... | |
Protected Member Functions | |
void | setPriorities () |
Set the priorities into OsiTMINLPInterface when needed. More... | |
void | addSos () |
Add SOS constraints to OsiTMINLPInterface when needed. More... | |
Protected Attributes | |
int | intParam_ [NumberIntParam] |
storage of integer parameters. More... | |
double | doubleParam_ [NumberDoubleParam] |
storage of double parameters. More... | |
OsiTMINLPInterface * | nonlinearSolver_ |
Storage of the non-linear solver used. More... | |
OsiSolverInterface * | continuousSolver_ |
Storage of continuous solver. More... | |
Ipopt::SmartPtr< TMINLP2OsiLP > | linearizer_ |
Method to linearize MINLPs. More... | |
CuttingMethods | cutGenerators_ |
Cut generation methods. More... | |
HeuristicMethods | heuristics_ |
Heuristic methods. More... | |
OsiChooseVariable * | branchingMethod_ |
Branching method. More... | |
NodeComparison | nodeComparisonMethod_ |
Node comparison method. More... | |
TreeTraversal | treeTraversalMethod_ |
Tree traversal method. More... | |
vector< OsiObject * > | objects_ |
Extra object to add to Cbc (not OsiObjects). More... | |
Ipopt::SmartPtr < Ipopt::Journalist > | journalist_ |
Storage of Journalist for output. More... | |
Ipopt::SmartPtr < Ipopt::OptionsList > | options_ |
List of Options. More... | |
Ipopt::SmartPtr < Bonmin::RegisteredOptions > | roptions_ |
Registered Options. More... | |
bool | readOptions_ |
flag to say if option file was read. More... | |
CoinMessageHandler * | messageHandler_ |
separate message handler. More... | |
std::string | prefix_ |
Prefix to use when reading options. More... | |
Static Protected Attributes | |
static int | defaultIntParam_ [NumberIntParam] |
default values for int parameters. More... | |
static double | defaultDoubleParam_ [NumberDoubleParam] |
default values for double parameters. More... | |
Methods to manipulate options. | |
virtual void | registerOptions () |
Register all the options for this algorithm instance. More... | |
virtual void | setBabDefaultOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions) |
Setup the defaults options for this algorithm. More... | |
virtual void | readOptionsFile () |
Get the options from default text file (bonmin.opt) if don't already have them. More... | |
void | readOptionsFile (std::string fileName) |
Get the options from given fileName. More... | |
void | readOptionsString (std::string opt_string) |
Get the options from long string containing all. More... | |
void | readOptionsStream (std::istream &is) |
Get the options from stream. More... | |
void | mayPrintDoc () |
May print documentation of options if options print_options_documentation is set to yes. More... | |
const char * | prefix () const |
Get prefix to use for options. More... | |
void | setOptionsAndJournalist (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions, Ipopt::SmartPtr< Ipopt::OptionsList > options, Ipopt::SmartPtr< Ipopt::Journalist > journalist) |
Set the value for options, output... More... | |
void | initializeOptionsAndJournalist () |
Initialize the options and the journalist. More... | |
static void | registerAllOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions) |
Register all the options for this algorithm instance. More... | |
A class to have all elements necessary to setup a branch-and-bound.
Definition at line 25 of file BonBabSetupBase.hpp.
typedef std::list<CuttingMethod> Bonmin::BabSetupBase::CuttingMethods |
Definition at line 65 of file BonBabSetupBase.hpp.
typedef std::list<HeuristicMethod > Bonmin::BabSetupBase::HeuristicMethods |
Definition at line 66 of file BonBabSetupBase.hpp.
Strategies for comparing the nodes on the heap.
Enumerator | |
---|---|
bestBound | |
DFS |
Depth First Search. |
BFS |
Best First Search. |
dynamic |
Dynamic strategy, see CbcBranchActual.hpp for explanations. |
bestGuess |
Best guessed integer solution is subtree below, based on pseudo costs. |
Definition at line 69 of file BonBabSetupBase.hpp.
Strategies for traversing the tree.
Enumerator | |
---|---|
HeapOnly | |
DiveFromBest |
dive from top node of the heap untill it gets to a leaf of the tree. Uses Bonmin::CbcDiver. |
ProbedDive |
Eplore two kids before following on dive. |
DfsDiveFromBest |
dive from top node of the heap with more elaborate strategy (see options doc). Uses Bonmin::CbcDfsDiver. |
DfsDiveDynamic |
Same as DfsDiveFromBest, but after a prescribed number of integer solution are found switch to best-bound and if too many node switches to depth-first. Uses Bonmin::CbcDfsDiver. |
Definition at line 79 of file BonBabSetupBase.hpp.
Parameters represented by an integer.
Enumerator | |
---|---|
MOST_FRACTIONAL | |
STRONG_BRANCHING | |
RELIABILITY_BRANCHING | |
QP_STRONG_BRANCHING | |
LP_STRONG_BRANCHING | |
NLP_STRONG_BRANCHING | |
OSI_SIMPLE | |
OSI_STRONG | |
RANDOM |
Definition at line 89 of file BonBabSetupBase.hpp.
Parameters represented by an integer.
Definition at line 105 of file BonBabSetupBase.hpp.
Parameters represented by a double.
Definition at line 127 of file BonBabSetupBase.hpp.
Bonmin::BabSetupBase::BabSetupBase | ( | const CoinMessageHandler * | handler = NULL | ) |
Default constructor.
Definition at line 55 of file BonBabSetupBase.cpp.
Bonmin::BabSetupBase::BabSetupBase | ( | Ipopt::SmartPtr< TMINLP > | tminlp, |
const CoinMessageHandler * | handler = NULL |
||
) |
Construct from existing tminlp.
Definition at line 216 of file BonBabSetupBase.cpp.
Bonmin::BabSetupBase::BabSetupBase | ( | Ipopt::SmartPtr< TNLPSolver > | app | ) |
Construct from existing application.
Definition at line 302 of file BonBabSetupBase.cpp.
Bonmin::BabSetupBase::BabSetupBase | ( | const OsiTMINLPInterface & | nlp | ) |
Construct from existing TMINLP interface.
Definition at line 268 of file BonBabSetupBase.cpp.
Bonmin::BabSetupBase::BabSetupBase | ( | const BabSetupBase & | other, |
OsiTMINLPInterface & | nlp | ||
) |
Copy but uses an other nlp.
Copy constructor with change of nlp.
Definition at line 129 of file BonBabSetupBase.cpp.
Bonmin::BabSetupBase::BabSetupBase | ( | const BabSetupBase & | other, |
OsiTMINLPInterface & | nlp, | ||
const std::string & | prefix | ||
) |
Copy but uses an other nlp.
Copy constructor with change of nlp.
Definition at line 180 of file BonBabSetupBase.cpp.
Bonmin::BabSetupBase::BabSetupBase | ( | const BabSetupBase & | other | ) |
Copy constructor.
Definition at line 78 of file BonBabSetupBase.cpp.
|
virtual |
Virtual destructor.
Definition at line 324 of file BonBabSetupBase.cpp.
|
pure virtual |
virtual copy constructor.
Implemented in Couenne::CouenneSetup, Bonmin::BonminSetup, Bonmin::RobotSetup, and Sepa::SepaSetup.
|
virtual |
Make a copy with solver replace by one passed .
Reimplemented in Bonmin::BonminSetup, Bonmin::RobotSetup, and Sepa::SepaSetup.
Definition at line 239 of file BonBabSetupBase.cpp.
void Bonmin::BabSetupBase::use | ( | const OsiTMINLPInterface & | nlp | ) |
use existing TMINLP interface (containing the options).
Definition at line 291 of file BonBabSetupBase.cpp.
void Bonmin::BabSetupBase::use | ( | Ipopt::SmartPtr< TMINLP > | tminlp | ) |
Read options (if not done before) and create interface using tminlp.
Definition at line 245 of file BonBabSetupBase.cpp.
void Bonmin::BabSetupBase::use | ( | Ipopt::SmartPtr< TMINLP2TNLP > | prob | ) |
use specific instanciation of a TMINLP2TNLP.
|
inline |
Set the non-linear solver used.
Definition at line 175 of file BonBabSetupBase.hpp.
|
virtual |
Register all the options for this algorithm instance.
Reimplemented in Couenne::CouenneSetup, Bonmin::BonminSetup, Bonmin::RobotSetup, and Sepa::SepaSetup.
Definition at line 404 of file BonBabSetupBase.cpp.
|
inlinevirtual |
Setup the defaults options for this algorithm.
Reimplemented in Bonmin::BonminSetup.
Definition at line 186 of file BonBabSetupBase.hpp.
|
static |
Register all the options for this algorithm instance.
Definition at line 410 of file BonBabSetupBase.cpp.
|
inlinevirtual |
Get the options from default text file (bonmin.opt) if don't already have them.
Reimplemented in Couenne::CouenneSetup.
Definition at line 192 of file BonBabSetupBase.hpp.
void Bonmin::BabSetupBase::readOptionsFile | ( | std::string | fileName | ) |
Get the options from given fileName.
Definition at line 683 of file BonBabSetupBase.cpp.
void Bonmin::BabSetupBase::readOptionsString | ( | std::string | opt_string | ) |
Get the options from long string containing all.
Definition at line 712 of file BonBabSetupBase.cpp.
void Bonmin::BabSetupBase::readOptionsStream | ( | std::istream & | is | ) |
Get the options from stream.
Definition at line 722 of file BonBabSetupBase.cpp.
void Bonmin::BabSetupBase::mayPrintDoc | ( | ) |
May print documentation of options if options print_options_documentation is set to yes.
Definition at line 741 of file BonBabSetupBase.cpp.
|
inline |
Get prefix to use for options.
Definition at line 212 of file BonBabSetupBase.hpp.
|
inline |
Set the value for options, output...
Definition at line 217 of file BonBabSetupBase.hpp.
void Bonmin::BabSetupBase::initializeOptionsAndJournalist | ( | ) |
Initialize the options and the journalist.
Definition at line 648 of file BonBabSetupBase.cpp.
|
inline |
Pointer to the non-linear solver used.
Definition at line 233 of file BonBabSetupBase.hpp.
|
inline |
Pointer to the continuous solver to use for relaxations.
Definition at line 238 of file BonBabSetupBase.hpp.
|
inline |
list of cutting planes methods to apply with their frequencies.
Definition at line 243 of file BonBabSetupBase.hpp.
|
inline |
list of Heuristic methods to use.
Definition at line 248 of file BonBabSetupBase.hpp.
|
inline |
branching method to use.
Definition at line 253 of file BonBabSetupBase.hpp.
|
inline |
Method used to compare nodes.
Definition at line 258 of file BonBabSetupBase.hpp.
|
inline |
Method used to traverse tree.
Definition at line 263 of file BonBabSetupBase.hpp.
|
inline |
Return value of integer parameter.
Definition at line 268 of file BonBabSetupBase.hpp.
|
inline |
Return value of double parameter.
Definition at line 273 of file BonBabSetupBase.hpp.
|
inline |
Return value of integer parameter.
Definition at line 278 of file BonBabSetupBase.hpp.
|
inline |
Return value of double parameter.
Definition at line 283 of file BonBabSetupBase.hpp.
|
inline |
Get the values of base parameters from the options stored.
Definition at line 290 of file BonBabSetupBase.hpp.
void Bonmin::BabSetupBase::gatherParametersValues | ( | Ipopt::SmartPtr< Ipopt::OptionsList > | options | ) |
Get the values of the base parameters from the passed options.
Definition at line 350 of file BonBabSetupBase.cpp.
|
inline |
Acces storage of Journalist for output.
Definition at line 297 of file BonBabSetupBase.hpp.
|
inline |
Acces list of Options.
Definition at line 303 of file BonBabSetupBase.hpp.
|
inline |
Access registered Options.
Definition at line 309 of file BonBabSetupBase.hpp.
|
inline |
Access to extra objects.
Definition at line 315 of file BonBabSetupBase.hpp.
|
inline |
Access to extra objects.
Definition at line 321 of file BonBabSetupBase.hpp.
|
inline |
Definition at line 326 of file BonBabSetupBase.hpp.
|
inline |
Definition at line 330 of file BonBabSetupBase.hpp.
|
protected |
Set the priorities into OsiTMINLPInterface when needed.
Definition at line 777 of file BonBabSetupBase.cpp.
|
protected |
Add SOS constraints to OsiTMINLPInterface when needed.
Definition at line 814 of file BonBabSetupBase.cpp.
|
protected |
storage of integer parameters.
Definition at line 341 of file BonBabSetupBase.hpp.
|
staticprotected |
default values for int parameters.
Definition at line 343 of file BonBabSetupBase.hpp.
|
protected |
storage of double parameters.
Definition at line 345 of file BonBabSetupBase.hpp.
|
staticprotected |
default values for double parameters.
Definition at line 347 of file BonBabSetupBase.hpp.
|
protected |
Storage of the non-linear solver used.
Definition at line 349 of file BonBabSetupBase.hpp.
|
protected |
Storage of continuous solver.
Definition at line 351 of file BonBabSetupBase.hpp.
|
protected |
Method to linearize MINLPs.
Definition at line 353 of file BonBabSetupBase.hpp.
|
protected |
Cut generation methods.
Definition at line 355 of file BonBabSetupBase.hpp.
|
protected |
Heuristic methods.
Definition at line 357 of file BonBabSetupBase.hpp.
|
protected |
Branching method.
Definition at line 359 of file BonBabSetupBase.hpp.
|
protected |
Node comparison method.
Definition at line 361 of file BonBabSetupBase.hpp.
|
protected |
Tree traversal method.
Definition at line 363 of file BonBabSetupBase.hpp.
|
protected |
Extra object to add to Cbc (not OsiObjects).
Definition at line 365 of file BonBabSetupBase.hpp.
|
protected |
Storage of Journalist for output.
Definition at line 369 of file BonBabSetupBase.hpp.
|
protected |
List of Options.
Definition at line 372 of file BonBabSetupBase.hpp.
|
protected |
Registered Options.
Definition at line 375 of file BonBabSetupBase.hpp.
|
protected |
flag to say if option file was read.
Definition at line 378 of file BonBabSetupBase.hpp.
|
protected |
separate message handler.
Definition at line 380 of file BonBabSetupBase.hpp.
|
protected |
Prefix to use when reading options.
Definition at line 382 of file BonBabSetupBase.hpp.