Go to the documentation of this file.
29 #ifndef BcpsBranchObject_h_
30 #define BcpsBranchObject_h_
177 virtual double branch(
bool normalBranch =
false) = 0;
180 virtual void print(
bool normalBranch) {}
double getDownScore() const
Get double score.
virtual int numBranchesLeft() const
The number of branch arms left to be evaluated.
virtual BcpsBranchObject * clone() const =0
Clone a object.
BcpsModel * model() const
Return model.
virtual AlpsReturnStatus encode(AlpsEncoded *encoded) const
Pack to an encoded object.
BcpsBranchObject()
Default Constructor.
int type_
Type of branching.
double downScore_
The score of branching down.
virtual AlpsReturnStatus decode(AlpsEncoded &encoded)
Unpack a branching object from an encoded object.
BcpsBranchObject contains the member data required when choosing branching entities and excuting actu...
AlpsEncoded & writeRep(const T &value)
AlpsEncoded & readRep(T &value)
BcpsBranchObject & operator=(const BcpsBranchObject &rhs)
Assignment operator.
BcpsBranchObject(const BcpsBranchObject &)
Copy constructor.
virtual void print(bool normalBranch)
Print information about this branching object.
AlpsReturnStatus encodeBcps(AlpsEncoded *encoded) const
Pack Bcps portion to an encoded object.
double value_
Current branching value.
int getDirection() const
Returns a code indicating the active arm of the branching object.
void setUpScore(double score)
Set integer score.
virtual double branch(bool normalBranch=false)=0
Perform branching as specified by the branching object.
void setDownScore(double score)
Get double score.
BcpsBranchObject(BcpsModel *model)
Useful constructor.
BcpsModel * model_
The model that owns this branch object.
BcpsBranchObject(BcpsModel *model, int objectIndex, double upScore, double downScore, int direction, double value)
Useful constructor.
void setObjectIndex(int ind)
Set object objectIndex.
void setDirection(int direction)
Set the direction of the branching object.
int direction_
Information required to do branching.
virtual int numBranches() const
The number of branch arms created for this branch object.
int numBranchesLeft_
Number of arms remaining to be evaluated.
AlpsReturnStatus decodeBcps(AlpsEncoded &encoded)
Unpack Bcps portion from an encoded object.
BcpsBranchObject(BcpsModel *model, int objectIndex, int direction, double value)
Useful constructor.
virtual bool boundBranch() const
Return true if branching should fix object bounds.
virtual ~BcpsBranchObject()
Destructor.
int objectIndex_
Branch object index.
double getUpScore() const
Get integer score.
void setType(int t)
Set type.
double upScore_
Quality/Goodness of this object.
double getValue() const
Return object branching value.
int getObjectIndex() const
Object objectIndex.