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.

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< CuttingMethodCuttingMethods
typedef std::list
< HeuristicMethod
HeuristicMethods

Public Member Functions

void gatherParametersValues ()
 Get the values of base parameters from the options stored.
void gatherParametersValues (Ipopt::SmartPtr< Ipopt::OptionsList > options)
 Get the values of the base parameters from the passed options.
Ipopt::SmartPtr
< Ipopt::Journalist > 
journalist ()
 Acces storage of Journalist for output.
Ipopt::SmartPtr
< Ipopt::OptionsList > 
options ()
 Acces list of Options.
Ipopt::SmartPtr
< Bonmin::RegisteredOptions
roptions ()
 Access registered Options.
const vector< OsiObject * > & objects () const
 Access to extra objects.
vector< OsiObject * > & objects ()
 Access to extra objects.
void addCutGenerator (CuttingMethod &cg)
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.
OsiSolverInterface * continuousSolver ()
 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.
OsiChooseVariable * branchingMethod ()
 branching method to use.
NodeComparisonnodeComparisonMethod ()
 Method used to compare nodes.
TreeTraversal treeTraversalMethod ()
 Method used to traverse tree.
int getIntParameter (const IntParameter &p) const
 Return value of integer parameter.
double getDoubleParameter (const DoubleParameter &p) const
 Return value of double parameter.
void setIntParameter (const IntParameter &p, const int v)
 Return value of integer parameter.
void setDoubleParameter (const DoubleParameter &p, const double v)
 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.
OsiSolverInterface * continuousSolver_
 Storage of continuous solver.
CuttingMethods cutGenerators_
 Cut generation methods.
HeuristicMethods heuristics_
 Heuristic methods.
OsiChooseVariable * branchingMethod_
 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::Journalist > 
journalist_
 Storage of Journalist for output.
Ipopt::SmartPtr
< Ipopt::OptionsList > 
options_
 List of Options.
Ipopt::SmartPtr
< Bonmin::RegisteredOptions
roptions_
 Registered Options.
bool readOptions_
 flag to say if option file was read.
CoinMessageHandler * messageHandler_
 separate message handler.
std::string prefix_
 Prefix to use when reading options.

Static Protected Attributes

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

Enums for optionslist parameters



enum  VarSelectStra_Enum {
  MOST_FRACTIONAL = 0, STRONG_BRANCHING, RELIABILITY_BRANCHING, QP_STRONG_BRANCHING,
  LP_STRONG_BRANCHING, NLP_STRONG_BRANCHING, OSI_SIMPLE, OSI_STRONG,
  RANDOM
}
 

Parameters represented by an integer.

More...
enum  IntParameter {
  BabLogLevel = 0, BabLogInterval, MaxFailures, FailureBehavior,
  MaxInfeasible, NumberStrong, MinReliability, MaxNodes,
  MaxSolutions, MaxIterations, SpecialOption, DisableSos,
  NumCutPasses, NumCutPassesAtRoot, RootLogLevel, NumberIntParam
}
 

Parameters represented by an integer.

More...
enum  DoubleParameter {
  CutoffDecr = 0, Cutoff, AllowableGap, AllowableFractionGap,
  IntTol, MaxTime, NumberDoubleParam
}
 

Parameters represented by a double.

More...
 BabSetupBase (const CoinMessageHandler *handler=NULL)
 Default constructor.
 BabSetupBase (Ipopt::SmartPtr< TMINLP > tminlp, const CoinMessageHandler *handler=NULL)
 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 &setup, OsiTMINLPInterface &nlp)
 Copy but uses an other nlp.
 BabSetupBase (const BabSetupBase &setup, OsiTMINLPInterface &nlp, const std::string &prefix)
 Copy but uses an other nlp.
 BabSetupBase (const BabSetupBase &other)
 Copy constructor.
virtual BabSetupBaseclone () const =0
 virtual copy constructor.
virtual BabSetupBaseclone (OsiTMINLPInterface &nlp) const
 Make a copy with solver replace by one passed .
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.
const char * prefix () const
 Get prefix to use for options.
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.

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

Definition at line 62 of file BonBabSetupBase.hpp.

Definition at line 63 of file BonBabSetupBase.hpp.


Member Enumeration Documentation

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 66 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 76 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 86 of file BonBabSetupBase.hpp.

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.

RootLogLevel 

Log level for root relaxation.

NumberIntParam 

Dummy end to size table.

Definition at line 102 of file BonBabSetupBase.hpp.

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


Constructor & Destructor Documentation

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 212 of file BonBabSetupBase.cpp.

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

Construct from existing application.

Definition at line 296 of file BonBabSetupBase.cpp.

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

Construct from existing TMINLP interface.

Definition at line 263 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 127 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 177 of file BonBabSetupBase.cpp.

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

Copy constructor.

Definition at line 77 of file BonBabSetupBase.cpp.

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

Virtual destructor.

Definition at line 317 of file BonBabSetupBase.cpp.


Member Function Documentation

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

virtual copy constructor.

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

BabSetupBase * Bonmin::BabSetupBase::clone ( OsiTMINLPInterface nlp  )  const [virtual]

Make a copy with solver replace by one passed .

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

Definition at line 234 of file BonBabSetupBase.cpp.

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

use existing TMINLP interface (containing the options).

Definition at line 285 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 240 of file BonBabSetupBase.cpp.

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

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

Register all the options for this algorithm instance.

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

Definition at line 392 of file BonBabSetupBase.cpp.

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

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

Register all the options for this algorithm instance.

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

Definition at line 398 of file BonBabSetupBase.cpp.

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

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

Reimplemented in Couenne::CouenneSetup.

