The OPTQP Procedure |
Consider a small illustrative example. Suppose you want to minimize a two-variable quadratic function on the nonnegative quadrant, subject to two constraints:
The linear objective function coefficients, vector of right-hand sides, and lower and upper bounds are identified immediately as
Let us carefully construct the quadratic matrix . Observe that you can use symmetry to separate the main-diagonal and off-diagonal elements:
The first expression
Finally, the matrix of constraints is as follows:
The QPS-format SAS input data set for the preceding problem can be expressed in the following manner:
data gsdata; input field1 $ field2 $ field3$ field4 field5 $ field6 @; datalines; NAME . EXAMPLE . . . ROWS . . . . . N OBJ . . . . L R1 . . . . G R2 . . . . COLUMNS . . . . . . X1 R1 1.0 R2 1.0 . X1 OBJ 2.0 . . . X2 R1 -1.0 R2 2.0 . X2 OBJ 3.0 . . RHS . . . . . . RHS R1 1.0 . . . RHS R2 100 . . RANGES . . . . . BOUNDS . . . . . QUADOBJ . . . . . . X1 X1 2.0 . . . X1 X2 2.5 . . . X2 X2 20 . . ENDATA . . . . . ;
For more details about the QPS-format data set, see Chapter 14, "The MPS-Format SAS Data Set."
Alternatively, if you have a QPS-format flat file named gs.qps, then the following call to the SAS macro %MPS2SASD translates that file into a SAS data set, named gsdata:
%mps2sasd(mpsfile =gs.qps, outdata = gsdata);
Note: The SAS macro %MPS2SASD is provided in SAS/OR software. See the section "Converting an MPS/QPS-Format File: %MPS2SASD" for details.
You can use the following call to PROC OPTQP:
proc optqp data=gsdata primalout = gspout dualout = gsdout; run;
The procedure output is displayed in Figure 17.2.
The optimal primal solution is displayed in Figure 17.3.
The SAS log shown in Figure 17.4 provides information about the problem, convergence information after each iteration, and the optimal objective value.
|
See the section "Interior Point Algorithm: Overview" and the section "Iteration Log for the OPTQP Procedure" for more details about convergence information given by the iteration log.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.