The Quadratic Programming Solver  Experimental 
Consider a small illustrative example. Suppose you want to minimize a twovariable quadratic function on the nonnegative quadrant, subject to two constraints:
To use the OPTMODEL procedure, it is not necessary to fit this problem into the general QP formulation mentioned in the section "Overview" and to compute the corresponding parameters. However, since these parameters are closely related to the QPSformat data set, which is used by the OPTQP procedure, we compute these parameters for illustrative purposes as follows. The linear objective function coefficients, vector of righthand 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 maindiagonal and offdiagonal elements:
The first expression
Finally, the matrix of constraints is as follows:
The following OPTMODEL program formulates the preceding problem in a manner that is very close to the mathematical specification of the given problem.
/* getting started */ proc optmodel; var x1 >= 0; /* declare nonnegative variable x1 */ var x2 >= 0; /* declare nonnegative variable x2 */ /* objective: quadratic function f(x1, x2) */ minimize f = /* the linear objective function coefficients */ 2 * x1 + 3 * x2 + /* quadratic <x, Qx> */ x1 * x1 + 2.5 * x1 * x2 + 10 * x2 * x2; /* subject to the following constraints */ con r1: x1  x2 <= 1; con r2: x1 + 2 * x2 >= 100; /* specify iterative interior point algorithm (QP) * in the SOLVE statement */ solve with qp; /* print the optimal solution */ print x1 x2; save qps qpsdata; quit;
The "with qp" clause in the SOLVE statement invokes the QP solver to solve the problem. The output is shown in Output 12.2.
In this example, the SAVE QPS statement is used to save the QP problem in the QPSformat data set qpsdata, shown in Output 12.3. The data set is consistent with the parameters of general quadratic programming previously computed. Also, the data set can be used as input to the OPTQP procedure.

Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.