Definition at line 189 of file BonBabSetupBase.hpp.

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

Get the options from given fileName.

Definition at line 662 of file BonBabSetupBase.cpp.

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

Get the options from long string containing all.

Definition at line 689 of file BonBabSetupBase.cpp.

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

Get the options from stream.

Definition at line 699 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 718 of file BonBabSetupBase.cpp.

const char* Bonmin::BabSetupBase::prefix (  )  const [inline]

Get prefix to use for options.

Definition at line 209 of file BonBabSetupBase.hpp.

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

void Bonmin::BabSetupBase::initializeOptionsAndJournalist (  ) 

Initialize the options and the journalist.

Definition at line 629 of file BonBabSetupBase.cpp.

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

Pointer to the non-linear solver used.

Definition at line 230 of file BonBabSetupBase.hpp.

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

Pointer to the continuous solver to use for relaxations.

Definition at line 235 of file BonBabSetupBase.hpp.

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

list of cutting planes methods to apply with their frequencies.

Definition at line 240 of file BonBabSetupBase.hpp.

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

list of Heuristic methods to use.

Definition at line 245 of file BonBabSetupBase.hpp.

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

branching method to use.

Definition at line 250 of file BonBabSetupBase.hpp.

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

Method used to compare nodes.

Definition at line 255 of file BonBabSetupBase.hpp.

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

Method used to traverse tree.

Definition at line 260 of file BonBabSetupBase.hpp.

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

Return value of integer parameter.

Definition at line 265 of file BonBabSetupBase.hpp.

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

Return value of double parameter.

Reimplemented in Couenne::CouenneSetup.

Definition at line 270 of file BonBabSetupBase.hpp.

void Bonmin::BabSetupBase::setIntParameter ( const IntParameter p,
const int  v 
) [inline]

Return value of integer parameter.

Definition at line 275 of file BonBabSetupBase.hpp.

void Bonmin::BabSetupBase::setDoubleParameter ( const DoubleParameter p,
const double  v 
) [inline]

Return value of double parameter.

Reimplemented in Couenne::CouenneSetup.

Definition at line 280 of file BonBabSetupBase.hpp.

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

Get the values of base parameters from the options stored.

Definition at line 287 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 343 of file BonBabSetupBase.cpp.

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

Acces storage of Journalist for output.

Definition at line 294 of file BonBabSetupBase.hpp.

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

Acces list of Options.

Definition at line 300 of file BonBabSetupBase.hpp.

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

Access registered Options.

Definition at line 306 of file BonBabSetupBase.hpp.

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

Access to extra objects.

Definition at line 312 of file BonBabSetupBase.hpp.

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

Access to extra objects.

Definition at line 318 of file BonBabSetupBase.hpp.

void Bonmin::BabSetupBase::addCutGenerator ( CuttingMethod cg  )  [inline]

Reimplemented in Bonmin::BonminSetup.

Definition at line 323 of file BonBabSetupBase.hpp.

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

Set the priorities into OsiTMINLPInterface when needed.

Definition at line 750 of file BonBabSetupBase.cpp.

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

Add SOS constraints to OsiTMINLPInterface when needed.

Definition at line 787 of file BonBabSetupBase.cpp.


Member Data Documentation

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

storage of integer parameters.

Definition at line 333 of file BonBabSetupBase.hpp.

int Bonmin::BabSetupBase::defaultIntParam_ [static, protected]
Initial value:
 {
        1 ,
        100 ,
        2 ,
        0 ,
        0 ,
        5 ,
        2 ,
        COIN_INT_MAX ,
        COIN_INT_MAX ,
        COIN_INT_MAX ,
        0 ,
        0 ,
        1 ,
        20 ,
        0 
      }

default values for int parameters.

Definition at line 335 of file BonBabSetupBase.hpp.

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

storage of double parameters.

Definition at line 337 of file BonBabSetupBase.hpp.

double Bonmin::BabSetupBase::defaultDoubleParam_ [static, protected]
Initial value:
 {
        0 ,
        COIN_DBL_MAX ,
        0 ,
        0 ,
        1e-09 ,
        COIN_DBL_MAX ,
      }

default values for double parameters.

Definition at line 339 of file BonBabSetupBase.hpp.

Storage of the non-linear solver used.

Definition at line 341 of file BonBabSetupBase.hpp.

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

Storage of continuous solver.

Definition at line 343 of file BonBabSetupBase.hpp.

Cut generation methods.

Definition at line 345 of file BonBabSetupBase.hpp.

Heuristic methods.

Definition at line 347 of file BonBabSetupBase.hpp.

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

Branching method.

Definition at line 349 of file BonBabSetupBase.hpp.

Node comparison method.

Definition at line 351 of file BonBabSetupBase.hpp.

Tree traversal method.

Definition at line 353 of file BonBabSetupBase.hpp.

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

Extra object to add to Cbc (not OsiObjects).

Definition at line 355 of file BonBabSetupBase.hpp.

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

Storage of Journalist for output.

Definition at line 359 of file BonBabSetupBase.hpp.

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

List of Options.

Definition at line 362 of file BonBabSetupBase.hpp.

Registered Options.

Definition at line 365 of file BonBabSetupBase.hpp.

flag to say if option file was read.

Definition at line 368 of file BonBabSetupBase.hpp.

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

separate message handler.

Definition at line 370 of file BonBabSetupBase.hpp.

std::string Bonmin::BabSetupBase::prefix_ [protected]

Prefix to use when reading options.

Definition at line 372 of file BonBabSetupBase.hpp.


The documentation for this class was generated from the following files:

Generated on 16 Feb 2012 by  doxygen 1.6.1