> There is a problem in the functions lpx_write_cpxlp and lpx_read_cpx_lp.
> The two operations are not inverses of each other. For instance, when 
> compiling and executing the file cpxlp_bug.c, a linear programming 
> problem is created, is written to disk as "a.cpxlp", then read and 
> written again as "b.cpxlp", and the two files are different.
> 
> Also, the program tries to solve the problems with lpx_simplex: the 
> original has a solution, not the modified one.
> 
> Perhaps the bound x_1 <= 0 in "a.cpxlp" should have been written -inf <= 
> x_1 <= 0 instead.
> 
> I am using GLPK version 4.8.

Thank you for your bug report.

There is a bug in lpx_read_cpxlp, namely, by default the lower bound
is set to 0, so when you specify x <= 0, both lower and upper bound are
set to 0 that erroneously gives x = 0.

I will fix the bug and post the patch to the list.

Andrew Makhorin




_______________________________________________
Bug-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-glpk

Reply via email to