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. | |
BcpsBranchStrategy (BcpsModel *m) | |
Useful Constructor. | |
virtual | ~BcpsBranchStrategy () |
Destructor. | |
virtual BcpsBranchStrategy * | clone () const =0 |
Clone a branch strategy. | |
void | setModel (BcpsModel *m) |
Set model. | |
virtual void | clearBest (BcpsModel *model) |
Clear branching strategy environment before starting a new round of selecting the best branch object. | |
virtual int | createCandBranchObjects (int numPassesLeft) |
Create a set of candidate branching objects. | |
virtual int | betterBranchObject (BcpsBranchObject *b, BcpsBranchObject *bestSoFar)=0 |
Compare branching object thisOne to bestSoFar. | |
virtual int | bestBranchObject () |
Compare branching objects in branchObjects_. | |
Protected Attributes | |
BcpsModel * | model_ |
Pointer to model. | |
Private Member Functions | |
BcpsBranchStrategy & | operator= (const BcpsBranchStrategy &rhs) |
Disable assignment operator. | |
| |
int | numBranchObjects_ |
Following members are used to store candidate branching objects. | |
BcpsBranchObject ** | branchObjects_ |
The set of candiate branching objects. | |
BcpsBranchObject * | bestBranchObject_ |
Following members are used to store information about best branching object found so far. | |
double | bestChangeUp_ |
Change up for best. | |
int | bestNumberUp_ |
Number of infeasibilities for up. | |
double | bestChangeDown_ |
Change down for best. | |
int | bestNumberDown_ |
Number of infeasibilities for down. | |
int | getNumBranchObjects () |
Set/get branching objects. | |
void | getNumBranchObjects (int num) |
Following members are used to store candidate branching objects. | |
BcpsBranchObject ** | getBranchObjects () |
Following members are used to store candidate branching objects. | |
void | setBranchObjects (BcpsBranchObject **obj) |
Following members are used to store candidate branching objects. | |
BcpsBranchObject * | getBestBranchObject () |
Following members are used to store candidate branching objects. | |
void | setBestBranchObject (BcpsBranchObject *ob) |
Following members are used to store candidate branching objects. |
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.
BcpsBranchStrategy::BcpsBranchStrategy | ( | ) | [inline] |
Default Constructor.
Definition at line 80 of file BcpsBranchStrategy.h.
BcpsBranchStrategy::BcpsBranchStrategy | ( | BcpsModel * | m | ) | [inline] |
Useful Constructor.
Definition at line 92 of file BcpsBranchStrategy.h.
virtual BcpsBranchStrategy::~BcpsBranchStrategy | ( | ) | [inline, virtual] |
Destructor.
Definition at line 104 of file BcpsBranchStrategy.h.
BcpsBranchStrategy& BcpsBranchStrategy::operator= | ( | const BcpsBranchStrategy & | rhs | ) | [private] |
Disable assignment operator.
Reimplemented in BlisBranchStrategyPseudo, BlisBranchStrategyRel, BlisBranchStrategyStrong, BlisBranchStrategyMaxInf, BlisBranchStrategyPseudo, BlisBranchStrategyRel, and BlisBranchStrategyStrong.
virtual BcpsBranchStrategy* BcpsBranchStrategy::clone | ( | ) | const [pure virtual] |
Clone a branch strategy.
Implemented in BlisBranchStrategyPseudo, BlisBranchStrategyRel, BlisBranchStrategyStrong, BlisBranchStrategyMaxInf, BlisBranchStrategyPseudo, BlisBranchStrategyRel, and BlisBranchStrategyStrong.
void BcpsBranchStrategy::setModel | ( | BcpsModel * | m | ) | [inline] |
Set model.
Definition at line 115 of file BcpsBranchStrategy.h.
int BcpsBranchStrategy::getNumBranchObjects | ( | ) | [inline] |
Set/get branching objects.
Definition at line 119 of file BcpsBranchStrategy.h.
void BcpsBranchStrategy::getNumBranchObjects | ( | int | num | ) | [inline] |
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 120 of file BcpsBranchStrategy.h.
BcpsBranchObject** BcpsBranchStrategy::getBranchObjects | ( | ) | [inline] |
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 121 of file BcpsBranchStrategy.h.
void BcpsBranchStrategy::setBranchObjects | ( | BcpsBranchObject ** | obj | ) | [inline] |
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 122 of file BcpsBranchStrategy.h.
BcpsBranchObject* BcpsBranchStrategy::getBestBranchObject | ( | ) | [inline] |
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 123 of file BcpsBranchStrategy.h.
void BcpsBranchStrategy::setBestBranchObject | ( | BcpsBranchObject * | ob | ) | [inline] |
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 124 of file BcpsBranchStrategy.h.
virtual void BcpsBranchStrategy::clearBest | ( | BcpsModel * | model | ) | [inline, virtual] |
Clear branching strategy environment before starting a new round of selecting the best branch object.
Definition at line 129 of file BcpsBranchStrategy.h.
virtual int BcpsBranchStrategy::createCandBranchObjects | ( | int | numPassesLeft | ) | [inline, virtual] |
Create a set of candidate branching objects.
Reimplemented in BlisBranchStrategyPseudo, BlisBranchStrategyRel, BlisBranchStrategyStrong, BlisBranchStrategyMaxInf, BlisBranchStrategyPseudo, BlisBranchStrategyRel, and BlisBranchStrategyStrong.
Definition at line 138 of file BcpsBranchStrategy.h.
virtual int BcpsBranchStrategy::betterBranchObject | ( | BcpsBranchObject * | b, | |
BcpsBranchObject * | bestSoFar | |||
) | [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 BlisBranchStrategyPseudo, BlisBranchStrategyRel, BlisBranchStrategyStrong, BlisBranchStrategyMaxInf, BlisBranchStrategyPseudo, BlisBranchStrategyRel, and BlisBranchStrategyStrong.
virtual int BcpsBranchStrategy::bestBranchObject | ( | ) | [virtual] |
Compare branching objects in branchObjects_.
Return the index of the best branching object. Also, set branch direction in the best object.
BcpsModel* BcpsBranchStrategy::model_ [protected] |
Pointer to model.
Definition at line 48 of file BcpsBranchStrategy.h.
int BcpsBranchStrategy::numBranchObjects_ [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 55 of file BcpsBranchStrategy.h.
BcpsBranchObject** BcpsBranchStrategy::branchObjects_ [protected] |
The set of candiate branching objects.
Definition at line 57 of file BcpsBranchStrategy.h.
BcpsBranchObject* BcpsBranchStrategy::bestBranchObject_ [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 66 of file BcpsBranchStrategy.h.
double BcpsBranchStrategy::bestChangeUp_ [protected] |
Change up for best.
Definition at line 68 of file BcpsBranchStrategy.h.
int BcpsBranchStrategy::bestNumberUp_ [protected] |
Number of infeasibilities for up.
Definition at line 70 of file BcpsBranchStrategy.h.
double BcpsBranchStrategy::bestChangeDown_ [protected] |
Change down for best.
Definition at line 72 of file BcpsBranchStrategy.h.
int BcpsBranchStrategy::bestNumberDown_ [protected] |
Number of infeasibilities for down.
Definition at line 74 of file BcpsBranchStrategy.h.