Bonmin::BabSetupBase Class Reference

A class to have all elements necessary to setup a branch-and-bound. More...

#include <BonBabSetupBase.hpp>

Inheritance diagram for Bonmin::BabSetupBase:

Inheritance graph
[legend]
Collaboration diagram for Bonmin::BabSetupBase:

Collaboration graph
[legend]
List of all members.

Enums for optionslist parameters

enum  VarSelectStra_Enum {
  MOST_FRACTIONAL = 0, STRONG_BRANCHING, RELIABILITY_BRANCHING, CURVATURE_ESTIMATOR,
  QP_STRONG_BRANCHING, LP_STRONG_BRANCHING, NLP_STRONG_BRANCHING, OSI_SIMPLE,
  OSI_STRONG, RANDOM
}
enum  IntParameter {
  BabLogLevel = 0, BabLogInterval, MaxFailures, FailureBehavior,
  MaxInfeasible, NumberStrong, MinReliability, MaxNodes,
  MaxSolutions, MaxIterations, SpecialOption, DisableSos,
  NumCutPasses, NumCutPassesAtRoot, NumberIntParam
}
 Parameters represented by an integer. More...
enum  DoubleParameter {
  CutoffDecr = 0, Cutoff, AllowableGap, AllowableFractionGap,
  IntTol, MaxTime, NumberDoubleParam
}
 Parameters represented by a double. More...
 BabSetupBase ()
 Default constructor.
 BabSetupBase (Ipopt::SmartPtr< TMINLP > tminlp)
 Construct from existing tminlp.
 BabSetupBase (Ipopt::SmartPtr< TNLPSolver > app)
 Construct from existing application.
 BabSetupBase (const OsiTMINLPInterface &nlp)
 Construct from existing TMINLP interface.
 BabSetupBase (const BabSetupBase &other)
 Copy constructor.
virtual BabSetupBaseclone () const =0
 virtual copy constructor.
virtual ~BabSetupBase ()
 Virtual destructor.

Methods to manipulate options.

virtual void registerOptions ()
 Register all the options for this algorithm instance.
virtual void setBabDefaultOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
 Setup the defaults options for this algorithm.
virtual void readOptionsFile ()
 Get the options from default text file (bonmin.opt) if don't already have them.
void readOptionsFile (std::string fileName)
 Get the options from given fileName.
void readOptionsString (std::string opt_string)
 Get the options from long string containing all.
void readOptionsStream (std::istream &is)
 Get the options from stream.
void mayPrintDoc ()
 May print documentation of options if options print_options_documentation is set to yes.
void setOptionsAndJournalist (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions, Ipopt::SmartPtr< Ipopt::OptionsList > options, Ipopt::SmartPtr< Ipopt::Journalist > journalist)
 Set the value for options, output.
void initializeOptionsAndJournalist ()
 Initialize the options and the journalist.
static void registerAllOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
 Register all the options for this algorithm instance.

Public Types

typedef std::list< CuttingMethodCuttingMethods
typedef std::list< CbcHeuristic * > HeuristicMethods
 bestBound = 0
 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.
 HeapOnly = 0
 DiveFromBest
 dive from top node of the heap untill it gets to a leaf of the tree.
 ProbedDive
 Eplore two kids before following on dive.
 DfsDiveFromBest
 dive from top node of the heap with more elaborate strategy (see options doc).
 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.
 MOST_FRACTIONAL = 0
 STRONG_BRANCHING
 RELIABILITY_BRANCHING
 CURVATURE_ESTIMATOR
 QP_STRONG_BRANCHING
 LP_STRONG_BRANCHING
 NLP_STRONG_BRANCHING
 OSI_SIMPLE
 OSI_STRONG
 RANDOM
 BabLogLevel = 0
 BabLogInterval
 Display information every logIntervval nodes.
 MaxFailures
 Max number of failures in a branch.
 FailureBehavior
 Behavior of the algorithm in the case of a failure.
 MaxInfeasible
 Max number of consecutive infeasible problem in a branch before fathoming.
 NumberStrong
 Number of candidates for strong branching.
 MinReliability
 Minimum reliability before trust pseudo-costs.
 MaxNodes
 Global node limit.
 MaxSolutions
 limit on number of integer feasible solution.
 MaxIterations
 Global iteration limit.
 SpecialOption
 Spetial option in particular for Cbc.
 DisableSos
 Consider or not SOS constraints.
 NumCutPasses
 Number of cut passes at nodes.
 NumCutPassesAtRoot
 Number of cut passes at nodes.
 NumberIntParam
 Dummy end to size table.
 CutoffDecr = 0
 Cutoff
 cutoff value
 AllowableGap
 Stop if absolute gap is less than this.
 AllowableFractionGap
 Stop if relative gap is less than this.
 IntTol
 Integer tolerance.
 MaxTime
 Global time limit.
 NumberDoubleParam
 Dummy end to size table.
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...

