8#ifndef CbcSimpleInteger_H
9#define CbcSimpleInteger_H
37 int way,
double value);
47 double lowerValue,
double upperValue);
71 virtual void fix(OsiSolverInterface *solver,
72 double *lower,
double *upper,
73 int branchState)
const;
76 virtual bool tighten(OsiSolverInterface *);
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
135 return (down_[1] != -COIN_DBL_MAX);
160#ifdef FUNNY_BRANCHING
167 int numberExtraChangedBounds_;
202 using CbcObject::feasibleRegion;
208 virtual double feasibleRegion(OsiSolverInterface *solver,
const OsiBranchingInformation *info)
const;
219 using CbcObject::solverBranch;
224 virtual OsiSolverBranch *
solverBranch(OsiSolverInterface *solver,
const OsiBranchingInformation *info)
const;
257 return originalLower_;
261 originalLower_ = value;
272 inline double breakEven()
const
277 inline void setBreakEven(
double value)
286 double originalLower_;
bool active() const
Returns true if active.
CbcModel * model() const
Return model.
int preferredWay() const
If -1 down always chosen first, +1 up always, 0 normal.
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.
CbcBranchingObject & operator=(const CbcBranchingObject &rhs)
Assignment operator.
virtual CbcBranchingObject * clone() const =0
Clone.
CbcBranchingObject()
Default Constructor.
virtual double branch()=0
Execute the actions required to branch, as specified by the current state of the branching object,...
CbcModel * model() const
Return model.
int variable() const
Index identifying the associated CbcObject within its class.
int way() const
Get the state of the branching object.
virtual void print() const
Print something about branch - only if log level high.
Simple branching object for an integer variable.
*Lower and upper bounds for up branch const double * upBounds() const
virtual bool tighten(OsiSolverInterface *)
Change (tighten) bounds in object to reflect bounds in solver.
*Set lower and upper bounds for down branch void setDownBounds(const double bounds[2])
virtual double branch()
Create a degenerate branch object.
virtual void print()
Print something about branch - only if log level high.
CbcIntegerBranchingObject(CbcModel *model, int variable, int way, double value)
Create a standard floor/ceiling branch object.
*Lower and upper bounds for down branch const double * downBounds() const
CbcIntegerBranchingObject()
Default constructor.
virtual void fix(OsiSolverInterface *solver, double *lower, double *upper, int branchState) const
Update bounds in solver as in 'branch' and update given bounds.
*Set lower and upper bounds for up branch void setUpBounds(const double bounds[2])
virtual CbcRangeCompare compareBranchingObject(const CbcBranchingObject *brObj, const bool replaceIfOverlap=false)
Compare the this with brObj.
virtual CbcBranchObjType type() const
Return the type (an integer identifier) of this.
Simple Branch and bound class.
virtual void resetSequenceEtc(int numberColumns, const int *originalColumns)
Change column numbers after preprocessing.
*Infeasibility large virtual is double infeasibility(const OsiBranchingInformation *info, int &preferredWay) const
*If down always chosen up normal int preferredWay_
*Original bounds double originalLowerBound() const
virtual int columnNumber() const
Column number if single column object -1 otherwise, so returns >= 0 Used by heuristics.
CbcSimpleInteger(CbcModel *model, int iColumn, double breakEven=0.5)
virtual void feasibleRegion()
Set bounds to fix the variable at the current (integer) value.
*Fills in a created branching object void fillCreateBranch(CbcIntegerBranchingObject *branching, const OsiBranchingInformation *info, int way)
virtual void resetBounds(const OsiSolverInterface *solver)
Reset variable bounds to their original values.
*Column number in model int columnNumber_
CbcSimpleInteger(const CbcSimpleInteger &)
void setOriginalUpperBound(double value)
void setOriginalLowerBound(double value)
*virtual Clone CbcObject * clone() const
CbcSimpleInteger(CbcModel *model, const OsiSimpleInteger *object)
virtual double feasibleRegion(OsiSolverInterface *solver, const OsiBranchingInformation *info) const
Set bounds to fix the variable at the current (integer) value.
*Construct an OsiSimpleInteger object OsiSimpleInteger * osiObject() const
virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way)
Create a branching object and indicate which way to branch first.
virtual OsiSolverBranch * solverBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info) const
Create an OsiSolverBranch object.
double originalUpperBound() const
virtual ~CbcSimpleInteger()
CbcSimpleInteger & operator=(const CbcSimpleInteger &rhs)
*Set column number void setColumnNumber(int value)
*Original upper bound double originalUpper_