[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-glpk] Bug in glpk 4.21?
From: |
Andrew Makhorin |
Subject: |
Re: [Bug-glpk] Bug in glpk 4.21? |
Date: |
Sat, 1 Sep 2007 01:54:28 +0400 |
> For the attached testcase, we obtain that
> $ glpsol p0033.mps --max -o output.gomory --gomory
> gives an optimum of 5201, while
> $ glpsol p0033.mps --max -o output.intopt --intopt
> gives an optimum of 5131. The optimum 5201 is confirmed
> by a completely different MIP solver.
> Does this behavior indicate there is a bug somewhere?
The bug appears if the constant term of the objective is non-zero
either originally or due to fixing some columns at non-zero value by
the mip preprocessor.
In my previous post I just commented out the corresponding fragment
leading to wrong results.
To fix the bug in a correct way please replace lines 748 and 751
(the routine ios_preprocess_node, file src/glpios02.c):
748: L[0] = -DBL_MAX, U[0] = mip->mip_obj;
751: L[0] = mip->mip_obj, U[0] = +DBL_MAX;
by the following ones:
748: L[0] = -DBL_MAX, U[0] = mip->mip_obj - mip->c0;
751: L[0] = mip->mip_obj - mip->c0, U[0] = +DBL_MAX;
Please note that these changes will appear in the next version of
the package.
Andrew Makhorin