Solving an LP Problem with Data in MPS Format (int6)
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: int6 */
/* TITLE: Solving an LP Problem with Data in MPS Format (int6)*/
/* PRODUCT: OR */
/* SYSTEM: ALL */
/* KEYS: OR */
/* PROCS: INTPOINT, LP, SORT */
/* DATA: */
/* */
/* SUPPORT: UPDATE: */
/* REF: */
/* MISC: Example 6 from INTPOINT chapter of Mathematical */
/* Programming Legacy Procedures. */
/* */
/****************************************************************/
/* NOTE: Will not run without specifying an MPS format file in the
filename statement */
filename w '/your-directory/your-filename.dat';
data raw;
infile w lrecl=80 pad;
input field1 $ 2-3 field2 $ 5-12 field3 $ 15-22
field4 25-36 field5 $ 40-47 field6 50-61;
run;
%sasmpsxs;
data lp;
set;
if _type_="FREE" then _type_="MIN";
if lag(_type_)="*HS" then _type_="RHS";
run;
proc sort data=lp;
by _col_;
run;
proc intpoint
arcdata=lp
condata=lp sparsecondata rhsobs=rhs grouped=condata
conout=solutn /* SAS data set for the optimal solution */
bytes=20000000
nnas=1700 ncoefs=4000 ncons=700
printlevel2=2 memrep;
run;
proc lp
data=lp sparsedata
endpause time=3600 maxit1=100000 maxit2=100000;
run;
show status;
quit;