<div dir="ltr">A fast guess : <div><br></div><div>You specify the problem to be maximized in the LP format, but in the MPS format your objective coefficient is positive. MPS format doesn&#39;t specify direction of optimization, but most solvers assume minimize. Could it be that you&#39;re mixing up maximize and minimize ?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 20, 2015 at 8:44 AM, Andy Somogyi <span dir="ltr">&lt;<a href="mailto:andy.somogyi@gmail.com" target="_blank">andy.somogyi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
<br>
I’m trying to use Clp, works fine for the built-in examples, but I can’t seem to get this simple attached problem to work. I’ve tried hard-coding this in C++, following the modify.cpp example, and I’ve tried reading it form a mps file, using either the command line clp program, or direction into the ClpModel object via readMps.<br>
<br>
It always results in a zero solution, but this problem has an analytic solution of [1, 1, 1, 0], and Mathematica finds this solution just fine if I import the mps and use NMinimise.<br>
<br>
Any ideas why this simple problem won’t converge to the correct solution in Clp.<br>
<br>
Thanks<br>
<br>
Here is the mps:<br>
<br>
************************************************************************<br>
*<br>
*  Maximize<br>
*  objective1_objf:<br>
*  + 1.0 R2<br>
*<br>
* Subject To<br>
*  A: +R1      -X1 -X2 = 0<br>
*  B:     -R2  +X1 +X2 = 0<br>
*<br>
*  Bounds<br>
*  0.0 &lt;= R1 &lt;= 1.0<br>
*  0.0 &lt;= R2 &lt;= +inf<br>
*  0.0 &lt;= X1 &lt;= +inf<br>
*  0.0 &lt;= X2 &lt;= +inf<br>
*<br>
************************************************************************<br>
NAME          EXAMPLE<br>
ROWS<br>
 N  OBJ<br>
 E  A<br>
 E  B<br>
COLUMNS<br>
    R1        A                  1.0<br>
    R2        OBJ                1.0   B                 -1.0<br>
    X1        A                 -1.0   B                  1.0<br>
    X2        A                 -1.0   B                  1.0<br>
<br>
RHS<br>
    RHS1      A                  0<br>
    RHS1      B                  0<br>
<br>
BOUNDS<br>
 LO BND1      R1                 0<br>
 UP BND1      R1                 1<br>
 LO BND1      R2                 0<br>
 LO BND1      X1                 0<br>
 LO BND1      X2                 0<br>
ENDATA<br>
<br>
<br>
_______________________________________________<br>
Clp mailing list<br>
<a href="mailto:Clp@list.coin-or.org">Clp@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/clp" target="_blank">http://list.coin-or.org/mailman/listinfo/clp</a><br>
</blockquote></div><br></div>