<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi Stefan,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">No problem, I will simply remove the flag that is useless apparently!</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Cheers,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Albert</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 23, 2020 at 9:48 AM Stefan Vigerske <<a href="mailto:svigerske@gams.com">svigerske@gams.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
There can be problems if you define NDEBUG for your code that includes <br>
SCIP headers and link against a SCIP library that has been build with <br>
NDEBUG not defined (e.g., OPT=dbg). Some SCIP structs that your code <br>
will try to access to directly will then not match the structs that are <br>
used by code inside the SCIP library.<br>
This should be fixed in the next bugfix release.<br>
<br>
Best,<br>
Stefan<br>
<br>
PS: I cannot imagine that -DNDEBUG will disable anything in CPLEX <br>
(unless you build CPLEX from source, too).<br>
<br>
On 6/23/20 9:27 AM, Schrotenboer, Albert wrote:<br>
> Dear Gerald (and others)<br>
> <br>
> Thank you for the clarification (months ago). I've been implementing it in<br>
> the way you suggested, everything seems ok, but then I encountered some<br>
> weird behaviour.<br>
> <br>
> I compile the code  in normal mode -> seems to work fine<br>
> I compile the code in DBG=opt mode -> seems to work fine<br>
> <br>
> In my program I also have some upper bounds that use plain CPLEX, so I<br>
> decided to use the flag -DNDEBUG while compiling, which is (as far as I<br>
> know) disabling CPLEX debug mode<br>
> <br>
> When I now compile my code in DBG=opt mode with the -DNDEBUG flag, I catch<br>
> an assert somewhere within scip:<br>
> JRP: src/scip/tree.c:1214: SCIPnodePropagateAgain: Assertion `node != NULL'<br>
> failed.<br>
> <br>
> Do you maybe know if this flag is the cause of any unspecified behavior? Of<br>
> course, it is a bit weird to use debug mode and to tell at the same time to<br>
> not debug (via the flag), but I want to make sure things are correct.<br>
> <br>
> <br>
> Kind regards,<br>
> Albert<br>
> <br>
> <br>
> On Thu, Jan 9, 2020 at 12:46 PM Gerald Gamrath <<a href="mailto:gamrath@zib.de" target="_blank">gamrath@zib.de</a>> wrote:<br>
> <br>
>> Dear Albert,<br>
>><br>
>> changing the upper bound to 0 to enforce your decision is correct.<br>
>> However, your consactive method should only mark the constraint to be<br>
>> repropagated; afterwards, propagation will be called where you should<br>
>> adjust the bounds. Since the bound is only changed at the current node,<br>
>> SCIP will automatically undo this when the current subtree is left and<br>
>> re-install the bound when it is re-entered. In the latter case, you thus<br>
>> only need to propagate variables added in the meantime.<br>
>><br>
>> For more details, see<br>
>> <a href="https://scip.zib.de/doc-6.0.2/html/FAQ.php#pricerandnodedata" rel="noreferrer" target="_blank">https://scip.zib.de/doc-6.0.2/html/FAQ.php#pricerandnodedata</a> or have a<br>
>> look at the binpacking example.<br>
>><br>
>> Best,<br>
>> Gerald<br>
>><br>
>> Am 09.01.20 um 10:45 schrieb Schrotenboer, Albert:<br>
>><br>
>> Dear SCIP Community,<br>
>><br>
>> I am solving a basic VRP with branch & price, and have a question<br>
>> regarding a branching rule I've implemented (Actually, I forgot how to do<br>
>> it...) I branch on x_{ij} arcs, which I identify with my branchrule object.<br>
>> To handle this information down the b&b tree, I use a constraint handler<br>
>> with the following virtual methods implemented:<br>
>><br>
>> SCIP_DECL_CONSTRANS(ObjConshdlrOwn::scip_trans)<br>
>>        To transform the info, nothing special<br>
>> SCIP_DECL_CONSACTIVE(ObjConshdlrOwn::scip_active)<br>
>>        Here I search which of my generated routes should be fixed to zero<br>
>> corresponding to my branching information. (I also do the appropriate<br>
>> adaptations in my pricing based on the branching). I fix my variables by<br>
>> the following routines:<br>
>><br>
>> if (SCIPvarGetUbLocal(var) > 0.01)<br>
>>        SCIP_CALL(SCIPchgVarUb(scip, (*d_varConsInfo).v_path[r].d_var, 0.0)<br>
>> );<br>
>><br>
>> This all works nicely (when I do not run in debug mode). When I run in<br>
>> Debug mode, however, an assert is collapsing when SCIP alters the path of<br>
>> the tree (when it backtracks a few nodes), saying that:<br>
>> JRP: src/scip/tree.c:1803: SCIPnodeAddBoundinfer: Assertion<br>
>> `(SCIP_NODETYPE)node->nodetype == SCIP_NODETYPE_FOCUSNODE ||<br>
>> (SCIP_NODETYPE)node->nodetype == SCIP_NODETYPE_PROBINGNODE ||<br>
>> (SCIP_NODETYPE)node->nodetype == SCIP_NODETYPE_CHILD ||<br>
>> (SCIP_NODETYPE)node->nodetype == SCIP_NODETYPE_REFOCUSNODE || node->depth<br>
>> == 0' failed.<br>
>><br>
>> My question is, therefore, the following: Is changing the UB to enforce<br>
>> variables to 0 the correct way to go? In addition, am I required to<br>
>> implement the deactive virtual method as well, to change the upper bounds<br>
>> back to what they were?<br>
>><br>
>> Kind regards,<br>
>> Albert<br>
>><br>
>> --<br>
>><br>
>> Albert Schrotenboer<br>
>><br>
>> Postdoctoral Researcher<br>
>><br>
>> Faculty of Economics and Business<br>
>><br>
>> University of Groningen<br>
>><br>
>> P.O. Box 800, 9700 AV Groningen<br>
>><br>
>> _______________________________________________<br>
>> Scip mailing listScip@zib.dehttps://<a href="http://listserv.zib.de/mailman/listinfo/scip" rel="noreferrer" target="_blank">listserv.zib.de/mailman/listinfo/scip</a><br>
>><br>
>><br>
>><br>
> <br>
> <br>
> _______________________________________________<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>
> <br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="color:rgb(0,0,0);font-size:10pt;letter-spacing:normal;line-height:12pt;margin-bottom:0px;margin-top:0px"><p class="MsoNormal"><span style="color:rgb(102,102,102)">dr. Albert Schrotenboer</span></p><p class="MsoNormal"><span style="color:rgb(102,102,102)">Postdoctoral Researcher<br></span></p><p class="MsoNormal"><span style="color:rgb(102,102,102)">Faculty of Economics and Business</span></p><p class="MsoNormal"><span style="color:rgb(102,102,102)"></span><font color="rgb(34, 34, 34)"><span style="color:rgb(102,102,102)">University of Groningen</span></font><font color="rgb(34, 34, 34)"><span style="color:rgb(102,102,102)"><br></span></font></p><p class="MsoNormal"><font color="rgb(34, 34, 34)"><span style="color:rgb(102,102,102)">P.O. Box 800, 9700 AV Groningen</span> </font></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>