Cbc
2.10.10
|
Information required to recreate the subproblem at this node. More...
#include <CbcNodeInfo.hpp>
Constructors & destructors | |
int | numberPointingToThis_ |
Number of other nodes pointing to this node. More... | |
CbcNodeInfo * | parent_ |
parent More... | |
OsiBranchingObject * | parentBranch_ |
Copy of the branching object of the parent when the node is created. More... | |
CbcNode * | owner_ |
Owner. More... | |
int | numberCuts_ |
Number of row cuts (this node) More... | |
int | nodeNumber_ |
The node number. More... | |
CbcCountRowCut ** | cuts_ |
Array of pointers to cuts. More... | |
int | numberRows_ |
Number of rows in problem (before these cuts). More... | |
int | numberBranchesLeft_ |
Number of branch arms left to explore at this node. More... | |
int | active_ |
Active node information. More... | |
CbcNodeInfo () | |
Default Constructor. More... | |
CbcNodeInfo (const CbcNodeInfo &) | |
Copy constructor. More... | |
CbcNodeInfo (CbcNodeInfo *parent, CbcNode *owner) | |
Construct with parent and owner. More... | |
virtual | ~CbcNodeInfo () |
Destructor. More... | |
virtual void | applyToModel (CbcModel *model, CoinWarmStartBasis *&basis, CbcCountRowCut **addCuts, int ¤tNumberCuts) const =0 |
Modify model according to information at node. More... | |
virtual int | applyBounds (int iColumn, double &lower, double &upper, int force)=0 |
Just apply bounds to one variable - force means overwrite by lower,upper (1=>infeasible) More... | |
virtual CbcNodeInfo * | buildRowBasis (CoinWarmStartBasis &basis) const =0 |
Builds up row basis backwards (until original model). More... | |
virtual CbcNodeInfo * | clone () const =0 |
Clone. More... | |
virtual void | allBranchesGone () |
Called when number branches left down to zero. More... | |
void | increment (int amount=1) |
Increment number of references. More... | |
int | decrement (int amount=1) |
Decrement number of references and return number left. More... | |
void | initializeInfo (int number) |
Initialize reference counts. More... | |
int | numberBranchesLeft () const |
Return number of branches left in object. More... | |
void | setNumberBranchesLeft (int value) |
Set number of branches left in object. More... | |
int | numberPointingToThis () const |
Return number of objects pointing to this. More... | |
void | setNumberPointingToThis (int number) |
Set number of objects pointing to this. More... | |
void | incrementNumberPointingToThis () |
Increment number of objects pointing to this. More... | |
int | branchedOn () |
Say one branch taken. More... | |
void | throwAway () |
Say thrown away. More... | |
CbcNodeInfo * | parent () const |
Parent of this. More... | |
void | nullParent () |
Set parent null. More... | |
void | addCuts (OsiCuts &cuts, int numberToBranch, int numberPointingToThis) |
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. More... | |
void | deleteCuts (int numberToDelete, int *which) |
void | deleteCut (int whichOne) |
Really delete a cut. More... | |
void | decrementCuts (int change=1) |
Decrement active cut counts. More... | |
void | incrementCuts (int change=1) |
Increment active cut counts. More... | |
void | decrementParentCuts (CbcModel *model, int change=1) |
Decrement all active cut counts in chain starting at parent. More... | |
void | incrementParentCuts (CbcModel *model, int change=1) |
Increment all active cut counts in parent chain. More... | |
CbcCountRowCut ** | cuts () const |
Array of pointers to cuts. More... | |
int | numberCuts () const |
Number of row cuts (this node) More... | |
void | setNumberCuts (int value) |
void | nullOwner () |
Set owner null. More... | |
const CbcNode * | owner () const |
CbcNode * | mutableOwner () const |
int | nodeNumber () const |
The node number. More... | |
void | setNodeNumber (int node) |
void | deactivate (int mode=3) |
Deactivate node information. More... | |
bool | allActivated () const |
Say if normal. More... | |
bool | marked () const |
Say if marked. More... | |
void | mark () |
Mark. More... | |
void | unmark () |
Unmark. More... | |
bool | symmetryWorked () const |
Get symmetry value (true worked at this node) More... | |
void | setSymmetryWorked () |
Say symmetry worked at this node) More... | |
const OsiBranchingObject * | parentBranch () const |
Branching object for the parent. More... | |
void | unsetParentBasedData () |
If we need to take off parent based data. More... | |
CbcNodeInfo & | operator= (const CbcNodeInfo &rhs) |
Illegal Assignment operator. More... | |
void | setParentBasedData () |
routine common to constructors More... | |
Information required to recreate the subproblem at this node.
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,
Notice that the active subproblem lives in a sort of limbo, neither a potential or an actual node in the branch-and-cut tree.
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 68 of file CbcNodeInfo.hpp.
CbcNodeInfo::CbcNodeInfo | ( | ) |
Default Constructor.
Creates an empty NodeInfo object.
CbcNodeInfo::CbcNodeInfo | ( | const CbcNodeInfo & | ) |
Copy constructor.
CbcNodeInfo::CbcNodeInfo | ( | CbcNodeInfo * | parent, |
CbcNode * | owner | ||
) |
Construct with parent and owner.
As for ‘construct with parent’, and attached to owner
.
|
virtual |
Destructor.
Note that the destructor will recursively delete the parent if this nodeInfo is the last child.
|
pure virtual |
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.
|
pure virtual |
Just apply bounds to one variable - force means overwrite by lower,upper (1=>infeasible)
Implemented in CbcFullNodeInfo, and CbcPartialNodeInfo.
|
pure virtual |
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.
|
pure virtual |
Clone.
Implemented in CbcFullNodeInfo, and CbcPartialNodeInfo.
|
inlinevirtual |
Called when number branches left down to zero.
Definition at line 124 of file CbcNodeInfo.hpp.
|
inline |
Increment number of references.
Definition at line 127 of file CbcNodeInfo.hpp.
|
inline |
Decrement number of references and return number left.
Definition at line 133 of file CbcNodeInfo.hpp.
|
inline |
Initialize reference counts.
Initialize the reference counts used for tree maintenance.
Definition at line 149 of file CbcNodeInfo.hpp.
|
inline |
Return number of branches left in object.
Definition at line 156 of file CbcNodeInfo.hpp.
|
inline |
Set number of branches left in object.
Definition at line 162 of file CbcNodeInfo.hpp.
|
inline |
Return number of objects pointing to this.
Definition at line 168 of file CbcNodeInfo.hpp.
|
inline |
Set number of objects pointing to this.
Definition at line 174 of file CbcNodeInfo.hpp.
|
inline |
Increment number of objects pointing to this.
Definition at line 180 of file CbcNodeInfo.hpp.
|
inline |
Say one branch taken.
Definition at line 186 of file CbcNodeInfo.hpp.
|
inline |
Say thrown away.
Definition at line 194 of file CbcNodeInfo.hpp.
|
inline |
Parent of this.
Definition at line 201 of file CbcNodeInfo.hpp.
|
inline |
Set parent null.
Definition at line 206 of file CbcNodeInfo.hpp.
void CbcNodeInfo::addCuts | ( | OsiCuts & | cuts, |
int | numberToBranch, | ||
int | numberPointingToThis | ||
) |
void CbcNodeInfo::addCuts | ( | int | numberCuts, |
CbcCountRowCut ** | cuts, | ||
int | numberToBranch | ||
) |
void CbcNodeInfo::deleteCuts | ( | int | numberToDelete, |
CbcCountRowCut ** | cuts | ||
) |
Delete cuts (decrements counts) Slow unless cuts in same order as saved.
void CbcNodeInfo::deleteCuts | ( | int | numberToDelete, |
int * | which | ||
) |
void CbcNodeInfo::deleteCut | ( | int | whichOne | ) |
Really delete a cut.
void CbcNodeInfo::decrementCuts | ( | int | change = 1 | ) |
Decrement active cut counts.
void CbcNodeInfo::incrementCuts | ( | int | change = 1 | ) |
Increment active cut counts.
void CbcNodeInfo::decrementParentCuts | ( | CbcModel * | model, |
int | change = 1 |
||
) |
Decrement all active cut counts in chain starting at parent.
void CbcNodeInfo::incrementParentCuts | ( | CbcModel * | model, |
int | change = 1 |
||
) |
Increment all active cut counts in parent chain.
|
inline |
Array of pointers to cuts.
Definition at line 236 of file CbcNodeInfo.hpp.
|
inline |
Number of row cuts (this node)
Definition at line 242 of file CbcNodeInfo.hpp.
|
inline |
Definition at line 246 of file CbcNodeInfo.hpp.
|
inline |
Set owner null.
Definition at line 252 of file CbcNodeInfo.hpp.
|
inline |
Definition at line 256 of file CbcNodeInfo.hpp.
|
inline |
Definition at line 260 of file CbcNodeInfo.hpp.
|
inline |
The node number.
Definition at line 265 of file CbcNodeInfo.hpp.
|
inline |
Definition at line 269 of file CbcNodeInfo.hpp.
void CbcNodeInfo::deactivate | ( | int | mode = 3 | ) |
Deactivate node information.
1 - bounds 2 - cuts 4 - basis! 8 - just marked 16 - symmetry branching worked
|
inline |
Say if normal.
Definition at line 282 of file CbcNodeInfo.hpp.
|
inline |
Say if marked.
Definition at line 287 of file CbcNodeInfo.hpp.
|
inline |
Mark.
Definition at line 292 of file CbcNodeInfo.hpp.
|
inline |
Unmark.
Definition at line 297 of file CbcNodeInfo.hpp.
|
inline |
Get symmetry value (true worked at this node)
Definition at line 302 of file CbcNodeInfo.hpp.
|
inline |
Say symmetry worked at this node)
Definition at line 307 of file CbcNodeInfo.hpp.
|
inline |
Branching object for the parent.
Definition at line 313 of file CbcNodeInfo.hpp.
void CbcNodeInfo::unsetParentBasedData | ( | ) |
If we need to take off parent based data.
|
private |
Illegal Assignment operator.
|
private |
routine common to constructors
|
protected |
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 328 of file CbcNodeInfo.hpp.
|
protected |
parent
Definition at line 331 of file CbcNodeInfo.hpp.
|
protected |
Copy of the branching object of the parent when the node is created.
Definition at line 334 of file CbcNodeInfo.hpp.
|
protected |
Owner.
Definition at line 337 of file CbcNodeInfo.hpp.
|
protected |
Number of row cuts (this node)
Definition at line 340 of file CbcNodeInfo.hpp.
|
protected |
The node number.
Definition at line 343 of file CbcNodeInfo.hpp.
|
protected |
Array of pointers to cuts.
Definition at line 346 of file CbcNodeInfo.hpp.
|
protected |
Number of rows in problem (before these cuts).
This means that for top of chain it must be rows at continuous
Definition at line 350 of file CbcNodeInfo.hpp.
|
protected |
Number of branch arms left to explore at this node.
Definition at line 358 of file CbcNodeInfo.hpp.
|
protected |
Active node information.
1 - bounds 2 - cuts 4 - basis!
Definition at line 364 of file CbcNodeInfo.hpp.