[Clp] Fwd: [Symphony] Incorrect solution for a simple linear programming model

Ted Ralphs ted at lehigh.edu
Fri Jul 27 19:52:15 EDT 2012


This turned out to be a problem in the interface to GLPK. At some point,
GLPK started indexing variables from one instead of zero. I committed a fix
to trunk and stable/5.4. It solves the small instance you provided
correctly now. Can you check it on your larger instance? Thanks for
distilling the problem done and providing as easy test case!

Cheers,

Ted

On Fri, Jul 27, 2012 at 1:50 PM, Bo Jensen <jensen.bo at gmail.com> wrote:

> Though you may be right, you can't make conclusion like that.
>
> a) I think AMPL has it's own presolver running before passing the problem
> to the solver.
>
> b) Comparing from command prompt and the problem passed by AMPL to CLP
> could give you a different permutation order of constraints and variable.
>
> In both situations you can (and often will) have different solution paths.
>
> On Fri, Jul 27, 2012 at 7:41 PM, Ahmadi, Javad <javad.ahmadi at amd.com>wrote:
>
>>  NAME          BLANK   ****
>>
>> ROWS****
>>
>>  N  OBJROW****
>>
>>  G  R0000000****
>>
>>  L  R0000001****
>>
>>  E  R0000002****
>>
>> COLUMNS****
>>
>>     C0000000  OBJROW    1.             R0000000  1.          ****
>>
>>     C0000000  R0000001  1.             R0000002  1.          ****
>>
>> RHS****
>>
>>     RHS       R0000000  1.             R0000001  2.          ****
>>
>>     RHS       R0000002  1.1         ****
>>
>> ENDATA****
>>
>> At line 1 NAME          BLANK****
>>
>> At line 2 ROWS****
>>
>> At line 7 COLUMNS****
>>
>> At line 10 RHS****
>>
>> At line 13 ENDATA****
>>
>> Problem BLANK has 3 rows, 1 columns and 3 elements****
>>
>> Model was imported from .\junk.mps in 0.01 seconds****
>>
>> Clp:solve****
>>
>> Presolve 0 (-3) rows, 0 (-1) columns and 0 (-3) elements****
>>
>> Empty problem - 0 rows, 0 columns and 0 elements****
>>
>> Optimal - objective value 1.1****
>>
>> After Postsolve, objective 1.1, infeasibilities - dual 0 (0), primal 0 (0)
>> ****
>>
>> Optimal objective 1.1 - 0 iterations time 0.012, Presolve 0.01****
>>
>> ** **
>>
>> ** **
>>
>> Nothing to do with CLP!****
>>
>> *From:* clp-bounces at list.coin-or.org [mailto:clp-bounces at list.coin-or.org]
>> *On Behalf Of *Ted Ralphs
>> *Sent:* Friday, July 27, 2012 12:09 PM
>> *To:* clp at list.coin-or.org
>> *Subject:* [Clp] Fwd: [Symphony] Incorrect solution for a simple linear
>> programming model****
>>
>> ** **
>>
>> Hi all,
>>
>> There have been a number of reports of Clp failing to solve very simple
>> LPs. The below was posted to the SYMPHONY mailing list, but since the
>> problem in question is an LP and is not pre-processed by SYMPHONY, this
>> seems to be a problem with Clp. I am looking into it, but I thought I would
>> throw it onto the Clp list in case anyone else is seeing the same thing or
>> wants to help.
>>
>> Cheers,
>>
>> Ted****
>>
>> ---------- Forwarded message ----------
>> From: *Federico Larumbe* <federico.larumbe at polymtl.ca>
>> Date: Thu, Jul 19, 2012 at 4:46 PM
>> Subject: [Symphony] Incorrect solution for a simple linear programming
>> model
>> To: symphony at list.coin-or.org
>>
>>
>> Hi, ****
>>
>> ** **
>>
>> I am testing Symphony with a simple example in AMPL format:****
>>
>> ** **
>>
>> symphony -F file.mod -D file.dat****
>>
>> ** **
>>
>>  -- file.mod ------------------****
>>
>> var y >= 0;****
>>
>> ** **
>>
>> minimize ObjectiveFunction: y;****
>>
>> ** **
>>
>> subject to C1:   y >= 1.0;****
>>
>> subject to C2:   y <= 2.0;****
>>
>> subject to C3:   y  = 1.1;****
>>
>> ** **
>>
>> end;****
>>
>> ------------------------------****
>>
>> ** **
>>
>> -- file.dat ------------------****
>>
>> data;****
>>
>> end;****
>>
>> ------------------------------****
>>
>>  ** **
>>
>> The solution given by the program is 2.0 instead of 1.1 (see attached
>> file). If I choose maximize, the solution is 1.0. If I remove C3, the
>> problem is unbounded. Is there any option that I missing?****
>>
>> ** **
>>
>> I compiled Sympthony in SUSE Linux with gcc 4.5.1 with the following
>> commands:****
>>
>> ** **
>>
>>  ./configure --with-gmpl --enable-openm****
>>
>> make****
>>
>>  ** **
>>
>> Thanks a lot,****
>>
>> Federico.****
>>
>> ** **
>>
>> --
>> Federico Larumbe
>> École Polytechnique de Montréal
>> Montréal H3C 3A9
>>
>> Group for Research in Decision Analysis (GERAD)
>> tel   +1 514 3406053 xt 6931
>> fax   +1 514 3405665
>> http://www.gerad.ca/en/directory/details.php?id=1214
>>
>> _______________________________________________
>> Symphony mailing list
>> Symphony at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/symphony****
>>
>>
>>
>>
>> --
>> Dr. Ted Ralphs
>> Associate Professor, Lehigh University
>> (610) 628-1280
>> ted 'at' lehigh 'dot' edu
>> coral.ie.lehigh.edu/~ted <http://coral.ie.lehigh.edu/%7Eted>****
>>
>> _______________________________________________
>> Clp mailing list
>> Clp at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/clp
>>
>>
>


-- 
Dr. Ted Ralphs
Associate Professor, Lehigh University
(610) 628-1280
ted 'at' lehigh 'dot' edu
coral.ie.lehigh.edu/~ted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20120727/a2d0712f/attachment-0001.html>


More information about the Clp mailing list