Branching strategy specifies: (1) how to select a candidate set of branching objects (2) how to compare two branching objects. More...
#include <BcpsBranchStrategy.h>
Public Member Functions | |
BcpsBranchStrategy () | |
Default Constructor. More... | |
BcpsBranchStrategy (BcpsModel *m) | |
Useful Constructor. More... | |
virtual | ~BcpsBranchStrategy () |
Destructor. More... | |
virtual BcpsBranchStrategy * | clone () const =0 |
Clone a branch strategy. More... | |
int | getType () |
Get type. More... | |
void | setType (int t) |
Set type. More... | |
void | setModel (BcpsModel *m) |
Set model. More... | |
virtual void | clearBest (BcpsModel *model) |
Clear branching strategy environment before starting a new round of selecting the best branch object. More... | |
virtual int | createCandBranchObjects (int numPassesLeft, double ub) |
Create a set of candidate branching objects. More... | |
virtual int | betterBranchObject (BcpsBranchObject *b, BcpsBranchObject *bestSoFar)=0 |
Compare branching object thisOne to bestSoFar. More... | |
virtual BcpsBranchObject * | bestBranchObject () |
Compare branching objects in branchObjects_. More... | |
int | getNumBranchObjects () |
Set/get branching objects. More... | |
void | getNumBranchObjects (int num) |
Set/get branching objects. More... | |
BcpsBranchObject ** | getBranchObjects () |
Set/get branching objects. More... | |
void | setBranchObjects (BcpsBranchObject **obj) |
Set/get branching objects. More... | |
BcpsBranchObject * | getBestBranchObject () |
Set/get branching objects. More... | |
void | setBestBranchObject (BcpsBranchObject *ob) |
Set/get branching objects. More... | |
Protected Attributes | |
int | type_ |
Type of branching strategy. More... | |
BcpsModel * | model_ |
Pointer to model. More... | |
int | numBranchObjects_ |
Following members are used to store candidate branching objects. More... | |
BcpsBranchObject ** | branchObjects_ |
The set of candiate branching objects. More... | |
BcpsBranchObject * | bestBranchObject_ |
Following members are used to store information about best branching object found so far. More... | |
double | bestChangeUp_ |
Change up for best. More... | |
int | bestNumberUp_ |
Number of infeasibilities for up. More... | |
double | bestChangeDown_ |
Change down for best. More... | |
int | bestNumberDown_ |
Number of infeasibilities for down. More... | |
Private Member Functions | |
BcpsBranchStrategy & | operator= (const BcpsBranchStrategy &rhs) |
Disable assignment operator. More... | |
Branching strategy specifies: (1) how to select a candidate set of branching objects (2) how to compare two branching objects.
Definition at line 39 of file BcpsBranchStrategy.h.
|
inline |
Default Constructor.
Definition at line 83 of file BcpsBranchStrategy.h.
|
inline |
Useful Constructor.
Definition at line 95 of file BcpsBranchStrategy.h.
|
inlinevirtual |
Destructor.
Definition at line 107 of file BcpsBranchStrategy.h.
|
private |
Disable assignment operator.
|
pure virtual |
Clone a branch strategy.
Implemented in BlisBranchStrategyStrong, BlisBranchStrategyStrong, BlisBranchStrategyPseudo, BlisBranchStrategyRel, BlisBranchStrategyPseudo, BlisBranchStrategyRel, BlisBranchStrategyBilevel, and BlisBranchStrategyMaxInf.
|
inline |
Get type.
Definition at line 118 of file BcpsBranchStrategy.h.
|
inline |
Set type.
Definition at line 121 of file BcpsBranchStrategy.h.
Set model.
Definition at line 124 of file BcpsBranchStrategy.h.
|
inline |
Set/get branching objects.
Definition at line 128 of file BcpsBranchStrategy.h.
|
inline |
Set/get branching objects.
Definition at line 129 of file BcpsBranchStrategy.h.
|
inline |
Set/get branching objects.
Definition at line 130 of file BcpsBranchStrategy.h.
|
inline |
Set/get branching objects.
Definition at line 131 of file BcpsBranchStrategy.h.
|
inline |
Set/get branching objects.
Definition at line 132 of file BcpsBranchStrategy.h.
|
inline |
Set/get branching objects.
Definition at line 133 of file BcpsBranchStrategy.h.
Clear branching strategy environment before starting a new round of selecting the best branch object.
Definition at line 138 of file BcpsBranchStrategy.h.
|
inlinevirtual |
Create a set of candidate branching objects.
Reimplemented in BlisBranchStrategyStrong, BlisBranchStrategyPseudo, BlisBranchStrategyRel, BlisBranchStrategyPseudo, BlisBranchStrategyBilevel, and BlisBranchStrategyMaxInf.
Definition at line 147 of file BcpsBranchStrategy.h.
|
pure virtual |
Compare branching object thisOne to bestSoFar.
If thisOne is better than bestObject, return branching direction(1 or -1), otherwise return 0. If bestSorFar is NULL, then always return branching direction(1 or -1).
Implemented in BlisBranchStrategyStrong, BlisBranchStrategyStrong, BlisBranchStrategyPseudo, BlisBranchStrategyRel, BlisBranchStrategyPseudo, BlisBranchStrategyRel, BlisBranchStrategyBilevel, and BlisBranchStrategyMaxInf.
|
virtual |
Compare branching objects in branchObjects_.
Return the index of the best branching object. Also, set branch direction in the best object.
|
protected |
Type of branching strategy.
Definition at line 48 of file BcpsBranchStrategy.h.
|
protected |
Pointer to model.
Definition at line 51 of file BcpsBranchStrategy.h.
|
protected |
Following members are used to store candidate branching objects.
NOTE: They are required to be cleared before starting another round of selecting. Number of candidate branching objects.
Definition at line 58 of file BcpsBranchStrategy.h.
|
protected |
The set of candiate branching objects.
Definition at line 60 of file BcpsBranchStrategy.h.
|
protected |
Following members are used to store information about best branching object found so far.
NOTE: They are required to be cleared before starting another round of selecting. Best branching object found so far.
Definition at line 69 of file BcpsBranchStrategy.h.
|
protected |
Change up for best.
Definition at line 71 of file BcpsBranchStrategy.h.
|
protected |
Number of infeasibilities for up.
Definition at line 73 of file BcpsBranchStrategy.h.
|
protected |
Change down for best.
Definition at line 75 of file BcpsBranchStrategy.h.
|
protected |
Number of infeasibilities for down.
Definition at line 77 of file BcpsBranchStrategy.h.