8#ifndef CbcBranchingObject_H
9#define CbcBranchingObject_H
14#include "OsiBranchingObject.hpp"
89 numberBranches_ = value;
105 virtual double branch(OsiSolverInterface *)
111 virtual void fix(OsiSolverInterface *,
117 virtual bool tighten(OsiSolverInterface *) {
return false; }
124 assert(branchIndex_ > 0);
129 using OsiBranchingObject::print;
@ DynamicPseudoCostBranchObj
@ SimpleIntegerDynamicPseudoCostBranchObj
virtual void previousBranch()
Reset every information so that the branching object appears to point to the previous child.
void resetNumberBranchesLeft()
Reset number of branches left to original.
int variable_
Branching variable (0 is first integer)
int way_
The state of the branching object.
virtual CbcBranchObjType type() const =0
Return the type (an integer identifier) of this.
CbcObject * originalCbcObject_
Pointer back to object which created.
CbcObject * object() const
Return pointer back to object which created.
void setNumberBranches(int value)
Set number of branches to do.
CbcBranchingObject(CbcModel *model, int variable, int way, double value)
Constructor.
CbcBranchingObject & operator=(const CbcBranchingObject &rhs)
Assignment operator.
virtual CbcBranchingObject * clone() const =0
Clone.
virtual bool tighten(OsiSolverInterface *)
Change (tighten) bounds in object to reflect bounds in solver.
virtual int fillStrongInfo(CbcStrongInfo &)
Some branchingObjects may claim to be able to skip strong branching.
CbcBranchingObject()
Default Constructor.
virtual CbcRangeCompare compareBranchingObject(const CbcBranchingObject *brObj, const bool replaceIfOverlap=false)=0
Compare the this with brObj.
CbcModel * model_
The model that owns this branching object.
void way(int way)
Set the state of the branching object.
virtual int compareOriginalObject(const CbcBranchingObject *brObj) const
Compare the original object of this with the original object of brObj.
virtual double branch()=0
Execute the actions required to branch, as specified by the current state of the branching object,...
virtual double branch(OsiSolverInterface *)
Execute the actions required to branch, as specified by the current state of the branching object,...
virtual void fix(OsiSolverInterface *, double *, double *, int) const
Update bounds in solver as in 'branch' and update given bounds.
CbcModel * model() const
Return model.
void setOriginalObject(CbcObject *object)
Set pointer back to object which created.
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.
void setModel(CbcModel *model)
update model
CbcBranchingObject(const CbcBranchingObject &)
Copy constructor.
virtual ~CbcBranchingObject()
Destructor.
Simple Branch and bound class.
Abstract base class for ‘objects’.