Cbc
2.10.5
|
#include <CbcObject.hpp>
Public Member Functions | |
CbcObject () | |
CbcObject (CbcModel *model) | |
CbcObject (const CbcObject &) | |
CbcObject & | operator= (const CbcObject &rhs) |
virtual CbcObject * | clone () const =0 |
Clone. More... | |
virtual | ~CbcObject () |
Destructor. More... | |
virtual double | infeasibility (const OsiBranchingInformation *, int &preferredWay) const |
Infeasibility of the object. More... | |
virtual double | infeasibility (int &) const |
virtual void | feasibleRegion ()=0 |
For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution. More... | |
virtual double | feasibleRegion (OsiSolverInterface *solver, const OsiBranchingInformation *info) const |
Dummy one for compatibility. More... | |
virtual double | feasibleRegion (OsiSolverInterface *solver) const |
For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution. More... | |
virtual CbcBranchingObject * | createCbcBranch (OsiSolverInterface *, const OsiBranchingInformation *, int) |
Create a branching object and indicate which way to branch first. More... | |
virtual OsiBranchingObject * | createBranch (OsiSolverInterface *, const OsiBranchingInformation *, int) const |
Create a branching object and indicate which way to branch first. More... | |
virtual OsiBranchingObject * | createOsiBranch (OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const |
Create an Osibranching object and indicate which way to branch first. More... | |
virtual OsiSolverBranch * | solverBranch () const |
Create an OsiSolverBranch object. More... | |
virtual CbcBranchingObject * | preferredNewFeasible () const |
Given a valid solution (with reduced costs, etc.), return a branching object which would give a new feasible point in a good direction. More... | |
virtual CbcBranchingObject * | notPreferredNewFeasible () const |
Given a valid solution (with reduced costs, etc.), return a branching object which would give a new feasible point in a bad direction. More... | |
virtual void | resetBounds (const OsiSolverInterface *) |
Reset variable bounds to their original values. More... | |
virtual void | floorCeiling (double &floorValue, double &ceilingValue, double value, double tolerance) const |
Returns floor and ceiling i.e. More... | |
virtual CbcObjectUpdateData | createUpdateInformation (const OsiSolverInterface *solver, const CbcNode *node, const CbcBranchingObject *branchingObject) |
Pass in information on branch just done and create CbcObjectUpdateData instance. More... | |
virtual void | updateInformation (const CbcObjectUpdateData &) |
Update object by CbcObjectUpdateData. More... | |
int | id () const |
Identifier (normally column number in matrix) More... | |
void | setId (int value) |
Set identifier (normally column number in matrix) but 1000000000 to 1100000000 means optional branching object i.e. More... | |
bool | optionalObject () const |
Return true if optional branching object i.e. More... | |
int | position () const |
Get position in object_ list. More... | |
void | setPosition (int position) |
Set position in object_ list. More... | |
void | setModel (CbcModel *model) |
update model More... | |
CbcModel * | model () const |
Return model. More... | |
int | preferredWay () const |
If -1 down always chosen first, +1 up always, 0 normal. More... | |
void | setPreferredWay (int value) |
Set -1 down always chosen first, +1 up always, 0 normal. More... | |
virtual void | redoSequenceEtc (CbcModel *, int, const int *) |
Redoes data when sequence numbers change. More... | |
virtual void | initializeForBranching (CbcModel *) |
Initialize for branching. More... | |
![]() | |
OsiObject () | |
Default Constructor. More... | |
OsiObject (const OsiObject &) | |
Copy constructor. More... | |
OsiObject & | operator= (const OsiObject &rhs) |
Assignment operator. More... | |
virtual | ~OsiObject () |
Destructor. More... | |
double | infeasibility (const OsiSolverInterface *solver, int &whichWay) const |
Infeasibility of the object. More... | |
virtual double | checkInfeasibility (const OsiBranchingInformation *info) const |
virtual bool | canDoHeuristics () const |
Return true if object can take part in normal heuristics. More... | |
virtual bool | canMoveToNearest () const |
Return true if object can take part in move to nearest heuristic. More... | |
virtual int | columnNumber () const |
Column number if single column object -1 otherwise, Used by heuristics. More... | |
int | priority () const |
Return Priority - note 1 is highest priority. More... | |
void | setPriority (int priority) |
Set priority. More... | |
virtual bool | boundBranch () const |
Return true if branch should only bound variables. More... | |
virtual bool | canHandleShadowPrices () const |
Return true if knows how to deal with Pseudo Shadow Prices. More... | |
int | numberWays () const |
Return maximum number of ways branch may have. More... | |
void | setNumberWays (int numberWays) |
Set maximum number of ways branch may have. More... | |
void | setWhichWay (int way) |
Return preferred way to branch. More... | |
int | whichWay () const |
Return current preferred way to branch. More... | |
double | infeasibility () const |
Return infeasibility. More... | |
virtual double | upEstimate () const |
Return "up" estimate (default 1.0e-5) More... | |
virtual double | downEstimate () const |
Return "down" estimate (default 1.0e-5) More... | |
virtual void | resetSequenceEtc (int, const int *) |
Change column numbers after preprocessing. More... | |
virtual void | updateBefore (const OsiObject *) |
Updates stuff like pseudocosts before threads. More... | |
virtual void | updateAfter (const OsiObject *, const OsiObject *) |
Updates stuff like pseudocosts after threads finished. More... | |
Protected Attributes | |
CbcModel * | model_ |
data More... | |
int | id_ |
Identifier (normally column number in matrix) More... | |
int | position_ |
Position in object list. More... | |
int | preferredWay_ |
If -1 down always chosen first, +1 up always, 0 normal. More... | |
![]() | |
double | infeasibility_ |
data More... | |
short | whichWay_ |
Computed preferred way to branch. More... | |
short | numberWays_ |
Maximum number of ways on branch. More... | |
int | priority_ |
Priority. More... | |
Definition at line 67 of file CbcObject.hpp.
CbcObject::CbcObject | ( | ) |
CbcObject::CbcObject | ( | CbcModel * | model | ) |
CbcObject::CbcObject | ( | const CbcObject & | ) |
|
virtual |
Destructor.
|
pure virtual |
Clone.
Implements OsiObject.
Implemented in CbcSimpleInteger, CbcIdiotBranch, CbcSimpleIntegerFixed, CbcClique, CbcSimpleIntegerDynamicPseudoCost, CbcSOS, CbcLink, CbcBranchToFixLots, CbcFollowOn2, CbcFollowOn, CbcBranchAllDifferent, CbcSimpleIntegerPseudoCost, CbcGeneral, CbcBranchCut, CbcNWay, and CbcLotsize.
|
inlinevirtual |
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
Implements OsiObject.
Reimplemented in CbcSimpleInteger, CbcIdiotBranch, CbcClique, CbcSimpleIntegerDynamicPseudoCost, CbcSOS, CbcBranchToFixLots, CbcFollowOn, CbcNWay, CbcBranchAllDifferent, CbcSimpleIntegerPseudoCost, CbcGeneral, CbcBranchCut, and CbcLotsize.
Definition at line 106 of file CbcObject.hpp.
|
inlinevirtual |
Reimplemented in CbcSimpleIntegerFixed, CbcLink, and CbcFollowOn2.
Definition at line 111 of file CbcObject.hpp.
|
pure virtual |
For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution.
Implemented in CbcSimpleInteger, CbcIdiotBranch, CbcClique, CbcSOS, CbcLink, CbcFollowOn, CbcBranchCut, CbcFollowOn2, CbcNWay, CbcLotsize, and CbcGeneral.
|
virtual |
|
virtual |
For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution.
Returns measure of how much it had to move solution to make feasible
Reimplemented from OsiObject.
|
inlinevirtual |
Create a branching object and indicate which way to branch first.
The branching object has to know how to create branches (fix variables, etc.)
Reimplemented in CbcSimpleInteger, CbcIdiotBranch, CbcClique, CbcSOS, CbcBranchToFixLots, CbcSimpleIntegerDynamicPseudoCost, CbcBranchCut, CbcLink, CbcFollowOn, CbcNWay, CbcLotsize, CbcBranchAllDifferent, CbcGeneral, and CbcSimpleIntegerPseudoCost.
Definition at line 138 of file CbcObject.hpp.
|
inlinevirtual |
Create a branching object and indicate which way to branch first.
The branching object has to know how to create branches (fix variables, etc.)
Reimplemented from OsiObject.
Definition at line 147 of file CbcObject.hpp.
|
virtual |
Create an Osibranching object and indicate which way to branch first.
The branching object has to know how to create branches (fix variables, etc.)
|
virtual |
Create an OsiSolverBranch object.
This returns NULL if branch not represented by bound changes
Reimplemented in CbcSimpleIntegerDynamicPseudoCost, and CbcSOS.
|
inlinevirtual |
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 CbcBranchCut, and CbcLotsize.
Definition at line 173 of file CbcObject.hpp.
|
inlinevirtual |
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 CbcBranchCut, and CbcLotsize.
Definition at line 186 of file CbcObject.hpp.
|
inlinevirtual |
Reset variable bounds to their original values.
Bounds may be tightened, so it may be good to be able to set this info in object.
Reimplemented from OsiObject.
Reimplemented in CbcSimpleInteger, and CbcLotsize.
Definition at line 195 of file CbcObject.hpp.
|
virtual |
|
virtual |
Pass in information on branch just done and create CbcObjectUpdateData instance.
If object does not need data then backward pointer will be NULL. Assumes can get information from solver
Reimplemented in CbcSimpleIntegerDynamicPseudoCost, and CbcSOS.
|
inlinevirtual |
Update object by CbcObjectUpdateData.
Reimplemented in CbcSimpleIntegerDynamicPseudoCost, and CbcSOS.
Definition at line 210 of file CbcObject.hpp.
|
inline |
Identifier (normally column number in matrix)
Definition at line 213 of file CbcObject.hpp.
|
inline |
Set identifier (normally column number in matrix) but 1000000000 to 1100000000 means optional branching object i.e.
code would work without it
Definition at line 221 of file CbcObject.hpp.
|
inline |
Return true if optional branching object i.e.
code would work without it
Definition at line 228 of file CbcObject.hpp.
|
inline |
Get position in object_ list.
Definition at line 234 of file CbcObject.hpp.
|
inline |
Set position in object_ list.
Definition at line 240 of file CbcObject.hpp.
|
inline |
update model
Definition at line 246 of file CbcObject.hpp.
|
inline |
Return model.
Definition at line 252 of file CbcObject.hpp.
|
inlinevirtual |
If -1 down always chosen first, +1 up always, 0 normal.
Reimplemented from OsiObject.
Definition at line 258 of file CbcObject.hpp.
|
inline |
Set -1 down always chosen first, +1 up always, 0 normal.
Definition at line 263 of file CbcObject.hpp.
|
inlinevirtual |
Redoes data when sequence numbers change.
Reimplemented in CbcClique, CbcSOS, CbcBranchToFixLots, CbcNWay, and CbcGeneral.
Definition at line 268 of file CbcObject.hpp.
|
inlinevirtual |
Initialize for branching.
Reimplemented in CbcIdiotBranch.
Definition at line 270 of file CbcObject.hpp.
|
protected |
|
protected |
Identifier (normally column number in matrix)
Definition at line 278 of file CbcObject.hpp.
|
protected |
Position in object list.
Definition at line 280 of file CbcObject.hpp.
|
protected |
If -1 down always chosen first, +1 up always, 0 normal.
Definition at line 282 of file CbcObject.hpp.