#include <CbcNode.hpp>
Inheritance diagram for CbcNodeInfo:
Public Member Functions | |
virtual void | applyToModel (CbcModel *model, CoinWarmStartBasis *&basis, CbcCountRowCut **addCuts, int ¤tNumberCuts) const =0 |
Modify model according to information at node. | |
virtual CbcNodeInfo * | buildRowBasis (CoinWarmStartBasis &basis) const =0 |
Builds up row basis backwards (until original model). | |
virtual CbcNodeInfo * | clone () const =0 |
Clone. | |
virtual void | allBranchesGone () |
Called when number branches left down to zero. | |
void | increment (int amount=1) |
Increment number of references. | |
int | decrement (int amount=1) |
Decrement number of references and return number left. | |
void | initializeInfo (int number) |
Initialize reference counts. | |
int | numberBranchesLeft () const |
Return number of branches left in object. | |
int | numberPointingToThis () const |
Return number of objects pointing to this. | |
int | branchedOn () |
Say one branch taken. | |
void | throwAway () |
Say thrown away. | |
CbcNodeInfo * | parent () const |
Parent of this. | |
void | addCuts (OsiCuts &cuts, int numberToBranch, int *whichGenerator) |
void | addCuts (int numberCuts, CbcCountRowCut **cuts, int numberToBranch) |
void | deleteCuts (int numberToDelete, CbcCountRowCut **cuts) |
Delete cuts (decrements counts) Slow unless cuts in same order as saved. | |
void | deleteCuts (int numberToDelete, int *which) |
void | deleteCut (int whichOne) |
Really delete a cut. | |
void | decrementCuts (int change=1) |
Decrement active cut counts. | |
void | decrementParentCuts (int change=1) |
Decrement all active cut counts in chain starting at parent. | |
void | incrementParentCuts (int change=1) |
Increment all active cut counts in parent chain. | |
CbcCountRowCut ** | cuts () const |
Array of pointers to cuts. | |
int | numberCuts () const |
Number of row cuts (this node). | |
void | setNumberCuts (int value) |
void | nullOwner () |
Set owner null. | |
const CbcNode * | owner () const |
int | nodeNumber () const |
The node number. | |
void | setNodeNumber (int node) |
Constructors & destructors | |
CbcNodeInfo () | |
Default Constructor. | |
CbcNodeInfo (const CbcNodeInfo &) | |
Copy constructor. | |
CbcNodeInfo (CbcNodeInfo *parent) | |
Construct with parent. | |
CbcNodeInfo (CbcNodeInfo *parent, CbcNode *owner) | |
Construct with parent and owner. | |
virtual | ~CbcNodeInfo () |
Destructor. | |
Protected Attributes | |
int | numberPointingToThis_ |
Number of other nodes pointing to this node. | |
CbcNodeInfo * | parent_ |
parent | |
CbcNode * | owner_ |
Owner. | |
int | numberCuts_ |
Number of row cuts (this node). | |
int | nodeNumber_ |
The node number. | |
CbcCountRowCut ** | cuts_ |
Array of pointers to cuts. | |
int | numberRows_ |
Number of rows in problem (before these cuts). | |
int | numberBranchesLeft_ |
Number of branch arms left to explore at this node. | |
Private Member Functions | |
CbcNodeInfo & | operator= (const CbcNodeInfo &rhs) |
Illegal Assignment operator. |
When a subproblem is initially created, it is represented by a CbcNode object and an attached CbcNodeInfo object.
The CbcNode contains information needed while the subproblem remains live. The CbcNode is deleted when the last branch arm has been evaluated.
The CbcNodeInfo contains information required to maintain the branch-and-cut search tree structure (links and reference counts) and to recreate the subproblem for this node (basis, variable bounds, cutting planes). A CbcNodeInfo object remains in existence until all nodes have been pruned from the subtree rooted at this node.
The principle used to maintain the reference count is that the reference count is always the sum of all potential and actual children of the node. Specifically,
CbcNodeInfo objects come in two flavours. A CbcFullNodeInfo object contains a full record of the information required to recreate a subproblem. A CbcPartialNodeInfo object expresses this information in terms of differences from the parent.
Definition at line 60 of file CbcNode.hpp.
|
Default Constructor. Creates an empty NodeInfo object. |
|
Copy constructor.
|
|
Construct with parent. Creates a NodeInfo object which knows its parent and assumes it will in turn have two children. |
|
Construct with parent and owner.
As for `construct with parent', and attached to |
|
Destructor. Note that the destructor will recursively delete the parent if this nodeInfo is the last child. |
|
Modify model according to information at node. The routine modifies the model according to bound and basis information at node and adds any cuts to the addCuts array. Implemented in CbcFullNodeInfo, and CbcPartialNodeInfo. |
|
Builds up row basis backwards (until original model). Returns NULL or previous one to apply . Depends on Free being 0 and impossible for cuts Implemented in CbcFullNodeInfo, and CbcPartialNodeInfo. |
|
Clone.
Implemented in CbcFullNodeInfo, and CbcPartialNodeInfo. |
|
Called when number branches left down to zero.
Definition at line 115 of file CbcNode.hpp. |
|
Increment number of references.
Definition at line 118 of file CbcNode.hpp. |
|
Decrement number of references and return number left.
Definition at line 122 of file CbcNode.hpp. |
|
Initialize reference counts. Initialize the reference counts used for tree maintenance. Definition at line 130 of file CbcNode.hpp. |
|
Return number of branches left in object.
Definition at line 134 of file CbcNode.hpp. |
|
Return number of objects pointing to this.
Definition at line 138 of file CbcNode.hpp. |
|
Say one branch taken.
Definition at line 142 of file CbcNode.hpp. |
|
Say thrown away.
Definition at line 146 of file CbcNode.hpp. |
|
Parent of this.
Definition at line 150 of file CbcNode.hpp. |
|
|
|
|
|
Delete cuts (decrements counts) Slow unless cuts in same order as saved.
|
|
|
|
Really delete a cut.
|
|
Decrement active cut counts.
|
|
Decrement all active cut counts in chain starting at parent.
|
|
Increment all active cut counts in parent chain.
|
|
Array of pointers to cuts.
Definition at line 174 of file CbcNode.hpp. |
|
Number of row cuts (this node).
Definition at line 178 of file CbcNode.hpp. |
|
Definition at line 180 of file CbcNode.hpp. |
|
Set owner null.
Definition at line 184 of file CbcNode.hpp. |
|
Definition at line 186 of file CbcNode.hpp. |
|
The node number.
Definition at line 189 of file CbcNode.hpp. |
|
Definition at line 191 of file CbcNode.hpp. |
|
Illegal Assignment operator.
|
|
Number of other nodes pointing to this node. Number of existing and potential search tree nodes pointing to this node. `Existing' means referenced by parent_ of some other CbcNodeInfo. `Potential' means children still to be created (numberBranchesLeft_ of this CbcNodeInfo). Definition at line 202 of file CbcNode.hpp. |
|
parent
Definition at line 205 of file CbcNode.hpp. |
|
Owner.
Definition at line 208 of file CbcNode.hpp. |
|
Number of row cuts (this node).
Definition at line 211 of file CbcNode.hpp. |
|
The node number.
Definition at line 214 of file CbcNode.hpp. |
|
Array of pointers to cuts.
Definition at line 217 of file CbcNode.hpp. |
|
Number of rows in problem (before these cuts). This means that for top of chain it must be rows at continuous Definition at line 221 of file CbcNode.hpp. |
|
Number of branch arms left to explore at this node.
Definition at line 229 of file CbcNode.hpp. |