30 #include "BcpsBranchObject.h"
74 BcpsBranchObject(model, varInd, direction, value)
78 down_[0] = model->
solver()->getColLower()[iColumn];
79 down_[1] = floor(value_);
80 up_[0] = ceil(value_);
98 BcpsBranchObject(model, varInd, intScore, dblScore, direction, value)
102 down_[0] = model->
solver()->getColLower()[iColumn];
103 down_[1] = floor(value_);
104 up_[0] = ceil(value_);
119 BcpsBranchObject(model, varInd, direction, lowerValue)
122 numBranchesLeft_ = 1;
123 down_[0] = lowerValue;
124 down_[1] = upperValue;
136 virtual BcpsBranchObject *
clone()
const {
146 virtual double branch(
bool normalBranch =
false);
149 virtual void print(
bool normalBranch);
162 AlpsReturnStatus status = AlpsReturnStatusOk;
165 for (j = 0; j < 2; ++j) {
166 encoded->writeRep(down_[j]);
168 for (j = 0; j < 2; ++j) {
169 encoded->writeRep(up_[j]);
177 AlpsReturnStatus status = AlpsReturnStatusOk;
180 for (j = 0; j < 2; ++j) {
181 encoded.readRep(down_[j]);
183 for (j = 0; j < 2; ++j) {
184 encoded.readRep(up_[j]);
193 virtual AlpsReturnStatus
encode(AlpsEncoded *encoded)
const {
194 AlpsReturnStatus status = AlpsReturnStatusOk;
196 status = encodeBcps(encoded);
203 virtual AlpsReturnStatus
decode(AlpsEncoded &encoded) {
205 AlpsReturnStatus status = AlpsReturnStatusOk;
207 status = decodeBcps(encoded);
const double * getColUpper()
Get column upper bound.
BlisBranchObjectInt & operator=(const BlisBranchObjectInt &rhs)
Assignment operator.
BlisBranchObjectInt(BlisModel *model, int varInd, int direction, double value)
Construct a branching object, which branching on variable varInd.
virtual BcpsBranchObject * clone() const
Clone.
double up_[2]
Up_[0]: the lower bound of upper arm; Up_[1]: the upper bound of upper arm;.
BlisBranchObjectInt(BlisModel *model, int varInd, int intScore, double dblScore, int direction, double value)
Construct a branching object, which branching on variable varInd.
virtual double branch(bool normalBranch=false)
Set the bounds for the variable according to the current arm of the branch and advances the object st...
virtual AlpsReturnStatus decode(AlpsEncoded &encoded)
Unpack a branching object from an encoded object.
virtual OsiSolverInterface * solver()
Get lp solver.
AlpsReturnStatus encodeBlis(AlpsEncoded *encoded) const
Pack Blis portion to an encoded object.
double down_[2]
Down_[0]: the lower bound of down arm; Down_[1]: the upper bound of down arm;.
virtual AlpsReturnStatus encode(AlpsEncoded *encoded) const
Pack to an encoded object.
BlisBranchObjectInt(BlisModel *model, int varInd, int direction, double lowerValue, double upperValue)
Create a degenerate branching object.
virtual ~BlisBranchObjectInt()
Destructor.
virtual void print(bool normalBranch)
Print something about branch - only if log level high.
const double * getDown() const
Get down arm bounds.
BlisBranchObjectInt()
Default constructor.
int * getIntColIndices() const
Get integers' column indices.
AlpsReturnStatus decodeBlis(AlpsEncoded &encoded)
Unpack Blis portion from an encoded object.
const double * getUp() const
Get upper arm bounds.