<div dir="ltr"><div dir="ltr"><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">Dear Gregor,</p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24);min-height:14px"><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">Thank you very much for your detailed explanation. As you suggested, I used the <span style="color:rgb(34,34,34)">ncreatednodesrun counter, although I think you meant to write</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica"><span style="-webkit-font-kerning: none;"><pruned nodes> = scip->stat->ncreatednodesrun - SCIPgetNNodes() - ( SCIPgetNChildren() + SCIPgetNLeaves() + SCIPgetNSiblings() )</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;min-height:14px"><span style="-webkit-font-kerning: none;"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">If I may ask for one last clarification: from what you write I understand that the children/siblings/leaves distinction is made based on the depth of each open node with respect to the focus node. Is this correct?</p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24);min-height:14px"><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">Thank you again.</p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24);min-height:14px"><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">Best,</p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24);min-height:14px"><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">Lara</p></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El jue., 25 jul. 2019 a las 14:46, Gregor Hendel (<<a href="mailto:hendel@zib.de">hendel@zib.de</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
Hi Lara,<br>
<br>
the tree maintains three different types of open nodes: children,
siblings, and leaves. The types are always relative to the focus
node. It is correct that SCIPgetNNodes() returns the total number of
processed nodes, ie, the nodes which have been focussed during the
search so far.<br>
<br>
The number of currently open nodes can therefore be accessed as the
sum SCIPgetNChildren() + SCIPgetNSiblings() + SCIPgetNLeaves()<br>
<br>
SCIPgetNFeasibleLeaves() and SCIPgetNInfeasibleLeaves() are
referring to leaves from hindsight, i.e., they count how often the
search encountered nodes where the relaxation was feasible (e.g, all
variables integer) and how often a focus<br>
node was pruned (either the relaxation hit the objective limit, or
the node represents an infeasible subproblem). <br>
On the contrary, SCIPgetNLeaves() reports the current number of leaf
nodes in the queue, not the total number of leaf nodes.<br>
<br>
It is not possible in the current SCIP version to access the number
of pruned nodes. If nodes are pruned from the queue, e.g., because a
new incumbent solution has been found, this happens silently at the
solver's discretion. <br>
<br>
There is a counter for the number of created nodes, which is not
publicly accessible via methods.<br>
<br>
scip->stat->ncreatednodesrun<br>
<br>
You can (ab)use this counter to get the number of pruned nodes by
the equation<br>
<br>
<pruned nodes> = scip->stat->ncreatednodesrun -
SCIPgetNNodes() - SCIPgetNChildren() + SCIPgetNLeaves() +
SCIPgetNSiblings()<br>
<br>
I don't see a reason why there is no public method to access this
attribute of the stats struct, I suggest you add one, that you can
wrap from the Python Interface in a second step.<br>
<br>
Hope this helps,<br>
Gregor<br>
<br>
<br>
<div class="gmail-m_-4280873926532715229moz-cite-prefix">Am 25.07.19 um 13:21 schrieb Lara
Scavuzzo Montana:<br>
</div>
<blockquote type="cite">
<div id="gmail-m_-4280873926532715229divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">
Dear SCIP community,</p>
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">
I am solving MILPs using SCIP’s Python interface with all
default parameters and a custom branching rule. I am a bit
confused by the terminology of the documentation, so I would
be very thankful for the following clarifications.</p>
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24);min-height:14px">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">
During the solving process, I would like to keep track of some
solving statistics. In particular, at each step know:</p>
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">
- <b>The number of processed nodes:</b> this can be accessed
with (correct me if I am wrong) SCIPgetNNodes().</p>
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">
- <b>The number of open nodes:</b> is SCIPnodepqlen() the
right function to call?</p>
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">
- <b>The number of pruned nodes</b> (by bound, infeasibility
or integrality): I was unfortunately unable to find a way to
obtain this value. Would it be (# of leaves) - (# of open
nodes) ?</p>
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24);min-height:14px">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">
I was also surprised to see that</p>
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">
SCIPgetNLeaves() != SCIPgetNFeasibleLeaves() +
SCIPgetNInfeasibleLeaves()</p>
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">
Maybe I am misinterpreting the meaning of these.</p>
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24);min-height:14px">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">
Just to clarify, I would of course be modifying the Python
interface to include all necessary functions.</p>
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">
Thank you in advance for any help with this issue.</p>
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">
Best,</p>
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;color:rgb(24,26,24)">
Lara Scavuzzo</p>
</div>
<br>
<fieldset class="gmail-m_-4280873926532715229mimeAttachmentHeader"></fieldset>
<pre class="gmail-m_-4280873926532715229moz-quote-pre">_______________________________________________
Scip mailing list
<a class="gmail-m_-4280873926532715229moz-txt-link-abbreviated" href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a>
<a class="gmail-m_-4280873926532715229moz-txt-link-freetext" href="https://listserv.zib.de/mailman/listinfo/scip" target="_blank">https://listserv.zib.de/mailman/listinfo/scip</a>
</pre>
</blockquote>
<br>
</div>
_______________________________________________<br>
Scip mailing list<br>
<a href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a><br>
<a href="https://listserv.zib.de/mailman/listinfo/scip" rel="noreferrer" target="_blank">https://listserv.zib.de/mailman/listinfo/scip</a><br>
</blockquote></div>