<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Dear Marco,<br>
    <br>
    I take a look at your linear program. I think that the problem may
    be related to numerical precision:<br>
    <br>
    In your constraint matrix there are coefficients such as<br>
    <br>
    0.000000815218676787828980000000 Buy_A_100032<br>
    as well:<br>
    BuyOpBigM_A_100032:  Buy_A_100032
    -124770.535999999990000000000000000000 BuyOp_A_100032 <= 0<br>
    <br>
    Usually all (fast) linear programming solvers are imprecise due to
    hardware limitations.<br>
    If your applications needs accurate solutions with precision up to,
    lets say, the tenth decimal place, you will probably face some
    numerical difficulties.<br>
    The problems becomes more prominent when large coefficients are
    mixed with very small ones, which is the specific case of your
    matrix. These matrixes are called "ill conditioned".<br>
    <br>
    Solutions:<br>
    -  you may try to scale your matrix: i.e.:  multiply some rows by a
    constant<br>
    - some solvers have an "exact arithmetic mode", but these modes are
    usually hundreds of times slowers (glpk has the parameter --exact,
    if I remember correctly).<br>
    <br>
    Cheers<br>
    <br>
    Haroldo<br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 01-03-2016 12:23, mg wrote:<br>
    </div>
    <blockquote
cite="mid:CAOayR=ZoZD8-c5zEZq9-jqLij755OZ9r7Pf=-sw8mTH8OCJGjA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_quote">
          <div dir="ltr">Hi All,
            <div>I'm facing a crash (std::bad_alloc) solving a MIP
              problem.</div>
            <div>Attached you can find the zipped lp file causing the
              problem and the C++ code I used to load and solve it.</div>
            <div><br>
            </div>
            <div>Cbc version 2.9.8 stable, on Windows</div>
            <div><br>
            </div>
            <div>Problem seems located here (location is approximated
              since I could only see mangled code in visual studio) :</div>
            <div><span style="font-family:monospace,monospace">ClpNode
                --> gutsOfConstructor --> ClpFactorization</span><br>
            </div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div><font face="arial, helvetica, sans-serif">Thanks in
                advance,</font></div>
            <div><font face="arial, helvetica, sans-serif">Marco</font></div>
          </div>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
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="http://list.coin-or.org/mailman/listinfo/cbc">http://list.coin-or.org/mailman/listinfo/cbc</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
==================================================
Haroldo Gambini Santos
D.Sc, Computer Science
Universidade Federal de Ouro Preto
<a class="moz-txt-link-freetext" href="http://www.decom.ufop.br/haroldo/">http://www.decom.ufop.br/haroldo/</a></pre>
  </body>
</html>