<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Giacomo (and Stefan),<br>
      <br>
      I agree that improving the numerical properties would be a good
      idea.<br>
      <br>
      Allan Wechsler has pointed out to me that there is an integer
      tolerance which could be set to a smaller value.  This can not be
      set from the standalone cbc, but can be from the example drivers -
      model.setIntegerTolerance(1.0e-10).<br>
      <br>
      Just doing that does not not fix the problem, but also turning off
      scaling does.<br>
      <br>
      John Forrest<br>
      On 17/11/16 15:17, Giacomo Nannicini wrote:<br>
    </div>
    <blockquote
cite="mid:CAFy=0d0qpNu=FTH=M_Wc_VEH56puBgboO+SiEoUp0vcEU-QdUg@mail.gmail.com"
      type="cite">
      <pre wrap="">Hi John and Stefan,
I would hardly call this a bug. The model is ill-conditioned
(coefficients ranging from 10^-2 to 10^7) and it almost seems
specifically built to 'trick" a solver into problems. The commercial
solver CPLEX has exactly the same behavior: if preprocessing is
disabled, it returns a solution with value 1000. So I do not think
there is much that can be done, other than trying to improve the
numerical properties of the model.

Giacomo<font face="sans-serif" size="2">Allan Wechsler</font>

On Thu, Nov 17, 2016 at 6:36 AM, John Forrest
<a class="moz-txt-link-rfc2396E" href="mailto:john.forrest@fastercoin.com"><john.forrest@fastercoin.com></a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Stefan,

It is a bug, but I am not sure how to fix.

The optimal continuous solution is 0.0,1.0e-9,0.0.  These values are all
within integer tolerances so it sets to integers i.e. 0,0,0 and thinks that
as the continuous solution is integral then the search is over and fixes
integer variable to 0 and leaves others .  However while the continuous
objective value was 9.0e-10, the  new solution will be 1.0e-3,0.0,0.0 -
giving an objective value of 1000.

The fixes that I can think of would affect performance too much and/or be
complicated.
On 16/11/16 09:09, Stefan Hacker wrote:

Hi,

I am trying to use Cbc to solve what I thought to be a simple problem.
However the behavior I see makes me wonder if I am encountering a Cbc
bug or if there is something wrong in the way I am using it.

If I run the attached model using Cbc 2.9.7 (version isn't that
important I think) from the console like this:
cbc model.lp -solve

I get the expected objective value of 0.9. However without presolving
enabled
cbc model.lp -preprocess off -solve

Cbc returns an objective value of 1000 which is incorrect.

Originally I was using Cbc as a library (close to the minimum.cpp
example from the documentation) and didn't consider presolve to be
relevant for such a small problem. Activating it feels like I am just
suppressing a symptom without understanding or fixing the cause. Even
more confusing to me is that after the call to branchAndBound the
CbcModel returns 0 for primary and secondary status and
isProvenOptimal returns true.

Is the result being wrong without presolve a bug or am I trying
something stupid here without noticing? Also Cbc returning "optimal"
in all ways I know to check but still returning an incorrect result is
unsettling. Did I miss some indicator Cbc gave me?

Thanks a lot.

Regards,
Stefan



_______________________________________________
Cbc mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="https://urldefense.proofpoint.com/v2/url?u=http-3A__list.coin-2Dor.org_mailman_listinfo_cbc&d=CwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=js2M0T-3OIMIVDvokcKjokJbk0F8QOCd0mT4FsVFE88&m=FlCDUkCFyl6LUVRWa6Mu7ehYk1QuoUvgFPJh_u4AQ-4&s=sSI8pGvVrbw0LJd5V9yjX8yTc8fpKvA0GSiLH77xu2c&e=">https://urldefense.proofpoint.com/v2/url?u=http-3A__list.coin-2Dor.org_mailman_listinfo_cbc&d=CwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=js2M0T-3OIMIVDvokcKjokJbk0F8QOCd0mT4FsVFE88&m=FlCDUkCFyl6LUVRWa6Mu7ehYk1QuoUvgFPJh_u4AQ-4&s=sSI8pGvVrbw0LJd5V9yjX8yTc8fpKvA0GSiLH77xu2c&e=</a>



_______________________________________________
Cbc mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="https://urldefense.proofpoint.com/v2/url?u=http-3A__list.coin-2Dor.org_mailman_listinfo_cbc&d=CwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=8FaVxIx99H879Ebkij38NpcRZoYLK-7QMl1LqyvBccA&m=fJ6JENZYx2k6pJo0f5S4KxtatK98Kji6H7IG4z1t5rk&s=GZXssk61y1TSxW4GAKGZzmDUkWHg__fPQFQgvzZbV1c&e=">https://urldefense.proofpoint.com/v2/url?u=http-3A__list.coin-2Dor.org_mailman_listinfo_cbc&d=CwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=8FaVxIx99H879Ebkij38NpcRZoYLK-7QMl1LqyvBccA&m=fJ6JENZYx2k6pJo0f5S4KxtatK98Kji6H7IG4z1t5rk&s=GZXssk61y1TSxW4GAKGZzmDUkWHg__fPQFQgvzZbV1c&e=</a>

</pre>
      </blockquote>
      <pre wrap="">

</pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>