<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Dear Saleh,<br>
    <br>
    this is indeed a bit strange. <br>
    <br>
    There is probably a numerical problem. For starters, you can use
    presolving, but avoid multiaggregations by<br>
    setting the two boolean parameters "presolving/donotaggr" and
    "presolving/donotmultaggr" to TRUE in your scip2. They are often the
    reason for numerical troubles in the original space.<br>
    <br>
    Unfortunately, you have optimized out some of the relevant
    information to help you, such as the type and violation of the
    constraint that is violated.<br>
    <br>
    Two questions: <br>
    1. I assume that if you do *not* disable presolving in the original
    SCIP, the bug is not triggered?<br>
    2. If the problem is a simple MIP problem, have you tried to write
    out the transformed problems of both SCIPs? You could write them in
    lp-format, which is very readable for small instances, and check
    what has happened to the violated constraint after presolving in the
    problem copy.<br>
    <br>
    To do so, use <br>
    <br>
    SCIP_CALL( SCIPpresolve(scip2) );<br>
    <a class="code"
href="https://scip.zib.de/doc-6.0.0/html/group__GlobalProblemMethods.php#gada41a57fc5a464ad565763d24e588d3a">SCIP_CALL(
      SCIPwriteTransProblem</a>(scip2, "presolvedprob.lp", "lp", false)
    )<br>
    <br>
    Maybe one of my guesses gets you started already,<br>
    Gregor<br>
    <br>
    <br>
    <div class="moz-cite-prefix">Am 02.11.18 um 17:58 schrieb M. Far.:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAGhf1zJuR1PQBEnoAfstes0dK70EQhD1emcuqC9Lvmy6-wAyew@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">
            <div dir="ltr">
              <div dir="ltr">
                <div dir="ltr">
                  <div dir="ltr">
                    <div dir="ltr">
                      <div dir="ltr">
                        <div>Hi</div>
                        <div>I am working on a simple MILP problem in
                          SCIP's c++ interface using CPLEX as the LP
                          solver.</div>
                        I have to disable presolving in my original
                        problem 'scip'. So I have:<br>
                      </div>
                      <div dir="ltr">SCIP_CALL( SCIPsetPresolving(scip,
                        SCIP_PARAMSETTING_OFF, true) );</div>
                      <div>after creating scip. Then, I need to solve a
                        copy of the problem by creating a second problem
                        'scip2':</div>
                      <div>SCIP* scip2;</div>
                      <div>SCIP_CALL( SCIPcreate(&scip2) );<br>
                        SCIP_CALL( SCIPcopyOrig(scip, scip2, nullptr,
                        nullptr, "copyProb", false, false, nullptr) );<br>
                        SCIP_CALL( SCIPsetIntParam(scip2,
                        "display/verblevel", 2) );</div>
                      <div><br>
                      </div>
                      <div>And I can turn on presolving procedure in
                        this problem. So I have:<br>
                      </div>
                      <div>`SCIP_CALL( SCIPsetPresolving(scip2,
                        SCIP_PARAMSETTING_DEFAULT, true) );`<br>
                      </div>
                      <div dir="ltr">
                        <div><br>
                        </div>
                        <div>Next, I want to add the solution of scip2
                          as an initial feasible solution to the
                          original problem. Hence:</div>
                        <div>```</div>
                        <div>SCIP_CALL( SCIPsolve(scip2) );<br>
                          auto sol2 = SCIPgetBestSol(scip2);<br>
                          SCIP_Bool stored;<br>
                          SCIP_CALL( SCIPaddSolFree(scip, &sol2,
                          &stored) );</div>
                        <div>```<br>
                        </div>
                        <div>However, when I solve the original scip by
                          calling `SCIPsolve(scip)`, I get the following
                          message in the output:</div>
                        <div>```<br>
                        </div>
                        <div>violation: right hand side is violated by
                          <a_number><br>
                          all 1 solutions given by solution candidate
                          storage are infeasible</div>
                        <div>```<br>
                        </div>
                        <div>Next, it ignores the solution, solves the
                          problem, and finds an "optimal solution" which
                          is inferior to sol2 (hence, not optimal
                          indeed).</div>
                        <div><br>
                        </div>
                        <div>I understand that something may be wrong
                          with the transformation. But I do not know how
                          to fix this.<br>
                        </div>
                        <div>(OS: Linux 4.15, SCIP ver.: 6.0.0, CPLEX
                          ver.: 12.8.0, gcc ver.: 7.3.0)<br>
                        </div>
                        <div><br>
                        </div>
                        <div>Bests,<br>
                          <div dir="ltr"
class="m_-1887873641005988722gmail-m_-4202621538027297685m_8836857469212455087m_-4500597847004404067gmail_signature">
                            <div dir="ltr"><br>
                            </div>
                          </div>
                        </div>
                        <div>Saleh<br>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </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">Scip@zib.de</a>
<a class="moz-txt-link-freetext" href="https://listserv.zib.de/mailman/listinfo/scip">https://listserv.zib.de/mailman/listinfo/scip</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>