CVSROOT: /cvs/ppl
Module name: ppl
Changes by: cimino(a)cs.unipr.it 2007-09-01 13:06:48
Modified files:
. : configure.ac
Log message:
The Java interface was unconditionally built even if
not requested by the user with the `--enable-interface'
option: fixed.
Patches:
http://www.cs.unipr.it/cgi-bin/cvsweb.cgi/ppl/configure.ac.diff?cvsroot=ppl…
-------- Original Message --------
Subject: Re: [Bug-glpk] Bug in glpk 4.21?
Date: Sat, 1 Sep 2007 01:54:28 +0400
From: Andrew Makhorin <mao(a)gnu.org>
Reply-To: Andrew Makhorin <mao(a)gnu.org>
To: Roberto Bagnara <bagnara(a)cs.unipr.it>
CC: bug-glpk(a)gnu.org
References: <10376349.20070831204809(a)gnu.org>
> 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
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara@cs.unipr.it
-------- Original Message --------
Subject: Re: [Bug-glpk] Bug in glpk 4.21?
Date: Sat, 1 Sep 2007 00:12:19 +0400
From: Andrew Makhorin <mao(a)gnu.org>
Reply-To: Andrew Makhorin <mao(a)gnu.org>
To: Roberto Bagnara <bagnara(a)cs.unipr.it>
CC: bug-glpk(a)gnu.org
References: <10376349.20070831204809(a)gnu.org>
> 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?
Thank you very much for your bug report.
The bug appears only in 4.21 in the mip preprocessor (which is part
of the routine glp_intopt).
To fix the bug please replace the fragment in the routine
ios_preprocess_node (file src/glpios02.c) between #if 0 and #else
by the corresponding fragment between #else and #endif as follows:
/* determine original row bounds */
L = xcalloc(1+m, sizeof(double));
U = xcalloc(1+m, sizeof(double));
#if 0
switch (mip->mip_stat)
{ case GLP_UNDEF:
L[0] = -DBL_MAX, U[0] = +DBL_MAX;
break;
case GLP_FEAS:
switch (mip->dir)
{ case GLP_MIN:
L[0] = -DBL_MAX, U[0] = mip->mip_obj;
break;
case GLP_MAX:
L[0] = mip->mip_obj, U[0] = +DBL_MAX;
break;
default:
xassert(mip != mip);
}
break;
default:
xassert(mip != mip);
}
#else
L[0] = -DBL_MAX, U[0] = +DBL_MAX;
#endif
for (i = 1; i <= m; i++)
{ L[i] = glp_get_row_lb(mip, i);
U[i] = glp_get_row_ub(mip, i);
}
/* determine original column bounds */
and then compile the package as usual.
Andrew Makhorin
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara@cs.unipr.it