Language Reference

NLPQUA Call

CALL NLPQUA (rc, xr, quad, x0 <, opt> <, blc> <, tc> <, par> <, "ptit"> <, lin> ) ;

This subroutine is supported only by the IML procedure.

The NLPQUA subroutine computes an optimum value of a quadratic objective function.

See the section Nonlinear Optimization and Related Subroutines for a listing of all NLP subroutines. See Chapter 16 for a description of the arguments of NLP subroutines.

The NLPQUA subroutine uses a fast algorithm for maximizing or minimizing the quadratic objective function

one-half x Superscript upper T Baseline bold upper G x plus g Superscript upper T Baseline x plus c

subject to boundary constraints and general linear equality and inequality constraints. The algorithm is memory-consuming for problems with general linear constraints.

The matrix bold upper G must be symmetric but not necessarily positive definite (or negative definite for maximization problems). The constant term c affects only the value of the objective function, not its derivatives or the optimal point x Superscript asterisk.

The algorithm is an active-set method in which the update of active boundary and linear constraints is done separately. The upper Q upper T decomposition of the matrix upper A Subscript k of active linear constraints is updated iteratively (Gill et al. 1984). If n Subscript f is the number of free parameters (that is, n minus the number of active boundary constraints) and n Subscript a is the number of active linear constraints, then bold upper Q is an n Subscript f Baseline times n Subscript f orthogonal matrix that contains null space Z in its first n Subscript f Baseline minus n Subscript a columns and range space Y in its last n Subscript a columns. The matrix bold upper T is an n Subscript a Baseline times n Subscript a triangular matrix of the form t Subscript i j Baseline equals 0 for i less-than n minus j. The Cholesky factor of the projected Hessian matrix upper Z Subscript k Superscript upper T Baseline bold upper G upper Z Subscript k is updated simultaneously with the upper Q upper T decomposition when the active set changes.

The objective function is specified by the input arguments quad and lin, as follows:

  • The quad argument specifies the symmetric n times n Hessian matrix, bold upper G, of the quadratic term. The input can be in dense or sparse form. In dense form, all n squared entries of the quad matrix must be specified. If n less-than-or-equal-to 3, the dense specification must be used. The sparse specification can be useful when bold upper G has many zero elements. You can specify an n n times 3 matrix in which each row represents one of the n n nonzero elements of bold upper G. The first column specifies the row location in bold upper G, the second column specifies the column location, and the third column specifies the value of the nonzero element.

  • The lin argument specifies the linear part of the quadratic optimization problem. It must be a vector of length n or n plus 1. If lin is a vector of length n, it specifies the vector g of the linear term, and the constant term c is considered zero. If lin is a vector of length n plus 1, then the first n elements of the argument specify the vector g and the last element specifies the constant term c of the objective function.

As in the other optimization subroutines, you can use the blc argument to specify boundary and general linear constraints, and you must provide a starting point x0 to determine the number of parameters. If x0 is not feasible, a feasible initial point is computed by linear programming, and the elements of x0 can be missing values.

Assuming nonnegativity constraints x greater-than-or-equal-to 0, the quadratic optimization problem is solved with the LCP call, which solves the linear complementarity problem.

Choosing a sparse (or dense) input form of the quad argument does not mean that the algorithm used in the NLPQUA subroutine is necessarily sparse (or dense). If the following conditions are satisfied, the NLPQUA algorithm stores and processes the matrix bold upper G as sparse:

  • No general linear constraints are specified.

  • The memory needed for the sparse storage of bold upper G is less than 80% of the memory needed for dense storage.

  • bold upper G is not a diagonal matrix. If bold upper G is diagonal, it is stored and processed as a diagonal matrix.

The sparse NLPQUA algorithm uses a modified form of minimum degree Cholesky factorization (George and Liu 1981).

In addition to the standard iteration history, the NLPNRA subroutine prints the following information:

  • The heading alpha is the step size, alpha, computed with the line-search algorithm.

  • The heading slope refers to g Superscript upper T Baseline s, the slope of the search direction at the current parameter iterate x Superscript left-parenthesis k right-parenthesis. For minimization, this value should be significantly smaller than zero. Otherwise, the line-search algorithm has difficulty reducing the function value sufficiently.

The Betts problem (see the section Constrained Betts Function) can be expressed as a quadratic problem in the following way:

x equals StartBinomialOrMatrix x 1 Choose x 2 EndBinomialOrMatrix comma upper G equals Start 2 By 2 Matrix 1st Row 1st Column 0.02 2nd Column 0 2nd Row 1st Column 0 2nd Column 2 EndMatrix comma g equals StartBinomialOrMatrix 0 Choose 0 EndBinomialOrMatrix comma c equals negative 100

Then

one-half x Superscript upper T Baseline upper G x minus g Superscript upper T Baseline x plus c equals 0.5 left-bracket 0.02 x 1 squared plus 2 x 2 squared right-bracket minus 100 equals 0.01 x 1 squared plus x 2 squared minus 100

The following statements use the NLPQUA subroutine to solve the Betts problem:

lin  = { 0. 0. -100};
quad = {  0.02   0.0 ,
          0.0    2.0 };
con  = {  2. -50.  .   .,
         50.  50.  .   .,
         10.  -1. 1. 10.};
x = { -1. -1.};
opt = {0 2};
call nlpqua(rc, xres, quad, x, opt, con, , , , lin);

The quad argument specifies the bold upper G matrix, and the lin argument specifies the g vector with the value of c appended as the last element. The matrix con specifies the boundary constraints and the general linear constraint.

The iteration history follows.

Figure 280: Quadratic Optimization


Note:Initial point was changed to be feasible for boundary and linear constraints.

Optimization Start
Parameter Estimates
NParameterEstimateGradient
Objective
Function
Lower
Bound
Constraint
Upper
Bound
Constraint
1X16.8000000.1360002.00000050.000000
2X2-1.000000-2.000000-50.00000050.000000


Value of Objective Function = -98.5376

Linear Constraints
159.00000: 10.0000<=+10.0000*X1-1.0000*X2


Null Space Method of Quadratic Problem

Parameter Estimates2
Lower Bounds2
Upper Bounds2
Linear Constraints1
Using Sparse Hessian_

Optimization Start
Active Constraints0Objective Function-98.5376
Max Abs Gradient Element2  

Iteration RestartsFunction
Calls
Active
Constraints
 Objective
Function
Objective
Function
Change
Max Abs
Gradient
Element
Step
Size
Slope of
Search
Direction
1 021 -99.873491.33590.58820.706-2.925
2 031 -99.960000.08651.11E-161.000-0.173

Optimization Results
Iterations2Function Calls4
Gradient Calls3Active Constraints1
Objective Function-99.96Max Abs Gradient Element1.110223E-16
Slope of Search Direction-0.173010381  

ABSGCONV convergence criterion satisfied.

Optimization Results
Parameter Estimates
NParameterEstimateGradient
Objective
Function
Active
Bound
Constraint
1X12.0000000.040000Lower BC
2X2-5.55112E-17-1.11022E-16 


Value of Objective Function = -99.96

Linear Constraints Evaluated at Solution
1 10.00000=-10.0000+10.0000*X1-1.0000*X2


Last updated: May 07, 2026