The INTPOINT Procedure |
This example demonstrates the use of the MPSOUT= option to convert a problem data set in PROC INTPOINT input format into an MPS-format SAS data set for use with the OPTLP procedure.
Suppose you want to solve a linear program with the following formulation:
You can save the LP in dense format by using the following DATA step:
data exdata; input x1 x2 x3 _type_ $ _rhs_; datalines; 2 -3 -4 min . . -2 -3 >= -5 1 1 2 <= 6 1 2 3 >= 7 10 15 20 upperbd . ;
If you decide to solve the problem by using the OPTLP procedure, you need to convert the data set exdata from dense format to MPS format. You can accomplish this by using the following statements:
proc intpoint condata=exdata mpsout=mpsdata bytes=100000; run;
The MPS-format SAS data set mpsdata is shown in Output 2.7.1.
Output 2.7.1: Data Set mpsdataThe constraint names _OBS2_, _OBS3_, and _OBS4_ are generated by the INTPOINT procedure. If you want to provide your own constraint names, use the ROW list variable in the CONOUT= data set. If you specify the problem data in sparse format instead of dense format, the MPSOUT= option produces the same MPS-format SAS data set shown in the preceding output.
Now that the problem data is in MPS format, you can solve the problem by using the OPTLP procedure. For more information, see Chapter 15, "The OPTLP Procedure."
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.