The LP Procedure

An MPS Format to Sparse 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.


      set lp;
      retain i 1;
      if _type_="FREE" and i=1 then

   proc lp sparsedata;

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.