Public Member Functions

void gatherParametersValues ()
 Get the values of base parameters from the options stored.
void gatherParametersValues (Ipopt::SmartPtr< OptionsList > options)
 Get the values of the base parameters from the passed options.
Ipopt::SmartPtr< Ipopt::Journalistjournalist ()
 Acces storage of Journalist for output.
Ipopt::SmartPtr< Ipopt::OptionsListoptions ()
 Acces list of Options.
Ipopt::SmartPtr< Bonmin::RegisteredOptionsroptions ()
 Access registered Options.
const vector< OsiObject * > & objects () const
 Access to extra objects.
vector< OsiObject * > & objects ()
 Access to extra objects.
Methods to initialize algorithm with various inputs.
void use (const OsiTMINLPInterface &nlp)
 use existing TMINLP interface (containing the options).
void use (Ipopt::SmartPtr< TMINLP > tminlp)
 Read options (if not done before) and create interface using tminlp.
void use (Ipopt::SmartPtr< TMINLP2TNLP > prob)
 use specific instanciation of a TMINLP2TNLP.
void setNonlinearSolver (OsiTMINLPInterface *s)
 Set the non-linear solver used.
Elements of the branch-and-bound setup.
OsiTMINLPInterfacenonlinearSolver ()
 Pointer to the non-linear solver used.
OsiSolverInterfacecontinuousSolver ()
 Pointer to the continuous solver to use for relaxations.
CuttingMethodscutGenerators ()
 list of cutting planes methods to apply with their frequencies.
HeuristicMethodsheuristics ()
 list of Heuristic methods to use.
OsiChooseVariablebranchingMethod ()
 branching method to use.
NodeComparison nodeComparisonMethod ()
 Method used to compare nodes.
TreeTraversal treeTraversalMethod ()
 Method used to traverse tree.
int getIntParameter (const IntParameter &p)
 Return value of integer parameter.
double getDoubleParameter (const DoubleParameter &p)
 Return value of double parameter.

Protected Member Functions

void setPriorities ()
 Set the priorities into OsiTMINLPInterface when needed.
void addSos ()
 Add SOS constraints to OsiTMINLPInterface when needed.

Protected Attributes

int intParam_ [NumberIntParam]
 storage of integer parameters.
double doubleParam_ [NumberDoubleParam]
 storage of double parameters.
OsiTMINLPInterfacenonlinearSolver_
 Storage of the non-linear solver used.
OsiSolverInterfacecontinuousSolver_
 Storage of continuous solver.
CuttingMethods cutGenerators_
 Cut generation methods.
HeuristicMethods heuristics_
 Heuristic methods.
OsiChooseVariablebranchingMethod_
 Branching method.
NodeComparison nodeComparisonMethod_
 Node comparison method.
TreeTraversal treeTraversalMethod_
 Tree traversal method.
vector< OsiObject * > objects_
 Extra object to add to Cbc (not OsiObjects).
Ipopt::SmartPtr< Ipopt::Journalistjournalist_
 Storage of Journalist for output.
Ipopt::SmartPtr< Ipopt::OptionsListoptions_
 List of Options.
Ipopt::SmartPtr< Bonmin::RegisteredOptionsroptions_
 Registered Options.
bool readOptions_
 flag to say if option file was read.
CoinMessageHandlerlpMessageHandler_
 separate message handler if continuousSolver_!= nonlinearSolver.

Static Protected Attributes

static int defaultIntParam_ [NumberIntParam]
 default values for int parameters.
static double defaultDoubleParam_ [NumberDoubleParam]
 default values for double parameters.

Classes

struct  CuttingMethod
 Type for cut generation method with its frequency and string identification. More...

Detailed Description

A class to have all elements necessary to setup a branch-and-bound.

Definition at line 22 of file BonBabSetupBase.hpp.


Member Typedef Documentation

typedef std::list<CuttingMethod> Bonmin::BabSetupBase::CuttingMethods

Definition at line 46 of file BonBabSetupBase.hpp.

typedef std::list<CbcHeuristic * > Bonmin::BabSetupBase::HeuristicMethods

Definition at line 47 of file BonBabSetupBase.hpp.


Member Enumeration Documentation

enum Bonmin::BabSetupBase::NodeComparison

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 50 of file BonBabSetupBase.hpp.

