Cbc 2.10.12
Loading...
Searching...
No Matches
CbcNodeInfo Class Referenceabstract

Information required to recreate the subproblem at this node. More...

#include <CbcNodeInfo.hpp>

Inheritance diagram for CbcNodeInfo:
Collaboration diagram for CbcNodeInfo:

Constructors & destructors

*Just apply bounds to one variable force means overwrite by lower
*Just apply bounds to one variable force means overwrite by double & lower
*Just apply bounds to one variable force means overwrite by double double & upper
*Just apply bounds to one variable force means overwrite by double double int force = 0
int numberPointingToThis_
 Number of other nodes pointing to this node.
*parent CbcNodeInfoparent_
*Copy of the branching object of the parent when the node is created OsiBranchingObject * parentBranch_
*Owner CbcNode * owner_
*The node number int nodeNumber_
*Array of pointers to cuts CbcCountRowCut ** cuts_
int numberRows_
 Number of rows in problem (before these cuts).
int numberBranchesLeft_
 Number of branch arms left to explore at this node.
int active_
 Active node information.
 CbcNodeInfo ()
 Default Constructor.
 CbcNodeInfo (const CbcNodeInfo &)
 Copy constructor.
virtual ~CbcNodeInfo ()
 Construct with parent and owner.
virtual void applyToModel (CbcModel *model, CoinWarmStartBasis *&basis, CbcCountRowCut **addCuts, int &currentNumberCuts) const =0
 Modify model according to information at node.
