bug-glpk
[Top][All Lists]
Advanced

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

[Bug-glpk] Re: Variables erroneously read as binary?


From: Andrew Makhorin
Subject: [Bug-glpk] Re: Variables erroneously read as binary?
Date: Sat, 9 Jan 2010 14:00:10 +0300

> After an upgrade to Fedora 12 (which ships GLPK 4.40) the attached
> MPS is interpreted as having all binary variables:

Thank you for your report.

In glpk 4.29 the mps file reading/writing routines were changed to
conform to the IBM OSL conventions. The IBM OSL documentation says:

   "For non-integer variables, the default bounds on columns are
   0 and +inf. For integer variables, the default bounds on columns
   are 0 and 1."

Since in your mps file integer columns x1 and x2 are not listed in the
BOUNDS section, they are considered as binary.

To specify that x1 and x2 are integer non-negative variables, you should
include them in the BOUNDS section as follows:

NAME          from_lp_file
ROWS
 N  r_000000
 L  C1
 L  r_000002
COLUMNS
    MARK0000  'MARKER'                 'INTORG'
    x1        r_000000  1
    x1        C1        2
    x1        r_000002  -4
    x2        r_000000  -2
    x2        C1        1
    x2        r_000002  4
    MARK0001  'MARKER'                 'INTEND'
RHS
    RHS       C1        5
    RHS       r_000002  5
BOUNDS
 PL FOO       x1
 PL FOO       x2
ENDATA





reply via email to

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