<div dir="ltr"><div>Dear Jakob,<br><br></div><div>Using the separator works completely fine! Thank you for your help. I think i might have had a bug in my code that causes that it not enters the pricing round again.<br><br></div><div>Cheers,<br></div><div>Albert<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 16, 2017 at 12:19 PM, Jakob Witzig <span dir="ltr"><<a href="mailto:witzig@zib.de" target="_blank">witzig@zib.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Albert,<br>
<br>
using constraints is absolutely fine, I just wanted to point out that there are differences between constraints and cuts in SCIP.<br>
<br>
It is hard to say what caused the segfault without looking at the code. You can try to compile SCIP in debug mode (make OPT=dbg LPS=cpx) to enable all asserts and to check if your code works correctly.<br>
<br>
W.r.t. your pricing: Are you sure that SCIP does not call your pricer after adding the constraints? Maybe your price doesn't find a new variable to price in?! (Which would be a bug in your code).<br>
<br>
Cheers,<br>
Jakob<div><div class="h5"><br>
<br>
<br>
Am 16.01.2017 um 10:54 schrieb Schrotenboer, A.H.:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Dear Jakob,<br>
<br>
Thank you for your quick response.<br>
<br>
First on the LP error messages: I made a small mistake in the<br>
formulation of the added constraints, so this is solved. It however does<br>
not solve the strange behaviour of not entering a pricing round again<br>
after adding constraints/cuts.<br>
<br>
On the constraints adding: Actually I use the constraint handler to<br>
handle constraints belonging to branching decisions. So i actually<br>
'misuse'  the sepalp call to add additional valid inequalities to the<br>
problem. I set the initial flag to true as you mentioned, so that could<br>
not cause the strange behaviour.<br>
<br>
I implemented it now by adding rows instead of constraints, and added<br>
them by    SCIP_CALL( SCIPaddCut(scip_, NULL, row, FALSE, &infeasible) );<br>
This gives me a segfault:<br>
<br>
==25272== Process terminating with default action of signal 11 (SIGSEGV)<br>
==25272==  Access not within mapped region at address 0x40<br>
==25272==    at 0x4F6760: SCIPconshdlrIncNAppliedCuts (in<br>
/home/p267375/Github/bpc/SCIP_<wbr>project/bin/vrp.linux.x86_64.g<wbr>nu.opt.cpx)<br>
==25272==    by 0x5ED1E0: sepastoreApplyCut (in<br>
/home/p267375/Github/bpc/SCIP_<wbr>project/bin/vrp.linux.x86_64.g<wbr>nu.opt.cpx)<br>
==25272==    by 0x5EE751: SCIPsepastoreApplyCuts (in<br>
/home/p267375/Github/bpc/SCIP_<wbr>project/bin/vrp.linux.x86_64.g<wbr>nu.opt.cpx)<br>
==25272==    by 0x60C283: priceAndCutLoop.isra.14 (in<br>
/home/p267375/Github/bpc/SCIP_<wbr>project/bin/vrp.linux.x86_64.g<wbr>nu.opt.cpx)<br>
==25272==    by 0x60ED50: propAndSolve.isra.16 (in<br>
/home/p267375/Github/bpc/SCIP_<wbr>project/bin/vrp.linux.x86_64.g<wbr>nu.opt.cpx)<br>
==25272==    by 0x60F9F9: SCIPsolveCIP (in<br>
/home/p267375/Github/bpc/SCIP_<wbr>project/bin/vrp.linux.x86_64.g<wbr>nu.opt.cpx)<br>
==25272==    by 0x5E2DE2: SCIPsolve (in<br>
/home/p267375/Github/bpc/SCIP_<wbr>project/bin/vrp.linux.x86_64.g<wbr>nu.opt.cpx)<br>
<br>
<br>
So I thought it is better to create an Sepa Class and implement the<br>
execlp method to do the same thing. I add them as constraints and this<br>
seems to work :))<br>
I by the way intended to use constraints instead of cuts since I need<br>
the dual values of the added inequalities for my pricing process.<br>
<br>
Cheers,<br>
<br>
Albert<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
On Mon, Jan 16, 2017 at 9:09 AM, Jakob Witzig <<a href="mailto:witzig@zib.de" target="_blank">witzig@zib.de</a><br></div></div><div><div class="h5">
<mailto:<a href="mailto:witzig@zib.de" target="_blank">witzig@zib.de</a>>> wrote:<br>
<br>
    Hi Albert,<br>
