<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello John,<br>
    <br>
    sorry for not making the context clear. As I said in my original
    post, "setInteger" is exactly, what we are using to declare the
    integer columns. We once did it by adding "OsiSimpleInteger"
    instances, but changed that, when the problem first appeared after
    adding the pre-processing step.<br>
    <br>
    What I found out in the mean time, though, is that there is indeed
    something the application does, which is not properly reflected in
    the user_driver.cpp: the application explicitly calls
    "OsiClpSolverInterface::findIntegersAndSOS(false)" on the initial
    solver instance, which we use to build the problem description. This
    happens right after all integer declarations (via setInteger) have
    been made, and all SOSs have been declared. I don't recall, when
    (and why) exactly I added that call, but it must have been at the
    time, we switched from "OsiSimpleInteger"-style declarations to
    "setInteger":<br>
    <blockquote><small><font face="Courier New, Courier, monospace">...
          matrix set-up, etc. ...<br>
          <br>
          if (num_integers &gt; 0)</font></small><br>
      <small><font face="Courier New, Courier, monospace">{<br>
          &nbsp;&nbsp;&nbsp; iptr.setInteger(&amp;m_integers[0], num_integers);<br>
          }<br>
          <br>
          if (num_sos &gt; 0)<br>
          {<br>
          &nbsp;&nbsp;&nbsp; static const double weights[] = { 1.0, 2.0 };<br>
          &nbsp;&nbsp;&nbsp; rowvec&lt;OsiObject*&gt; pobjs(num_sos);<br>
          &nbsp;&nbsp;&nbsp; int members[2];<br>
          &nbsp;&nbsp;&nbsp; int ix = 0;<br>
          <br>
          &nbsp;&nbsp;&nbsp; for (std::vector&lt;int&gt;::const_iterator it =
          m_sos.begin(); it != m_sos.end(); )<br>
          &nbsp;&nbsp;&nbsp; {<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; members[0] = *it; ++it;<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; members[1] = *it; ++it;<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pobjs[ix++] = new OsiSOS(&amp;iptr, 2, members,
          weights, 1);<br>
          &nbsp;&nbsp;&nbsp; }<br>
          <br>
          &nbsp;&nbsp;&nbsp; iptr.addObjects(ix, pobjs.begin());<br>
          &nbsp;&nbsp;&nbsp; DEBUGOUT("Added " &lt;&lt; ix &lt;&lt; " SOS
          constraint(s)");<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
          &nbsp;&nbsp;&nbsp; delete_all(pobjs.begin(), pobjs.begin() + ix);<br>
          }<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
          if (DO_EXPLICIT_FINDINT)<br>
          {<br>
          &nbsp;&nbsp;&nbsp; iptr.findIntegersAndSOS(false);<br>
          }<br>
        </font></small><br>
    </blockquote>
    If I leave the call in, the SOS code properly works (using your
    changes), but we trigger the "assert()" in
    "OsiSolverInterface::findIntegers":<br>
    <blockquote><font face="Courier New, Courier, monospace"><small>#0&nbsp;
          0x00007ffff60f8849 in raise () from /lib64/libc.so.6</small></font><br>
      <font face="Courier New, Courier, monospace"><small>#1&nbsp;
          0x00007ffff60f9cd8 in abort () from /lib64/libc.so.6</small></font><br>
      <font face="Courier New, Courier, monospace"><small>#2&nbsp;
          0x00007ffff60f1616 in __assert_fail_base () from
          /lib64/libc.so.6</small></font><br>
      <font face="Courier New, Courier, monospace"><small>#3&nbsp;
          0x00007ffff60f16c2 in __assert_fail () from /lib64/libc.so.6</small></font><br>
      <font face="Courier New, Courier, monospace"><small>#4&nbsp;
          0x00007ffff4ab79ed in OsiSolverInterface::findIntegers
          (this=0x7ff4e8, justCount=false) at
          OsiSolverInterface.cpp:1978</small></font><br>
      <font face="Courier New, Courier, monospace"><small>#5&nbsp;
          0x00007ffff426537c in OsiClpSolverInterface::deleteCols
          (this=0x7ff240, num=2, columnIndices=0x804d50) at
          OsiClpSolverInterface.cpp:3236</small></font><br>
      <font face="Courier New, Courier, monospace"><small>#6&nbsp;
          0x00007ffff510c436 in CbcModel::AddIntegers
          (this=0x7fffffff84f0) at CbcModel.cpp:1306</small></font><br>
      <font face="Courier New, Courier, monospace"><small>#7&nbsp;
          0x00007ffff5112812 in CbcModel::branchAndBound
          (this=0x7fffffff84f0, doStatistics=0) at CbcModel.cpp:2701</small></font><br>
      <font face="Courier New, Courier, monospace"><small>#8&nbsp;
          0x00007ffff53fb5e7 in lp::detail::(anonymous
          namespace)::solve_via_cbc (LP=...) at src/Expr_problem.cpp:674</small></font><br>
      <font face="Courier New, Courier, monospace"><small>#9&nbsp;
          0x00007ffff53fd893 in lp::detail::program_impl::solve_for
          (this=0x6be510, s=..., result=@0x7fffffff90b0: 0) at
          src/Expr_problem.cpp:1151</small></font><br>
    </blockquote>
    If I comment the call out, then the SOS fails with the "well-known"
    error, even in the presence of your changes:<br>
    <blockquote><small><font face="Courier New, Courier, monospace">#0&nbsp;
          0x00007ffff60f8849 in raise () from /lib64/libc.so.6<br>
          #1&nbsp; 0x00007ffff60f9cd8 in abort () from /lib64/libc.so.6<br>
          #2&nbsp; 0x00007ffff69f1655 in
          __gnu_cxx::__verbose_terminate_handler() () from
          /usr/lib64/libstdc++.so.6<br>
          #3&nbsp; 0x00007ffff69ef7c6 in ?? () from /usr/lib64/libstdc++.so.6<br>
          #4&nbsp; 0x00007ffff69ef7f3 in std::terminate() () from
          /usr/lib64/libstdc++.so.6<br>
          #5&nbsp; 0x00007ffff69efa1e in __cxa_throw () from
          /usr/lib64/libstdc++.so.6<br>
          #6&nbsp; 0x00007ffff4486185 in indexError (index=4,
          methodName="isInteger") at OsiClpSolverInterface.cpp:1447<br>
          #7&nbsp; 0x00007ffff448c02f in OsiClpSolverInterface::isInteger
          (this=0x6d2c70, colNumber=4) at OsiClpSolverInterface.cpp:2756<br>
          #8&nbsp; 0x00007ffff5395dd1 in CbcSOS::CbcSOS (this=0x6b2790,
          model=0x7fffffffc980, numberMembers=2, which=0x6cec00,
          weights=0x6ceb20, identifier=3, type=1) at CbcSOS.cpp:67<br>
          #9&nbsp; 0x00007ffff535d267 in CbcModel::findIntegers
          (this=0x7fffffffc980, startAgain=false, type=0) at
          CbcModel.cpp:10966<br>
          #10 0x00007ffff5337f30 in CbcModel::branchAndBound
          (this=0x7fffffffc980, doStatistics=0) at CbcModel.cpp:1920<br>
          #11 0x00007ffff56245d9 in lp::detail::(anonymous
          namespace)::solve_via_cbc (LP=...) at src/Expr_problem.cpp:678<br>
          #12 0x00007ffff5626bea in lp::detail::solution_impl::solve_lp
          (this=0x6b0e70, base=...) at src/Expr_problem.cpp:1660</font></small><br>
    </blockquote>
    What got me confused was, that those errors occur in different tests
    (i.e., when the one works, the other fails and vice versa).<br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">Am 13.05.2014 16:44, schrieb John
      Forrest:<br>
    </div>
    <blockquote cite="mid:53722FDC.309@fastercoin.com" type="cite">Dirk,
      <br>
      <br>
      Using OsiSimpleInteger may be a bit heavyweight (and lead to
      problems).&nbsp; Why not just use setInteger?
      <br>
      <br>
      John
      <br>
      _______________________________________________
      <br>
      Cbc mailing list
      <br>
      <a class="moz-txt-link-abbreviated" href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a>
      <br>
      <a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/cbc">http://list.coin-or.org/mailman/listinfo/cbc</a>
      <br>
    </blockquote>
    <br>
  </body>
</html>