enum Bonmin::BabSetupBase::TreeTraversal

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 60 of file BonBabSetupBase.hpp.

enum Bonmin::BabSetupBase::VarSelectStra_Enum

Enumerator:
MOST_FRACTIONAL 
STRONG_BRANCHING 
RELIABILITY_BRANCHING 
CURVATURE_ESTIMATOR 
QP_STRONG_BRANCHING 
LP_STRONG_BRANCHING 
NLP_STRONG_BRANCHING 
OSI_SIMPLE 
OSI_STRONG 
RANDOM 

Definition at line 70 of file BonBabSetupBase.hpp.

enum Bonmin::BabSetupBase::IntParameter

Parameters represented by an integer.

Enumerator:
BabLogLevel 
BabLogInterval  Display information every logIntervval nodes.
MaxFailures  Max number of failures in a branch.
FailureBehavior  Behavior of the algorithm in the case of a failure.
MaxInfeasible  Max number of consecutive infeasible problem in a branch before fathoming.
NumberStrong  Number of candidates for strong branching.
MinReliability  Minimum reliability before trust pseudo-costs.
MaxNodes  Global node limit.
MaxSolutions  limit on number of integer feasible solution.
MaxIterations  Global iteration limit.
SpecialOption  Spetial option in particular for Cbc.
DisableSos  Consider or not SOS constraints.
NumCutPasses  Number of cut passes at nodes.
NumCutPassesAtRoot  Number of cut passes at nodes.
NumberIntParam  Dummy end to size table.

Definition at line 84 of file BonBabSetupBase.hpp.

enum Bonmin::BabSetupBase::DoubleParameter

Parameters represented by a double.

Enumerator:
CutoffDecr 
Cutoff  cutoff value
AllowableGap  Stop if absolute gap is less than this.
AllowableFractionGap  Stop if relative gap is less than this.
IntTol  Integer tolerance.
MaxTime  Global time limit.
NumberDoubleParam  Dummy end to size table.

Definition at line 105 of file BonBabSetupBase.hpp.


Constructor & Destructor Documentation

Bonmin::BabSetupBase::BabSetupBase (  ) 

Default constructor.

Bonmin::BabSetupBase::BabSetupBase ( Ipopt::SmartPtr< TMINLP tminlp  ) 

Construct from existing tminlp.

Bonmin::BabSetupBase::BabSetupBase ( Ipopt::SmartPtr< TNLPSolver app  ) 

Construct from existing application.

Bonmin::BabSetupBase::BabSetupBase ( const OsiTMINLPInterface nlp  ) 

Construct from existing TMINLP interface.

Bonmin::BabSetupBase::BabSetupBase ( const BabSetupBase other  ) 

Copy constructor.

virtual Bonmin::BabSetupBase::~BabSetupBase (  )  [virtual]

Virtual destructor.


Member Function Documentation

virtual BabSetupBase* Bonmin::BabSetupBase::clone (  )  const [pure virtual]

virtual copy constructor.

Implemented in Bonmin::CouenneSetup, and Bonmin::BonminSetup.

void Bonmin::BabSetupBase::use ( const OsiTMINLPInterface nlp  ) 

use existing TMINLP interface (containing the options).

void Bonmin::BabSetupBase::use ( Ipopt::SmartPtr< TMINLP tminlp  ) 

Read options (if not done before) and create interface using tminlp.

void Bonmin::BabSetupBase::use ( Ipopt::SmartPtr< TMINLP2TNLP prob  ) 

use specific instanciation of a TMINLP2TNLP.

void Bonmin::BabSetupBase::setNonlinearSolver ( OsiTMINLPInterface s  )  [inline]

Set the non-linear solver used.

Definition at line 144 of file BonBabSetupBase.hpp.

References nonlinearSolver_.

virtual void Bonmin::BabSetupBase::registerOptions (  )  [virtual]

Register all the options for this algorithm instance.

Reimplemented in Bonmin::CouenneSetup, and Bonmin::BonminSetup.

virtual void Bonmin::BabSetupBase::setBabDefaultOptions ( Ipopt::SmartPtr< Bonmin::RegisteredOptions roptions  )  [inline, virtual]

Setup the defaults options for this algorithm.

Reimplemented in Bonmin::BonminSetup.

Definition at line 155 of file BonBabSetupBase.hpp.

static void Bonmin::BabSetupBase::registerAllOptions ( Ipopt::SmartPtr< Bonmin::RegisteredOptions roptions  )  [static]

Register all the options for this algorithm instance.

Reimplemented in Bonmin::CouenneSetup, and Bonmin::BonminSetup.

virtual void Bonmin::BabSetupBase::readOptionsFile (  )  [inline, virtual]

