Translates an MPS file into an equivalent short generic GAMS program using a GDX file to store data. A number of solver specific extensions are recognized.
The MPS file is first attempted to be read in free format (no spaces in names). If it seems that row or column names have spaces but have at most 8 characters, parsing in fixed format is attempted. The MPS readers of the HiGHS solver are utilized. GAMS Data Exchange (GDX) files and matching GAMS source is written.
Notes:
- Row, column, SOS (special ordered sets), and cone names can have up to 63 characters and are tested for case sensitivity and uniqueness because these names become GAMS set members. If the test fails, the tool attempts to modify the names.
- MPS files may contain multiple N rows. The first one will be used as objective function and remaining ones will be ignored.
- If no optimization direction is given, minimization will be assumed.
- Variables in SOS and cones must be continuous.
- SOS must not overlap.
The MPS format has been extended in different forms by several solver vendors. Not all extensions are supported by MPS2GMS.
The following MPS sections are recognized by the free format parser:
- NAME
- OBJSENSE, MAX, MIN
- ROWS
- COLUMNS
- RHS
- BOUNDS
- RANGES
- QUADOBJ, QMATRIX
- QSECTION, QCMATRIX
- CSECTION with cone types QUAD and RQUAD
- SETS, SOS
- ENDATA
The fixed format parser also recognizes these sections except for QMATRIX, QSECTION, QCMATRIX, CSECTION, SETS, and SOS.
For a description of the MPS format, see also
Usage
mps2gms mpsfile [ gdxfile [ gmsfile ] ] { key=value }
If no GDX filename is given, the name of the MPS file is used, with .mps
extension replaced by .gdx
, or .gdx
appended. If no GMS filename is given, the name of the GDX file is used, with .gdx
extension replaced by .gms
, or .gms
appended.
Guide to parameters:
Key | Description |
---|---|
MPS | Name of MPS input file |
GDX | Name of GDX output file |
GMS | Name of GAMS program output file |
COLUMNINTVARSAREBINARY | Whether integer variables that appear first in COLUMNS section should be assumed to be binary variables.Possible values: 0, 1. Default: 0 Note that modern solvers assume binary variables, but for backward compatibility the default is set to the original IBM interpretation. |