<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Dear Lan,<br>
    <br>
    that backtrace shows that the pricer_farkas() method of your pricer
    [#7] calls SCIPgetVarRedcost() [#6]. That asks the corresponding
    column for its redcost and finally calls SCIPcolGetRedcost() [#4],
    where the assert comes up.<br>
    <br>
    Thus, it is your pricer that triggers this, because it asks a
    variable for its reduced cost during Farkas pricing, rather than its
    Farkas coefficient via SCIPgetVarFarkasCoef().<br>
    <br>
    Best,<br>
    Gerald<br>
    <br>
    <div class="moz-cite-prefix">Am 08.11.19 um 03:43 schrieb Ngô Lan:<br>
    </div>
    <blockquote type="cite"
      cite="mid:ac65ddbbd9f9457ea40ec964fd4dbf1b@aalto.fi">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;"
        dir="ltr">
        <p>Hi Gerald,</p>
        <p><br>
        </p>
        <p>Here is the backtrace:</p>
        <p><br>
        </p>
        <div>#0  0x00007ffff9d25428 in __GI_raise (sig=sig@entry=6) at
          ../sysdeps/unix/sysv/linux/raise.c:54</div>
        <div>#1  0x00007ffff9d2702a in __GI_abort () at abort.c:89</div>
        <div>#2  0x00007ffff9d1dbd7 in __assert_fail_base
          (fmt=<optimized out>,
          assertion=assertion@entry=0x7ffffd938b60 "lp->validsollp ==
          stat->lpcount",</div>
        <div>    file=file@entry=0x7ffffd936f00
"/mnt/c/Users/hp/Documents/GitHub/scipoptsuite-6.0.2/scip/src/scip/lp.c",
          line=line@entry=3899,</div>
        <div>    function=function@entry=0x7ffffd93eed0
          <__PRETTY_FUNCTION__.20094> "SCIPcolGetRedcost") at
          assert.c:92</div>
        <div>#3  0x00007ffff9d1dc82 in __GI___assert_fail
          (assertion=0x7ffffd938b60 "lp->validsollp ==
          stat->lpcount", file=0x7ffffd936f00
"/mnt/c/Users/hp/Documents/GitHub/scipoptsuite-6.0.2/scip/src/scip/lp.c",</div>
        <div>    line=3899, function=0x7ffffd93eed0
          <__PRETTY_FUNCTION__.20094> "SCIPcolGetRedcost") at
          assert.c:101</div>
        <div>#4  0x00007ffffbe19d57 in SCIPcolGetRedcost
          (col=0x62b0000084f0, stat=0x61b00001ea80, lp=0x61600000cf80)
          at
/mnt/c/Users/hp/Documents/GitHub/scipoptsuite-6.0.2/scip/src/scip/lp.c:3899</div>
        <div>#5  0x00007ffffc002e48 in SCIPgetColRedcost
          (scip=0x611000002c00, col=0x62b0000084f0) at
/mnt/c/Users/hp/Documents/GitHub/scipoptsuite-6.0.2/scip/src/scip/scip_lp.c:1079</div>
        <div>#6  0x00007ffffc067e80 in SCIPgetVarRedcost
          (scip=0x611000002c00, var=0x630000290628) at
/mnt/c/Users/hp/Documents/GitHub/scipoptsuite-6.0.2/scip/src/scip/scip_var.c:1883</div>
        <div>#7  0x000000000065fc3f in
          ObjPricerRCPSP::scip_farkas(Scip*, SCIP_Pricer*, SCIP_Result*)
          ()</div>
        <div>#8  0x00007ffffc14baa6 in pricerFarkasObj
          (scip=0x611000002c00, pricer=0x60c00001a680,
          result=0x7ffffffecae0) at
/mnt/c/Users/hp/Documents/GitHub/scipoptsuite-6.0.2/scip/src/objscip/objpricer.cpp:199</div>
        <div>#9  0x00007ffffbfa703f in SCIPpricerFarkas
          (pricer=0x60c00001a680, set=0x61d00001d680,
          prob=0x6110000183c0, result=0x7ffffffecae0)</div>
        <div>    at
/mnt/c/Users/hp/Documents/GitHub/scipoptsuite-6.0.2/scip/src/scip/pricer.c:449</div>
        <div>#10 0x00007ffffbfa71fe in SCIPpricerExec
          (pricer=0x60c00001a680, set=0x61d00001d680,
          prob=0x6110000183c0, lp=0x61600000cf80,
          pricestore=0x608000366020, lowerbound=0x7ffffffecb28,
          stopearly=0x7ffffffecae8,</div>
        <div>    result=0x7ffffffecae0) at
/mnt/c/Users/hp/Documents/GitHub/scipoptsuite-6.0.2/scip/src/scip/pricer.c:489</div>
        <div>#11 0x00007ffffc0b9d2f in SCIPpriceLoop
          (blkmem=0x625000007900, set=0x61d00001d680,
          messagehdlr=0x608000005720, stat=0x61b00001ea80,
          transprob=0x6110000183c0, origprob=0x611000018c80,
          primal=0x60c00001a500,</div>
        <div>    tree=0x61300000d240, reopt=0x0, lp=0x61600000cf80,
          pricestore=0x608000366020, sepastore=0x60400023bd90,
          cutpool=0x60b0001193f0, branchcand=0x60d000008c00,
          eventqueue=0x60300001fe40,</div>
        <div>    eventfilter=0x619000013a80, cliquetable=0x607000027690,
          pretendroot=0, displayinfo=0, maxpricerounds=2147483647,
          npricedcolvars=0x7ffffffecce4, mustsepa=0x7ffffffeccdc,
          lperror=0x7ffffffed5b4,</div>
        <div>    aborted=0x7ffffffed5b0) at
/mnt/c/Users/hp/Documents/GitHub/scipoptsuite-6.0.2/scip/src/scip/solve.c:2121</div>
        <div>#12 0x00007ffffc0bb2c3 in priceAndCutLoop
          (blkmem=0x625000007900, set=0x61d00001d680,
          messagehdlr=0x608000005720, stat=0x61b00001ea80,
          mem=0x60300000be60, transprob=0x6110000183c0,
          origprob=0x611000018c80,</div>
        <div>    primal=0x60c00001a500, tree=0x61300000d240, reopt=0x0,
          lp=0x61600000cf80, pricestore=0x608000366020,
          sepastore=0x60400023bd90, cutpool=0x60b0001193f0,
          delayedcutpool=0x60b000119340,</div>
        <div>    branchcand=0x60d000008c00, conflict=0x61500001c000,
          conflictstore=0x60f0000052c0, eventfilter=0x619000013a80,
          eventqueue=0x60300001fe40, cliquetable=0x607000027690,
          fullseparation=1,</div>
        <div>    propagateagain=0x7ffffffed5a4, cutoff=0x7ffffffed84c,
          unbounded=0x7ffffffed854, lperror=0x7ffffffed5b4,
          pricingaborted=0x7ffffffed5b0)</div>
        <div>    at
/mnt/c/Users/hp/Documents/GitHub/scipoptsuite-6.0.2/scip/src/scip/solve.c:2382</div>
        <div>#13 0x00007ffffc0be98b in solveNodeLP
          (blkmem=0x625000007900, set=0x61d00001d680,
          messagehdlr=0x608000005720, stat=0x61b00001ea80,
          mem=0x60300000be60, origprob=0x611000018c80,
          transprob=0x6110000183c0,</div>
        <div>    primal=0x60c00001a500, tree=0x61300000d240, reopt=0x0,
          lp=0x61600000cf80, relaxation=0x60300001fb70,
          pricestore=0x608000366020, sepastore=0x60400023bd90,
          cutpool=0x60b0001193f0,</div>
        <div>    delayedcutpool=0x60b000119340,
          branchcand=0x60d000008c00, conflict=0x61500001c000,
          conflictstore=0x60f0000052c0, eventfilter=0x619000013a80,
          eventqueue=0x60300001fe40, cliquetable=0x607000027690,</div>
        <div>    initiallpsolved=0, fullseparation=1, newinitconss=0,
          propagateagain=0x7ffffffed5a4, solverelaxagain=0x7ffffffed59c,
          cutoff=0x7ffffffed84c, unbounded=0x7ffffffed854,
          lperror=0x7ffffffed5b4,</div>
        <div>    pricingaborted=0x7ffffffed5b0) at
/mnt/c/Users/hp/Documents/GitHub/scipoptsuite-6.0.2/scip/src/scip/solve.c:3086</div>
        <div>#14 0x00007ffffc0c1ebc in propAndSolve
          (blkmem=0x625000007900, set=0x61d00001d680,
          messagehdlr=0x608000005720, stat=0x61b00001ea80,
          mem=0x60300000be60, origprob=0x611000018c80,
          transprob=0x6110000183c0,</div>
        <div>    primal=0x60c00001a500, tree=0x61300000d240, reopt=0x0,
          lp=0x61600000cf80, relaxation=0x60300001fb70,
          pricestore=0x608000366020, sepastore=0x60400023bd90,
          branchcand=0x60d000008c00, cutpool=0x60b0001193f0,</div>
        <div>    delayedcutpool=0x60b000119340, conflict=0x61500001c000,
          conflictstore=0x60f0000052c0, eventfilter=0x619000013a80,
          eventqueue=0x60300001fe40, cliquetable=0x607000027690,
          focusnode=0x6290002695d8,</div>
        <div>    actdepth=5, propagate=1, solvelp=1, solverelax=1,
          forcedlpsolve=0, initiallpsolved=0, fullseparation=1,
          afterlpproplps=0x7ffffffed650, heurtiming=0x7ffffffed58c,
          nlperrors=0x7ffffffed590,</div>
        <div>    fullpropagation=0x7ffffffed5a8,
          propagateagain=0x7ffffffed5a4, lpsolved=0x7ffffffed598,
          relaxcalled=0x7ffffffed5bc, solvelpagain=0x7ffffffed5a0,
          solverelaxagain=0x7ffffffed59c, cutoff=0x7ffffffed84c,</div>
        <div>    postpone=0x7ffffffed850, unbounded=0x7ffffffed854,
          stopped=0x7ffffffed864, lperror=0x7ffffffed5b4,
          pricingaborted=0x7ffffffed5b0,
          forcedenforcement=0x7ffffffed5b8)</div>
        <div>    at
/mnt/c/Users/hp/Documents/GitHub/scipoptsuite-6.0.2/scip/src/scip/solve.c:3890</div>
        <div>#15 0x00007ffffc0c3245 in solveNode (blkmem=0x625000007900,
          set=0x61d00001d680, messagehdlr=0x608000005720,
          stat=0x61b00001ea80, mem=0x60300000be60,
          origprob=0x611000018c80, transprob=0x6110000183c0,</div>
        <div>    primal=0x60c00001a500, tree=0x61300000d240, reopt=0x0,
          lp=0x61600000cf80, relaxation=0x60300001fb70,
          pricestore=0x608000366020, sepastore=0x60400023bd90,
          branchcand=0x60d000008c00, cutpool=0x60b0001193f0,</div>
        <div>    delayedcutpool=0x60b000119340, conflict=0x61500001c000,
          conflictstore=0x60f0000052c0, eventfilter=0x619000013a80,
          eventqueue=0x60300001fe40, cliquetable=0x607000027690,
          cutoff=0x7ffffffed84c,</div>
        <div>    postpone=0x7ffffffed850, unbounded=0x7ffffffed854,
          infeasible=0x7ffffffed858, restart=0x7ffffffeda8c,
          afternodeheur=0x7ffffffed860, stopped=0x7ffffffed864)</div>
        <div>    at
/mnt/c/Users/hp/Documents/GitHub/scipoptsuite-6.0.2/scip/src/scip/solve.c:4190</div>
        <div>#16 0x00007ffffc0c6f6d in SCIPsolveCIP
          (blkmem=0x625000007900, set=0x61d00001d680,
          messagehdlr=0x608000005720, stat=0x61b00001ea80,
          mem=0x60300000be60, origprob=0x611000018c80,
          transprob=0x6110000183c0,</div>
        <div>    primal=0x60c00001a500, tree=0x61300000d240, reopt=0x0,
          lp=0x61600000cf80, relaxation=0x60300001fb70,
          pricestore=0x608000366020, sepastore=0x60400023bd90,
          cutpool=0x60b0001193f0,</div>
        <div>    delayedcutpool=0x60b000119340,
          branchcand=0x60d000008c00, conflict=0x61500001c000,
          conflictstore=0x60f0000052c0, eventfilter=0x619000013a80,
          eventqueue=0x60300001fe40, cliquetable=0x607000027690,</div>
        <div>    restart=0x7ffffffeda8c) at
/mnt/c/Users/hp/Documents/GitHub/scipoptsuite-6.0.2/scip/src/scip/solve.c:4974</div>
        <div>#17 0x00007ffffc04ff0e in SCIPsolve (scip=0x611000002c00)
          at
/mnt/c/Users/hp/Documents/GitHub/scipoptsuite-6.0.2/scip/src/scip/scip_solve.c:2648</div>
        <div>#18 0x000000000061838b in RCPSP::solve(int) ()</div>
        <div>#19 0x00000000006a95fb in main ()</div>
        <br>
        <p><br>
        </p>
        <p>Thank you for your time.</p>
        <p><br>
        </p>
        <p>Best,</p>
        <p>Lan</p>
      </div>
      <hr style="display:inline-block;width:98%" tabindex="-1">
      <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
          face="Calibri, sans-serif" color="#000000"><b>From:</b> Gerald
          Gamrath <a class="moz-txt-link-rfc2396E" href="mailto:gamrath@zib.de"><gamrath@zib.de></a><br>
          <b>Sent:</b> 07 November 2019 12:24:52<br>
          <b>To:</b> Ngô Lan; <a class="moz-txt-link-abbreviated" href="mailto:Scip@zib.de">Scip@zib.de</a><br>
          <b>Subject:</b> Re: [SCIP] Farkas pricing</font>
        <div> </div>
      </div>
      <div>Dear Lan,<br>
        <br>
        you are right, SCIPcolGetRedcost should not be called in that
        case. The assertion alone does not help too much for pinning
        down the reason for the issue, could you run your code with gdb
        and send me the complete backtrace?<br>
        <br>
        Best,<br>
        Gerald<br>
        <br>
        <div class="moz-cite-prefix">Am 07.11.19 um 02:14 schrieb Ngô
          Lan:<br>
        </div>
        <blockquote type="cite"
          cite="mid:5b711857e5024bebb4c3330950ab1d99@aalto.fi">
          <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
          <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;"
            dir="ltr">
            <p>Hi Gerald, </p>
            <p><br>
            </p>
            <p>Thank you for your fast reply. In my implementation, I do
              not implement the Farkas pricing but a heuristic in the
              farkas callback to generate more columns. So I didn't
              call <span style="font-family: Calibri, Helvetica,
                sans-serif, serif, EmojiFont; font-size: 16px;">SCIPcolGetRedcost
                directly but it was called when the master is resolved
                after the new column is added. The error I got is "<span>lp.c:3899:
                  SCIPcolGetRedcost: Assertion `lp->validsollp ==
                  stat->lpcount' failed."</span></span></p>
            <p><span style="font-family: Calibri, Helvetica, sans-serif,
                serif, EmojiFont; font-size: 16px;"><span>I was
                  wondering why this error occurred since the master is
                  infeasible so when it is solved again after farkas, it
                  should not call <span style="font-family: Calibri,
                    Helvetica, sans-serif, serif, EmojiFont; font-size:
                    16px;">SCIPcolGetRedcost. Or did I do something
                    wrong that leads to that <span style="font-family:
                      Calibri, Helvetica, sans-serif, serif, EmojiFont;
                      font-size: 16px;">SCIPcolGetRedcost call?</span></span></span></span></p>
            <p><span style="font-family: Calibri, Helvetica, sans-serif,
                serif, EmojiFont; font-size: 16px;"><span><span
                    style="font-family: Calibri, Helvetica, sans-serif,
                    serif, EmojiFont; font-size: 16px;"><span
                      style="font-family: Calibri, Helvetica,
                      sans-serif, serif, EmojiFont; font-size: 16px;"><br>
                    </span></span></span></span></p>
            <p><font face="Calibri, Helvetica, sans-serif, serif,
                EmojiFont">Best,</font></p>
            <p><font face="Calibri, Helvetica, sans-serif, serif,
                EmojiFont">Lan</font></p>
          </div>
          <hr style="display:inline-block;width:98%" tabindex="-1">
          <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
              face="Calibri, sans-serif" color="#000000"><b>From:</b>
              Scip
              <a class="moz-txt-link-rfc2396E"
                href="mailto:scip-bounces@zib.de" moz-do-not-send="true"><scip-bounces@zib.de></a>
              on behalf of Gerald Gamrath
              <a class="moz-txt-link-rfc2396E"
                href="mailto:gamrath@zib.de" moz-do-not-send="true"><gamrath@zib.de></a><br>
              <b>Sent:</b> 06 November 2019 12:02:40<br>
              <b>To:</b> <a class="moz-txt-link-abbreviated"
                href="mailto:scip@zib.de" moz-do-not-send="true">scip@zib.de</a><br>
              <b>Subject:</b> Re: [SCIP] Farkas pricing</font>
            <div> </div>
          </div>
          <div>Dear Lan,<br>
            <br>
            sorry, the documentation is a bit misleading in this case.
            Similar to constraints, there is a separate method to get
            the Farkas coefficient for variables. Please use
            SCIPgetVarFarkasCoef() for this.<br>
            <br>
            Best,<br>
            Gerald<br>
            <br>
            <div class="moz-cite-prefix">On 06.11.19 02:10, Ngô Lan
              wrote:<br>
            </div>
            <blockquote type="cite"
              cite="mid:343ac57cd1bc44d2acc4ee05adadd977@aalto.fi">
              <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
              <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;"
                dir="ltr">
                <p>Hi all, </p>
                <p><br>
                </p>
                <p>I am implementing BPC and after some branchings, my
                  master will become infeasible due to not having enough
                  columns in the pool. Instead of Farkas pricing, I
                  implement a heuristic to add more columns into the
                  problem inside the <span>SCIP_DECL_PRICERFARKAS</span> callback.
                  However I ran into the assertion error "<span>lp->validsollp
                    == stat->lpcount" in function <span>SCIPcolGetRedcost.
                      I can understand that this is due to the lastest
                      solution being infeasible but then how Farkas
                      works normally? It would be great if someone can
                      give me insight into this. Thank you for your
                      time.</span></span></p>
                <p><span><span><br>
                    </span></span></p>
                <p><span><span>Best,</span></span></p>
                <p>Lan</p>
              </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" moz-do-not-send="true">Scip@zib.de</a>
<a class="moz-txt-link-freetext" href="https://listserv.zib.de/mailman/listinfo/scip" moz-do-not-send="true">https://listserv.zib.de/mailman/listinfo/scip</a>
</pre>
            </blockquote>
            <br>
          </div>
        </blockquote>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>