*Just apply bounds to one variable force means overwrite by upper (1=>infeasible) virtual int applyBounds(int iColumn
virtual CbcNodeInfobuildRowBasis (CoinWarmStartBasis &basis) const =0
 Builds up row basis backwards (until original model).
*virtual Clone CbcNodeInfoclone () const =0
*Called when number branches left down to virtual zero void allBranchesGone ()
*Increment number of references void increment (int amount=1)
*Decrement number of references and return number left int decrement (int amount=1)
void initializeInfo (int number)
 Initialize reference counts.
*Return number of branches left in object int numberBranchesLeft () const
*Set number of branches left in object void setNumberBranchesLeft (int value)
*Return number of objects pointing to this int numberPointingToThis () const
*Set number of objects pointing to this void setNumberPointingToThis (int number)
*Increment number of objects pointing to this void incrementNumberPointingToThis ()
*Say one branch taken int branchedOn ()
*Say thrown away void throwAway ()
*Parent of this CbcNodeInfoparent () const
*Set parent null void nullParent ()
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.
void deleteCuts (int numberToDelete, int *which)
*Really delete a cut void deleteCut (int whichOne)
*Decrement active cut counts void decrementCuts (int change=1)
*Increment active cut counts void incrementCuts (int change=1)
*Decrement all active cut counts in chain starting at parent void decrementParentCuts (CbcModel *model, int change=1)
*Increment all active cut counts in parent chain void incrementParentCuts (CbcModel *model, int change=1)
*Array of pointers to cuts CbcCountRowCut ** cuts () const
*Number of row cuts (this node) inline int numberCuts() const
void setNumberCuts (int value)
*Set owner null void nullOwner ()
const CbcNode * owner () const
CbcNode * mutableOwner () const
*The node number int nodeNumber () const
void setNodeNumber (int node)
void deactivate (int mode=3)
 Deactivate node information.
*Say if normal bool allActivated () const
*Say if marked bool marked () const
*Mark void mark ()
*Unmark void unmark ()
*Get symmetry value (true worked at this node) inline bool symmetryWorked() const
*Say symmetry worked at this node void setSymmetryWorked ()
*Branching object for the parent const OsiBranchingObject * parentBranch () const
*If we need to take off parent based data void unsetParentBasedData ()
*Number of row cuts (this node) int numberCuts_
*Illegal Assignment operator CbcNodeInfo &operator= (const CbcNodeInfo &rhs)
*routine common to constructors void setParentBasedData ()

Detailed Description

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,

  • Once it's determined how the node will branch, the reference count is set to the number of potential children (i.e., the number of arms of the branch).
  • As each child is created by CbcNode::branch() (converting a potential child to the active subproblem), the reference count is decremented.
  • If the child survives and will become a node in the search tree (converting the active subproblem into an actual child), increment the reference count.

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.

Constructor & Destructor Documentation

◆ CbcNodeInfo() [1/2]

CbcNodeInfo::CbcNodeInfo ( )

Default Constructor.

Creates an empty NodeInfo object.

◆ CbcNodeInfo() [2/2]

CbcNodeInfo::CbcNodeInfo ( const CbcNodeInfo & )

Copy constructor.

◆ ~CbcNodeInfo()

virtual CbcNodeInfo::~CbcNodeInfo ( )
virtual

Construct with parent and owner.

As for `construct with parent', and attached to owner. */ CbcNodeInfo(CbcNodeInfo *parent, CbcNode *owner);

/** Destructor

Note that the destructor will recursively delete the parent if this nodeInfo is the last child.

Member Function Documentation

◆ applyToModel()

virtual void CbcNodeInfo::applyToModel ( CbcModel * model,
CoinWarmStartBasis *& basis,
CbcCountRowCut ** addCuts,
int & currentNumberCuts ) const
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.

◆ upper()

*Just apply bounds to one variable force means overwrite by CbcNodeInfo::upper ( 1 ,
infeasible  )

◆ buildRowBasis()

virtual CbcNodeInfo * CbcNodeInfo::buildRowBasis ( CoinWarmStartBasis & basis) const
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.

◆ clone()

*virtual Clone CbcNodeInfo * CbcNodeInfo::clone ( ) const
pure virtual

Implemented in CbcFullNodeInfo, and CbcPartialNodeInfo.

◆ allBranchesGone()

*Called when number branches left down to virtual zero void CbcNodeInfo::allBranchesGone ( )
inlinevirtual

Definition at line 124 of file CbcNodeInfo.hpp.

◆ increment()

*Increment number of references void CbcNodeInfo::increment ( int amount = 1)
inline

Definition at line 127 of file CbcNodeInfo.hpp.

◆ decrement()

*Decrement number of references and return number left int CbcNodeInfo::decrement ( int amount = 1)
inline

Definition at line 133 of file CbcNodeInfo.hpp.

◆ initializeInfo()

void CbcNodeInfo::initializeInfo ( int number)
inline

Initialize reference counts.

Initialize the reference counts used for tree maintenance.

Definition at line 149 of file CbcNodeInfo.hpp.

◆ numberBranchesLeft()

*Return number of branches left in object int CbcNodeInfo::numberBranchesLeft ( ) const
inline

Definition at line 156 of file CbcNodeInfo.hpp.

◆ setNumberBranchesLeft()

*Set number of branches left in object void CbcNodeInfo::setNumberBranchesLeft ( int value)
inline

Definition at line 162 of file CbcNodeInfo.hpp.

◆ numberPointingToThis()

*Return number of objects pointing to this int CbcNodeInfo::numberPointingToThis ( ) const
inline

Definition at line 168 of file CbcNodeInfo.hpp.

◆ setNumberPointingToThis()

*Set number of objects pointing to this void CbcNodeInfo::setNumberPointingToThis ( int number)
inline

Definition at line 174 of file CbcNodeInfo.hpp.

◆ incrementNumberPointingToThis()

*Increment number of objects pointing to this void CbcNodeInfo::incrementNumberPointingToThis ( )
inline

Definition at line 180 of file CbcNodeInfo.hpp.

◆ branchedOn()

*Say one branch taken int CbcNodeInfo::branchedOn ( )
inline

Definition at line 186 of file CbcNodeInfo.hpp.

◆ throwAway()

*Say thrown away void CbcNodeInfo::throwAway ( )
inline

Definition at line 194 of file CbcNodeInfo.hpp.

◆ parent()

*Parent of this CbcNodeInfo * CbcNodeInfo::parent ( ) const
inline

Definition at line 201 of file CbcNodeInfo.hpp.

◆ nullParent()

*Set parent null void CbcNodeInfo::nullParent ( )
inline

Definition at line 206 of file CbcNodeInfo.hpp.

◆ addCuts() [1/2]

void CbcNodeInfo::addCuts ( OsiCuts & cuts,
int numberToBranch,
int numberPointingToThis )

◆ addCuts() [2/2]

void CbcNodeInfo::addCuts ( int numberCuts,
CbcCountRowCut ** cuts,
int numberToBranch )

◆ deleteCuts() [1/2]

void CbcNodeInfo::deleteCuts ( int numberToDelete,
CbcCountRowCut ** cuts )

Delete cuts (decrements counts) Slow unless cuts in same order as saved.

◆ deleteCuts() [2/2]

void CbcNodeInfo::deleteCuts ( int numberToDelete,
int * which )

◆ deleteCut()

*Really delete a cut void CbcNodeInfo::deleteCut ( int whichOne)

◆ decrementCuts()

*Decrement active cut counts void CbcNodeInfo::decrementCuts ( int change = 1)

◆ incrementCuts()

*Increment active cut counts void CbcNodeInfo::incrementCuts ( int change = 1)

◆ decrementParentCuts()

*Decrement all active cut counts in chain starting at parent void CbcNodeInfo::decrementParentCuts ( CbcModel * model,
int change = 1 )

◆ incrementParentCuts()

*Increment all active cut counts in parent chain void CbcNodeInfo::incrementParentCuts ( CbcModel * model,
int change = 1 )

◆ cuts() [1/3]

*Array of pointers to cuts CbcCountRowCut ** CbcNodeInfo::cuts ( ) const
inline

Definition at line 236 of file CbcNodeInfo.hpp.

◆ cuts() [2/3]

*Number of row CbcNodeInfo::cuts ( this node) const
inline

Definition at line 241 of file CbcNodeInfo.hpp.

◆ setNumberCuts()

void CbcNodeInfo::setNumberCuts ( int value)
inline

Definition at line 246 of file CbcNodeInfo.hpp.

◆ nullOwner()

*Set owner null void CbcNodeInfo::nullOwner ( )
inline

Definition at line 252 of file CbcNodeInfo.hpp.

◆ owner()

const CbcNode * CbcNodeInfo::owner ( ) const
inline

Definition at line 256 of file CbcNodeInfo.hpp.

◆ mutableOwner()

CbcNode * CbcNodeInfo::mutableOwner ( ) const
inline

Definition at line 260 of file CbcNodeInfo.hpp.

◆ nodeNumber()

*The node number int CbcNodeInfo::nodeNumber ( ) const
inline

Definition at line 265 of file CbcNodeInfo.hpp.

◆ setNodeNumber()

void CbcNodeInfo::setNodeNumber ( int node)
inline

Definition at line 269 of file CbcNodeInfo.hpp.

◆ deactivate()

void CbcNodeInfo::deactivate ( int mode = 3)

Deactivate node information.

1 - bounds 2 - cuts 4 - basis! 8 - just marked 16 - symmetry branching worked

◆ allActivated()

*Say if normal bool CbcNodeInfo::allActivated ( ) const
inline

Definition at line 282 of file CbcNodeInfo.hpp.

◆ marked()

*Say if marked bool CbcNodeInfo::marked ( ) const
inline

Definition at line 287 of file CbcNodeInfo.hpp.

◆ mark()

*Mark void CbcNodeInfo::mark ( )
inline

Definition at line 292 of file CbcNodeInfo.hpp.

◆ unmark()

*Unmark void CbcNodeInfo::unmark ( )
inline

Definition at line 297 of file CbcNodeInfo.hpp.

◆ value()

*Get symmetry CbcNodeInfo::value ( true worked at this node) const
inline

Definition at line 301 of file CbcNodeInfo.hpp.

◆ setSymmetryWorked()

*Say symmetry worked at this node void CbcNodeInfo::setSymmetryWorked ( )
inline

Definition at line 307 of file CbcNodeInfo.hpp.

◆ parentBranch()

*Branching object for the parent const OsiBranchingObject * CbcNodeInfo::parentBranch ( ) const
inline

Definition at line 313 of file CbcNodeInfo.hpp.

◆ unsetParentBasedData()

*If we need to take off parent based data void CbcNodeInfo::unsetParentBasedData ( )

◆ cuts() [3/3]

*Number of row CbcNodeInfo::cuts ( this node)
protected

◆ operator CbcNodeInfo &operator=()

*Illegal Assignment CbcNodeInfo::operator CbcNodeInfo &operator= ( const CbcNodeInfo & rhs)
private

◆ setParentBasedData()

*routine common to constructors void CbcNodeInfo::setParentBasedData ( )
private

Member Data Documentation

◆ lower [1/2]

* Just apply bounds to one variable force means overwrite by CbcNodeInfo::lower

Definition at line 113 of file CbcNodeInfo.hpp.

◆ lower [2/2]

*Just apply bounds to one variable force means overwrite by double& CbcNodeInfo::lower

Definition at line 114 of file CbcNodeInfo.hpp.

◆ upper

*Just apply bounds to one variable force means overwrite by double double& CbcNodeInfo::upper

Definition at line 114 of file CbcNodeInfo.hpp.

◆ force

*Just apply bounds to one variable force means overwrite by double double int CbcNodeInfo::force = 0

Definition at line 114 of file CbcNodeInfo.hpp.

◆ numberPointingToThis_

int CbcNodeInfo::numberPointingToThis_
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.

◆ parent_

* parent CbcNodeInfo* CbcNodeInfo::parent_
protected

Definition at line 331 of file CbcNodeInfo.hpp.

◆ parentBranch_

* Copy of the branching object of the parent when the node is created OsiBranchingObject* CbcNodeInfo::parentBranch_
protected

Definition at line 334 of file CbcNodeInfo.hpp.

◆ owner_

* Owner CbcNode* CbcNodeInfo::owner_
protected

Definition at line 337 of file CbcNodeInfo.hpp.

◆ nodeNumber_

* The node number int CbcNodeInfo::nodeNumber_
protected

Definition at line 343 of file CbcNodeInfo.hpp.

◆ cuts_

* Array of pointers to cuts CbcCountRowCut** CbcNodeInfo::cuts_
protected

Definition at line 346 of file CbcNodeInfo.hpp.

◆ numberRows_

int CbcNodeInfo::numberRows_
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.

◆ numberBranchesLeft_

int CbcNodeInfo::numberBranchesLeft_
protected

Number of branch arms left to explore at this node.

Todo
There seems to be redundancy between this field and CbcBranchingObject::numberBranchesLeft_. It'd be good to sort out if both are necessary.

Definition at line 358 of file CbcNodeInfo.hpp.

◆ active_

int CbcNodeInfo::active_
protected

Active node information.

1 - bounds 2 - cuts 4 - basis!

Definition at line 364 of file CbcNodeInfo.hpp.


The documentation for this class was generated from the following file: