QPSolve.mesa
Copyright Ó 1990, 1992 by Xerox Corporation. All rights reserved.
Ken Shoemake, March 30, 1990 5:49 pm PST
DIRECTORY
;
QPSolve: CEDAR DEFINITIONS
~ BEGIN
Data Structures
IVector: TYPE ~ REF IVectorRep;
IVectorRep: TYPE ~ RECORD[n: NAT, s: SEQUENCE len: NAT OF INT];
RVector: TYPE ~ REF RVectorRep;
RVectorRep: TYPE ~ RECORD [n: NAT, s: SEQUENCE len: NAT OF REAL];
Matrix: TYPE ~ REF MatrixRep;
MatrixRep: TYPE ~ RECORD [m: NAT, s: SEQUENCE len: NAT OF RVector];
Procedures
NewMatrix: PROC [m, n: NAT] RETURNS [M: Matrix];
QPSolve: PROC [c: RVector, A: Matrix, lobd: RVector, x: RVector, iVar: IVector, nFR: NAT]
RETURNS [minFR: NAT]
Solve simple Quadratic Program: minimize ý xTx + cTx, subject to Ax = 0 and x e lobd.
Iterations start with initial feasible vector x, with x[i  iFX] fixed on their bounds and the rest, x[i  iFR], free. Elements [0..nFR) of iVar store iFR, and [nFR..n) store iFX.
END..