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