[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] --wfreemps
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] --wfreemps |
Date: |
Tue, 18 Oct 2011 12:06:13 +0400 |
> the problem seems not to be writing of the mps file, but the reading.
>
> The integers are interpreted as binaries.
>
Correct. Glp_write_mps has a bug: it does not write 'PL' to the BOUNDS
section for integer non-negative (i.e. having no upper bound) variables,
so glp_read_mps reads such variables as binary.
Raniere, thank you for your report.
You can fix the bug by changing the fragment (file glpmps.c, lines
1341-1344):
bnds: /* write BOUNDS section */
for (j = P->n; j >= 1; j--)
if (!(P->col[j]->type == GLP_LO && P->col[j]->lb == 0.0))
break;
to the following one:
bnds: /* write BOUNDS section */
for (j = P->n; j >= 1; j--)
if (!(P->col[j]->kind == GLP_CV &&
P->col[j]->type == GLP_LO && P->col[j]->lb == 0.0))
break;
> -------- Original-Nachricht --------
> > Datum: Mon, 17 Oct 2011 23:37:48 -0200
> > Betreff: [Help-glpk] --wfreemps
>
> > Hi,
> > I trying to convert one problem on gmpl format to free mps format, both in
> > attached, and the solve it.
> > Unfortunately, when solve the mps file I get an answer different from the
> > answer that I get when solve using the gmpl file.
> >
> > I was using the following commands:
> > $ glpsol --math exemp01.mod
> > $ glpsol --math exemp01.mod --check --wfreemps exemp01.mps
> > $ glpsol --freemps exemp01.mps
> >
> >
> > Raniere Gaia Costa da Silva
>