bug-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-glpk] Re: lpx_write_cpxlp and lpx_read_cpx_lp are incompatible


From: Andrew Makhorin
Subject: [Bug-glpk] Re: lpx_write_cpxlp and lpx_read_cpx_lp are incompatible
Date: Mon, 25 Jul 2005 14:19:42 +0400

> 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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]