<div dir="ltr"><div><div><div><div>Hi,<br><br></div>Thanks for the clarification. I also came with another question while implementing the branching rule. I have a constraint handler responsible for subtour removal on the graph, despite this, a solution with a subtour is going into the SCIP_DECL_BRANCHEXECPS method of the branching rule. Reading the documentation it says that the BRANCHEXECPS method will only be called if the infeasibility could not be resolved in the callback methods <a class="el" href="http://scip.zib.de/doc/html/CONS.php#CONSENFOLP">CONSENFOLP</a> and <a class="el" href="http://scip.zib.de/doc/html/CONS.php#CONSENFOPS">CONSENFOPS</a>. So while I was debugging this, it seems that the method called before entering the branching rule was responsible only for checking the feasibility of the solution, not actually solving it. And the checking is returning correctly: that the current solution is infeasible.<br><br></div>My code is working right now but I'm also checking the feasibility of the solution on the branching callback. If it is infeasible, I do not create any child and the cuts are then properly added by the constraint handler callback.<br><br></div>Thanks again,<br></div>Matheus<br></div><div class="gmail_extra"><br><div class="gmail_quote">2018-03-22 6:21 GMT-03:00 Gregor Hendel <span dir="ltr"><<a href="mailto:hendel@zib.de" target="_blank">hendel@zib.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
Dear Matheus,<br>
<br>
constraints are the most fundamental concept of SCIP. They are far
more general than matrix-based restrictions of the search domain. A
constraint may be representable only by a set of <br>
linear inequalities (such as an "and"-constraint on binary
variables), or not completely linearly representable at all
(nonlinear constraints).<br>
A constraint will, during the solution process, add as much of its
linear representation to the <br>
LP relaxation as needed.<br>
<br>
As long as you solve linearly constrained problems, the differences
between constraints and rows are negligible, <br>
there is usually a 1-1 correspondence.<br>
<br>
If you are interested, you find more information in the original
publication "SCIP: Solving Constraint Integer Programs" by Tobias
Achterberg.<br>
<br>
Kind regards,<br>
Gregor<div><div class="h5"><br>
<br>
<div class="m_1889981747551019030moz-cite-prefix">Am 21.03.2018 um 23:00 schrieb Matheus
Ota:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>Hi,<br>
<br>
</div>
I followed the src/scip/branch_multaggr.c and I guess it
is working fine now! It turns out I have mistaken the
SCIPbacktrackProbing function. The second argument need to
be the depth of the node I want to go back to, and not the
number of steps up I want to go.<br>
</div>
Can I ask another thing? Whats the difference between a
SCIP_ROW and a SCIP_CONS? Because the way I think of each
constraint is translated into a row in the problem
formulation.<br>
<br>
</div>
Thanks,<br>
</div>
Matheus<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2018-03-21 6:42 GMT-03:00 Gerald
Gamrath <span dir="ltr"><<a href="mailto:gamrath@zib.de" target="_blank">gamrath@zib.de</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"> Dear Matheus,<br>
<br>
if you create your constraints as linear constraints, and
not as rows, you cannot add them with SCIPaddRowProbing,
but should rather use SCIPaddConsNode and provide the
probing node as the node to add the constraint to.<br>
<br>
I would recommend to have a look at the multi-aggregated
branching rule (src/scip/branch_multaggr.c), which does
something very similar to what you want to do.<br>
<br>
Best,<br>
Gerald
<div>
<div class="m_1889981747551019030h5"><br>
<br>
<div class="m_1889981747551019030m_3583030326194016729moz-cite-prefix">On
21.03.2018 00:26, Matheus Ota wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi,<br>
<br>
</div>
<div>Thanks for the fast reply! I followed what
you said, but I guess I'm doing something wrong,
can you help me to figure it out?<br>
<br>
</div>
<div>So first I enclosed the part of the code that
I want to compute the lower bounds in
SCIPstartProbing(scip) and SCIPendProbing(scip).<br>
<br>
</div>
<div>Then I call SCIPnewProbingNode(scip), create
the constraint1 and add it with
SCIPaddRowProbing(scip, constraint1). I then
solve the probing node with
SCIPsolveProbingLP(scip, -1, &lperror,
&cutoff), get the lower bound with
SCIPgetLPObjval(scip) and got back to the parent
with SCIPbacktrackProbing(scip, 1).<br>
<br>
</div>
<div>This same process is then repeated imposing
constraint2 in the problem.<br>
<br>
</div>
<div>Can you tell me if this is the right way to
do it? The code is not working as it was before
adding the branching rule and I'm having some
difficulties in understanding how to use the
probing mode correctly.<br>
<br>
</div>
<div>Thanks again,<br>
</div>
<div>Matheus</div>
<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2018-03-20 5:52 GMT-03:00
Gregor Hendel <span dir="ltr"><<a href="mailto:hendel@zib.de" target="_blank">hendel@zib.de</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"> Dear
Matheus,<br>
<br>
this sounds like an application of the SCIP
probing mode, which allows to explore some
tentative children before branching. Please
have a look at the documentation of the
probing mode:<br>
<br>
<a class="m_1889981747551019030m_3583030326194016729m_3923750445048037240moz-txt-link-freetext" href="http://scip.zib.de/doc-5.0.1/html/group__PublicProbingMethods.php" target="_blank">http://scip.zib.de/doc-5.0.1/h<wbr>tml/group__PublicProbingMethod<wbr>s.php</a><br>
<br>
Probing mode supports local constraints at
the tentative node, and solve the
corresponding LP relaxation.<br>
<br>
You can then retrieve the LP solution
objective using SCIPgetLPObjval(), see also<br>
<br>
<a class="m_1889981747551019030m_3583030326194016729m_3923750445048037240moz-txt-link-freetext" href="http://scip.zib.de/doc-5.0.1/html/group__PublicLPMethods.php" target="_blank">http://scip.zib.de/doc-5.0.1/h<wbr>tml/group__PublicLPMethods.php</a><br>
<br>
for further information.<br>
<br>
Happy probing,<br>
Gregor
<div>
<div class="m_1889981747551019030m_3583030326194016729h5"><br>
<br>
<br>
<div class="m_1889981747551019030m_3583030326194016729m_3923750445048037240moz-cite-prefix">Am
19.03.2018 um 21:45 schrieb Matheus
Ota:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="m_1889981747551019030m_3583030326194016729h5">
<div dir="ltr">
<div>
<div>
<div>Hi,<br>
<br>
</div>
Im trying to use SCIP to
implement a Branch-Cut-and-Price
for the VRP. For now Im focusing
only on the Branch-and-Cut part,
using the CVRPSEP package (<a href="http://econ.au.dk/research/researcher-websites/jens-lysgaard/cvrpsep/" target="_blank">http://econ.au.dk/research/re<wbr>searcher-websites/jens-lysgaar<wbr>d/cvrpsep/</a>).
I already added the cuts and my
program is able to solve some
simple instances, in order to
increase its performance I need
to implement custom branching
rules. <br>
<br>
</div>
The branching rule works this way:
it first select a few subsets of
the set of vertexes in the graph
and impose a few constraints on
them. It then computes the lower
bound (solving the relaxation) for
each child node and uses these
values to choose the node to
branch on. Could you please give
me some information about of how I
can get the lower bound on the
branching rule callback? Or maybe
a better way of doing this or
something similar?<br>
<br>
</div>
<div>Thanks,<br>
</div>
<div>Matheus <br>
</div>
</div>
<br>
<fieldset class="m_1889981747551019030m_3583030326194016729m_3923750445048037240mimeAttachmentHeader"></fieldset>
<br>
</div>
</div>
<pre>______________________________<wbr>_________________
Scip mailing list
<a class="m_1889981747551019030m_3583030326194016729m_3923750445048037240moz-txt-link-abbreviated" href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a>
<a class="m_1889981747551019030m_3583030326194016729m_3923750445048037240moz-txt-link-freetext" href="https://listserv.zib.de/mailman/listinfo/scip" target="_blank">https://listserv.zib.de/mailma<wbr>n/listinfo/scip</a>
</pre>
</blockquote>
<br>
</div>
<br>
______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/scip</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="m_1889981747551019030m_3583030326194016729mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
Scip mailing list
<a class="m_1889981747551019030m_3583030326194016729moz-txt-link-abbreviated" href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a>
<a class="m_1889981747551019030m_3583030326194016729moz-txt-link-freetext" href="https://listserv.zib.de/mailman/listinfo/scip" target="_blank">https://listserv.zib.de/mailma<wbr>n/listinfo/scip</a>
</pre>
</blockquote>
<br>
</div>
</div>
</div>
<br>
______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/scip</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="m_1889981747551019030mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
Scip mailing list
<a class="m_1889981747551019030moz-txt-link-abbreviated" href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a>
<a class="m_1889981747551019030moz-txt-link-freetext" href="https://listserv.zib.de/mailman/listinfo/scip" target="_blank">https://listserv.zib.de/<wbr>mailman/listinfo/scip</a>
</pre>
</blockquote>
<br>
</div></div></div>
<br>______________________________<wbr>_________________<br>
Scip mailing list<br>
<a href="mailto:Scip@zib.de">Scip@zib.de</a><br>
<a href="https://listserv.zib.de/mailman/listinfo/scip" rel="noreferrer" target="_blank">https://listserv.zib.de/<wbr>mailman/listinfo/scip</a><br>
<br></blockquote></div><br></div>