bug-glpk
[Top][All Lists]
Advanced

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

[Bug-glpk] two issues


From: Brady Hunsaker
Subject: [Bug-glpk] two issues
Date: Sun, 12 Jan 2003 16:48:38 -0500
User-agent: Mutt/1.3.22i

Hi Andrew,

Two issues that recently came up.

The first was brought to my attention by JP Fasano of the COIN
project.  When reading an MPS file, a constant in the objective is
specified by a RHS entry for the objective.  Apparently the MPS
convention is that the value has the opposite sign as other objective 
coefficients since it is on the "RHS".  GLPK incorrectly treats the
constant as the same sign.  In version 3.2.3, I believe this can be
corrected on line 176 of glplpx8a.c:
                  if (cqe->ind == obj) lpx_set_obj_c0(lp, cqe->val);
should be
                  if (cqe->ind == obj) lpx_set_obj_c0(lp, -cqe->val);

For writing MPS files, I believe line 517 should be changed
                  rhs = (make_obj && i == 0 ? obj[0] : 0.0); break;
should be
                  rhs = (make_obj && i == 0 ? -obj[0] : 0.0); break;

JP originally noticed this when doing routine tests on the netlib
instance e226.

Brady





reply via email to

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