[Cbc] MaxNumNodes and active nodes

Giacomo Nannicini giacomo.n at gmail.com
Fri Jun 18 09:13:34 EDT 2010


John,
I had commented away that part of the code already, and when maxTime
(instead of maxNodes) is hit, I do find all active nodes in the tree.
But somehow this does not seem to work with maxNodes - I have several
examples.

I will try with the even handler as you suggest and hopefully it will work out.

Thanks!

Giacomo

On Fri, Jun 18, 2010 at 2:57 AM, John Forrest
<john.forrest at fastercoin.com> wrote:
> 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
>>
>
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc
>




More information about the Cbc mailing list