Getting Started Example (optlp0)
/***************************************************************/
/* */
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: optlp0 */
/* TITLE: Getting Started Example (optlp0) */
/* PRODUCT: OR */
/* SYSTEM: ALL */
/* KEYS: OR */
/* PROCS: OPTLP */
/* DATA: */
/* */
/* SUPPORT: UPDATE: */
/* REF: */
/* MISC: Example from the Getting Started section of the */
/* OPTLP chapter of Mathematical Programming. */
/* */
/***************************************************************/
data example;
input field1 $ field2 $ field3 $ field4 field5 $ field6;
datalines;
NAME . EXAMPLE . . .
ROWS . . . . .
N COST . . . .
G R1 . . . .
L R2 . . . .
L R3 . . . .
COLUMNS . . . . .
. X1 COST 2 R2 1
. X1 R3 1 . .
. X2 COST -3 R1 -2
. X2 R2 1 R3 2
. X3 COST -4 R1 -3
. X3 R2 2 R3 3
RHS . . . . .
. RHS R1 -5 R2 4
. RHS R3 7 . .
ENDATA . . . . .
;
title1 'The OPTLP Procedure';
proc optlp data = example
objsense = min
presolver = automatic
algorithm = primal
primalout = expout
dualout = exdout;
run;
title2 'Primal Solution';
proc print data=expout label;
run;
title2 'Dual Solution';
proc print data=exdout label;
run;