8 #ifndef CbcSimpleInteger_H
9 #define CbcSimpleInteger_H
47 double lowerValue,
double upperValue);
62 void fillPart(
int variable,
int way,
double value);
72 double *lower,
double *upper,
73 int branchState)
const;
104 memcpy(
down_, bounds, 2 *
sizeof(
double));
109 memcpy(
up_, bounds, 2 *
sizeof(
double));
111 #ifdef FUNNY_BRANCHING
114 inline const int *variables()
const
119 inline const double *newBounds()
const
124 inline int numberExtraChangedBounds()
const
126 return numberExtraChangedBounds_;
129 int applyExtraBounds(
int iColumn,
double lower,
double upper,
int way);
133 inline bool active()
const
160 #ifdef FUNNY_BRANCHING
167 int numberExtraChangedBounds_;
253 virtual void resetSequenceEtc(
int numberColumns,
const int *originalColumns);
virtual void resetSequenceEtc(int numberColumns, const int *originalColumns)
Change column numbers after preprocessing.
Abstract branching object base class Now just difference with OsiBranchingObject. ...
const double * upBounds() const
Lower and upper bounds for up branch.
Define a single integer class.
Define a single integer class.
virtual void print() const
Print something about branch - only if log level high.
virtual ~CbcSimpleInteger()
double down_[2]
Lower [0] and upper [1] bounds for the down arm (way_ = -1)
double infeasibility() const
Return infeasibility.
virtual void fix(OsiSolverInterface *solver, double *lower, double *upper, int branchState) const
Update bounds in solver as in 'branch' and update given bounds.
virtual CbcBranchingObject * clone() const
Clone.
CbcIntegerBranchingObject & operator=(const CbcIntegerBranchingObject &rhs)
Assignment operator.
double breakEven_
Breakeven i.e. >= this preferred is up.
int columnNumber_
Column number in model.
double value() const
Current value.
int variable() const
Index identifying the associated CbcObject within its class.
CbcIntegerBranchingObject()
Default constructor.
int preferredWay_
If -1 down always chosen first, +1 up always, 0 normal.
void fillPart(int variable, int way, double value)
Does part of constructor.
virtual void resetBounds(const OsiSolverInterface *solver)
Reset variable bounds to their original values.
virtual void feasibleRegion()=0
For the variable(s) referenced by the object, look at the current solution and set bounds to match th...
virtual int columnNumber() const
Column number if single column object -1 otherwise, so returns >= 0 Used by heuristics.
double originalUpperBound() const
int preferredWay() const
If -1 down always chosen first, +1 up always, 0 normal.
double up_[2]
Lower [0] and upper [1] bounds for the up arm (way_ = 1)
double originalLowerBound() const
Original bounds.
virtual bool tighten(OsiSolverInterface *)
Change (tighten) bounds in object to reflect bounds in solver.
void setDownBounds(const double bounds[2])
Set lower and upper bounds for down branch.
virtual CbcObject * clone() const
Clone.
Simple branching object for an integer variable.
Abstract Base Class for describing an interface to a solver.
void setOriginalLowerBound(double value)
const double COIN_DBL_MAX
virtual void feasibleRegion()
Set bounds to fix the variable at the current (integer) value.
virtual void previousBranch()
Reset every information so that the branching object appears to point to the previous child...
int way() const
Get the state of the branching object.
virtual void print()
Print something about branch - only if log level high.
OsiSimpleInteger * osiObject() const
Construct an OsiSimpleInteger object.
void setBreakEven(double value)
Set breakeven e.g 0.7 -> >= 0.7 go up first.
void setOriginalUpperBound(double value)
double originalLower_
data
virtual CbcRangeCompare compareBranchingObject(const CbcBranchingObject *brObj, const bool replaceIfOverlap=false)
Compare the this with brObj.
virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way)
Create a branching object and indicate which way to branch first.
virtual CbcBranchObjType type() const
Return the type (an integer identifier) of this.
virtual ~CbcIntegerBranchingObject()
Destructor.
void setColumnNumber(int value)
Set column number.
double originalUpper_
Original upper bound.
void setUpBounds(const double bounds[2])
Set lower and upper bounds for up branch.
virtual double branch()
Sets the bounds for the variable according to the current arm of the branch and advances the object s...
virtual OsiSolverBranch * solverBranch() const
Create an OsiSolverBranch object.
CbcModel * model() const
Return model.
Simple Branch and bound class.
void fillCreateBranch(CbcIntegerBranchingObject *branching, const OsiBranchingInformation *info, int way)
Fills in a created branching object.
CbcSimpleInteger & operator=(const CbcSimpleInteger &rhs)
const double * downBounds() const
Lower and upper bounds for down branch.
double breakEven() const
Breakeven e.g 0.7 -> >= 0.7 go up first.
virtual double branch()=0
Execute the actions required to branch, as specified by the current state of the branching object...