#include <CbcBranchDecision.hpp>
Public Member Functions | |
CbcBranchDecision () | |
Default Constructor. | |
CbcBranchDecision (const CbcBranchDecision &) | |
virtual | ~CbcBranchDecision () |
Destructor. | |
virtual CbcBranchDecision * | clone () 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 *) |
Saves a clone of current branching object. | |
virtual void | updateInformation (OsiSolverInterface *, const CbcNode *) |
Pass in information on branch just done. | |
virtual void | setBestCriterion (double) |
Sets or gets best criterion so far. | |
virtual double | getBestCriterion () const |
virtual void | generateCpp (FILE *) |
Create C++ lines to get to current state. | |
CbcModel * | cbcModel () const |
Model. | |
OsiChooseVariable * | chooseMethod () const |
void | setChooseMethod (const OsiChooseVariable &method) |
Set (clone) chooseMethod. | |
CbcBranchDecision () | |
Default Constructor. | |
CbcBranchDecision (const CbcBranchDecision &) | |
virtual | ~CbcBranchDecision () |
Destructor. | |
virtual CbcBranchDecision * | clone () 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 *) |
Saves a clone of current branching object. | |
virtual void | updateInformation (OsiSolverInterface *, const CbcNode *) |
Pass in information on branch just done. | |
virtual void | setBestCriterion (double) |
Sets or gets best criterion so far. | |
virtual double | getBestCriterion () const |
virtual void | generateCpp (FILE *) |
Create C++ lines to get to current state. | |
CbcModel * | cbcModel () const |
Model. | |
OsiChooseVariable * | chooseMethod () const |
void | setChooseMethod (const OsiChooseVariable &method) |
Set (clone) chooseMethod. | |
Protected Attributes | |
CbcBranchingObject * | object_ |
CbcModel * | model_ |
Pointer to model. | |
OsiChooseVariable * | chooseMethod_ |
Private Member Functions | |
CbcBranchDecision & | operator= (const CbcBranchDecision &rhs) |
Assignment is illegal. | |
CbcBranchDecision & | operator= (const CbcBranchDecision &rhs) |
Assignment is illegal. |
Definition at line 22 of file CbcBranchDecision.hpp.
CbcBranchDecision::CbcBranchDecision | ( | ) |
Default Constructor.
CbcBranchDecision::CbcBranchDecision | ( | const CbcBranchDecision & | ) |
virtual CbcBranchDecision::~CbcBranchDecision | ( | ) | [virtual] |
Destructor.
CbcBranchDecision::CbcBranchDecision | ( | ) |
Default Constructor.
CbcBranchDecision::CbcBranchDecision | ( | const CbcBranchDecision & | ) |
virtual CbcBranchDecision::~CbcBranchDecision | ( | ) | [virtual] |
Destructor.
virtual CbcBranchDecision* CbcBranchDecision::clone | ( | ) | const [pure virtual] |
Clone.
Implemented in CbcBranchUserDecision, CbcBranchDefaultDecision, CbcBranchDynamicDecision, CbcBranchDefaultDecision, and CbcBranchDynamicDecision.
virtual void CbcBranchDecision::initialize | ( | CbcModel * | model | ) | [pure virtual] |
Initialize e.g. before starting to choose a branch at a node.
Implemented in CbcBranchUserDecision, CbcBranchDefaultDecision, CbcBranchDynamicDecision, 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, CbcBranchDynamicDecision, 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, CbcBranchDefaultDecision, 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, and CbcBranchDynamicDecision.
Definition at line 68 of file CbcBranchDecision.hpp.
virtual void CbcBranchDecision::saveBranchingObject | ( | OsiBranchingObject * | ) | [inline, virtual] |
Saves a clone of current branching object.
Can be used to update information on object causing branch - after branch
Reimplemented in CbcBranchDynamicDecision, and CbcBranchDynamicDecision.
Definition at line 74 of file CbcBranchDecision.hpp.
virtual void CbcBranchDecision::updateInformation | ( | OsiSolverInterface * | , |
const CbcNode * | |||
) | [inline, virtual] |
Pass in information on branch just done.
assumes object can get information from solver
Reimplemented in CbcBranchDynamicDecision, and CbcBranchDynamicDecision.
Definition at line 77 of file CbcBranchDecision.hpp.
virtual void CbcBranchDecision::setBestCriterion | ( | double | ) | [inline, virtual] |
Sets or gets best criterion so far.
Reimplemented in CbcBranchDefaultDecision, CbcBranchDynamicDecision, CbcBranchDefaultDecision, and CbcBranchDynamicDecision.
Definition at line 80 of file CbcBranchDecision.hpp.
virtual double CbcBranchDecision::getBestCriterion | ( | ) | const [inline, virtual] |
Reimplemented in CbcBranchDefaultDecision, CbcBranchDynamicDecision, CbcBranchDefaultDecision, and CbcBranchDynamicDecision.
Definition at line 81 of file CbcBranchDecision.hpp.
virtual void CbcBranchDecision::generateCpp | ( | FILE * | ) | [inline, virtual] |
Create C++ lines to get to current state.
Definition at line 85 of file CbcBranchDecision.hpp.
CbcModel* CbcBranchDecision::cbcModel | ( | ) | const [inline] |
Model.
Definition at line 87 of file CbcBranchDecision.hpp.
OsiChooseVariable* CbcBranchDecision::chooseMethod | ( | ) | const [inline] |
Definition at line 101 of file CbcBranchDecision.hpp.
void CbcBranchDecision::setChooseMethod | ( | const OsiChooseVariable & | method | ) |
Set (clone) chooseMethod.
CbcBranchDecision& CbcBranchDecision::operator= | ( | const CbcBranchDecision & | rhs | ) | [private] |
Assignment is illegal.
virtual CbcBranchDecision* CbcBranchDecision::clone | ( | ) | const [pure virtual] |
Clone.
Implemented in CbcBranchUserDecision, CbcBranchDefaultDecision, CbcBranchDynamicDecision, CbcBranchDefaultDecision, and CbcBranchDynamicDecision.
virtual void CbcBranchDecision::initialize | ( | CbcModel * | model | ) | [pure virtual] |
Initialize e.g. before starting to choose a branch at a node.
Implemented in CbcBranchUserDecision, CbcBranchDefaultDecision, CbcBranchDynamicDecision, 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, CbcBranchDynamicDecision, 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, CbcBranchDefaultDecision, 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, and CbcBranchDynamicDecision.
Definition at line 68 of file CbcBranchDecision.hpp.
virtual void CbcBranchDecision::saveBranchingObject | ( | OsiBranchingObject * | ) | [inline, virtual] |
Saves a clone of current branching object.
Can be used to update information on object causing branch - after branch
Reimplemented in CbcBranchDynamicDecision, and CbcBranchDynamicDecision.
Definition at line 74 of file CbcBranchDecision.hpp.
virtual void CbcBranchDecision::updateInformation | ( | OsiSolverInterface * | , |
const CbcNode * | |||
) | [inline, virtual] |
Pass in information on branch just done.
assumes object can get information from solver
Reimplemented in CbcBranchDynamicDecision, and CbcBranchDynamicDecision.
Definition at line 77 of file CbcBranchDecision.hpp.
virtual void CbcBranchDecision::setBestCriterion | ( | double | ) | [inline, virtual] |
Sets or gets best criterion so far.
Reimplemented in CbcBranchDefaultDecision, CbcBranchDynamicDecision, CbcBranchDefaultDecision, and CbcBranchDynamicDecision.
Definition at line 80 of file CbcBranchDecision.hpp.
virtual double CbcBranchDecision::getBestCriterion | ( | ) | const [inline, virtual] |
Reimplemented in CbcBranchDefaultDecision, CbcBranchDynamicDecision, CbcBranchDefaultDecision, and CbcBranchDynamicDecision.
Definition at line 81 of file CbcBranchDecision.hpp.
virtual void CbcBranchDecision::generateCpp | ( | FILE * | ) | [inline, virtual] |
Create C++ lines to get to current state.
Definition at line 85 of file CbcBranchDecision.hpp.
CbcModel* CbcBranchDecision::cbcModel | ( | ) | const [inline] |
Model.
Definition at line 87 of file CbcBranchDecision.hpp.
OsiChooseVariable* CbcBranchDecision::chooseMethod | ( | ) | const [inline] |
Definition at line 101 of file CbcBranchDecision.hpp.
void CbcBranchDecision::setChooseMethod | ( | const OsiChooseVariable & | method | ) |
Set (clone) chooseMethod.
CbcBranchDecision& CbcBranchDecision::operator= | ( | const CbcBranchDecision & | rhs | ) | [private] |
Assignment is illegal.
CbcBranchingObject * CbcBranchDecision::object_ [protected] |
Definition at line 110 of file CbcBranchDecision.hpp.
CbcModel * CbcBranchDecision::model_ [protected] |
Pointer to model.
Definition at line 112 of file CbcBranchDecision.hpp.
OsiChooseVariable * CbcBranchDecision::chooseMethod_ [protected] |
Definition at line 116 of file CbcBranchDecision.hpp.