Bonmin::CbcDiver Class Reference

Class to do diving in the tree. More...

#include <BonDiver.hpp>

List of all members.

Public Member Functions

 CbcDiver ()
 Default constructor.
 CbcDiver (const CbcDiver &rhs)
 Copy constructor.
CbcDiveroperator= (const CbcDiver &rhs)
 Assignment operator.
virtual ~CbcDiver ()
 Destructor.
virtual CbcTree * clone () const
 copy constructor.
virtual void cleanTree (CbcModel *model, double cutoff, double &bestPossibleObjective)
 Prune the tree using an objective function cutoff if nextOnBranch_ exists we push it on the heap and call CbcTree function.
virtual double getBestPossibleObjective ()
 Get best possible objective function in the tree.
virtual void endSearch ()
 Don't know what this is yet?
void initialize (Ipopt::SmartPtr< Ipopt::OptionsList > options)
 Initialize the method (get options).
Heap access and maintenance methods.
virtual CbcNode * top () const
 Return top node (next node to process.*/.
virtual void push (CbcNode *x)
 Add node to the heap.
virtual void pop ()
 Remove the top node of the heap.
virtual CbcNode * bestNode (double cutoff)
 Remove the best node from the heap and return it.
vector methods
virtual bool empty ()
 Test if empty.
virtual int size ()
 Give size of the tree.

Static Public Member Functions

static void registerOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
 Register the options of the method.

Private Attributes

bool treeCleaning_
 Say if we are cleaning the tree (then only call CbcTree functions).
CbcNode * nextOnBranch_
 Noext node on the branch.
bool stop_diving_on_cutoff_
 Flag indicating if we want to stop diving based on the guessed objective value and the cutoff value.


Detailed Description

Class to do diving in the tree.

Principle is that branch-and-bound follows current branch of the tree untill it hits the bottom at which point it goes to the best candidate (according to CbcCompare) on the heap.

Definition at line 25 of file BonDiver.hpp.


Constructor & Destructor Documentation

Bonmin::CbcDiver::CbcDiver (  ) 

Default constructor.

Definition at line 23 of file BonDiver.cpp.

Referenced by clone().

Bonmin::CbcDiver::CbcDiver ( const CbcDiver rhs  ) 

Copy constructor.

Definition at line 30 of file BonDiver.cpp.

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

Destructor.

Definition at line 50 of file BonDiver.cpp.


Member Function Documentation

CbcDiver & Bonmin::CbcDiver::operator= ( const CbcDiver rhs  ) 

Assignment operator.

Definition at line 38 of file BonDiver.cpp.

References nextOnBranch_, stop_diving_on_cutoff_, and treeCleaning_.

CbcTree * Bonmin::CbcDiver::clone (  )  const [virtual]

copy constructor.

Definition at line 55 of file BonDiver.cpp.

References CbcDiver().

CbcNode * Bonmin::CbcDiver::top (  )  const [virtual]

Return top node (next node to process.*/.

Definition at line 63 of file BonDiver.cpp.

References nextOnBranch_, and treeCleaning_.

void Bonmin::CbcDiver::push ( CbcNode *  x  )  [virtual]

Add node to the heap.

Definition at line 76 of file BonDiver.cpp.

References nextOnBranch_, and treeCleaning_.

void Bonmin::CbcDiver::pop (  )  [virtual]

Remove the top node of the heap.

Definition at line 93 of file BonDiver.cpp.

References nextOnBranch_, and treeCleaning_.

CbcNode * Bonmin::CbcDiver::bestNode ( double  cutoff  )  [virtual]

Remove the best node from the heap and return it.

Definition at line 106 of file BonDiver.cpp.

References nextOnBranch_, stop_diving_on_cutoff_, and treeCleaning_.

bool Bonmin::CbcDiver::empty (  )  [virtual]

Test if empty.

Definition at line 133 of file BonDiver.cpp.

References nextOnBranch_.

virtual int Bonmin::CbcDiver::size (  )  [inline, virtual]

Give size of the tree.

Definition at line 61 of file BonDiver.hpp.

References nextOnBranch_.

void Bonmin::CbcDiver::cleanTree ( CbcModel *  model,
double  cutoff,
double &  bestPossibleObjective 
) [virtual]

Prune the tree using an objective function cutoff if nextOnBranch_ exists we push it on the heap and call CbcTree function.

This routine removes all nodes with objective worst than the specified cutoff value. It also sets bestPossibleObjective to best of all on tree before deleting.

Definition at line 142 of file BonDiver.cpp.

References nextOnBranch_, and treeCleaning_.

double Bonmin::CbcDiver::getBestPossibleObjective (  )  [virtual]

Get best possible objective function in the tree.

Definition at line 154 of file BonDiver.cpp.

References nextOnBranch_.

virtual void Bonmin::CbcDiver::endSearch (  )  [inline, virtual]

Don't know what this is yet?

Definition at line 81 of file BonDiver.hpp.

References nextOnBranch_.

void Bonmin::CbcDiver::registerOptions ( Ipopt::SmartPtr< Bonmin::RegisteredOptions roptions  )  [static]

Register the options of the method.

Definition at line 168 of file BonDiver.cpp.

References Bonmin::RegisteredOptions::BonminCategory.

Referenced by Bonmin::BabSetupBase::registerAllOptions().

void Bonmin::CbcDiver::initialize ( Ipopt::SmartPtr< Ipopt::OptionsList >  options  ) 

Initialize the method (get options).

Definition at line 182 of file BonDiver.cpp.

References stop_diving_on_cutoff_.


Member Data Documentation

bool Bonmin::CbcDiver::treeCleaning_ [private]

Say if we are cleaning the tree (then only call CbcTree functions).

Definition at line 94 of file BonDiver.hpp.

Referenced by bestNode(), cleanTree(), operator=(), pop(), push(), and top().

CbcNode* Bonmin::CbcDiver::nextOnBranch_ [private]

Noext node on the branch.

Definition at line 96 of file BonDiver.hpp.

Referenced by bestNode(), cleanTree(), empty(), endSearch(), getBestPossibleObjective(), operator=(), pop(), push(), size(), and top().

bool Bonmin::CbcDiver::stop_diving_on_cutoff_ [private]

Flag indicating if we want to stop diving based on the guessed objective value and the cutoff value.

Definition at line 99 of file BonDiver.hpp.

Referenced by bestNode(), initialize(), and operator=().


The documentation for this class was generated from the following files:
Generated on Thu Oct 8 03:08:51 2009 by  doxygen 1.4.7