Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The LP Procedure

An MPS Format Conversion Example

If your model input is in MPS input format, you can convert it to the sparse input format of PROC LP using the SAS macro function SASMPSXS. For example, if your have an MPS file called MODEL.MPS and it is stored in the directory C:\OR on a PC, the following program can help you to convert the file and solve the problem.

   %sasmpsxs(mpsfile="c:\or\model.mps",lpdata=lp);

   data;
      set lp;
      retain i=1;
      if _type_="FREE" and i=1 then
         do;
           _type_="MIN";
           i=0;
         end;
   run;

   proc lp sparsedata;
   run;

In the MPS input format, all objective functions, price change rows, and free rows have the type N. The SASMPSXS macro marks them as FREE rows. After the conversion, you must run a DATA step to identify the objective rows and price change rows. In this example, assume that the problem is one of minimization and the first FREE row is an objective row.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.