Branching decision default class.
More...
#include <CbcBranchDefaultDecision.hpp>
|
| CbcBranchDefaultDecision () |
|
| CbcBranchDefaultDecision (const CbcBranchDefaultDecision &) |
|
virtual | ~CbcBranchDefaultDecision () |
|
virtual CbcBranchDecision * | clone () const |
| Clone. More...
|
|
virtual void | initialize (CbcModel *model) |
| Initialize, e.g. before the start of branch selection at a node. More...
|
|
virtual int | betterBranch (CbcBranchingObject *thisOne, CbcBranchingObject *bestSoFar, double changeUp, int numInfUp, double changeDn, int numInfDn) |
| Compare two branching objects. More...
|
|
virtual void | setBestCriterion (double value) |
| Sets or gets best criterion so far. More...
|
|
virtual double | getBestCriterion () const |
|
virtual int | bestBranch (CbcBranchingObject **objects, int numberObjects, int numberUnsatisfied, double *changeUp, int *numberInfeasibilitiesUp, double *changeDown, int *numberInfeasibilitiesDown, double objectiveValue) |
| Compare N branching objects. More...
|
|
| CbcBranchDecision () |
| Default Constructor. More...
|
|
| CbcBranchDecision (const CbcBranchDecision &) |
|
virtual | ~CbcBranchDecision () |
| Destructor. 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 | generateCpp (FILE *) |
| Create C++ lines to get to current state. More...
|
|
CbcModel * | cbcModel () const |
| Model. More...
|
|
OsiChooseVariable * | chooseMethod () const |
|
void | setChooseMethod (const OsiChooseVariable &method) |
| Set (clone) chooseMethod. More...
|
|
Branching decision default class.
This class implements a simple default algorithm (betterBranch()) for choosing a branching variable.
Definition at line 18 of file CbcBranchDefaultDecision.hpp.
◆ CbcBranchDefaultDecision() [1/2]
CbcBranchDefaultDecision::CbcBranchDefaultDecision |
( |
| ) |
|
◆ CbcBranchDefaultDecision() [2/2]
◆ ~CbcBranchDefaultDecision()
virtual CbcBranchDefaultDecision::~CbcBranchDefaultDecision |
( |
| ) |
|
|
virtual |
◆ clone()
◆ initialize()
virtual void CbcBranchDefaultDecision::initialize |
( |
CbcModel * |
model | ) |
|
|
virtual |
Initialize, e.g. before the start of branch selection at a node.
Implements CbcBranchDecision.
◆ betterBranch()
Compare two branching objects.
Return nonzero if thisOne
is better than bestSoFar
.
The routine compares branches using the values supplied in numInfUp
and numInfDn
until a solution is found by search, after which it uses the values supplied in changeUp
and changeDn
. The best branching object seen so far and the associated parameter values are remembered in the CbcBranchDefaultDecision
object. The nonzero return value is +1 if the up branch is preferred, -1 if the down branch is preferred.
As the names imply, the assumption is that the values supplied for numInfUp
and numInfDn
will be the number of infeasibilities reported by the branching object, and changeUp
and changeDn
will be the estimated change in objective. Other measures can be used if desired.
Because an CbcBranchDefaultDecision
object remembers the current best branching candidate (bestObject_) as well as the values used in the comparison, the parameter bestSoFar
is redundant, hence unused.
Implements CbcBranchDecision.
◆ setBestCriterion()
virtual void CbcBranchDefaultDecision::setBestCriterion |
( |
double |
value | ) |
|
|
virtual |
◆ getBestCriterion()
virtual double CbcBranchDefaultDecision::getBestCriterion |
( |
| ) |
const |
|
virtual |
◆ bestBranch()
virtual int CbcBranchDefaultDecision::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.
This routine is used only after strong branching.
Reimplemented from CbcBranchDecision.
◆ operator=()
Illegal Assignment operator.
◆ bestCriterion_
double CbcBranchDefaultDecision::bestCriterion_ |
|
private |
◆ bestChangeUp_
double CbcBranchDefaultDecision::bestChangeUp_ |
|
private |
◆ bestNumberUp_
int CbcBranchDefaultDecision::bestNumberUp_ |
|
private |
◆ bestChangeDown_
double CbcBranchDefaultDecision::bestChangeDown_ |
|
private |
◆ bestObject_
◆ bestNumberDown_
int CbcBranchDefaultDecision::bestNumberDown_ |
|
private |
The documentation for this class was generated from the following file: