<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Lara,<br>
<br>
Sorry, apparently I forgot to mention that there is also the
category SCIPgetNObjlimLeaves(), which is increased every time that
the node LP is interrupted because it hit the objective limit. This
is also a sort of pruning. If no nodes are "pruned" as in your
formula below, the search process solves all terminal nodes, such
that they are either "objlimleaves", integral (in which case,
SCIPgetNFeasibleLeaves() is increased by 1), or infeasible (in which
case, SCIPgetNInfeasibleLeaves() is increased by 1). <br>
<br>
All the above types of nodes are accounted for by SCIPgetNNodes().<br>
<br>
Does this explain the observation in your experiment?<br>
<br>
Best,<br>
Gregor<br>
<br>
<div class="moz-cite-prefix">Am 14.08.19 um 10:44 schrieb Lara
Scavuzzo:<br>
</div>
<blockquote type="cite"
cite="mid:CA+D7Vzpd+QrVgqLakvejKG679xXcVwTEj39fsBG-hXazqjrgDw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">Dear SCIP community,<br>
</div>
<div><br>
</div>
<div>I still have not been able to solve the problem I
reported in my previous emails. </div>
<div><br>
</div>
<div>Any help is appreciated.</div>
<div><br>
</div>
<div>Best,</div>
<div><br>
</div>
<div>Lara</div>
<div dir="ltr"><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">El lun., 5 ago. 2019 a las
17:23, Lara Scavuzzo (<<a
href="mailto:lascavuzzo@gmail.com" moz-do-not-send="true">lascavuzzo@gmail.com</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 dir="ltr">
<div dir="ltr">Dear Gregor,
<div><br>
</div>
<div>
<p
style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Arial"><span>I
have experienced some weird behavior using the
method that I implemented following your
instructions.</span></p>
<p
style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Arial;min-height:15px"><span></span><br>
</p>
<p
style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Arial"><span>In
particular, I noticed that if I enable all default
heuristics the number of pruned nodes remains zero
during the whole process. In order to investigate
this, I observed the evolution of the number of
open nodes (obtained as SCIPgetNChildren() +
SCIPgetNLeaves() + SCIPgetNSiblings() ). If no
nodes are pruned, the number of open nodes should
increase linearly. However, this is not the case
(see attached figure).</span></p>
<p
style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Arial;min-height:15px"><span></span><br>
</p>
<p
style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Arial"><span>I
wonder if this has anything to do with heuristics,
cutting planes, etc. ?</span></p>
<p
style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Arial"><span>As
I mentioned in my first email, I would like to
know the number of pruned nodes by all processes
(bound, integrality and infeasibility).</span></p>
<p
style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Arial;min-height:15px"><span></span><br>
</p>
<p
style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Arial"><span>Best
regards,</span></p>
<p
style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Arial;min-height:15px"><span></span><br>
</p>
<p
style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Arial"><span>Lara
Scavuzzo</span></p>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">El jue., 25 jul. 2019 a
las 19:06, Gregor Hendel (<<a
href="mailto:hendel@zib.de" target="_blank"
moz-do-not-send="true">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>
<div
class="gmail-m_-7301786887273632861gmail-m_3758811403329591682moz-cite-prefix">Am
25.07.19 um 18:23 schrieb Lara Scavuzzo:<br>
</div>
<blockquote type="cite">
<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><pruned
nodes> =
scip->stat->ncreatednodesrun -
SCIPgetNNodes() - ( SCIPgetNChildren() +
SCIPgetNLeaves() + SCIPgetNSiblings() )</span></p>
</div>
</div>
</blockquote>
that is what I meant indeed. <br>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<p
style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;min-height:14px"><span></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>
</div>
</div>
</blockquote>
It is not the depth that decides. It is the
parent-child relation with the focus node. If the
focus node has already been branched on, the newly
created nodes are stored as children. Similarly, when
the focus node was created as a branching child
itself, the other node with the same parent is the
sibling of the focus node. All other open nodes are
maintained as leaves. Recall that SCIP admits n-ary
user branching schemes, which is why even the siblings
are kept as array, although there is usually at most 1
sibling.<br>
<br>
Best regards,<br>
Gregor<br>
<br>
<blockquote type="cite">
<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);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" target="_blank"
moz-do-not-send="true">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_-7301786887273632861gmail-m_3758811403329591682gmail-m_-4280873926532715229moz-cite-prefix">Am
25.07.19 um 13:21 schrieb Lara Scavuzzo
Montana:<br>
</div>
<blockquote type="cite">
<div
id="gmail-m_-7301786887273632861gmail-m_3758811403329591682gmail-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_-7301786887273632861gmail-m_3758811403329591682gmail-m_-4280873926532715229mimeAttachmentHeader"></fieldset>
<pre class="gmail-m_-7301786887273632861gmail-m_3758811403329591682gmail-m_-4280873926532715229moz-quote-pre">_______________________________________________
Scip mailing list
<a class="gmail-m_-7301786887273632861gmail-m_3758811403329591682gmail-m_-4280873926532715229moz-txt-link-abbreviated" href="mailto:Scip@zib.de" target="_blank" moz-do-not-send="true">Scip@zib.de</a>
<a class="gmail-m_-7301786887273632861gmail-m_3758811403329591682gmail-m_-4280873926532715229moz-txt-link-freetext" href="https://listserv.zib.de/mailman/listinfo/scip" target="_blank" moz-do-not-send="true">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"
moz-do-not-send="true">Scip@zib.de</a><br>
<a
href="https://listserv.zib.de/mailman/listinfo/scip"
rel="noreferrer" target="_blank"
moz-do-not-send="true">https://listserv.zib.de/mailman/listinfo/scip</a><br>
</blockquote>
</div>
</blockquote>
<br>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Scip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Scip@zib.de">Scip@zib.de</a>
<a class="moz-txt-link-freetext" href="https://listserv.zib.de/mailman/listinfo/scip">https://listserv.zib.de/mailman/listinfo/scip</a>
</pre>
</blockquote>
<br>
</body>
</html>