8#ifndef CbcGeneralDepth_H
9#define CbcGeneralDepth_H
20#include "ClpSimplex.hpp"
35 CbcGeneralDepth(CbcModel *
model,
int maximumDepth);
38 CbcGeneralDepth(
const CbcGeneralDepth &);
41 virtual CbcObject *
clone()
const;
44 CbcGeneralDepth &
operator=(
const CbcGeneralDepth &rhs);
50 virtual double infeasibility(
const OsiBranchingInformation *info,
53 using CbcObject::feasibleRegion;
58 virtual CbcBranchingObject *
createCbcBranch(OsiSolverInterface *solver,
const OsiBranchingInformation *info,
int way);
60 inline int maximumNodes()
const
65 inline int maximumDepth()
const
70 inline void setMaximumDepth(
int value)
72 maximumDepth_ = value;
75 inline int numberNodes()
const
80 inline int whichSolution()
const
82 return whichSolution_;
100 mutable int whichSolution_;
102 mutable int numberNodes_;
114 CbcGeneralBranchingObject();
117 CbcGeneralBranchingObject(CbcModel *
model);
120 CbcGeneralBranchingObject(
const CbcGeneralBranchingObject &);
123 CbcGeneralBranchingObject &
operator=(
const CbcGeneralBranchingObject &rhs);
126 virtual CbcBranchingObject *clone()
const;
129 virtual ~CbcGeneralBranchingObject();
141 virtual void print();
146 inline void setNode(CbcNode *node)
163 virtual int compareOriginalObject(
const CbcBranchingObject *brObj)
const;
173 virtual CbcRangeCompare compareBranchingObject(
const CbcBranchingObject *brObj,
const bool replaceIfOverlap =
false);
175 inline int numberSubProblems()
const
177 return numberSubProblems_;
180 inline int decrementNumberLeft()
183 return numberSubLeft_;
186 inline int whichNode()
const
191 inline void setWhichNode(
int value)
196 const CbcSubProblem *subProblem(
int which)
const
198 return subProblems_ + which;
204 CbcSubProblem *subProblems_;
208 int numberSubProblems_;
223 CbcOneGeneralBranchingObject();
226 CbcOneGeneralBranchingObject(CbcModel *
model,
227 CbcGeneralBranchingObject *
object,
231 CbcOneGeneralBranchingObject(
const CbcOneGeneralBranchingObject &);
234 CbcOneGeneralBranchingObject &
operator=(
const CbcOneGeneralBranchingObject &rhs);
237 virtual CbcBranchingObject *clone()
const;
240 virtual ~CbcOneGeneralBranchingObject();
252 virtual void print();
266 virtual int compareOriginalObject(
const CbcBranchingObject *brObj)
const;
276 virtual CbcRangeCompare compareBranchingObject(
const CbcBranchingObject *brObj,
const bool replaceIfOverlap =
false);
281 CbcGeneralBranchingObject *object_;
double sumInfeasibilities() const
Get sum of "infeasibilities" reported by each object.
double objectiveValue() const
CbcNodeInfo * nodeInfo_
Information to make basis and bounds.
CbcNodeInfo * nodeInfo() const
int branch(OsiSolverInterface *solver)
Does next branch and updates state.
double checkIsCutoff(double cutoff)
Double checks in case node can change its mind!
int numberUnsatisfied() const
Get the number of objects unsatisfied at this node.
CbcModel * model() const
Return model.
virtual void feasibleRegion()=0
For the variable(s) referenced by the object, look at the current solution and set bounds to match th...
virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface *, const OsiBranchingInformation *, int)
Create a branching object and indicate which way to branch first.
int preferredWay() const
If -1 down always chosen first, +1 up always, 0 normal.
virtual void redoSequenceEtc(CbcModel *, int, const int *)
Redoes data when sequence numbers change.
virtual double infeasibility(const OsiBranchingInformation *, int &preferredWay) const
Abstract base class for `objects'.
Abstract branching object base class Now just difference with OsiBranchingObject.
CbcBranchingObject & operator=(const CbcBranchingObject &rhs)
Assignment operator.
virtual double branch()=0
Execute the actions required to branch, as specified by the current state of the branching object,...
virtual void print() const
Print something about branch - only if log level high.
Define a catch all class.
virtual CbcObject * clone() const =0
Clone.
CbcGeneral & operator=(const CbcGeneral &rhs)