Cbc  2.10.10
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
CbcBranchDecision Class Referenceabstract

#include <CbcBranchDecision.hpp>

+ Inheritance diagram for CbcBranchDecision:
+ Collaboration diagram for CbcBranchDecision:

Public Member Functions

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

Protected Attributes

CbcBranchingObjectobject_
 
CbcModelmodel_
 Pointer to model. More...
 
OsiChooseVariable * chooseMethod_
 

Private Member Functions

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

Detailed Description

Definition at line 28 of file CbcBranchDecision.hpp.

Constructor & Destructor Documentation

◆ CbcBranchDecision() [1/2]

CbcBranchDecision::CbcBranchDecision ( )

Default Constructor.

◆ CbcBranchDecision() [2/2]

CbcBranchDecision::CbcBranchDecision ( const CbcBranchDecision )

◆ ~CbcBranchDecision()

virtual CbcBranchDecision::~CbcBranchDecision ( )
virtual

Destructor.

Member Function Documentation

◆ clone()

virtual CbcBranchDecision* CbcBranchDecision::clone ( ) const
pure virtual

◆ initialize()

virtual void CbcBranchDecision::initialize ( CbcModel model)
pure virtual

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

Implemented in CbcBranchDynamicDecision, CbcBranchDefaultDecision, and CbcBranchUserDecision.

◆ betterBranch()

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 CbcBranchDynamicDecision, CbcBranchDefaultDecision, and CbcBranchUserDecision.

◆ bestBranch()

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 CbcBranchDefaultDecision, and CbcBranchUserDecision.

◆ whichMethod()

virtual int CbcBranchDecision::whichMethod ( )
inlinevirtual

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

Reimplemented in CbcBranchDynamicDecision.

Definition at line 75 of file CbcBranchDecision.hpp.

◆ saveBranchingObject()

virtual void CbcBranchDecision::saveBranchingObject ( OsiBranchingObject *  )
inlinevirtual

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 82 of file CbcBranchDecision.hpp.

◆ updateInformation()

virtual void CbcBranchDecision::updateInformation ( OsiSolverInterface *  ,
const CbcNode  
)
inlinevirtual

Pass in information on branch just done.

assumes object can get information from solver

Reimplemented in CbcBranchDynamicDecision.

Definition at line 85 of file CbcBranchDecision.hpp.

◆ setBestCriterion()

virtual void CbcBranchDecision::setBestCriterion ( double  )
inlinevirtual

Sets or gets best criterion so far.

Reimplemented in CbcBranchDynamicDecision, and CbcBranchDefaultDecision.

Definition at line 88 of file CbcBranchDecision.hpp.

◆ getBestCriterion()

virtual double CbcBranchDecision::getBestCriterion ( ) const
inlinevirtual

Reimplemented in CbcBranchDynamicDecision, and CbcBranchDefaultDecision.

Definition at line 89 of file CbcBranchDecision.hpp.

◆ generateCpp()

virtual void CbcBranchDecision::generateCpp ( FILE *  )
inlinevirtual

Create C++ lines to get to current state.

Definition at line 94 of file CbcBranchDecision.hpp.

◆ cbcModel()

CbcModel* CbcBranchDecision::cbcModel ( ) const
inline

Model.

Definition at line 96 of file CbcBranchDecision.hpp.

◆ chooseMethod()

OsiChooseVariable* CbcBranchDecision::chooseMethod ( ) const
inline

Definition at line 111 of file CbcBranchDecision.hpp.

◆ setChooseMethod()

void CbcBranchDecision::setChooseMethod ( const OsiChooseVariable &  method)

Set (clone) chooseMethod.

◆ operator=()

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

Assignment is illegal.

Member Data Documentation

◆ object_

CbcBranchingObject* CbcBranchDecision::object_
protected

Definition at line 120 of file CbcBranchDecision.hpp.

◆ model_

CbcModel* CbcBranchDecision::model_
protected

Pointer to model.

Definition at line 122 of file CbcBranchDecision.hpp.

◆ chooseMethod_

OsiChooseVariable* CbcBranchDecision::chooseMethod_
protected

Definition at line 126 of file CbcBranchDecision.hpp.


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