CbcBranchDecision Class Reference

Abstract branching decision base class. More...

#include <CbcBranchBase.hpp>

Inheritance diagram for CbcBranchDecision:
Inheritance graph
[legend]
Collaboration diagram for CbcBranchDecision:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CbcBranchDecision ()
 Default Constructor.
 CbcBranchDecision (const CbcBranchDecision &)
virtual ~CbcBranchDecision ()
 Destructor.
virtual CbcBranchDecisionclone () const =0
 Clone.
virtual void initialize (CbcModel *model)=0
 Initialize e.g. before starting to choose a branch at a node.
virtual int betterBranch (CbcBranchingObject *thisOne, CbcBranchingObject *bestSoFar, double changeUp, int numberInfeasibilitiesUp, double changeDown, int numberInfeasibilitiesDown)=0
 Compare two branching objects.
virtual int bestBranch (CbcBranchingObject **objects, int numberObjects, int numberUnsatisfied, double *changeUp, int *numberInfeasibilitiesUp, double *changeDown, int *numberInfeasibilitiesDown, double objectiveValue)
 Compare N branching objects.
virtual int whichMethod ()
 Says whether this method can handle both methods - 1 better, 2 best, 3 both.
virtual void saveBranchingObject (OsiBranchingObject *object)
 Saves a clone of current branching object.
virtual void updateInformation (OsiSolverInterface *solver, const CbcNode *node)
 Pass in information on branch just done.
virtual void setBestCriterion (double value)
 Sets or gets best criterion so far.
virtual double getBestCriterion () const
virtual void generateCpp (FILE *fp)
 Create C++ lines to get to current state.
CbcModelcbcModel () const
 Model.
OsiChooseVariablechooseMethod () const
void setChooseMethod (const OsiChooseVariable &method)
 Set (clone) chooseMethod.

Protected Attributes

CbcBranchingObjectobject_
CbcModelmodel_
 Pointer to model.
OsiChooseVariablechooseMethod_

Private Member Functions

CbcBranchDecisionoperator= (const CbcBranchDecision &rhs)
 Assignment is illegal.

Detailed Description

Abstract branching decision base class.

In the abstract, an CbcBranchDecision object is expected to be able to compare two possible branching choices.

The betterBranch() method is the crucial routine. It is expected to be able to compare two CbcBranchingObjects .

See CbcObject for an overview of the three classes (CbcObject, CbcBranchingObject, and CbcBranchDecision) which make up cbc's branching model.

Definition at line 434 of file CbcBranchBase.hpp.


Constructor & Destructor Documentation

CbcBranchDecision::CbcBranchDecision (  ) 

Default Constructor.

CbcBranchDecision::CbcBranchDecision ( const CbcBranchDecision  ) 
virtual CbcBranchDecision::~CbcBranchDecision (  )  [virtual]

Destructor.


Member Function Documentation

virtual CbcBranchDecision* CbcBranchDecision::clone (  )  const [pure virtual]
virtual void CbcBranchDecision::initialize ( CbcModel model  )  [pure virtual]

Initialize e.g. before starting to choose a branch at a node.

Implemented in CbcBranchUserDecision, CbcBranchDefaultDecision, and CbcBranchDynamicDecision.

virtual int CbcBranchDecision::betterBranch ( CbcBranchingObject thisOne,
CbcBranchingObject bestSoFar,
double  changeUp,
int  numberInfeasibilitiesUp,
double  changeDown,
int  numberInfeasibilitiesDown 
) [pure virtual]

Compare two branching objects.

Return nonzero if branching using thisOne is better than branching using bestSoFar.

If bestSoFar is NULL, the routine should return a nonzero value. This routine is used only after strong branching. Either this or bestBranch is used depending which user wants.

Implemented in CbcBranchUserDecision, CbcBranchDefaultDecision, and CbcBranchDynamicDecision.

virtual int CbcBranchDecision::bestBranch ( CbcBranchingObject **  objects,
int  numberObjects,
int  numberUnsatisfied,
double *  changeUp,
int *  numberInfeasibilitiesUp,
double *  changeDown,
int *  numberInfeasibilitiesDown,
double  objectiveValue 
) [virtual]

Compare N branching objects.

Return index of best and sets way of branching in chosen object.

Either this or betterBranch is used depending which user wants.

Reimplemented in CbcBranchUserDecision, and CbcBranchDefaultDecision.

virtual int CbcBranchDecision::whichMethod (  )  [inline, virtual]

Says whether this method can handle both methods - 1 better, 2 best, 3 both.

Reimplemented in CbcBranchDynamicDecision.

Definition at line 480 of file CbcBranchBase.hpp.

virtual void CbcBranchDecision::saveBranchingObject ( OsiBranchingObject object  )  [inline, virtual]

Saves a clone of current branching object.

Can be used to update information on object causing branch - after branch

Reimplemented in CbcBranchDynamicDecision.

Definition at line 484 of file CbcBranchBase.hpp.

virtual void CbcBranchDecision::updateInformation ( OsiSolverInterface solver,
const CbcNode node 
) [inline, virtual]

Pass in information on branch just done.

assumes object can get information from solver

Reimplemented in CbcBranchDynamicDecision.

Definition at line 487 of file CbcBranchBase.hpp.

virtual void CbcBranchDecision::setBestCriterion ( double  value  )  [inline, virtual]

Sets or gets best criterion so far.

Reimplemented in CbcBranchDefaultDecision, and CbcBranchDynamicDecision.

Definition at line 490 of file CbcBranchBase.hpp.

virtual double CbcBranchDecision::getBestCriterion (  )  const [inline, virtual]

Reimplemented in CbcBranchDefaultDecision, and CbcBranchDynamicDecision.

Definition at line 491 of file CbcBranchBase.hpp.

virtual void CbcBranchDecision::generateCpp ( FILE *  fp  )  [inline, virtual]

Create C++ lines to get to current state.

Definition at line 493 of file CbcBranchBase.hpp.

CbcModel* CbcBranchDecision::cbcModel (  )  const [inline]

Model.

Definition at line 495 of file CbcBranchBase.hpp.

OsiChooseVariable* CbcBranchDecision::chooseMethod (  )  const [inline]

Definition at line 500 of file CbcBranchBase.hpp.

void CbcBranchDecision::setChooseMethod ( const OsiChooseVariable method  ) 

Set (clone) chooseMethod.

CbcBranchDecision& CbcBranchDecision::operator= ( const CbcBranchDecision rhs  )  [private]

Assignment is illegal.

Reimplemented in CbcBranchUserDecision, CbcBranchDefaultDecision, and CbcBranchDynamicDecision.


Member Data Documentation

Definition at line 508 of file CbcBranchBase.hpp.

Pointer to model.

Definition at line 510 of file CbcBranchBase.hpp.

Definition at line 514 of file CbcBranchBase.hpp.


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

Generated on 15 Mar 2015 for Coin-All by  doxygen 1.6.1