2 #ifndef CbcGeneralDepth_H
3 #define CbcGeneralDepth_H
14 #include "ClpSimplex.hpp"
15 #include "ClpNode.hpp"
31 CbcGeneralDepth (
CbcModel * model,
int maximumDepth);
34 CbcGeneralDepth (
const CbcGeneralDepth &);
40 CbcGeneralDepth &
operator=(
const CbcGeneralDepth& rhs);
46 virtual double infeasibility(
const OsiBranchingInformation * info,
47 int &preferredWay)
const;
56 inline int maximumNodes()
const {
60 inline int maximumDepth()
const {
64 inline void setMaximumDepth(
int value) {
65 maximumDepth_ = value;
68 inline int whichSolution()
const {
69 return whichSolution_;
72 inline ClpNode * nodeInfo(
int which) {
73 return nodeInfo_->nodeInfo_[which];
86 mutable int whichSolution_;
88 mutable int numberNodes_;
90 mutable ClpNodeStuff * nodeInfo_;
101 CbcGeneralBranchingObject ();
104 CbcGeneralBranchingObject (
CbcModel * model);
107 CbcGeneralBranchingObject (
const CbcGeneralBranchingObject &);
110 CbcGeneralBranchingObject &
operator=(
const CbcGeneralBranchingObject& rhs);
116 virtual ~CbcGeneralBranchingObject ();
123 virtual void checkIsCutoff(
double cutoff);
128 virtual void print();
130 void state(
double & objectiveValue,
double & sumInfeasibilities,
131 int & numberUnsatisfied,
int which)
const;
133 inline void setNode(
CbcNode * node) {
161 inline int numberSubProblems()
const {
162 return numberSubProblems_;
165 inline int decrementNumberLeft() {
167 return numberSubLeft_;
170 inline int whichNode()
const {
174 inline void setWhichNode(
int value) {
178 const CbcSubProblem * subProblem(
int which)
const {
179 return subProblems_ + which;
185 CbcSubProblem * subProblems_;
189 int numberSubProblems_;
205 CbcOneGeneralBranchingObject ();
208 CbcOneGeneralBranchingObject (
CbcModel * model,
209 CbcGeneralBranchingObject *
object,
213 CbcOneGeneralBranchingObject (
const CbcOneGeneralBranchingObject &);
216 CbcOneGeneralBranchingObject &
operator=(
const CbcOneGeneralBranchingObject& rhs);
222 virtual ~CbcOneGeneralBranchingObject ();
229 virtual void checkIsCutoff(
double cutoff);
234 virtual void print();
263 CbcGeneralBranchingObject * object_;
267 #endif //COIN_HAS_CLP
virtual CbcBranchingObject * clone() const =0
Clone.
Abstract branching object base class Now just difference with OsiBranchingObject. ...
CbcGeneral & operator=(const CbcGeneral &rhs)
virtual void print() const
Print something about branch - only if log level high.
virtual CbcBranchObjType type() const =0
Return the type (an integer identifier) of this.
virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way)
Creates a branching object.
virtual void feasibleRegion()=0
For the variable(s) referenced by the object, look at the current solution and set bounds to match th...
virtual double infeasibility(const OsiBranchingInformation *info, int &preferredWay) const
Infeasibility - large is 0.5.
virtual CbcRangeCompare compareBranchingObject(const CbcBranchingObject *brObj, const bool replaceIfOverlap=false)=0
Compare the this with brObj.
virtual void feasibleRegion()=0
This looks at solution and sets bounds to contain solution.
virtual CbcObject * clone() const =0
Clone.
CbcBranchingObject & operator=(const CbcBranchingObject &rhs)
Assignment operator.
virtual void redoSequenceEtc(CbcModel *model, int numberColumns, const int *originalColumns)=0
Redoes data when sequence numbers change.
Information required while the node is live.
Define a catch all class.
virtual int compareOriginalObject(const CbcBranchingObject *brObj) const
Compare the original object of this with the original object of brObj.
Simple Branch and bound class.
virtual double branch()=0
Execute the actions required to branch, as specified by the current state of the branching object...