#include <CbcBranchBase.hpp>
Inheritance diagram for CbcObject:
Public Member Functions | |
CbcObject () | |
CbcObject (CbcModel *model) | |
CbcObject (const CbcObject &) | |
CbcObject & | operator= (const CbcObject &rhs) |
virtual CbcObject * | clone () const =0 |
Clone. | |
virtual | ~CbcObject () |
Destructor. | |
virtual double | infeasibility (int &preferredWay) const =0 |
Infeasibility of the object. | |
virtual void | feasibleRegion ()=0 |
For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution. | |
virtual CbcBranchingObject * | createBranch (int way)=0 |
Create a branching object and indicate which way to branch first. | |
virtual OsiSolverBranch * | solverBranch () const |
Create an OsiSolverBranch object. | |
virtual CbcBranchingObject * | preferredNewFeasible () const |
Given a valid solution (with reduced costs, etc. | |
virtual CbcBranchingObject * | notPreferredNewFeasible () const |
Given a valid solution (with reduced costs, etc. | |
virtual void | resetBounds () |
Reset variable bounds to their original values. | |
virtual bool | boundBranch () const |
Return true if branch created by object should fix variables. | |
virtual void | floorCeiling (double &floorValue, double &ceilingValue, double value, double tolerance) const |
Returns floor and ceiling i.e. | |
int | id () const |
Identifier (normally column number in matrix). | |
int | priority () const |
Return Priority. | |
void | setPriority (int priority) |
Set priority. | |
virtual int | columnNumber () const |
Column number if single column object -1 otherwise. | |
void | setModel (CbcModel *model) |
update model | |
CbcModel * | model () const |
Return model. | |
virtual double | upEstimate () const |
Return "up" estimate (default 1.0e-5). | |
virtual double | downEstimate () const |
Return "down" estimate (default 1.0e-5). | |
int | preferredWay () const |
If -1 down always chosen first, +1 up always, 0 normal. | |
void | setPreferredWay (int value) |
Set -1 down always chosen first, +1 up always, 0 normal. | |
virtual void | redoSequenceEtc (CbcModel *model, int numberColumns, const int *originalColumns) |
Redoes data when sequence numbers change. | |
Protected Attributes | |
CbcModel * | model_ |
Model. | |
int | id_ |
Identifier (normally column number in matrix). | |
int | priority_ |
Priority. | |
int | preferredWay_ |
If -1 down always chosen first, +1 up always, 0 normal. |
Definition at line 60 of file CbcBranchBase.hpp.
CbcObject::CbcObject | ( | ) |
CbcObject::CbcObject | ( | CbcModel * | model | ) |
CbcObject::CbcObject | ( | const CbcObject & | ) |
virtual CbcObject::~CbcObject | ( | ) | [virtual] |
Destructor.
virtual CbcObject* CbcObject::clone | ( | ) | const [pure virtual] |
Clone.
Implemented in CbcFollowOn2, CbcLink, CbcClique, CbcSOS, CbcSimpleInteger, CbcNWay, CbcSimpleIntegerPseudoCost, CbcFollowOn, CbcBranchCut, CbcBranchToFixLots, CbcBranchAllDifferent, CbcSimpleIntegerDynamicPseudoCost, and CbcLotsize.
virtual double CbcObject::infeasibility | ( | int & | preferredWay | ) | const [pure virtual] |
Infeasibility of the object.
This is some measure of the infeasibility of the object. It should be scaled to be in the range [0.0, 0.5], with 0.0 indicating the object is satisfied.
The preferred branching direction is returned in preferredWay,
This is used to prepare for strong branching but should also think of case when no strong branching
The object may also compute an estimate of cost of going "up" or "down". This will probably be based on pseudo-cost ideas
Implemented in CbcFollowOn2, CbcLink, CbcClique, CbcSOS, CbcSimpleInteger, CbcNWay, CbcSimpleIntegerPseudoCost, CbcFollowOn, CbcBranchCut, CbcBranchToFixLots, CbcBranchAllDifferent, CbcSimpleIntegerDynamicPseudoCost, and CbcLotsize.
virtual void CbcObject::feasibleRegion | ( | ) | [pure virtual] |
For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution.
Implemented in CbcFollowOn2, CbcLink, CbcClique, CbcSOS, CbcSimpleInteger, CbcNWay, CbcFollowOn, CbcBranchCut, and CbcLotsize.
virtual CbcBranchingObject* CbcObject::createBranch | ( | int | way | ) | [pure virtual] |
Create a branching object and indicate which way to branch first.
The branching object has to know how to create branches (fix variables, etc.)
Implemented in CbcFollowOn2, CbcLink, CbcClique, CbcSOS, CbcSimpleInteger, CbcNWay, CbcSimpleIntegerPseudoCost, CbcFollowOn, CbcBranchCut, CbcBranchToFixLots, CbcBranchAllDifferent, CbcSimpleIntegerDynamicPseudoCost, and CbcLotsize.
virtual OsiSolverBranch* CbcObject::solverBranch | ( | ) | const [virtual] |
Create an OsiSolverBranch object.
This returns NULL if branch not represented by bound changes
Reimplemented in CbcSOS, CbcSimpleInteger, and CbcSimpleIntegerDynamicPseudoCost.
virtual CbcBranchingObject* CbcObject::preferredNewFeasible | ( | ) | const [inline, virtual] |
Given a valid solution (with reduced costs, etc.
), return a branching object which would give a new feasible point in a good direction.
If the method cannot generate a feasible point (because there aren't any, or because it isn't bright enough to find one), it should return null.
Reimplemented in CbcSimpleInteger, CbcBranchCut, and CbcLotsize.
Definition at line 124 of file CbcBranchBase.hpp.
virtual CbcBranchingObject* CbcObject::notPreferredNewFeasible | ( | ) | const [inline, virtual] |
Given a valid solution (with reduced costs, etc.
), return a branching object which would give a new feasible point in a bad direction.
If the method cannot generate a feasible point (because there aren't any, or because it isn't bright enough to find one), it should return null.
Reimplemented in CbcSimpleInteger, CbcBranchCut, and CbcLotsize.
Definition at line 135 of file CbcBranchBase.hpp.
virtual void CbcObject::resetBounds | ( | ) | [inline, virtual] |
Reset variable bounds to their original values.
Bounds may be tightened, so it may be good to be able to reset them to their original values.
Reimplemented in CbcSimpleInteger, CbcBranchCut, and CbcLotsize.
Definition at line 143 of file CbcBranchBase.hpp.
virtual bool CbcObject::boundBranch | ( | ) | const [inline, virtual] |
Return true if branch created by object should fix variables.
Reimplemented in CbcBranchCut.
Definition at line 147 of file CbcBranchBase.hpp.
virtual void CbcObject::floorCeiling | ( | double & | floorValue, | |
double & | ceilingValue, | |||
double | value, | |||
double | tolerance | |||
) | const [virtual] |
int CbcObject::id | ( | ) | const [inline] |
Identifier (normally column number in matrix).
Definition at line 155 of file CbcBranchBase.hpp.
References id_.
int CbcObject::priority | ( | ) | const [inline] |
Return Priority.
Definition at line 158 of file CbcBranchBase.hpp.
References priority_.
Referenced by CbcModel::priority().
void CbcObject::setPriority | ( | int | priority | ) | [inline] |
virtual int CbcObject::columnNumber | ( | ) | const [virtual] |
Column number if single column object -1 otherwise.
Reimplemented in CbcSimpleInteger, and CbcLotsize.
void CbcObject::setModel | ( | CbcModel * | model | ) | [inline] |
CbcModel* CbcObject::model | ( | ) | const [inline] |
Return model.
Definition at line 173 of file CbcBranchBase.hpp.
References model_.
Referenced by setModel().
virtual double CbcObject::upEstimate | ( | ) | const [virtual] |
Return "up" estimate (default 1.0e-5).
Reimplemented in CbcSimpleIntegerPseudoCost, and CbcSimpleIntegerDynamicPseudoCost.
virtual double CbcObject::downEstimate | ( | ) | const [virtual] |
Return "down" estimate (default 1.0e-5).
Reimplemented in CbcSimpleIntegerPseudoCost, and CbcSimpleIntegerDynamicPseudoCost.
int CbcObject::preferredWay | ( | ) | const [inline] |
If -1 down always chosen first, +1 up always, 0 normal.
Definition at line 181 of file CbcBranchBase.hpp.
References preferredWay_.
void CbcObject::setPreferredWay | ( | int | value | ) | [inline] |
Set -1 down always chosen first, +1 up always, 0 normal.
Definition at line 184 of file CbcBranchBase.hpp.
References preferredWay_.
virtual void CbcObject::redoSequenceEtc | ( | CbcModel * | model, | |
int | numberColumns, | |||
const int * | originalColumns | |||
) | [inline, virtual] |
Redoes data when sequence numbers change.
Reimplemented in CbcClique, CbcSOS, CbcSimpleInteger, and CbcNWay.
Definition at line 187 of file CbcBranchBase.hpp.
CbcModel* CbcObject::model_ [protected] |
int CbcObject::id_ [protected] |
Identifier (normally column number in matrix).
Definition at line 195 of file CbcBranchBase.hpp.
Referenced by id().
int CbcObject::priority_ [protected] |
Priority.
Definition at line 197 of file CbcBranchBase.hpp.
Referenced by priority(), and setPriority().
int CbcObject::preferredWay_ [protected] |
If -1 down always chosen first, +1 up always, 0 normal.
Definition at line 199 of file CbcBranchBase.hpp.
Referenced by preferredWay(), and setPreferredWay().