MPS (format)

Uses your system voice; voice and rate in settings.

Snapshot

≈ 4 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

MPS (Mathematical Programming System) is a file format for presenting and archiving linear programming (LP) and mixed integer programming problems.

MPS (Mathematical Programming System) is a file format for presenting and archiving linear programming (LP) and mixed integer programming problems. LIM1: XONE + YTWO = 10 MYEQN: - YTWO + ZTHREE = 7 Bounds XONE = ) rows, and N for non-constraining rows. The order of the rows named in this section is unimportant, except for non-constraining rows marked N, the first of which would be interpreted as the objective function. The COLUMNS section contains the entries of the A-matrix. All entries for a given column must be placed consecutively, although within a column the order of the entries (rows) is irrelevant. Rows not mentioned for a column are implied to have a coefficient of zero. The RHS section allows one or more right-hand-side vectors to be defined; there is seldom more than one. In the above example, the name of the RHS vector is RHS1, and has non-zero values in all 3 of the constraint rows of the problem. Rows not mentioned in an RHS vector would be assumed to have a right-hand-side of zero. The optional RANGES specifies double-inequalities for the rows lower and upper bounds. The optional BOUNDS section specifies lower and upper bounds on individual variables. The first 2-3 columns specify the bound type. Some of the common bounds are UP, LO, FX, FR, MI and PI. Where a bound of type UP means an upper bound is applied to the variable. A bound of type LO means a lower bound is applied. A bound type of FX ("fixed") means that the variable has upper and lower bounds equal to a single value. A bound type of FR ("free") means the variable has neither lower nor upper bounds and so can take on negative values. A variation on that is MI for free negative, giving an upper bound of 0 but no lower bound. 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. Such as BV for binary, being 0 or 1. UI for upper integer and LI for lower integer. SC stands for semi-continuous and indicates that the variable may be zero, but if not must be equal to at least the value given. Variables not mentioned in a given BOUNDS set are taken to be non-negative (lower bound zero, no upper bound). Next the row label is in columns 5-12 followed by the column label in columns 14–22. With the value of the bound in columns 25–36. A few special cases of the MPS standard are not consistently handled by implementations. In the BOUNDS section, if a variable is given a nonpositive upper bound but no lower bound, its lower bound may default to zero or to minus infinity (also, if the upper bound is given as zero, the lower bound might be zero or negative infinity). If an integer variable has no upper bound specified, its upper bound may default to one rather than to plus infinity. Alternatively, some mps solvers allow other categories to enhance the functionality. such as Integrality markers to mark integer variables with keywords 'MARKER' 'INTORG', 'Marker' 'INTEND' or another section such as INTEGER. With many other custom categories for different solvers. The ENDATA section signifies the end of the LP problem. This must be there

Extensions

Many LP products include extensions to the MPS 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). Some extensions include adding new kind of data to the MPS file (e.g. sections to include objective sense, integrality requirements, quadratic data or advanced MIP modelling constructs). There is also a compressed MPSC file format. SMPS is a specialized extension, designed to represent stochastic programming problem instances, in use especially in research environments. Although some extensions are not standardized, the format is still in general use.

Text derived from https://en.wikipedia.org/w/index.php?oldid=1362298640 under CC BY-SA 4.0; modifications have been made.

Sources cited in this revision

Extracted from the cited revision's reference blocks; absent citations are not invented.