Get the options from default text file (bonmin.opt) if don't already have them.

Reimplemented in Bonmin::CouenneSetup.

Definition at line 161 of file BonBabSetupBase.hpp.

References readOptions_.

Referenced by Bonmin::CouenneSetup::readOptionsFile().

void Bonmin::BabSetupBase::readOptionsFile ( std::string  fileName  ) 

Get the options from given fileName.

void Bonmin::BabSetupBase::readOptionsString ( std::string  opt_string  ) 

Get the options from long string containing all.

void Bonmin::BabSetupBase::readOptionsStream ( std::istream &  is  ) 

Get the options from stream.

void Bonmin::BabSetupBase::mayPrintDoc (  ) 

May print documentation of options if options print_options_documentation is set to yes.

void Bonmin::BabSetupBase::setOptionsAndJournalist ( Ipopt::SmartPtr< Bonmin::RegisteredOptions roptions,
Ipopt::SmartPtr< Ipopt::OptionsList options,
Ipopt::SmartPtr< Ipopt::Journalist journalist 
) [inline]

Set the value for options, output.

..

Definition at line 181 of file BonBabSetupBase.hpp.

References journalist(), journalist_, options(), options_, roptions(), and roptions_.

void Bonmin::BabSetupBase::initializeOptionsAndJournalist (  ) 

Initialize the options and the journalist.

OsiTMINLPInterface* Bonmin::BabSetupBase::nonlinearSolver (  )  [inline]

Pointer to the non-linear solver used.

Definition at line 197 of file BonBabSetupBase.hpp.

References nonlinearSolver_.

OsiSolverInterface* Bonmin::BabSetupBase::continuousSolver (  )  [inline]

Pointer to the continuous solver to use for relaxations.

Definition at line 202 of file BonBabSetupBase.hpp.

References continuousSolver_.

CuttingMethods& Bonmin::BabSetupBase::cutGenerators (  )  [inline]

list of cutting planes methods to apply with their frequencies.

Definition at line 207 of file BonBabSetupBase.hpp.

References cutGenerators_.

HeuristicMethods& Bonmin::BabSetupBase::heuristics (  )  [inline]

list of Heuristic methods to use.

Definition at line 212 of file BonBabSetupBase.hpp.

References heuristics_.

OsiChooseVariable* Bonmin::BabSetupBase::branchingMethod (  )  [inline]

branching method to use.

Definition at line 217 of file BonBabSetupBase.hpp.

References branchingMethod_.

NodeComparison Bonmin::BabSetupBase::nodeComparisonMethod (  )  [inline]

Method used to compare nodes.

Definition at line 222 of file BonBabSetupBase.hpp.

References nodeComparisonMethod_.

TreeTraversal Bonmin::BabSetupBase::treeTraversalMethod (  )  [inline]

Method used to traverse tree.

Definition at line 227 of file BonBabSetupBase.hpp.

References treeTraversalMethod_.

int Bonmin::BabSetupBase::getIntParameter ( const IntParameter p  )  [inline]

Return value of integer parameter.

Definition at line 232 of file BonBabSetupBase.hpp.

References intParam_.

double Bonmin::BabSetupBase::getDoubleParameter ( const DoubleParameter p  )  [inline]

Return value of double parameter.

Definition at line 237 of file BonBabSetupBase.hpp.

References doubleParam_.

void Bonmin::BabSetupBase::gatherParametersValues (  )  [inline]

Get the values of base parameters from the options stored.

Definition at line 244 of file BonBabSetupBase.hpp.

References options_.

void Bonmin::BabSetupBase::gatherParametersValues ( Ipopt::SmartPtr< OptionsList options  ) 

Get the values of the base parameters from the passed options.

Ipopt::SmartPtr<Ipopt::Journalist> Bonmin::BabSetupBase::journalist (  )  [inline]

Acces storage of Journalist for output.

Definition at line 251 of file BonBabSetupBase.hpp.

References journalist_.

Referenced by setOptionsAndJournalist().

Ipopt::SmartPtr<Ipopt::OptionsList> Bonmin::BabSetupBase::options (  )  [inline]

Acces list of Options.

Definition at line 257 of file BonBabSetupBase.hpp.

References options_.

Referenced by setOptionsAndJournalist().

Ipopt::SmartPtr<Bonmin::RegisteredOptions> Bonmin::BabSetupBase::roptions (  )  [inline]

Access registered Options.

Definition at line 263 of file BonBabSetupBase.hpp.

References roptions_.

Referenced by setOptionsAndJournalist().