<br>
    when you implement the SCIP_DECL_CONSSEPA callback for your<br>
    branch-price-and-cut approach you could think about adding a cut<br>
    (SCIP_ROW) instead of a constraint (SCIP_CONS). Within SCIP there is<br>
    are slight differences between both types, e.g., a constraint can be<br>
    propagated and a cut not. When you decide to add cuts instead of<br>
    constraints, the result pointer needs to be set to SCIP_SEPARATED.<br>
<br>
    Moreover, you should make sure that your constraints (in your<br>
    current implementation) enter the LP, i.e., set initial flag to TRUE.<br>
<br>
    The warnings are printed by SCIP (see lp.c) and just say that your<br>
    LP is numerically unstable and the LP solver struggles with solving<br>
    them. You should have a look at your formulation and the<br>
    constraints/cuts you generate.<br>
<br>
    Cheers,<br>
    Jakob<br>
<br>
<br>
    Am 14.01.2017 um 22:06 schrieb Schrotenboer, A.H.:<br>
<br>
        Hello all,<br>
<br>
        I'm using the c++ wrapper classes of scip to implement a branch<br>
        & price<br>
        & cut algorithm. So in each node of the branch and bound tree i do<br>
        column generation. After that is finished, i want to add cuts (valid<br>
        inequalities actually). I did that by implementing the function<br>
        of my<br>
        constraint handler:<br>
        SCIP_DECL_CONSSEPALP(ObjConshd<wbr>lrMSPRP::scip_sepalp),<br>
        where ObjConshdlrMSPRP denotes my own Constraint Handler class.<br>
<br>
        After it has added constraints to the LP via multiple calls of<br>
        SCIP_CALL(SCIPaddCons(scip_, cons)), where 'cons' is a simple linear<br>
        constraint, it  sets ' *result = SCIP_CONSADDED'.<br>
<br>
        After the cuts are added, it should redo the column generation<br>
        process,<br>
        since there are possibly new columns of negative reduced costs that<br>
        should enter the LP relaxation. This however does not happen. I<br>
        get the<br>
        following strange calls of (i think cplex)<br>
<br>
        (node 2) numerical troubles in LP 21 -- solve again with dual<br>
        simplex<br>
        without scaling<br>
        (node 2) numerical troubles in LP 22 -- solve again with dual<br>
        simplex<br>
        without presolving<br>
        (node 2) numerical troubles in LP 23 -- solve again with dual<br>
        simplex<br>
        with tighter primal and dual feasibility tolerance<br>
        (node 2) numerical troubles in LP 24 -- solve again from scratch<br>
        with<br>
        dual simplex<br>
<br>
        Does someone know why this happens and/or why my pricing problem<br>
        is not<br>
        entered again at the same node?<br>
<br>
        Thanks in advance,<br>
<br>
        Albert Schrotenboer<br>
<br>
<br>
<br>
        ______________________________<wbr>_________________<br>
        Scip mailing list<br></div></div>
        <a href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a> <mailto:<a href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a>><br>
        <a href="http://listserv.zib.de/mailman/listinfo/scip" rel="noreferrer" target="_blank">http://listserv.zib.de/mailman<wbr>/listinfo/scip</a><span class=""><br>
        <<a href="http://listserv.zib.de/mailman/listinfo/scip" rel="noreferrer" target="_blank">http://listserv.zib.de/mailma<wbr>n/listinfo/scip</a>><br>
<br>
<br>
<br>
    --<br>
    Jakob Witzig<br>
<br>
    Zuse Institute Berlin (ZIB)<br>
<br>
    Division Mathematical Optimization and Scientific Information<br>
    Research Group Mathematical Optimization Methods<br>
<br>
    Takustrasse 7<br>
    14195 Berlin<br>
<br>
    Tel. : +49 (0)30 84185-416<br>
    Fax  : +49 (0)30 84185-269<br></span>
    email: <a href="mailto:witzig@zib.de" target="_blank">witzig@zib.de</a> <mailto:<a href="mailto:witzig@zib.de" target="_blank">witzig@zib.de</a>><br>
<br>
<br>
</blockquote><div class="HOEnZb"><div class="h5">
<br>
<br>
-- <br>
Jakob Witzig<br>
<br>
Zuse Institute Berlin (ZIB)<br>
<br>
Division Mathematical Optimization and Scientific Information<br>
Research Group Mathematical Optimization Methods<br>
<br>
Takustrasse 7<br>
14195 Berlin<br>
<br>
Tel. : +49 (0)30 84185-416<br>
Fax  : +49 (0)30 84185-269<br>
email: <a href="mailto:witzig@zib.de" target="_blank">witzig@zib.de</a><br>
</div></div></blockquote></div><br></div>