BcpsBranchStrategy Class Reference

Branching strategy specifies: (1) how to select a candidate set of branching objects (2) how to compare two branching objects. More...

#include <BcpsBranchStrategy.h>

Inheritance diagram for BcpsBranchStrategy:

Inheritance graph
[legend]
Collaboration diagram for BcpsBranchStrategy:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BcpsBranchStrategy ()
 Default Constructor.
 BcpsBranchStrategy (BcpsModel *m)
 Useful Constructor.
virtual ~BcpsBranchStrategy ()
 Destructor.
virtual BcpsBranchStrategyclone () const =0
 Clone a branch strategy.
int getType ()
 Get type.
void setType (int t)
 Set type.
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, double ub)
 Create a set of candidate branching objects.
virtual int betterBranchObject (BcpsBranchObject *b, BcpsBranchObject *bestSoFar)=0
 Compare branching object thisOne to bestSoFar.
virtual BcpsBranchObjectbestBranchObject ()
 Compare branching objects in branchObjects_.
int getNumBranchObjects ()
 Set/get branching objects.
void getNumBranchObjects (int num)
 Set/get branching objects.
BcpsBranchObject ** getBranchObjects ()
 Set/get branching objects.
void setBranchObjects (BcpsBranchObject **obj)
 Set/get branching objects.
BcpsBranchObjectgetBestBranchObject ()
 Set/get branching objects.
void setBestBranchObject (BcpsBranchObject *ob)
 Set/get branching objects.

Protected Attributes

int type_
 Type of branching strategy.
BcpsModelmodel_
 Pointer to model.
int numBranchObjects_
 Number of candidate branching objects.
BcpsBranchObject ** branchObjects_
 The set of candiate branching objects.
BcpsBranchObjectbestBranchObject_
 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.

Private Member Functions

BcpsBranchStrategyoperator= (const BcpsBranchStrategy &rhs)
 Disable assignment operator.

Detailed Description

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.


Constructor & Destructor Documentation

BcpsBranchStrategy::BcpsBranchStrategy (  )  [inline]

Default Constructor.

Definition at line 83 of file BcpsBranchStrategy.h.

BcpsBranchStrategy::BcpsBranchStrategy ( BcpsModel m  )  [inline]

Useful Constructor.

Definition at line 95 of file BcpsBranchStrategy.h.

virtual BcpsBranchStrategy::~BcpsBranchStrategy (  )  [inline, virtual]

Destructor.

Definition at line 107 of file BcpsBranchStrategy.h.

References branchObjects_, and numBranchObjects_.


Member Function Documentation

BcpsBranchStrategy& BcpsBranchStrategy::operator= ( const BcpsBranchStrategy rhs  )  [private]

Disable assignment operator.

virtual BcpsBranchStrategy* BcpsBranchStrategy::clone (  )  const [pure virtual]

Clone a branch strategy.

Implemented in BlisBranchStrategyPseudo, BlisBranchStrategyRel, and BlisBranchStrategyStrong.

int BcpsBranchStrategy::getType (  )  [inline]

Get type.

Definition at line 118 of file BcpsBranchStrategy.h.

References type_.

void BcpsBranchStrategy::setType ( int  t  )  [inline]

Set type.

Definition at line 121 of file BcpsBranchStrategy.h.

References type_.

void BcpsBranchStrategy::setModel ( BcpsModel m  )  [inline]

Set model.

Definition at line 124 of file BcpsBranchStrategy.h.

References model_.

int BcpsBranchStrategy::getNumBranchObjects (  )  [inline]

Set/get branching objects.

Definition at line 128 of file BcpsBranchStrategy.h.

References numBranchObjects_.

void BcpsBranchStrategy::getNumBranchObjects ( int  num  )  [inline]

Set/get branching objects.

Definition at line 129 of file BcpsBranchStrategy.h.

References numBranchObjects_.

BcpsBranchObject** BcpsBranchStrategy::getBranchObjects (  )  [inline]

Set/get branching objects.

Definition at line 130 of file BcpsBranchStrategy.h.

References branchObjects_.

void BcpsBranchStrategy::setBranchObjects ( BcpsBranchObject **  obj  )  [inline]

Set/get branching objects.

Definition at line 131 of file BcpsBranchStrategy.h.

References branchObjects_.

BcpsBranchObject* BcpsBranchStrategy::getBestBranchObject (  )  [inline]

Set/get branching objects.

Definition at line 132 of file BcpsBranchStrategy.h.

References bestBranchObject_.

void BcpsBranchStrategy::setBestBranchObject ( BcpsBranchObject ob  )  [inline]

Set/get branching objects.

Definition at line 133 of file BcpsBranchStrategy.h.

References bestBranchObject_.

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 138 of file BcpsBranchStrategy.h.

References bestBranchObject_, bestChangeDown_, bestChangeUp_, bestNumberDown_, and bestNumberUp_.

virtual int BcpsBranchStrategy::createCandBranchObjects ( int  numPassesLeft,
double  ub 
) [inline, virtual]

Create a set of candidate branching objects.

Reimplemented in BlisBranchStrategyPseudo.

Definition at line 147 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, and BlisBranchStrategyStrong.

virtual BcpsBranchObject* BcpsBranchStrategy::bestBranchObject (  )  [virtual]

Compare branching objects in branchObjects_.

Return the index of the best branching object. Also, set branch direction in the best object.


Member Data Documentation

int BcpsBranchStrategy::type_ [protected]

Type of branching strategy.

Definition at line 48 of file BcpsBranchStrategy.h.

Referenced by getType(), and setType().

BcpsModel* BcpsBranchStrategy::model_ [protected]

Pointer to model.

Definition at line 51 of file BcpsBranchStrategy.h.

Referenced by setModel().

int BcpsBranchStrategy::numBranchObjects_ [protected]

Number of candidate branching objects.

Definition at line 58 of file BcpsBranchStrategy.h.

Referenced by getNumBranchObjects(), and ~BcpsBranchStrategy().

BcpsBranchObject** BcpsBranchStrategy::branchObjects_ [protected]

The set of candiate branching objects.

Definition at line 60 of file BcpsBranchStrategy.h.

Referenced by getBranchObjects(), setBranchObjects(), and ~BcpsBranchStrategy().

BcpsBranchObject* BcpsBranchStrategy::bestBranchObject_ [protected]

Best branching object found so far.

Definition at line 69 of file BcpsBranchStrategy.h.

Referenced by clearBest(), getBestBranchObject(), and setBestBranchObject().

double BcpsBranchStrategy::bestChangeUp_ [protected]

Change up for best.

Definition at line 71 of file BcpsBranchStrategy.h.

Referenced by clearBest().

int BcpsBranchStrategy::bestNumberUp_ [protected]

Number of infeasibilities for up.

Definition at line 73 of file BcpsBranchStrategy.h.

Referenced by clearBest().

double BcpsBranchStrategy::bestChangeDown_ [protected]

Change down for best.

Definition at line 75 of file BcpsBranchStrategy.h.

Referenced by clearBest().

int BcpsBranchStrategy::bestNumberDown_ [protected]

Number of infeasibilities for down.

Definition at line 77 of file BcpsBranchStrategy.h.

Referenced by clearBest().


The documentation for this class was generated from the following file:
Generated on Mon Nov 7 03:05:03 2011 by  doxygen 1.4.7