<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    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">
      <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>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"><scip-bounces@zib.de></a> on behalf of Gerald Gamrath
          <a class="moz-txt-link-rfc2396E" href="mailto:gamrath@zib.de"><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">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>
  </body>
</html>