MPS (format)

Other software may require a customized reader routine in order to read MPS files.

MPS is an old format, so it is set up for punch cards: Fields start in column 2, 5, 15, 25, 40 and 50.

Sections of an MPS file are marked by so-called header cards, which are distinguished by their starting in column 1.

Here is a little sample model written in MPS format (explained in more detail below): For comparison, here is the same model written out in an equation-oriented format: As mentioned below, the lower bound on XONE is either zero or -infinity, depending upon implementation, because it is not specified.

Strangely, nothing in MPS format specifies the direction of optimization, and there is no standard "default" direction; some LP solvers will maximize if not instructed otherwise, others will minimize,[2] and still others put safety first and have no default and require a selection somewhere in a control program or by a calling parameter.

If the model is formulated for minimization and the solver requires maximization (or vice versa), it is easy to convert between the two by negating all coefficients of the objective function.

Bound type PL is for a free positive from zero to plus infinity, but as this is the normal default, it is seldom used.

Additionally, in some modifications of the mps file format there exists bound types for use in MIP models.

The representation is neither easy for human interpretation nor compact (although reserves column / row order information, which is often beneficial for LP solver behaviour reproducibility).

One of the alternatives to MPS that does not have its limitations and is supported by most solvers is the nl file format.

The free format MPS allows for long names and more accurate data by allowing fields to exceed the columns defined by the original standard, and apply whitespaces as separators instead of fixed column positions (note that this makes some MPS files that included whitespaces as part of names to be no longer valid).

[6] SMPS[7] is a specialized extension, designed to represent stochastic programming problem instances, in use especially in research environments.

NEOS input statistics for January 2011.