const vector<OsiObject *>& Bonmin::BabSetupBase::objects (  )  const [inline]

Access to extra objects.

Definition at line 269 of file BonBabSetupBase.hpp.

References objects_.

vector<OsiObject *>& Bonmin::BabSetupBase::objects (  )  [inline]

Access to extra objects.

Definition at line 275 of file BonBabSetupBase.hpp.

References objects_.

void Bonmin::BabSetupBase::setPriorities (  )  [protected]

Set the priorities into OsiTMINLPInterface when needed.

void Bonmin::BabSetupBase::addSos (  )  [protected]

Add SOS constraints to OsiTMINLPInterface when needed.


Member Data Documentation

int Bonmin::BabSetupBase::intParam_[NumberIntParam] [protected]

storage of integer parameters.

Definition at line 287 of file BonBabSetupBase.hpp.

Referenced by getIntParameter().

int Bonmin::BabSetupBase::defaultIntParam_[NumberIntParam] [static, protected]

default values for int parameters.

Definition at line 289 of file BonBabSetupBase.hpp.

double Bonmin::BabSetupBase::doubleParam_[NumberDoubleParam] [protected]

storage of double parameters.

Definition at line 291 of file BonBabSetupBase.hpp.

Referenced by getDoubleParameter(), and Bonmin::CouenneSetup::setDoubleParameter().

double Bonmin::BabSetupBase::defaultDoubleParam_[NumberDoubleParam] [static, protected]

default values for double parameters.

Definition at line 293 of file BonBabSetupBase.hpp.

OsiTMINLPInterface* Bonmin::BabSetupBase::nonlinearSolver_ [protected]

Storage of the non-linear solver used.

Definition at line 295 of file BonBabSetupBase.hpp.

Referenced by nonlinearSolver(), and setNonlinearSolver().

OsiSolverInterface* Bonmin::BabSetupBase::continuousSolver_ [protected]

Storage of continuous solver.

Definition at line 297 of file BonBabSetupBase.hpp.

Referenced by continuousSolver().

CuttingMethods Bonmin::BabSetupBase::cutGenerators_ [protected]

Cut generation methods.

Definition at line 299 of file BonBabSetupBase.hpp.

Referenced by cutGenerators().

HeuristicMethods Bonmin::BabSetupBase::heuristics_ [protected]

Heuristic methods.

Definition at line 301 of file BonBabSetupBase.hpp.

Referenced by heuristics().

OsiChooseVariable* Bonmin::BabSetupBase::branchingMethod_ [protected]

Branching method.

Definition at line 303 of file BonBabSetupBase.hpp.

Referenced by branchingMethod().

NodeComparison Bonmin::BabSetupBase::nodeComparisonMethod_ [protected]

Node comparison method.

Definition at line 305 of file BonBabSetupBase.hpp.

Referenced by nodeComparisonMethod().

TreeTraversal Bonmin::BabSetupBase::treeTraversalMethod_ [protected]

Tree traversal method.

Definition at line 307 of file BonBabSetupBase.hpp.

Referenced by treeTraversalMethod().

vector<OsiObject *> Bonmin::BabSetupBase::objects_ [protected]

Extra object to add to Cbc (not OsiObjects).

Definition at line 309 of file BonBabSetupBase.hpp.

Referenced by objects().

Ipopt::SmartPtr<Ipopt::Journalist> Bonmin::BabSetupBase::journalist_ [protected]

Storage of Journalist for output.

Definition at line 313 of file BonBabSetupBase.hpp.

Referenced by journalist(), and setOptionsAndJournalist().

Ipopt::SmartPtr<Ipopt::OptionsList> Bonmin::BabSetupBase::options_ [protected]

List of Options.

Definition at line 316 of file BonBabSetupBase.hpp.

Referenced by gatherParametersValues(), options(), and setOptionsAndJournalist().

Ipopt::SmartPtr<Bonmin::RegisteredOptions> Bonmin::BabSetupBase::roptions_ [protected]

Registered Options.

Definition at line 319 of file BonBabSetupBase.hpp.

Referenced by roptions(), and setOptionsAndJournalist().

bool Bonmin::BabSetupBase::readOptions_ [protected]

flag to say if option file was read.

Definition at line 322 of file BonBabSetupBase.hpp.

Referenced by Bonmin::CouenneSetup::readOptionsFile(), and readOptionsFile().

CoinMessageHandler* Bonmin::BabSetupBase::lpMessageHandler_ [protected]

separate message handler if continuousSolver_!= nonlinearSolver.

Definition at line 324 of file BonBabSetupBase.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Jun 26 03:19:53 2008 for Bonmin by  doxygen 1.4.7