MPS (format)

MPS (format)

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

Overview

The format was named after an early IBM LP product and has emerged as a de facto standard ASCII medium among most of the commercial LP codes. Essentially all commercial LP codes accept this format, and it is also accepted by the open-source COIN-OR system. Other public domain software may require a customized reader routine in order to read MPS files, but such routines are not hard to write. See also the comment regarding the lp_solve code, in another section of this article, for the availability of an MPS reader.

MPS is column-oriented (as opposed to entering the model as equations), and all model components (variables, rows, etc.) receive names. The MIPLIB site provides a concise summary of MPS format, and a more detailed description is given in [Murtagh] .

MPS is an old format, so it is set up for punch cards, and is not free format. Fields start in column 1, 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. Although it is typical to use upper-case throughout the file for historical reasons, many MPS-readers will accept mixed-case for anything except the header cards, and some allow mixed-case anywhere. The names that you choose for the individual entities (constraints or variables) are not important to the solver; one should pick meaningful names, or easy names for a post-processing code to read.

MPS format

Here is a little sample model written in MPS format (explained in more detail below):

NAME TESTPROB ROWS N COST L LIM1 G LIM2 E MYEQN COLUMNS XONE COST 1 LIM1 1 XONE LIM2 1 YTWO COST 4 LIM1 1 YTWO MYEQN -1 ZTHREE COST 9 LIM2 1 ZTHREE MYEQN 1 RHS RHS1 LIM1 5 LIM2 10 RHS1 MYEQN 7 BOUNDS UP BND1 XONE 4 LO BND1 YTWO -1 UP BND1 YTWO 1 ENDATA

For comparison, here is the same model written out in an equation-oriented format:

Optimize COST: XONE + 4*YTWO + 9*ZTHREE Subject To LIM1: XONE + YTWO <= 5 LIM2: XONE + ZTHREE >= 10 MYEQN: - YTWO + ZTHREE = 7 Bounds XONE <= 4 -1 <= YTWO <= 1 End

Strangely, nothing in MPS format specifies the direction of optimization, and there is no standard "default" direction; some LP codes will maximize if not instructed otherwise, others will minimize, 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 code requires maximization (or vice versa), it is easy to convert between the two by negating all coefficients. The optimal value of the objective function will then be the negative of the original optimal value, but the values of the variables themselves will be correct.

Variables

The NAME record can have any value, starting in column 15. The ROWS section defines the names of all the constraints; entries in column 2 or 3 are E for equality rows, L for less-than ( <= ) rows, G for greater-than ( >= ) rows, and N for non-constraining rows (the first of which would be interpreted as the objective function). The order of the rows named in this section is unimportant.

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 BOUNDS section specifies lower and upper bounds on individual variables, if they are not given by rows in the matrix. All the bounds that have a given name in column 5 are taken together as a set. Variables not mentioned in a given BOUNDS set are taken to be non-negative (lower bound zero, no upper bound). 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.

Another optional section called RANGES specifies double-inequalities, in a somewhat counterintuitive way not described here. Ways to mark integer variables are also beyond the scope of this article. The final card must be ENDATA.

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 inifinity. If an integer variable has no upper bound specified, its upper bound may default to one rather than to plus infinity.

ee also

* [http://lpsolve.sourceforge.net/5.5/mps-format.htm MPS file format] - a description of the format by the authors of [http://sourceforge.net/projects/lpsolve lp_solve]
* [http://www.aimms.com/aimms/index.cgi?dm=wikipedia AIMMS, the modeling system]
* AMPL
* GAMS
* Pocket Streets - MPS is also the extension for files in Microsoft's Pocket Streets software

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • MPS — may refer to: Robinson List, aka Mail Preference Service, direct mail opt out system Malmin Palloseura, association football club from Helsinki, Finland. Marginal propensity to save Master Production Schedule Ministry of Public Security of the… …   Wikipedia

  • MPS — Cette page d’homonymie répertorie les différents sujets et articles partageant un même nom.   Sigles d’une seule lettre   Sigles de deux lettres > Sigles de trois lettres   Sigles de quatre lettres …   Wikipédia en Français

  • MPs elected in the Ghana parliamentary election, 2004 — Changes*Alhassan Wayo Seini, MP for Tamale Central, left the NDC to join the NPP. He also resigned his seat in parliament. *Dan Abodakpi, MP for Keta constituency, who was also Minister for Trade and Industry in the NDC Rawlings government, was… …   Wikipedia

  • Top Gear (original format) — Top Gear (in its original 30 minute format) was a car based BBC television series produced by BBC Birmingham, broadcast from 1977 to 2001. It consisted of 30 minute magazine format programmes presented by a number of people, including Angela… …   Wikipedia

  • CUTEr — A Constrained and Unconstrained Testing Environment, revisited = CUTEr [2] is an [http://www.opensource.org open source] testing environment for optimization and linear algebra solvers which provides a collection of test problems along with a set …   Wikipedia

  • COIN-OR — –Infobox Organization name = COIN OR image border = size = 80x80 caption = formation = 2000 type = headquarters = location = membership = language = leader title = leader name = key people = num staff = budget = website = http://www.coin… …   Wikipedia

  • Live in Bayern — Livealbum von Volker Kriegel Mild Maniac Orchestra Veröffentlichung Mai 1981 Label Musik Pr …   Deutsch Wikipedia

  • List of mathematics articles (M) — NOTOC M M estimator M group M matrix M separation M set M. C. Escher s legacy M. Riesz extension theorem M/M/1 model Maass wave form Mac Lane s planarity criterion Macaulay brackets Macbeath surface MacCormack method Macdonald polynomial Machin… …   Wikipedia

  • MINTO — is an integer programming solver which uses branch and bound algorithm. It stands for Mixed Integer Optimizer . MINTO is a software system that solves mixed integer programming problem by a branch and bound algorithm with linear programming… …   Wikipedia

  • Liberal Party of Canada leadership convention, 2006 — Canadian politics/leadership race party = Liberal year = 2006 date = December 2 December 3 2006 location = Montreal, Quebec winner = Stéphane Dion replaces = Paul Martin numcands = 8 ballots= 4 entryfee = C$50,000 requirement = signatures of at… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”