[Top][All Lists]

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

Re: [Help-glpk] Sets of ordered pairs: Differences between AMPL and GNU

From: Andrew Makhorin
Subject: Re: [Help-glpk] Sets of ordered pairs: Differences between AMPL and GNU MathProg
Date: Tue, 25 Nov 2008 22:58:16 +0300

Hi Peter,

> I wrote a litte C++ demo which shows that the error occurs in v4.31 (and
> previous versions), but not in v4.33. The same happens with the
> executables (glpsol.exe).

> Maybe this information is useful for you.

> But anyway, since the latest version behaves nicely, everything is OK!

I tested your demo model with glpk 4.31. In fact, the results were

In the changelog I found the following record concerning glpk 4.32:

        * glpmpl01.c
        A bug was fixed. Due to this bug iterated expressions having
        an indexing expression whose dummy indices are bound to some
        values, i.e. like sum{(i+1,j,k-1) in E} x[i,j,k] are evaluated
        incorrectly. Namely, current value of such expressions is not
        invalidated when corresponding dummy indices (like i and k in
        the example above) are changed, that erroneously results in the
        same value evaluated for the first time.

Most probably this bug (which now is fixed) caused incorrect results.

BTW, I noticed that in your code you are using routines
_glp_lpx_read_model and _glp_lpx_write_mps; this is not a good idea,
because these symbols may disappear in further versions of the package.
Please use documented api routines glp_mpl_... and glp_write_mps

Best regards,

Andrew Makhorin

reply via email to

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