QPROG/DQPROG (Single/Double precision)
Solve a quadratic programming problem subject to linear equality/inequality
constraints.
Usage
CALL QPROG (NVAR, NCON, NEQ, A, LDAi,B, G, H, LDH, DIAG,
SOL, NACT, IACT, ALAMDA)
Arguments
NVAR ― The numbcr ef variables. (Input)
NCON ― Thc number of linear constraints. (Input)
NEQ ― The number of linear equality constraints. (Input)
A ― NCON by NVAR matrix. (Input)
The matrix contains the equality contraints in thc first NEQ rows
followed by the inequality constraints.
LDA ― Leading dimension of A exactly as specified in the dimension statement
of the calling program. (Input)
B ― Vector of length NCON containing right-hand sides of the linear
constraints . (Input)
G ― Vector of length NVAR containing the coefficients of the linear term of the
objective function. (Input)
H ― NVAR by NVAR matrix containing the Hessian matrix of thc objective
function. (Input)
H should be symmetric positive definite; if H is not positive definite, the
algorithm attempts to solve the QP problem with H replaced by a H + DIAG * I
such that H + DIAG * I is positive definite. See Comment 3.
LDH ― Leading dimension of H exactly as specified in the dimension statement
of the calling program. (Input)
DIAG ― Scalar equal to thc multiple of the identity matrix added to H to give a
positive definite matrix. (Output)
SOL ― Vector of length NVAR containing solution. (Output)
NACT ― Final number of active constraints. (Output)
LACT ― Vector of length NVAR oontaining thc indices of the final active
constraints in the first NACT positions. (Output)
ALAMDA ― Vector of length NVAR containing the Lagrange multiplier
estimatcs of the final active constraints in tbe first NACT positions. (Output)
Comments
1. Automatic workspace usage is
QPROG (3 * NVAR ** 2 + 11 * NVAR)/2 + NCON units, or
DQPROG (3 * NVAR ** + 2 + 11 * NVAR) + 2 *NCON units.
Workspacc may be explicitly provided, if desired, by use of
Q2ROG/DQ2ROG. Thc reference is
CALL Q2ROG (NVAR, NCON, NEQ, A, LDA, B, G, H, LDH,
DIAG, SOL, NACT, IACT, ALAMDA, WK)
Thc additional argument is
WK ― Work vector of length(3 * NVAR**2 + 11 * NVAR)/2 + NCON.
2. Informational errors
Type Code
3 1 Due to the effect of computer rounding error, a
cbange in the variables fail to improvc the objective
function value ; usually the solution is close to
optimum.
4 2 The system of equations is inconsistent. There is no
solution.
3. If a perturbation of H, H + DIAG * I, was used in the QP problem, then
H + DIAG * I should also be used in the definition of the Lagrange
multipliers.
[IMSLマニュアルより]