8 #ifndef CbcSimpleInteger_H 9 #define CbcSimpleInteger_H 38 int way ,
double value) ;
48 double lowerValue,
double upperValue) ;
63 void fillPart (
int variable,
int way ,
double value) ;
72 virtual void fix(OsiSolverInterface * solver,
73 double * lower,
double * upper,
74 int branchState)
const ;
77 virtual bool tighten(OsiSolverInterface * ) ;
102 memcpy(
down_, bounds, 2*
sizeof(
double));
106 memcpy(
up_, bounds, 2*
sizeof(
double));
108 #ifdef FUNNY_BRANCHING 111 inline const int * variables()
const {
115 inline const double * newBounds()
const {
119 inline int numberExtraChangedBounds()
const {
120 return numberExtraChangedBounds_;
123 int applyExtraBounds(
int iColumn,
double lower,
double upper,
int way) ;
127 inline bool active()
const {
128 return (
down_[1] != -COIN_DBL_MAX);
153 #ifdef FUNNY_BRANCHING 160 int numberExtraChangedBounds_;
192 OsiSimpleInteger * osiObject()
const;
194 virtual double infeasibility(
const OsiBranchingInformation * info,
195 int &preferredWay)
const;
203 virtual double feasibleRegion(OsiSolverInterface * solver,
const OsiBranchingInformation * info)
const;
210 virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface * solver,
const OsiBranchingInformation * info,
int way) ;
219 virtual OsiSolverBranch * solverBranch(OsiSolverInterface * solver,
const OsiBranchingInformation * info)
const;
227 virtual void feasibleRegion();
233 virtual int columnNumber()
const;
236 columnNumber_ = value;
243 virtual void resetBounds(
const OsiSolverInterface * solver) ;
247 virtual void resetSequenceEtc(
int numberColumns,
const int * originalColumns) ;
250 return originalLower_;
253 originalLower_ = value;
256 return originalUpper_;
259 originalUpper_ = value;
Simple branching object for an integer variable.
void setDownBounds(const double bounds[2])
Set lower and upper bounds for down branch.
virtual void feasibleRegion()=0
For the variable(s) referenced by the object, look at the current solution and set bounds to match th...
void setBreakEven(double value)
Set breakeven e.g 0.7 -> >= 0.7 go up first.
void setOriginalLowerBound(double value)
double down_[2]
Lower [0] and upper [1] bounds for the down arm (way_ = -1)
CbcIntegerBranchingObject()
Default constructor.
CbcIntegerBranchingObject & operator=(const CbcIntegerBranchingObject &rhs)
Assignment operator.
virtual CbcBranchObjType type() const
Return the type (an integer identifier) of this.
virtual ~CbcIntegerBranchingObject()
Destructor.
virtual CbcRangeCompare compareBranchingObject(const CbcBranchingObject *brObj, const bool replaceIfOverlap=false)
Compare the this with brObj.
Define a single integer class.
void fillPart(int variable, int way, double value)
Does part of constructor.
virtual CbcBranchingObject * clone() const
Clone.
virtual double branch()
Sets the bounds for the variable according to the current arm of the branch and advances the object s...
CbcModel * model() const
Return model.
void setUpBounds(const double bounds[2])
Set lower and upper bounds for up branch.
double originalUpper_
Original upper bound.
double originalUpperBound() const
const double * downBounds() const
Lower and upper bounds for down branch.
int way() const
Get the state of the branching object.
virtual void fix(OsiSolverInterface *solver, double *lower, double *upper, int branchState) const
Update bounds in solver as in 'branch' and update given bounds.
Abstract branching object base class Now just difference with OsiBranchingObject. ...
virtual void previousBranch()
Reset every information so that the branching object appears to point to the previous child...
double originalLower_
data
int preferredWay_
If -1 down always chosen first, +1 up always, 0 normal.
int variable() const
Index identifying the associated CbcObject within its class.
virtual double branch()=0
Execute the actions required to branch, as specified by the current state of the branching object...
virtual bool tighten(OsiSolverInterface *)
Change (tighten) bounds in object to reflect bounds in solver.
virtual void print() const
Print something about branch - only if log level high.
virtual void print()
Print something about branch - only if log level high.
double originalLowerBound() const
Original bounds.
int columnNumber_
Column number in model.
double breakEven() const
Breakeven e.g 0.7 -> >= 0.7 go up first.
double breakEven_
Breakeven i.e. >= this preferred is up.
double up_[2]
Lower [0] and upper [1] bounds for the up arm (way_ = 1)
void setColumnNumber(int value)
Set column number.
void setOriginalUpperBound(double value)
virtual OsiSolverBranch * solverBranch() const
Create an OsiSolverBranch object.
const double * upBounds() const
Lower and upper bounds for up branch.
Simple Branch and bound class.