[Cbc] MaxNumNodes and active nodes

John Forrest john.forrest at fastercoin.com
Fri Jun 18 02:57:45 EDT 2010


Giacomo,

The nodes are deliberately deleted - find this code in CbcModel.cpp

        if (tree_->size()) {
            double dummyBest;
            tree_->cleanTree(this, -COIN_DBL_MAX, dummyBest) ;
        }

What you can do is create your own event handler - see driver4.cpp for
an example and use that to check on max time or nodes (using event
treeStatus (or node if you need finer control)).  Then before saying
stop you can scan the tree from the event handler.

John Forrest


On Thu, 2010-06-17 at 23:52 -0400, Giacomo Nannicini wrote:
> Hi,
> does someone know how the MaxNumNodes parameter affects the creation
> of nodes in Cbc?
> 
> Let me explain better. I need to access a list of all nodes which are
> still active after the optimization stops because of some limit (nodes
> or time).
> I thought that I could find such list scanning the tree (
> CbcModel::tree_ ) but apparently this is not so.
> When the optimization stops on maximum number of nodes, it often tells
> me that there are no active nodes in the tree, even though I know that
> the optimization has not finished so there has to be some node left to
> explore - but I cannot find where this behaviour comes from. I would
> expect Cbc to create the nodes after branching anyway, even though
> they will not be solved because of the node limit.
> 
> Is there some limbo where nodes could exist without being added to the tree?
> 
> Thanks!
> 
> Giacomo
> 
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc
> 




More information about the Cbc mailing list