Amadeus cookies policy - you'll see this message only once.

Amadeus use cookies on this website. They help us to know a little bit about you and how you use our website, which improves the browsing experience and marketing - both for you and for others. They are stored locally on your computer or mobile device. To accept cookies, continue browsing as normal. Or, go to the privacy policy for more information.

Using Proc OPTMODEL to Produce MPS Tables

MPS (Mathematical Programming System) tables are used to represent equations and constraints in the area of Operational Research. While MPS tables are an industry standard, they are not very user-friendly to create. It is possible to use Proc OPTMODEL to produce an MPS table from conventional constraints and an objective function. This MPS table can then be used in Proc OPTLP, Proc OPTMILP and other SAS/OR procedures.

The following example shows Proc OPTMODEL being used to solve a simple linear programming problem:

proc optmodel;
  *Setting up Variables;
  var x >= 0, y >= 0; 
  *Constraints;
  con con1: x + 5*y >= 20;
  con con2: 10*x + 15*y

This syntax will solve our problem, and find an optimal solution. However, we can alter the code and chose to create an MPS table instead of solving the problem using Proc OPTMODEL:

proc optmodel;
  *Setting up Variables;
  var x >= 0, y >= 0; 
  *Constraints;
  con con1: x + 5*y >= 20;
  con con2: 10*x + 15*y

This new code saves an MPS-style table called "lin_prog" in the Amadeus library. The MPS table created can be seen below:

                        The SAS System
Obs FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6
1 NAME lin_prog . . 2 ROWS . . 3 MAX f . . 4 G con1 . . 5 L con2 . . 6 COLUMNS . . 7 x f 13 con1 1 8 x con2 10 . 9 y f 18 con1 5 10 y con2 15 . 11 RHS . . 12 .RHS. con1 20 . 13 .RHS. con2 480 . 14 ENDATA . .

This table can then be used in SAS using Proc OPTLP, Proc OPTMILP and more. This means we can then take advantage of other procedure's capabilities, being mixed integer or non-linear optimization.

As can be seen, this method enables users to formulate a linear programming problem and convert the constraints into an MPS table with ease.