hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_opt_qpconvex1_sparse_solve (e04nk)

Purpose

nag_opt_qpconvex1_sparse_solve (e04nk) solves sparse linear programming or quadratic programming problems.

Syntax

[ns, xs, istate, miniz, minz, ninf, sinf, obj, clamda, user, lwsav, iwsav, rwsav, ifail] = e04nk(n, m, iobj, ncolh, qphx, a, ha, ka, bl, bu, start, names, crname, ns, xs, istate, leniz, lenz, lwsav, iwsav, rwsav, 'nnz', nnz, 'nname', nname, 'user', user)
[ns, xs, istate, miniz, minz, ninf, sinf, obj, clamda, user, lwsav, iwsav, rwsav, ifail] = nag_opt_qpconvex1_sparse_solve(n, m, iobj, ncolh, qphx, a, ha, ka, bl, bu, start, names, crname, ns, xs, istate, leniz, lenz, lwsav, iwsav, rwsav, 'nnz', nnz, 'nname', nname, 'user', user)
Before calling nag_opt_qpconvex1_sparse_solve (e04nk), or the option setting function (e04nm), nag_opt_init (e04wb) must be called.

Description

nag_opt_qpconvex1_sparse_solve (e04nk) is designed to solve a class of quadratic programming problems that are assumed to be stated in the following general form:
minimize f(x)  subject to  l{
x
Ax
}
u,
xRn
minimize xRn f(x)   subject to   l { x Ax } u,
(1)
where xx is a set of variables, AA is an mm by nn matrix and the objective function f(x)f(x) may be specified in a variety of ways depending upon the particular problem to be solved. The optional parameter Maximize may be used to specify an alternative problem in which f(x)f(x) is maximized. The possible forms for f(x)f(x) are listed in Table 1, in which the prefixes FP, LP and QP stand for ‘feasible point’, ‘linear programming’ and ‘quadratic programming’ respectively, cc is an nn-element vector and HH is the nn by nn second-derivative matrix 2f(x)2f(x) (the Hessian matrix).
Problem type Objective function f(x)f(x) Hessian matrix HH
FP Not applicable Not applicable
LP cTxcTx Not applicable
QP cTx + (1/2)xTHxcTx+12xTHx Symmetric positive semidefinite
Table 1
For LP and QP problems, the unique global minimum value of f(x)f(x) is found. For FP problems, f(x)f(x) is omitted and the function attempts to find a feasible point for the set of constraints. For QP problems, you must also provide a function that computes HxHx for any given vector xx. (HH need not be stored explicitly.) If HH is the zero matrix, the function will still solve the resulting LP problem; however, this can be accomplished more efficiently by setting ncolh = 0ncolh=0 (see Section [Parameters]).
The defining feature of a convex QP problem is that the matrix HH must be positive semidefinite, i.e., it must satisfy xTHx0xTHx0 for all xx. Otherwise, f(x)f(x) is said to be nonconvex and it may be more appropriate to call nag_opt_nlp1_sparse_solve (e04ug) instead.
nag_opt_qpconvex1_sparse_solve (e04nk) is intended to solve large-scale linear and quadratic programming problems in which the constraint matrix AA is sparse (i.e., when the number of zero elements is sufficiently large that it is worthwhile using algorithms which avoid computations and storage involving zero elements). The function also takes advantage of sparsity in cc. (Sparsity in HH can be exploited in the function that computes HxHx.) For problems in which AA can be treated as a dense matrix, it is usually more efficient to use nag_opt_lp_solve (e04mf), nag_opt_lsq_lincon_solve (e04nc) or nag_opt_qp_dense_solve (e04nf).
The upper and lower bounds on the mm elements of AxAx are said to define the general constraints of the problem. Internally, nag_opt_qpconvex1_sparse_solve (e04nk) converts the general constraints to equalities by introducing a set of slack variables ss, where s = (s1,s2,,sm)Ts=(s1,s2,,sm)T. For example, the linear constraint 52x1 + 3x2 + 52x1+3x2+ is replaced by 2x1 + 3x2s1 = 02x1+3x2-s1=0, together with the bounded slack 5s1 + 5s1+. The problem defined by (1) can therefore be re-written in the following equivalent form:
minimize f(x)  subject to  Axs = 0,  l{
x
s
}
u.
xRn,sRm
minimizexRn,sRm f(x)   subject to   Ax-s=0,  l{ x s } u.
Since the slack variables ss are subject to the same upper and lower bounds as the elements of AxAx, the bounds on AxAx and xx can simply be thought of as bounds on the combined vector (x,s)(x,s). (In order to indicate their special role in QP problems, the original variables xx are sometimes known as ‘column variables’, and the slack variables ss are known as ‘row variables’.)
Each LP or QP problem is solved using an active-set method. This is an iterative procedure with two phases: a feasibility phase, in which the sum of infeasibilities is minimized to find a feasible point; and an optimality phase, in which f(x)f(x) is minimized by constructing a sequence of iterations that lies within the feasible region.
A constraint is said to be active or binding at xx if the associated element of either xx or AxAx is equal to one of its upper or lower bounds. Since an active constraint in AxAx has its associated slack variable at a bound, the status of both simple and general upper and lower bounds can be conveniently described in terms of the status of the variables (x,s)(x,s). A variable is said to be nonbasic if it is temporarily fixed at its upper or lower bound. It follows that regarding a general constraint as being active is equivalent to thinking of its associated slack as being nonbasic.
At each iteration of an active-set method, the constraints Axs = 0Ax-s=0 are (conceptually) partitioned into the form
BxB + SxS + NxN = 0,
BxB+SxS+NxN=0,
where xNxN consists of the nonbasic elements of (x,s)(x,s) and the basis matrix BB is square and nonsingular. The elements of xBxB and xSxS are called the basic and superbasic variables respectively; with xNxN they are a permutation of the elements of xx and ss. At a QP solution, the basic and superbasic variables will lie somewhere between their upper or lower bounds, while the nonbasic variables will be equal to one of their bounds. At each iteration, xSxS is regarded as a set of independent variables that are free to move in any desired direction, namely one that will improve the value of the objective function (or sum of infeasibilities). The basic variables are then adjusted in order to ensure that (x,s)(x,s) continues to satisfy Axs = 0Ax-s=0. The number of superbasic variables (nSnS say) therefore indicates the number of degrees of freedom remaining after the constraints have been satisfied. In broad terms, nSnS is a measure of how nonlinear the problem is. In particular, nSnS will always be zero for FP and LP problems.
If it appears that no improvement can be made with the current definition of BB, SS and NN, a nonbasic variable is selected to be added to SS, and the process is repeated with the value of nSnS increased by one. At all stages, if a basic or superbasic variable encounters one of its bounds, the variable is made nonbasic and the value of nSnS is decreased by one.
Associated with each of the mm equality constraints Axs = 0Ax-s=0 is a dual variable πiπi. Similarly, each variable in (x,s)(x,s) has an associated reduced gradient djdj (also known as a reduced cost). The reduced gradients for the variables xx are the quantities gATπg-ATπ, where gg is the gradient of the QP objective function; and the reduced gradients for the slack variables ss are the dual variables ππ. The QP subproblem is optimal if dj0dj0 for all nonbasic variables at their lower bounds, dj0dj0 for all nonbasic variables at their upper bounds and dj = 0dj=0 for all superbasic variables. In practice, an approximate QP solution is found by slightly relaxing these conditions on djdj (see the description of the optional parameter Optimality Tolerance).
The process of computing and comparing reduced gradients is known as pricing (a term first introduced in the context of the simplex method for linear programming). To ‘price’ a nonbasic variable xjxj means that the reduced gradient djdj associated with the relevant active upper or lower bound on xjxj is computed via the formula dj = gjaTπdj=gj-aTπ, where ajaj is the jjth column of
(AI)
A -I . (The variable selected by such a process and the corresponding value of djdj (i.e., its reduced gradient) are the quantities +S and dj in the monitoring file output; see Section [Description of Monitoring Information].) If AA has significantly more columns than rows (i.e., nmnm), pricing can be computationally expensive. In this case, a strategy known as partial pricing can be used to compute and compare only a subset of the djdj's.
nag_opt_qpconvex1_sparse_solve (e04nk) is based on SQOPT, which is part of the SNOPT package described in Gill et al. (2002), which in turn utilizes functions from the MINOS package (see Murtagh and Saunders (1995)). It uses stable numerical methods throughout and includes a reliable basis package (for maintaining sparse LULU factors of the basis matrix BB), a practical anti-degeneracy procedure, efficient handling of linear constraints and bounds on the variables (by an active-set strategy), as well as automatic scaling of the constraints. Further details can be found in Section [Algorithmic Details].

References

Fourer R (1982) Solving staircase linear programs by the simplex method Math. Programming 23 274–313
Gill P E and Murray W (1978) Numerically stable methods for quadratic programming Math. Programming 14 349–372
Gill P E, Murray W and Saunders M A (2002) SNOPT: An SQP Algorithm for Large-scale Constrained Optimization 12 979–1006 SIAM J. Optim.
Gill P E, Murray W, Saunders M A and Wright M H (1987) Maintaining LU factors of a general sparse matrix Linear Algebra and its Applics. 88/89 239–270
Gill P E, Murray W, Saunders M A and Wright M H (1989) A practical anti-cycling procedure for linearly constrained optimization Math. Programming 45 437–474
Gill P E, Murray W, Saunders M A and Wright M H (1991) Inertia-controlling methods for general quadratic programming SIAM Rev. 33 1–36
Hall J A J and McKinnon K I M (1996) The simplest examples where the simplex method cycles and conditions where EXPAND fails to prevent cycling Report MS 96–100 Department of Mathematics and Statistics, University of Edinburgh
Murtagh B A and Saunders M A (1995) MINOS 5.4 users' guide Report SOL 83-20R Department of Operations Research, Stanford University

Parameters

Compulsory Input Parameters

1:     n – int64int32nag_int scalar
nn, the number of variables (excluding slacks). This is the number of columns in the linear constraint matrix AA.
Constraint: n1n1.
2:     m – int64int32nag_int scalar
mm, the number of general linear constraints (or slacks). This is the number of rows in AA, including the free row (if any; see iobj).
Constraint: m1m1.
3:     iobj – int64int32nag_int scalar
If iobj > 0iobj>0, row iobj of AA is a free row containing the nonzero elements of the vector cc appearing in the linear objective term cTxcTx.
If iobj = 0iobj=0, there is no free row, i.e., the problem is either an FP problem (in which case iobj must be set to zero), or a QP problem with c = 0c=0.
Constraint: 0iobjm0iobjm.
4:     ncolh – int64int32nag_int scalar
nHnH, the number of leading nonzero columns of the Hessian matrix HH. For FP and LP problems, ncolh must be set to zero.
Constraint: 0ncolhn0ncolhn.
5:     qphx – function handle or string containing name of m-file
For QP problems, you must supply a version of qphx to compute the matrix product HxHx. If HH has zero rows and columns, it is most efficient to order the variables x = (yz)
T
x= yz T  so that
Hx =
(H10)
00
(y)
z
=
(H1y)
0
,
Hx= H10 00 y z = H1y 0 ,
where the nonlinear variables yy appear first as shown. For FP and LP problems, qphx will never be called by nag_opt_qpconvex1_sparse_solve (e04nk) and hence qphx may be the string 'e54nku'.
[hx, user] = qphx(nstate, ncolh, x, user)

Input Parameters

1:     nstate – int64int32nag_int scalar
If nstate = 1nstate=1, nag_opt_qpconvex1_sparse_solve (e04nk) is calling qphx for the first time. This parameter setting allows you to save computation time if certain data must be read or calculated only once.
If nstate2nstate2, nag_opt_qpconvex1_sparse_solve (e04nk) is calling qphx for the last time. This parameter setting allows you to perform some additional computation on the final solution. In general, the last call to qphx is made with nstate = 2 + ifailnstate=2+ifail (see Section [Error Indicators and Warnings]).
Otherwise, nstate = 0nstate=0.
2:     ncolh – int64int32nag_int scalar
This is the same parameter ncolh as supplied to nag_opt_qpconvex1_sparse_solve (e04nk).
3:     x(ncolh) – double array
The first ncolh elements of the vector xx.
4:     user – Any MATLAB object
qphx is called from nag_opt_qpconvex1_sparse_solve (e04nk) with the object supplied to nag_opt_qpconvex1_sparse_solve (e04nk).

Output Parameters

1:     hx(ncolh) – double array
The product HxHx.
2:     user – Any MATLAB object
6:     a(nnz) – double array
nnz, the dimension of the array, must satisfy the constraint 1nnzn × m1nnzn×m.
The nonzero elements of AA, ordered by increasing column index. Note that elements with the same row and column indices are not allowed.
7:     ha(nnz) – int64int32nag_int array
nnz, the dimension of the array, must satisfy the constraint 1nnzn × m1nnzn×m.
ha(i)hai must contain the row index of the nonzero element stored in a(i)ai, for i = 1,2,,nnzi=1,2,,nnz. Note that the row indices for a column may be supplied in any order.
Constraint: 1ha(i)m1haim, for i = 1,2,,nnzi=1,2,,nnz.
8:     ka(n + 1n+1) – int64int32nag_int array
ka(j)kaj must contain the index in a of the start of the jjth column, for j = 1,2,,nj=1,2,,n. ka(n + 1)kan+1 must be set to nnz + 1nnz+1. To specify the jjth column as empty, set ka(j) = ka(j + 1)kaj=kaj+1. As a consequence ka(1)ka1 is always 11.
Constraints:
  • ka(1) = 1ka1=1;
  • ka(j)1kaj1, for j = 2,3,,nj=2,3,,n;
  • ka(n + 1) = nnz + 1kan+1=nnz+1;
  • 0ka(j + 1)ka(j)m0kaj+1-kajm, for j = 1,2,,nj=1,2,,n.
9:     bl(n + mn+m) – double array
ll, the lower bounds for all the variables and general constraints, in the following order. The first n elements of bl must contain the bounds on the variables xx, and the next m elements the bounds for the general linear constraints AxAx (or slacks ss) and the free row (if any). To specify a nonexistent lower bound (i.e., lj = lj=-), set bl(j)bigbndblj-bigbnd, where bigbndbigbnd is the value of the optional parameter Infinite Bound Size. To specify the jjth constraint as an equality, set bl(j) = bu(j) = βblj=buj=β, say, where |β| < bigbnd|β|<bigbnd. Note that the lower bound corresponding to the free row must be set to - and stored in bl(n + iobj)bln+iobj.
Constraint: if iobj > 0iobj>0, bl(n + iobj)bigbndbln+iobj-bigbnd
(See also the description for bu.)
10:   bu(n + mn+m) – double array
uu, the upper bounds for all the variables and general constraints, in the following order. The first n elements of bu must contain the bounds on the variables xx, and the next m elements the bounds for the general linear constraints AxAx (or slacks ss) and the free row (if any). To specify a nonexistent upper bound (i.e., uj = + uj=+), set bu(j)bigbndbujbigbnd. Note that the upper bound corresponding to the free row must be set to + + and stored in bu(n + iobj)bun+iobj.
Constraints:
  • if iobj > 0iobj>0, bu(n + iobj)bigbndbun+iobjbigbnd;
  • bl(j)bu(j)bljbuj, for j = 1,2,,n + mj=1,2,,n+m;
  • if bl(j) = bu(j) = βblj=buj=β, |β| < bigbnd|β|<bigbnd.
11:   start – string (length ≥ 1)
Indicates how a starting basis is to be obtained.
start = 'C'start='C'
An internal Crash procedure will be used to choose an initial basis matrix BB.
start = 'W'start='W'
A basis is already defined in istate (probably from a previous call).
Constraint: start = 'C'start='C' or 'W''W'.
12:   names(55) – cell array of strings
A set of names associated with the so-called MPSX form of the problem, as follows:
names(1)names1
Must contain the name for the problem (or be blank).
names(2)names2
Must contain the name for the free row (or be blank).
names(3)names3
Must contain the name for the constraint right-hand side (or be blank).
names(4)names4
Must contain the name for the ranges (or be blank).
names(5)names5
Must contain the name for the bounds (or be blank).
(These names are used in the monitoring file output; see Section [Description of Monitoring Information].)
13:   crname(nname) – cell array of strings
nname, the dimension of the array, must satisfy the constraint nname = 1nname=1 or n + mn+m.
The optional column and row names, respectively.
If nname = 1nname=1, crname is not referenced and the printed output will use default names for the columns and rows.
If nname = n + mnname=n+m, the first n elements must contain the names for the columns and the next m elements must contain the names for the rows. Note that the name for the free row (if any) must be stored in crname(n + iobj)crnamen+iobj.
14:   ns – int64int32nag_int scalar
nSnS, the number of superbasics. For QP problems, ns need not be specified if start = 'C'start='C', but must retain its value from a previous call when start = 'W'start='W'. For FP and LP problems, ns need not be initialized.
15:   xs(n + mn+m) – double array
The initial values of the variables and slacks (x,s)(x,s). (See the description for istate.)
16:   istate(n + mn+m) – int64int32nag_int array
If start = 'C'start='C', the first n elements of istate and xs must specify the initial states and values, respectively, of the variables xx. (The slacks ss need not be initialized.) An internal Crash procedure is then used to select an initial basis matrix BB. The initial basis matrix will be triangular (neglecting certain small elements in each column). It is chosen from various rows and columns of
(AI)
A -I . Possible values for istate(j)istatej are as follows:
istate(j)istatej State of xs(j)xsj during Crash procedure
00 or 11 Eligible for the basis
22 Ignored
33 Eligible for the basis (given preference over 00 or 11)
44 or 55 Ignored
If nothing special is known about the problem, or there is no wish to provide special information, you may set istate(j) = 0istatej=0 and xs(j) = 0.0xsj=0.0, for j = 1,2,,nj=1,2,,n. All variables will then be eligible for the initial basis. Less trivially, to say that the jjth variable will probably be equal to one of its bounds, set istate(j) = 4istatej=4 and xs(j) = bl(j)xsj=blj or istate(j) = 5istatej=5 and xs(j) = bu(j)xsj=buj as appropriate.
Following the Crash procedure, variables for which istate(j) = 2istatej=2 are made superbasic. Other variables not selected for the basis are then made nonbasic at the value xs(j)xsj if bl(j)xs(j)bu(j)bljxsjbuj, or at the value bl(j)blj or bu(j)buj closest to xs(j)xsj.
If start = 'W'start='W', istate and xs must specify the initial states and values, respectively, of the variables and slacks (x,s)(x,s). If nag_opt_qpconvex1_sparse_solve (e04nk) has been called previously with the same values of n and m, istate already contains satisfactory information.
Constraints:
  • if start = 'C'start='C', 0istate(j)50istatej5, for j = 1,2,,nj=1,2,,n;
  • if start = 'W'start='W', 0istate(j)30istatej3, for j = 1,2,,n + mj=1,2,,n+m.
17:   leniz – int64int32nag_int scalar
The dimension of the array iz as declared in the (sub)program from which nag_opt_qpconvex1_sparse_solve (e04nk) is called.
Constraint: leniz1leniz1.
18:   lenz – int64int32nag_int scalar
The dimension of the array z as declared in the (sub)program from which nag_opt_qpconvex1_sparse_solve (e04nk) is called.
Constraint: lenz1lenz1.
The amounts of workspace provided (i.e., leniz and lenz) and required (i.e., miniz and minz) are (by default for nag_opt_qpconvex1_sparse_solve (e04nk)) output on the current advisory message unit nadv (as defined by nag_file_set_unit_advisory (x04ab)). Since the minimum values of leniz and lenz required to start solving the problem are returned in miniz and minz, respectively, you may prefer to obtain appropriate values from the output of a preliminary run with leniz and lenz set to 11. (nag_opt_qpconvex1_sparse_solve (e04nk) will then terminate with ifail = 12ifail=12.)
19:   lwsav(2020) – logical array
20:   iwsav(380380) – int64int32nag_int array
21:   rwsav(285285) – double array
The arrays lwsav, iwsav and rwsav must not be altered between calls to any of the functions nag_opt_qpconvex1_sparse_solve (e04nk), (e04nl), (e04nm) or nag_opt_init (e04wb).

Optional Input Parameters

1:     nnz – int64int32nag_int scalar
Default: The dimension of the arrays a, ha. (An error is raised if these dimensions are not equal.)
The number of nonzero elements in AA.
Constraint: 1nnzn × m1nnzn×m.
2:     nname – int64int32nag_int scalar
Default: The dimension of the array crname.
The number of column (i.e., variable) and row names supplied in crname.
nname = 1nname=1
There are no names. Default names will be used in the printed output.
nname = n + mnname=n+m
All names must be supplied.
Constraint: nname = 1nname=1 or n + mn+m.
3:     user – Any MATLAB object
user is not used by nag_opt_qpconvex1_sparse_solve (e04nk), but is passed to qphx. Note that for large objects it may be more efficient to use a global variable which is accessible from the m-files than to use user.

Input Parameters Omitted from the MATLAB Interface

iz z iuser ruser

Output Parameters

1:     ns – int64int32nag_int scalar
The final number of superbasics. This will be zero for FP and LP problems.
2:     xs(n + mn+m) – double array
The final values of the variables and slacks (x,s)(x,s).
3:     istate(n + mn+m) – int64int32nag_int array
The final states of the variables and slacks (x,s)(x,s). The significance of each possible value of istate(j)istatej is as follows:
istate(j)istatej State of variable jj Normal value of xs(j)xsj
00 Nonbasic bl(j)blj
11 Nonbasic bu(j)buj
22 Superbasic Between bl(j)blj and bu(j)buj
33 Basic Between bl(j)blj and bu(j)buj
If ninf = 0ninf=0, basic and superbasic variables may be outside their bounds by as much as the value of the optional parameter Feasibility Tolerance. Note that unless the Scale Option = 0Scale Option=0 is specified, the optional parameter Feasibility Tolerance applies to the variables of the scaled problem. In this case, the variables of the original problem may be as much as 0.10.1 outside their bounds, but this is unlikely unless the problem is very badly scaled.
Very occasionally some nonbasic variables may be outside their bounds by as much as the optional parameter Feasibility Tolerance, and there may be some nonbasic variables for which xs(j)xsj lies strictly between its bounds.
If ninf > 0ninf>0, some basic and superbasic variables may be outside their bounds by an arbitrary amount (bounded by sinf if Scale Option = 0Scale Option=0).
4:     miniz – int64int32nag_int scalar
The minimum value of leniz required to start solving the problem. If ifail = 12ifail=12, nag_opt_qpconvex1_sparse_solve (e04nk) may be called again with leniz suitably larger than miniz. (The bigger the better, since it is not certain how much workspace the basis factors need.)
5:     minz – int64int32nag_int scalar
The minimum value of lenz required to start solving the problem. If ifail = 13ifail=13, nag_opt_qpconvex1_sparse_solve (e04nk) may be called again with lenz suitably larger than minz. (The bigger the better, since it is not certain how much workspace the basis factors need.)
6:     ninf – int64int32nag_int scalar
The number of infeasibilities. This will be zero if ifail = 0ifail=0 or 11.
7:     sinf – double scalar
The sum of infeasibilities. This will be zero if ninf = 0ninf=0. (Note that nag_opt_qpconvex1_sparse_solve (e04nk) does not attempt to compute the minimum value of sinf if ifail = 3ifail=3.)
8:     obj – double scalar
The value of the objective function.
If ninf = 0ninf=0, obj includes the quadratic objective term (1/2)xTHx12xTHx (if any).
If ninf > 0ninf>0, obj is just the linear objective term cTxcTx (if any).
For FP problems, obj is set to zero.
9:     clamda(n + mn+m) – double array
A set of Lagrange multipliers for the bounds on the variables and the general constraints. More precisely, the first n elements contain the multipliers (reduced costs) for the bounds on the variables, and the next m elements contain the multipliers (shadow prices) for the general linear constraints.
10:   user – Any MATLAB object
11:   lwsav(2020) – logical array
12:   iwsav(380380) – int64int32nag_int array
13:   rwsav(285285) – double array
14:   ifail – int64int32nag_int scalar
ifail = 0ifail=0 unless the function detects an error (see [Error Indicators and Warnings]).
nag_opt_qpconvex1_sparse_solve (e04nk) returns with ifail = 0ifail=0 if the reduced gradient (Norm rg; see Section [Printed output]) is negligible, the Lagrange multipliers (Lagr Mult; see Section [Printed output]) are optimal and xx satisfies the constraints to the accuracy requested by the value of the optional parameter Feasibility Tolerance (default value = max (106,sqrt(ε))default value=max(10-6,ε), where εε is the machine precision).

Error Indicators and Warnings

Note: nag_opt_qpconvex1_sparse_solve (e04nk) may return useful information for one or more of the following detected errors or warnings.
Errors or warnings detected by the function:

Cases prefixed with W are classified as warnings and do not generate an error of type NAG:error_n. See nag_issue_warnings.

W ifail = 1ifail=1
Weak solution found. The final xx is not unique, although xx gives the global minimum value of the objective function.
W ifail = 2ifail=2
The problem is unbounded (or badly scaled). The objective function is not bounded below in the feasible region.
W ifail = 3ifail=3
The problem is infeasible. The general constraints cannot all be satisfied simultaneously to within the value of the optional parameter Feasibility Tolerance (default value = max (106,sqrt(ε))default value=max(10-6,ε), where εε is the machine precision).
  ifail = 4ifail=4
Too many iterations. The value of the optional parameter Iteration Limit (default value = max (50,5(n + m))default value=max(50,5(n+m))) is too small.
  ifail = 5ifail=5
The reduced Hessian matrix ZTHZZTHZ (see Section [Definition of the Working Set and Search Direction]) exceeds its assigned dimension. The value of the optional parameter Superbasics Limit (default value = min (nH + 1,n)default value=min(nH+1,n)) is too small.
  ifail = 6ifail=6
The Hessian matrix HH appears to be indefinite. This sometimes occurs because the values of the optional parameters LU Factor Tolerance (default value = 100.0default value=100.0) and LU Update Tolerance (default value = 10.0default value=10.0) are too large. Check also that qphx has been coded correctly and that all relevant elements of HxHx have been assigned their correct values.
  ifail = 7ifail=7
An input parameter is invalid.
  ifail = 8ifail=8
Numerical error in trying to satisfy the general constraints. The basis is very ill-conditioned.
  ifail = 9ifail=9
Not enough integer workspace for the basis factors. Increase leniz and rerun nag_opt_qpconvex1_sparse_solve (e04nk).
  ifail = 10ifail=10
Not enough real workspace for the basis factors. Increase lenz and rerun nag_opt_qpconvex1_sparse_solve (e04nk).
  ifail = 11ifail=11
The basis is singular after 1515 attempts to factorize it (adding slacks where necessary). Either the problem is badly scaled or the value of the optional parameter LU Factor Tolerance (default value = 100.0default value=100.0) is too large.
  ifail = 12ifail=12
Not enough integer workspace to start solving the problem. Increase leniz to at least miniz and rerun nag_opt_qpconvex1_sparse_solve (e04nk).
  ifail = 13ifail=13
Not enough real workspace to start solving the problem. Increase lenz to at least minz and rerun nag_opt_qpconvex1_sparse_solve (e04nk).

Accuracy

nag_opt_qpconvex1_sparse_solve (e04nk) implements a numerically stable active-set strategy and returns solutions that are as accurate as the condition of the problem warrants on the machine.

Further Comments

This section contains a description of the printed output.

Description of the Printed Output

The following line of summary output ( < 80<80 characters) is produced at every iteration. In all cases, the values of the quantities printed are those in effect on completion of the given iteration.
Itn is the iteration count.
Step is the step taken along the computed search direction.
Ninf is the number of violated constraints (infeasibilities). This will be zero during the optimality phase.
Sinf/Objective is the value of the current objective function. If xx is not feasible, Sinf gives the sum of the magnitudes of constraint violations. If xx is feasible, Objective is the value of the objective function. The output line for the final iteration of the feasibility phase (i.e., the first iteration for which Ninf is zero) will give the value of the true objective at the first feasible point.
During the optimality phase, the value of the objective function will be nonincreasing. During the feasibility phase, the number of constraint infeasibilities will not increase until either a feasible point is found, or the optimality of the multipliers implies that no feasible point exists.
Norm rg is dSdS, the Euclidean norm of the reduced gradient (see Section [Main Iteration]). During the optimality phase, this norm will be approximately zero after a unit step. For FP and LP problems, Norm rg is not printed.
The final printout includes a listing of the status of every variable and constraint.
The following describes the printout for each variable. A full stop (.) is printed for any numerical value that is zero.
Variable gives the name of the variable. If nname = 1nname=1, a default name is assigned to the jjth variable, for j = 1,2,,nj=1,2,,n. If nname = n + mnname=n+m, the name supplied in crname(j)crnamej is assigned to the jjth variable.
State gives the state of the variable (LL if nonbasic on its lower bound, UL if nonbasic on its upper bound, EQ if nonbasic and fixed, FR if nonbasic and strictly between its bounds, BS if basic and SBS if superbasic).
A key is sometimes printed before State. Note that unless the optional parameter Scale Option = 0Scale Option=0 (default value = 2default value=2) is specified, the tests for assigning a key are applied to the variables of the scaled problem.
A Alternative optimum possible. The variable is nonbasic, but its reduced gradient is essentially zero. This means that if the variable were allowed to start moving away from its bound, there would be no change in the value of the objective function. The values of the other free variables might change, giving a genuine alternative solution. However, if there are any degenerate variables (labelled D), the actual change might prove to be zero, since one of them could encounter a bound immediately. In either case, the values of the Lagrange multipliers might also change.
D Degenerate. The variable is basic or superbasic, but it is equal (or very close) to one of its bounds.
I Infeasible. The variable is basic or superbasic and is currently violating one of its bounds by more than the value of the Feasibility Tolerance.
N Not precisely optimal. The variable is nonbasic or superbasic. If the value of the reduced gradient for the variable exceeds the value of the optional parameter Optimality Tolerance, the solution would not be declared optimal because the reduced gradient for the variable would not be considered negligible.
Value is the value of the variable at the final iteration.
Lower Bound is the lower bound specified for the variable. None indicates that bl(j)bigbndblj-bigbnd.
Upper Bound is the upper bound specified for the variable. None indicates that bu(j)bigbndbujbigbnd.
Lagr Mult is the Lagrange multiplier for the associated bound. This will be zero if State is FR. If xx is optimal, the multiplier should be non-negative if State is LL, non-positive if State is UL and zero if State is BS or SBS.
Residual is the difference between the variable Value and the nearer of its (finite) bounds bl(j)blj and bu(j)buj. A blank entry indicates that the associated variable is not bounded (i.e., bl(j)bigbndblj-bigbnd and bu(j)bigbndbujbigbnd).
The meaning of the printout for linear constraints is the same as that given above for variables, with ‘variable’ replaced by ‘constraint’, nn replaced by mm, crname(j)crnamej replaced by crname(n + j)crnamen+j, bl(j)blj and bu(j)buj are replaced by bl(n + j)bln+j and bu(n + j)bun+j respectively, and with the following change in the heading:
Constrnt gives the name of the linear constraint.
Note that movement off a constraint (as opposed to a variable moving away from its bound) can be interpreted as allowing the entry in the Residual column to become positive.
Numerical values are output with a fixed number of digits; they are not guaranteed to be accurate to this precision.

Example

function nag_opt_qpconvex1_sparse_solve_example
n = int64(7);
m = int64(8);
iobj = int64(8);
ncolh = int64(7);
a = [0.02;
     0.02;
     0.03;
     1;
     0.7;
     0.02;
     0.15;
     -200;
     0.06;
     0.75;
     0.03;
     0.04;
     0.05;
     0.04;
     1;
     -2000;
     0.02;
     1;
     0.01;
     0.08;
     0.08;
     0.8;
     -2000;
     1;
     0.12;
     0.02;
     0.02;
     0.75;
     0.04;
     -2000;
     0.01;
     0.8;
     0.02;
     1;
     0.02;
     0.06;
     0.02;
     -2000;
     1;
     0.01;
     0.01;
     0.97;
     0.01;
     400;
     0.97;
     0.03;
     1;
     400];
ha = [int64(7);5;3;1;6;4;2;8;7;6;5;4;3;2;1;8;2;1;4;3;7;6;8;1;7;3;4;6;2;8;5;6;7;1;2;3;4;8;1;2;3;6;7;8;7;2;1;8];
ka = [int64(1);9;17;24;31;39;45;49];
bl = [0;
     0;
     400;
     100;
     0;
     0;
     0;
     2000;
     -1e25;
     -1e25;
     -1e25;
     -1e25;
     1500;
     250;
     -1e25];
bu = [200;
     2500;
     800;
     700;
     1500;
     1e25;
     1e25;
     2000;
     60;
     100;
     40;
     30;
     1e25;
     300;
     1e25];
start = 'C';
names = {'        '; '        '; '        '; '        '; '        '};
crname = {'...X1...'; '...X2...'; '...X3...'; '...X4...'; '...X5...'; ...
          '...X6...'; '...X7...'; '..ROW1..'; '..ROW2..'; '..ROW3..'; ...
          '..ROW4..'; '..ROW5..'; '..ROW6..'; '..ROW7..'; '..COST..'};
ns = int64(-1232765364);
xs = [0;0;0;0;0;0;0;0;0;0;0;0;0;0;0];
istate = zeros(15, 1, 'int64');
leniz = int64(10000);
lenz = int64(10000);
[cwsav,lwsav,iwsav,rwsav,ifail] = ...
    nag_opt_init('nag_opt_qpconvex1_sparse_solve');
[nsOut, xsOut, istateOut, miniz, minz, ninf, sinf, obj, clamda, user, lwsavOut, iwsavOut, rwsavOut, ifail] = ...
  nag_opt_qpconvex1_sparse_solve(n, m, iobj, ncolh, @qphx, a, ha, ka, bl, bu, start, ...
    names, crname, ns, xs, istate, leniz, lenz, ...
    lwsav, iwsav, rwsav);
 obj

function [hx, user] = qphx(nstate, ncolh, x, user)
  hx = zeros(ncolh, 1);

  hx(1) = 2*x(1);
  hx(2) = 2*x(2);
  hx(3) = 2*(x(3)+x(4));
  hx(4) = hx(3);
  hx(5) = 2*x(5);
  hx(6) = 2*(x(6)+x(7));
  hx(7) = hx(6);
 

obj =

  -1.8478e+06


function e04nk_example
n = int64(7);
m = int64(8);
iobj = int64(8);
ncolh = int64(7);
a = [0.02;
     0.02;
     0.03;
     1;
     0.7;
     0.02;
     0.15;
     -200;
     0.06;
     0.75;
     0.03;
     0.04;
     0.05;
     0.04;
     1;
     -2000;
     0.02;
     1;
     0.01;
     0.08;
     0.08;
     0.8;
     -2000;
     1;
     0.12;
     0.02;
     0.02;
     0.75;
     0.04;
     -2000;
     0.01;
     0.8;
     0.02;
     1;
     0.02;
     0.06;
     0.02;
     -2000;
     1;
     0.01;
     0.01;
     0.97;
     0.01;
     400;
     0.97;
     0.03;
     1;
     400];
ha = [int64(7);5;3;1;6;4;2;8;7;6;5;4;3;2;1;8;2;1;4;3;7;6;8;1;7;3;4;6;2; ...
      8;5;6;7;1;2;3;4;8;1;2;3;6;7;8;7;2;1;8];
ka = [int64(1);9;17;24;31;39;45;49];
bl = [0;0;400;100;0;0;0;2000;-1e25;-1e25;-1e25;-1e25;1500;250;-1e25];
bu = [200;2500;800;700;1500;1e25;1e25;2000;60;100;40;30;1e25;300;1e25];
start = 'C';
names = {'        '; '        '; '        '; '        '; '        '};
crname = {'...X1...'; '...X2...'; '...X3...'; '...X4...'; '...X5...'; ...
          '...X6...'; '...X7...'; '..ROW1..'; '..ROW2..'; '..ROW3..'; ...
          '..ROW4..'; '..ROW5..'; '..ROW6..'; '..ROW7..'; '..COST..'};
ns = int64(-1232765364);
xs = [0;0;0;0;0;0;0;0;0;0;0;0;0;0;0];
istate = zeros(15, 1, 'int64');
leniz = int64(10000);
lenz = int64(10000);
[cwsav,lwsav,iwsav,rwsav,ifail] = e04wb('e04nk');
[nsOut, xsOut, istateOut, miniz, minz, ninf, sinf, obj, clamda, user, ...
 lwsavOut, iwsavOut, rwsavOut, ifail] = ...
  e04nk(n, m, iobj, ncolh, @qphx, a, ha, ka, bl, bu, start, ...
    names, crname, ns, xs, istate, leniz, lenz, ...
    lwsav, iwsav, rwsav);
 obj

function [hx, user] = qphx(nstate, ncolh, x, user)
  hx = zeros(ncolh, 1);

  hx(1) = 2*x(1);
  hx(2) = 2*x(2);
  hx(3) = 2*(x(3)+x(4));
  hx(4) = hx(3);
  hx(5) = 2*x(5);
  hx(6) = 2*(x(6)+x(7));
  hx(7) = hx(6);
 

obj =

  -1.8478e+06


Note: the remainder of this document is intended for more advanced users. Section [Algorithmic Details] contains a detailed description of the algorithm which may be needed in order to understand Sections [Optional Parameters] and [Description of Monitoring Information]. Section [Optional Parameters] describes the optional parameters which may be set by calls to nag_opt_qpconvex1_sparse_option_string (e04nm). Section [Description of Monitoring Information] describes the quantities which can be requested to monitor the course of the computation.

Algorithmic Details

This section contains a detailed description of the method used by nag_opt_qpconvex1_sparse_solve (e04nk).

Overview

nag_opt_qpconvex1_sparse_solve (e04nk) is based on an inertia-controlling method that maintains a Cholesky factorization of the reduced Hessian (see below). The method is similar to that of Gill and Murray (1978), and is described in detail by Gill et al. (1991). Here we briefly summarise the main features of the method. Where possible, explicit reference is made to the names of variables that are parameters of the function or appear in the printed output.
The method used has two distinct phases: finding an initial feasible point by minimizing the sum of infeasibilities (the feasibility phase), and minimizing the quadratic objective function within the feasible region (the optimality phase). The computations in both phases are performed by the same functions. The two-phase nature of the algorithm is reflected by changing the function being minimized from the sum of infeasibilities (the printed quantity Sinf; see Section [Description of Monitoring Information]) to the quadratic objective function (the printed quantity Objective; see Section [Description of Monitoring Information]).
In general, an iterative process is required to solve a quadratic program. Given an iterate (x,s)(x,s) in both the original variables xx and the slack variables ss, a new iterate (x,s)(x-,s-) is defined by
(x)
s
=
(x)
s
+ αp,
x- s- = x s +αp,
(2)
where the step length αα is a non-negative scalar (the printed quantity Step; see Section [Description of Monitoring Information]), and pp is called the search direction. (For simplicity, we shall consider a typical iteration and avoid reference to the index of the iteration.) Once an iterate is feasible (i.e., satisfies the constraints), all subsequent iterates remain feasible.

Definition of the Working Set and Search Direction

At each iterate (x,s)(x,s), a working set of constraints is defined to be a linearly independent subset of the constraints that are satisfied ‘exactly’ (to within the value of the optional parameter Feasibility Tolerance). The working set is the current prediction of the constraints that hold with equality at a solution of the LP or QP problem. Let mWmW denote the number of constraints in the working set (including bounds), and let WW denote the associated mWmW by (n + m)(n+m) working set matrix consisting of the mWmW gradients of the working set constraints.
The search direction is defined so that constraints in the working set remain unaltered for any value of the step length. It follows that pp must satisfy the identity
Wp = 0.
Wp=0.
(3)
This characterisation allows pp to be computed using any nn by nZnZ full-rank matrix ZZ that spans the null space of WW. (Thus, nZ = nmWnZ=n-mW and WZ = 0WZ=0.) The null space matrix ZZ is defined from a sparse LULU factorization of part of WW (see (6) and (7)). The direction pp will satisfy (3) if
p = ZpZ,
p=ZpZ,
(4)
where pZpZ is any nZnZ-vector.
The working set contains the constraints Axs = 0Ax-s=0 and a subset of the upper and lower bounds on the variables (x,s)(x,s). Since the gradient of a bound constraint xjljxjlj or xjujxjuj is a vector of all zeros except for ± 1±1 in position jj, it follows that the working set matrix contains the rows of
(AI)
A -I  and the unit rows associated with the upper and lower bounds in the working set.
The working set matrix WW can be represented in terms of a certain column partition of the matrix
(AI)
A -I  by (conceptually) partitioning the constraints Axs = 0Ax-s=0 so that
BxB + SxS + NxN = 0,
BxB+SxS+NxN=0,
(5)
where BB is a square nonsingular basis and xBxB, xSxS and xNxN are the basic, superbasic and nonbasic variables respectively. The nonbasic variables are equal to their upper or lower bounds at (x,s)(x,s), and the superbasic variables are independent variables that are chosen to improve the value of the current objective function. The number of superbasic variables is nSnS (the printed quantity Ns; see Section [Description of Monitoring Information]). Given values of xNxN and xSxS, the basic variables xBxB are adjusted so that (x,s)(x,s) satisfies (5).
If PP is a permutation matrix such that
(AI)
P =
(BSN)
A -I P= B S N , then WW satisfies
WP =
(BSN)
0 0 IN
,
WP= B S N 0 0 IN ,
(6)
where ININ is the identity matrix with the same number of columns as NN.
The null space matrix ZZ is defined from a sparse LULU factorization of part of WW. In particular, ZZ is maintained in ‘reduced gradient’ form, using the LUSOL package (see Gill et al. (1991)) to maintain sparse LULU factors of the basis matrix BB that alters as the working set WW changes. Given the permutation PP, the null space basis is given by
Z = P
  − B − 1S I 0  
.
Z=P -B-1S I 0 .
(7)
This matrix is used only as an operator, i.e., it is never computed explicitly. Products of the form ZvZv and ZTgZTg are obtained by solving with BB or BTBT. This choice of ZZ implies that nZnZ, the number of ‘degrees of freedom’ at (x,s)(x,s), is the same as nSnS, the number of superbasic variables.
Let gZgZ and HZHZ denote the reduced gradient and reduced Hessian of the objective function:
gZ = ZTg  and  HZ = ZTHZ,
gZ=ZTg  and  HZ=ZTHZ,
(8)
where gg is the objective gradient at (x,s)(x,s). Roughly speaking, gZgZ and HZHZ describe the first and second derivatives of an nSnS-dimensional unconstrained problem for the calculation of pZpZ. (The condition estimator of HZHZ is the quantity Cond Hz in the monitoring file output; see Section [Description of Monitoring Information].)
At each iteration, an upper triangular factor RR is available such that HZ = RTRHZ=RTR. Normally, RR is computed from RTR = ZTHZRTR=ZTHZ at the start of the optimality phase and then updated as the QP working set changes. For efficiency, the dimension of RR should not be excessive (say, nS1000nS1000). This is guaranteed if the number of nonlinear variables is ‘moderate’.
If the QP problem contains linear variables, HH is positive semidefinite and RR may be singular with at least one zero diagonal element. However, an inertia-controlling strategy is used to ensure that only the last diagonal element of RR can be zero. (See Gill et al. (1991) for a discussion of a similar strategy for indefinite quadratic programming.)
If the initial RR is singular, enough variables are fixed at their current value to give a nonsingular RR. This is equivalent to including temporary bound constraints in the working set. Thereafter, RR can become singular only when a constraint is deleted from the working set (in which case no further constraints are deleted until RR becomes nonsingular).

Main Iteration

If the reduced gradient is zero, (x,s)(x,s) is a constrained stationary point on the working set. During the feasibility phase, the reduced gradient will usually be zero only at a vertex (although it may be zero elsewhere in the presence of constraint dependencies). During the optimality phase, a zero reduced gradient implies that xx minimizes the quadratic objective function when the constraints in the working set are treated as equalities. At a constrained stationary point, Lagrange multipliers λλ are defined from the equations
WTλ = g(x).
WTλ=g(x).
(9)
A Lagrange multiplier λjλj corresponding to an inequality constraint in the working set is said to be optimal if λjσλjσ when the associated constraint is at its upper bound, or if λjσλj-σ when the associated constraint is at its lower bound, where σσ depends on the value of the optional parameter Optimality Tolerance. If a multiplier is nonoptimal, the objective function (either the true objective or the sum of infeasibilities) can be reduced by continuing the minimization with the corresponding constraint excluded from the working set. (This step is sometimes referred to as ‘deleting’ a constraint from the working set.) If optimal multipliers occur during the feasibility phase but the sum of infeasibilities is nonzero, there is no feasible point and the function terminates immediately with ifail = 3ifail=3 (see Section [Error Indicators and Warnings]).
The special form (6) of the working set allows the multiplier vector λλ, the solution of (9), to be written in terms of the vector
d = (g) 0 − (A − I)
T
π = (g − ATπ) π ,
d= g 0 - A -I Tπ= g-ATπ π ,
(10)
where ππ satisfies the equations BTπ = gBBTπ=gB, and gBgB denotes the basic elements of gg. The elements of ππ are the Lagrange multipliers λjλj associated with the equality constraints Axs = 0Ax-s=0. The vector dNdN of nonbasic elements of dd consists of the Lagrange multipliers λjλj associated with the upper and lower bound constraints in the working set. The vector dSdS of superbasic elements of dd is the reduced gradient gZgZ in (8). The vector dBdB of basic elements of dd is zero, by construction. (The Euclidean norm of dSdS and the final values of dSdS, gg and ππ are the quantities Norm rg, Reduced Gradnt, Obj Gradient and Dual Activity in the monitoring file output; see Section [Description of Monitoring Information].)
If the reduced gradient is not zero, Lagrange multipliers need not be computed and the search direction is given by p = ZpZp=ZpZ (see (7) and (11)). The step length is chosen to maintain feasibility with respect to the satisfied constraints.
There are two possible choices for pZpZ, depending on whether or not HZHZ is singular. If HZHZ is nonsingular, RR is nonsingular and pZpZ in (4) is computed from the equations
RTRpZ = gZ,
RTRpZ=-gZ,
(11)
where gZgZ is the reduced gradient at xx. In this case, (x,s) + p(x,s)+p is the minimizer of the objective function subject to the working set constraints being treated as equalities. If (x,s) + p(x,s)+p is feasible, αα is defined to be unity. In this case, the reduced gradient at (x,s)(x-,s-) will be zero, and Lagrange multipliers are computed at the next iteration. Otherwise, αα is set to αmαm, the step to the ‘nearest’ constraint along pp. This constraint is then added to the working set at the next iteration.
If HZHZ is singular, then RR must also be singular, and an inertia-controlling strategy is used to ensure that only the last diagonal element of RR is zero. (See Gill et al. (1991) for a discussion of a similar strategy for indefinite quadratic programming.) In this case, pZpZ satisfies
pZT HZ pZ = 0   and   gZT pZ0,
pZT HZ pZ=0   and   gZT pZ0,
(12)
which allows the objective function to be reduced by any step of the form (x,s) + αp(x,s)+αp, where α > 0α>0. The vector p = ZpZp=ZpZ is a direction of unbounded descent for the QP problem in the sense that the QP objective is linear and decreases without bound along pp. If no finite step of the form (x,s) + αp(x,s)+αp (where α > 0α>0) reaches a constraint not in the working set, the QP problem is unbounded and the function terminates immediately with ifail = 2ifail=2 (see Section [Error Indicators and Warnings]). Otherwise, αα is defined as the maximum feasible step along pp and a constraint active at (x,s) + αp(x,s)+αp is added to the working set for the next iteration.

Miscellaneous

If the basis matrix is not chosen carefully, the condition of the null space matrix ZZ in (7) could be arbitrarily high. To guard against this, the function implements a ‘basis repair’ feature in which the LUSOL package (see Gill et al. (1991)) is used to compute the rectangular factorization
(BS)
T
= LU,
B S T=LU,
(13)
returning just the permutation PP that makes PLPTPLPT unit lower triangular. The pivot tolerance is set to require |PLPT|ij2|PLPT|ij2, and the permutation is used to define PP in (6). It can be shown that ZZ is likely to be little more than unity. Hence, ZZ should be well-conditioned regardless of the condition of WW. This feature is applied at the beginning of the optimality phase if a potential BSB-S ordering is known.
The EXPAND procedure (see Gill et al. (1989)) is used to reduce the possibility of cycling at a point where the active constraints are nearly linearly dependent. Although there is no absolute guarantee that cycling will not occur, the probability of cycling is extremely small (see Hall and McKinnon (1996)). The main feature of EXPAND is that the feasibility tolerance is increased at the start of every iteration. This allows a positive step to be taken at every iteration, perhaps at the expense of violating the bounds on (x,s)(x,s) by a small amount.
Suppose that the value of the optional parameter Feasibility Tolerance is δδ. Over a period of KK iterations (where KK is the value of the optional parameter Expand Frequency), the feasibility tolerance actually used by the function (i.e., the working feasibility tolerance) increases from 0.5δ0.5δ to δδ (in steps of 0.5δ / K0.5δ/K).
At certain stages the following ‘resetting procedure’ is used to remove small constraint infeasibilities. First, all nonbasic variables are moved exactly onto their bounds. A count is kept of the number of nontrivial adjustments made. If the count is nonzero, the basic variables are recomputed. Finally, the working feasibility tolerance is reinitialized to 0.5δ0.5δ.
If a problem requires more than KK iterations, the resetting procedure is invoked and a new cycle of iterations is started. (The decision to resume the feasibility phase or optimality phase is based on comparing any constraint infeasibilities with δδ.)
The resetting procedure is also invoked when the function reaches an apparently optimal, infeasible or unbounded solution, unless this situation has already occurred twice. If any nontrivial adjustments are made, iterations are continued.
The EXPAND procedure not only allows a positive step to be taken at every iteration, but also provides a potential choice of constraints to be added to the working set. All constraints at a distance αα (where ααmααm) along pp from the current point are then viewed as acceptable candidates for inclusion in the working set. The constraint whose normal makes the largest angle with the search direction is added to the working set. This strategy helps keep the basis matrix BB well-conditioned.

Optional Parameters

Several optional parameters in nag_opt_qpconvex1_sparse_solve (e04nk) define choices in the problem specification or the algorithm logic. In order to reduce the number of formal parameters of nag_opt_qpconvex1_sparse_solve (e04nk) these optional parameters have associated default values that are appropriate for most problems. Therefore, you need only specify those optional parameters whose values are to be different from their default values.
The remainder of this section can be skipped if you wish to use the default values for all optional parameters.
The following is a list of the optional parameters available. A full description of each optional parameter is provided in Section [Description of the Optional s].
Optional parameters may be specified by calling nag_opt_qpconvex1_sparse_option_string (e04nm) before a call to nag_opt_qpconvex1_sparse_solve (e04nk).
nag_opt_qpconvex1_sparse_option_string (e04nm) can be called to supply options directly, one call being necessary for each optional parameter. For example,
[lwsav, iwsav, rwsav, inform] = e04nm('Print Level = 5', lwsav, iwsav, rwsav);
nag_opt_qpconvex1_sparse_option_string (e04nm) should be consulted for a full description of this method of supplying optional parameters.
All optional parameters not specified by you are set to their default values. Optional parameters specified by you are unaltered by nag_opt_qpconvex1_sparse_solve (e04nk) (unless they define invalid values) and so remain in effect for subsequent calls unless altered by you.

Description of the Optional Parameters

For each option, we give a summary line, a description of the optional parameter and details of constraints.
The summary line contains:
Keywords and character values are case and white space insensitive.
Check Frequency  ii
Default = 60=60
Every iith iteration after the most recent basis factorization, a numerical test is made to see if the current solution (x,s)(x,s) satisfies the linear constraints Axs = 0Ax-s=0. If the largest element of the residual vector r = Axsr=Ax-s is judged to be too large, the current basis is refactorized and the basic variables recomputed to satisfy the constraints more accurately. If i < 0i<0, the default value is used. If i = 0i=0, the value i = 99999999i=99999999 is used and effectively no checks are made.
Crash Option  ii
Default = 2=2
Note that this option does not apply when start = 'W'start='W' (see Section [Parameters]).
If start = 'C'start='C', an internal Crash procedure is used to select an initial basis from various rows and columns of the constraint matrix
(AI)
A -I . The value of ii determines which rows and columns are initially eligible for the basis, and how many times the Crash procedure is called. If i = 0i=0, the all-slack basis B = IB=-I is chosen. If i = 1i=1, the Crash procedure is called once (looking for a triangular basis in all rows and columns of the linear constraint matrix AA). If i = 2i=2, the Crash procedure is called twice (looking at any equality constraints first followed by any inequality constraints). If i < 0i<0 or i > 2i>2, the default value is used.
If i = 1​ or ​2i=1​ or ​2, certain slacks on inequality rows are selected for the basis first. (If i = 2i=2, numerical values are used to exclude slacks that are close to a bound.) The Crash procedure then makes several passes through the columns of AA, searching for a basis matrix that is essentially triangular. A column is assigned to ‘pivot’ on a particular row if the column contains a suitably large element in a row that has not yet been assigned. (The pivot elements ultimately form the diagonals of the triangular basis.) For remaining unassigned rows, slack variables are inserted to complete the basis.
Crash Tolerance  rr
Default = 0.1=0.1
This value allows the Crash procedure to ignore certain ‘small’ nonzero elements in the constraint matrix AA while searching for a triangular basis. For each column of AA, if amaxamax is the largest element in the column, other nonzeros in that column are ignored if they are less than (or equal to) amax × ramax×r.
When r > 0r>0, the basis obtained by the Crash procedure may not be strictly triangular, but it is likely to be nonsingular and almost triangular. The intention is to obtain a starting basis with more column variables and fewer (arbitrary) slacks. A feasible solution may be reached earlier for some problems. If r < 0r<0 or r1r1, the default value is used.
Defaults  
This special keyword may be used to reset all optional parameters to their default values.
Expand Frequency  ii
Default = 10000=10000
This option is part of an anti-cycling procedure (see Section [Miscellaneous]) designed to allow progress even on highly degenerate problems.
For LP problems, the strategy is to force a positive step at every iteration, at the expense of violating the constraints by a small amount. Suppose that the value of the optional parameter Feasibility Tolerance is δδ. Over a period of ii iterations, the feasibility tolerance actually used by nag_opt_qpconvex1_sparse_solve (e04nk) (i.e., the working feasibility tolerance) increases from 0.5δ0.5δ to δδ (in steps of 0.5δ / i0.5δ/i).
For QP problems, the same procedure is used for iterations in which there is only one superbasic variable. (Cycling can only occur when the current solution is at a vertex of the feasible region.) Thus, zero steps are allowed if there is more than one superbasic variable, but otherwise positive steps are enforced.
Increasing the value of ii helps reduce the number of slightly infeasible nonbasic basic variables (most of which are eliminated during the resetting procedure). However, it also diminishes the freedom to choose a large pivot element (see optional parameter Pivot Tolerance).
If i < 0i<0, the default value is used. If i = 0i=0, the value i = 99999999i=99999999 is used and effectively no anti-cycling procedure is invoked.
Factorization Frequency  ii
Default = 100=100
If i > 0i>0, at most ii basis changes will occur between factorizations of the basis matrix. For LP problems, the basis factors are usually updated at every iteration. For QP problems, fewer basis updates will occur as the solution is approached. The number of iterations between basis factorizations will therefore increase. During these iterations a test is made regularly according to the value of optional parameter Check Frequency to ensure that the linear constraints Axs = 0Ax-s=0 are satisfied. If necessary, the basis will be refactorized before the limit of ii updates is reached. If i0i0, the default value is used.
Feasibility Tolerance  rr
Default = max (106,sqrt(ε))=max(10-6,ε)
If rεrε, rr defines the maximum acceptable absolute violation in each constraint at a ‘feasible’ point (including slack variables). For example, if the variables and the coefficients in the linear constraints are of order unity, and the latter are correct to about five decimal digits, it would be appropriate to specify rr as 10510-5. If r < εr<ε, the default value is used.
nag_opt_qpconvex1_sparse_solve (e04nk) attempts to find a feasible solution before optimizing the objective function. If the sum of infeasibilities cannot be reduced to zero, the problem is assumed to be infeasible. Let Sinf be the corresponding sum of infeasibilities. If Sinf is quite small, it may be appropriate to raise rr by a factor of 1010 or 100100. Otherwise, some error in the data should be suspected. Note that the function does not attempt to find the minimum value of Sinf.
If the constraints and variables have been scaled (see Scale Option), then feasibility is defined in terms of the scaled problem (since it is more likely to be meaningful).
Infinite Bound Size  rr
Default = 1020=1020
If r > 0r>0, rr defines the ‘infinite’ bound bigbndbigbnd in the definition of the problem constraints. Any upper bound greater than or equal to bigbndbigbnd will be regarded as + + (and similarly any lower bound less than or equal to bigbnd-bigbnd will be regarded as -). If r0r0, the default value is used.
Infinite Step Size  rr
Default = max (bigbnd,1020)=max(bigbnd,1020)
If r > 0r>0, rr specifies the magnitude of the change in variables that will be considered a step to an unbounded solution. (Note that an unbounded solution can occur only when the Hessian is not positive definite.) If the change in xx during an iteration would exceed the value of rr, the objective function is considered to be unbounded below in the feasible region. If r0r0, the default value is used.
Iteration Limit  ii
Default = max (50,5(n + m))=max(50,5(n+m))
Iters  
Itns  
The value of ii specifies the maximum number of iterations allowed before termination. Setting i = 0i=0 and Print Level > 0Print Level>0 means that the workspace needed to start solving the problem will be computed and printed, but no iterations will be performed. If i < 0i<0, the default value is used.
List  
Default for e04nk = Liste04nk=List
Nolist  
Default for e04nk = Noliste04nk=Nolist
Normally each optional parameter specification is printed as it is supplied. Optional parameter Nolist may be used to suppress the printing and optional parameter List may be used to restore printing.
LU Factor Tolerance  r1r1
Default = 100.0=100.0
LU Update Tolerance  r2r2
Default = 10.0=10.0
The values of r1r1 and r2r2 affect the stability and sparsity of the basis factorization B = LUB=LU, during refactorization and updates respectively. The lower triangular matrix LL is a product of matrices of the form
(10)
μ 1
1 0 μ 1
where the multipliers μμ will satisfy |μ|ri|μ|ri. The default values of r1r1 and r2r2 usually strike a good compromise between stability and sparsity. For large and relatively dense problems, setting r1r1 and r2r2 to 2525 (say) may give a marked improvement in sparsity without impairing stability to a serious degree.
Note that for band matrices it may be necessary to set r1r1 in the range 1r1 < 21r1<2 in order to achieve stability. If r1 < 1r1<1 or r2 < 1r2<1, the default value is used.
LU Singularity Tolerance  rr
Default = ε0.67=ε0.67
If r > 0r>0, rr defines the singularity tolerance used to guard against ill-conditioned basis matrices. Whenever the basis is refactorized, the diagonal elements of UU are tested as follows. If |ujj|r|ujj|r or |ujj| < r × maxi |uij||ujj|<r×maxi|uij|, the jjth column of the basis is replaced by the corresponding slack variable. If r0r0, the default value is used.
Minimize  
Default
Maximize  
This option specifies the required direction of the optimization. It applies to both linear and nonlinear terms (if any) in the objective function. Note that if two problems are the same except that one minimizes f(x)f(x) and the other maximizes f(x)-f(x), their solutions will be the same but the signs of the dual variables πiπi and the reduced gradients djdj (see Section [Main Iteration]) will be reversed.
Monitoring File  ii
Default = 1=-1
If i0i0 and Print Level > 0Print Level>0 (see Print Level), monitoring information produced by nag_opt_qpconvex1_sparse_solve (e04nk) is sent to a file with logical unit number ii. If i < 0i<0 and/or Print Level = 0Print Level=0, the default value is used and hence no monitoring information is produced.
Optimality Tolerance  rr
Default = max (106,sqrt(ε))=max(10-6,ε)
If rεrε, rr is used to judge the size of the reduced gradients dj = gjπTajdj=gj-πTaj. By definition, the reduced gradients for basic variables are always zero. Optimality is declared if the reduced gradients for any nonbasic variables at their lower or upper bounds satisfy r × max (1,π)djr × max (1,π)-r×max(1,π)djr×max(1,π), and if |dj|r × max (1,π)|dj|r×max(1,π) for any superbasic variables. If r < εr<ε, the default value is used.
Partial Price  ii
Default = 10=10
Note that this option does not apply to QP problems.
This option is recommended for large FP or LP problems that have significantly more variables than constraints (i.e., nmnm). It reduces the work required for each pricing operation (i.e., when a nonbasic variable is selected to enter the basis). If i = 1i=1, all columns of the constraint matrix
(AI)
A -I  are searched. If i > 1i>1, AA and I-I are partitioned to give ii roughly equal segments Aj,KjAj,Kj, for j = 1,2,,pj=1,2,,p (modulo pp). If the previous pricing search was successful on Aj1,Kj1Aj-1,Kj-1, the next search begins on the segments Aj,KjAj,Kj. If a reduced gradient is found that is larger than some dynamic tolerance, the variable with the largest such reduced gradient (of appropriate sign) is selected to enter the basis. If nothing is found, the search continues on the next segments Aj + 1,Kj + 1Aj+1,Kj+1, and so on. If i0i0, the default value is used.
Pivot Tolerance  rr
Default = ε0.67=ε0.67
If r > 0r>0, rr is used to prevent columns entering the basis if they would cause the basis to become almost singular. If r0r0, the default value is used.
Print Level  ii
The value of ii controls the amount of printout produced by nag_opt_qpconvex1_sparse_solve (e04nk), as indicated below. A detailed description of the printed output is given in Section [Printed output] (summary output at each iteration and the final solution) and Section [Description of Monitoring Information] (monitoring information at each iteration). Note that the summary output will not exceed 8080 characters per line and that the monitoring information will not exceed 120120 characters per line. If i < 0i<0, the default value is used.
The following printout is sent to the current advisory message unit (as defined by nag_file_set_unit_advisory (x04ab)):
ii Output
0000 No output.
0101 The final solution only.
0505 One line of summary output for each iteration (no printout of the final solution).
1010 The final solution and one line of summary output for each iteration.
The following printout is sent to the logical unit number defined by the optional parameter Monitoring File:
ii Output
0000 No output.
0101 The final solution only.
0505 One long line of output for each iteration (no printout of the final solution).
1010 The final solution and one long line of output for each iteration.
2020 The final solution, one long line of output for each iteration, matrix statistics (initial status of rows and columns, number of elements, density, biggest and smallest elements, etc.), details of the scale factors resulting from the scaling procedure (if Scale Option = 1Scale Option=1 or 22 (see the description of the optional parameter Scale Option), basis factorization statistics and details of the initial basis resulting from the Crash procedure (if start = 'C'start='C'; see Section [Parameters]).
If Print Level > 0Print Level>0 and the unit number defined by optional parameter Monitoring File is the same as that defined by nag_file_set_unit_advisory (x04ab), then the summary output is suppressed.
Rank Tolerance  rr
Default = 100ε=100ε
Scale Option  ii
Default = 2=2
This option enables you to scale the variables and constraints using an iterative procedure due to Fourer (1982), which attempts to compute row scales riri and column scales cjcj such that the scaled matrix coefficients aij = aij × (cj / ri)a-ij=aij×(cj/ri) are as close as possible to unity. This may improve the overall efficiency on some problems. (The lower and upper bounds on the variables and slacks for the scaled problem are redefined as lj = lj / cjl-j=lj/cj and uj = uj / cju-j=uj/cj respectively, where cjrjncjrj-n if j > nj>n.)
If i = 0i=0, no scaling is performed. If i = 1i=1, all rows and columns of the constraint matrix AA are scaled. If i = 2i=2, an additional scaling is performed that may be helpful when the solution xx is large; it takes into account columns of
(AI)
A -I  that are fixed or have positive lower bounds or negative upper bounds. If i < 0i<0 or i > 2i>2, the default value is used.
Scale Tolerance  rr
Default = 0.9=0.9
Note that this option does not apply when Scale Option = 0Scale Option=0.
If 0 < r < 10<r<1, rr is used to control the number of scaling passes to be made through the constraint matrix AA. At least 33 (and at most 1010) passes will be made. More precisely, let apap denote the largest column ratio (i.e., ('biggest'​ element)/('smallest'​ element) 'biggest'​ element 'smallest'​ element  in some sense) after the ppth scaling pass through AA. The scaling procedure is terminated if apap1 × rapap-1×r for some p3p3. Thus, increasing the value of rr from 0.90.9 to 0.990.99 (say) will probably increase the number of passes through AA.
If r0r0 or r1r1, the default value is used.
Superbasics Limit  ii
Default = min (nH + 1,n)=min(nH+1,n)
Note that this option does not apply to FP or LP problems.
The value of ii specifies ‘how nonlinear’ you expect the QP problem to be. If i0i0, the default value is used.

Description of Monitoring Information

This section describes the intermediate printout and final printout which constitutes the monitoring information produced by nag_opt_qpconvex1_sparse_solve (e04nk). (See also the description of the optional parameters Monitoring File and Print Level.) You can control the level of printed output.
When Print Level = 5Print Level=5 or 1010 and Monitoring File0Monitoring File0, the following line of intermediate printout ( < 120<120 characters) is produced at every iteration on the unit number specified by optional parameter Monitoring File. Unless stated otherwise, the values of the quantities printed are those in effect on completion of the given iteration.
Itn is the iteration count.
pp is the partial price indicator. The variable selected by the last pricing operation came from the ppth partition of AA and I-I. Note that pp is reset to zero whenever the basis is refactorized.
dj is the value of the reduced gradient (or reduced cost) for the variable selected by the pricing operation at the start of the current iteration.
+S is the variable selected by the pricing operation to be added to the superbasic set.
-S is the variable chosen to leave the superbasic set.
-BS is the variable removed from the basis (if any) to become nonbasic.
Step is the value of the step length αα taken along the current search direction pp. The variables xx have just been changed to x + αpx+αp. If a variable is made superbasic during the current iteration (i.e., +S is positive), Step will be the step to the nearest bound. During the optimality phase, the step can be greater than unity only if the reduced Hessian is not positive definite.
Pivot is the rrth element of a vector yy satisfying By = aqBy=aq whenever aqaq (the qqth column of the constraint matrix
(AI)
A-I ) replaces the rrth column of the basis matrix BB. Wherever possible, Step is chosen so as to avoid extremely small values of Pivot (since they may cause the basis to be nearly singular). In extreme cases, it may be necessary to increase the value of the optional parameter Pivot Tolerance to exclude very small elements of yy from consideration during the computation of Step.
Ninf is the number of violated constraints (infeasibilities). This will be zero during the optimality phase.
Sinf/Objective is the value of the current objective function. If xx is not feasible, Sinf gives the sum of the magnitudes of constraint violations. If xx is feasible, Objective is the value of the objective function. The output line for the final iteration of the feasibility phase (i.e., the first iteration for which Ninf is zero) will give the value of the true objective at the first feasible point.
During the optimality phase, the value of the objective function will be nonincreasing. During the feasibility phase, the number of constraint infeasibilities will not increase until either a feasible point is found, or the optimality of the multipliers implies that no feasible point exists.
L is the number of nonzeros in the basis factor LL. Immediately after a basis factorization B = LUB=LU, this entry contains lenL. Further nonzeros are added to L when various columns of BB are later replaced. (Thus, L increases monotonically.)
U is the number of nonzeros in the basis factor UU. Immediately after a basis factorization B = LUB=LU, this entry contains lenU. As columns of BB are replaced, the matrix UU is maintained explicitly (in sparse form). The value of U may fluctuate up or down; in general, it will tend to increase.
Ncp is the number of compressions required to recover workspace in the data structure for UU. This includes the number of compressions needed during the previous basis factorization. Normally, Ncp should increase very slowly. If it does not, increase leniz and lenz by at least L + UL+U and rerun nag_opt_qpconvex1_sparse_solve (e04nk) (possibly using start = 'W'start='W'; see Section [Parameters]).
Norm rg is dSdS, the Euclidean norm of the reduced gradient (see Section [Main Iteration]). During the optimality phase, this norm will be approximately zero after a unit step. For FP and LP problems, Norm rg is not printed.
Ns is the current number of superbasic variables. For FP and LP problems, Ns is not printed.
Cond Hz is a lower bound on the condition number of the reduced Hessian (see Section [Definition of the Working Set and Search Direction]). The larger this number, the more difficult the problem. For FP and LP
problems, Cond Hz is not printed.
When Print Level20Print Level20 and Monitoring File0Monitoring File0, the following lines of intermediate printout ( < 120<120 characters) are produced on the unit number specified by optional parameter Monitoring File whenever the matrix BB or BS = (BS)
T
BS= B S T is factorized. Gaussian elimination is used to compute an LULU factorization of BB or BSBS, where PLPTPLPT is a lower triangular matrix and PUQPUQ is an upper triangular matrix for some permutation matrices PP and QQ. The factorization is stabilized in the manner described under the optional parameter LU Factor Tolerance (default value = 100.0default value=100.0).
Factorize is the factorization count.
Demand is a code giving the reason for the present factorization as follows:
Code Meaning
010010 First LULU factorization.
011011 The number of updates reached the value of the optional parameter Factorization Frequency.
012012 The number of nonzeros in the updated factors has increased significantly.
017017 Not enough storage to update factors.
010010 Row residuals too large (see the description for the optional parameter Check Frequency).
011011 Ill-conditioning has caused inconsistent results.
Iteration is the iteration count.
Nonlinear is the number of nonlinear variables in the current basis BB (not printed if BSBS is factorized).
Linear is the number of linear variables in BB (not printed if BSBS is factorized).
Slacks is the number of slack variables in BB (not printed if BSBS is factorized).
Elems is the number of nonzeros in BB (not printed if BSBS is factorized).
Density is the percentage nonzero density of BB (not printed if BSBS is factorized). More precisely, Density = 100 × Elems / (Nonlinear + Linear + Slacks)2Density=100×Elems/(Nonlinear+Linear+Slacks)2.
Compressns is the number of times the data structure holding the partially factorized matrix needed to be compressed, in order to recover unused workspace. Ideally, it should be zero. If it is more than 33 or 44, increase leniz and lenz and rerun nag_opt_qpconvex1_sparse_solve (e04nk) (possibly using start = 'W'start='W'; see Section [Parameters]).
Merit is the average Markowitz merit count for the elements chosen to be the diagonals of PUQPUQ. Each merit count is defined to be (c1)(r1)(c-1)(r-1), where cc and rr are the number of nonzeros in the column and row containing the element at the time it is selected to be the next diagonal. Merit is the average of m such quantities. It gives an indication of how much work was required to preserve sparsity during the factorization.
lenL is the number of nonzeros in LL.
lenU is the number of nonzeros in UU.
Increase is the percentage increase in the number of nonzeros in LL and UU relative to the number of nonzeros in BB. More precisely, Increase = 100 × (lenL + lenUElems) / ElemsIncrease=100×(lenL+lenU-Elems)/Elems.
m is the number of rows in the problem. Note that m = Ut + Lt + bpm=Ut+Lt+bp.
Ut is the number of triangular rows of BB at the top of UU.
d1 is the number of columns remaining when the density of the basis matrix being factorized reached 0.30.3.
Lmax is the maximum subdiagonal element in the columns of LL. This will not exceed the value of the optional parameter LU Factor Tolerance.
Bmax is the maximum nonzero element in BB (not printed if BSBS is factorized).
BSmax is the maximum nonzero element in BSBS (not printed if BB is factorized).
Umax is the maximum nonzero element in UU, excluding elements of BB that remain in UU unchanged. (For example, if a slack variable is in the basis, the corresponding row of BB will become a row of UU without modification. Elements in such rows will not contribute to Umax. If the basis is strictly triangular then none of the elements of BB will contribute and Umax will be zero.)
Ideally, Umax should not be significantly larger than Bmax. If it is several orders of magnitude larger, it may be advisable to reset the optional parameter LU Factor Tolerance to some value nearer unity.
Umax is not printed if BSBS is factorized.
Umin is the magnitude of the smallest diagonal element of PUQPUQ (not printed if BSBS is factorized).
Growth is the value of the ratio Umax/Bmax, which should not be too large.
Providing Lmax is not large (say, < 10.0<10.0), the ratio max (Bmax,Umax) / Uminmax(Bmax,Umax)/Umin is an estimate of the condition number of BB. If this number is extremely large, the basis is nearly singular and some numerical difficulties might occur. (However, an effort is made to avoid near-singularity by using slacks to replace columns of BB that would have made Umin extremely small and the modified basis is refactorized.)
Growth is not printed if BSBS is factorized.
Lt is the number of triangular columns of BB at the left of LL.
bp is the size of the ‘bump’ or block to be factorized nontrivially after the triangular rows and columns of BB have been removed.
d2 is the number of columns remaining when the density of the basis matrix being factorized has reached 0.60.6.
When Print Level20Print Level20 and Monitoring File0Monitoring File0, the following lines of intermediate printout ( < 80<80 characters) are produced on the unit number specified by optional parameter Monitoring File whenever start = 'C'start='C' (see Section [Parameters]). They refer to the number of columns selected by the Crash procedure during each of several passes through AA, whilst searching for a triangular basis matrix.
Slacks is the number of slacks selected initially.
Free cols is the number of free columns in the basis, including those whose bounds are rather far apart.
Preferred is the number of ‘preferred’ columns in the basis (i.e., istate(j) = 3istatej=3 for some jnjn). It will be a subset of the columns for which istate(j) = 3istatej=3 was specified.
Unit is the number of unit columns in the basis.
Double is the number of double columns in the basis.
Triangle is the number of triangular columns in the basis.
Pad is the number of slacks used to pad the basis (to make it a nonsingular triangle).
When Print Level20Print Level20 and Monitoring File0Monitoring File0, the following lines of intermediate printout ( < 80<80 characters) are produced on the unit number specified by optional parameter Monitoring File. They refer to the elements of the names array (see Section [Parameters]).
Name gives the name for the problem (blank if problem unnamed).
Status gives the exit status for the problem (i.e., Optimal soln, Weak soln, Unbounded, Infeasible, Excess itns, Error condn or Feasble soln) followed by details of the direction of the optimization (i.e., (Min) or (Max)).
Objective gives the name of the free row for the problem (blank if objective unnamed).
RHS gives the name of the constraint right-hand side for the problem (blank if objective unnamed).
Ranges gives the name of the ranges for the problem (blank if objective unnamed).
Bounds gives the name of the bounds for the problem (blank if objective unnamed).
When Print Level = 1Print Level=1 or 1010 and Monitoring File0Monitoring File0, the following lines of final printout ( < 120<120 characters) are produced on the unit number specified by optional parameter Monitoring File.
Let ajaj denote the jjth column of AA, for j = 1,2,,nj=1,2,,n. The following describes the printout for each column (or variable). A full stop (.) is printed for any numerical value that is zero.
Number is the column number jj. (This is used internally to refer to xjxj in the intermediate output.)
Column gives the name of xjxj.
State gives the state of the variable (LL if nonbasic on its lower bound, UL if nonbasic on its upper bound, EQ if nonbasic and fixed, FR if nonbasic and strictly between its bounds, BS if basic and SBS if superbasic).
A key is sometimes printed before State. Note that unless the optional parameter Scale Option = 0Scale Option=0 is specified, the tests for assigning a key are applied to the variables of the scaled problem.
A Alternative optimum possible. The variable is nonbasic, but its reduced gradient is essentially zero. This means that if the variable were allowed to start moving away from its bound, there would be no change in the value of the objective function. The values of the other free variables might change, giving a genuine alternative solution. However, if there are any degenerate variables (labelled D), the actual change might prove to be zero, since one of them could encounter a bound immediately. In either case, the values of the Lagrange multipliers might also change.
D Degenerate. The variable is basic or superbasic, but it is equal (or very close) to one of its bounds.
I Infeasible. The variable is basic or superbasic and is currently violating one of its bounds by more than the value of the Feasibility Tolerance.
N Not precisely optimal. The variable is nonbasic or superbasic. If the value of the reduced gradient for the variable exceeds the value of the optional parameter Optimality Tolerance, the solution would not be declared optimal because the reduced gradient for the variable would not be considered negligible.
Activity is the value of xjxj at the final iterate.
Obj Gradient is the value of gjgj at the final iterate. For FP problems, gjgj is set to zero.
Lower Bound is the lower bound specified for the variable. None indicates that bl(j)bigbndblj-bigbnd.
Upper Bound is the upper bound specified for the variable. None indicates that bu(j)bigbndbujbigbnd.
Reduced Gradnt is the value of djdj at the final iterate (see Section [Main Iteration]). For FP problems, djdj is set to zero.
m + j is the value of m + jm+j.
Let vivi denote the iith row of AA, for i = 1,2,,mi=1,2,,m. The following describes the printout for each row (or constraint). A full stop (.) is printed for any numerical value that is zero.
Number is the value of n + in+i. (This is used internally to refer to sisi in the intermediate output.)
Row gives the name of νiνi.
State gives the state of vivi (LL if active on its lower bound, UL if active on its upper bound, EQ if active and fixed, BS if inactive when sisi is basic and SBS if inactive when sisi is superbasic).
A key is sometimes printed before State. Note that unless the optional parameter Scale Option = 0Scale Option=0 is specified, the tests for assigning a key are applied to the variables of the scaled problem.
A Alternative optimum possible. The variable is nonbasic, but its reduced gradient is essentially zero. This means that if the variable were allowed to start moving away from its bound, there would be no change in the value of the objective function. The values of the other free variables might change, giving a genuine alternative solution. However, if there are any degenerate variables (labelled D), the actual change might prove to be zero, since one of them could encounter a bound immediately. In either case, the values of the Lagrange multipliers might also change.
D Degenerate. The variable is basic or superbasic, but it is equal (or very close) to one of its bounds.
I Infeasible. The variable is basic or superbasic and is currently violating one of its bounds by more than the value of the Feasibility Tolerance.
N Not precisely optimal. The variable is nonbasic or superbasic. If the value of the reduced gradient for the variable exceeds the value of the optional parameter Optimality Tolerance, the solution would not be declared optimal because the reduced gradient for the variable would not be considered negligible.
Activity is the value of vivi at the final iterate.
Slack Activity is the value by which the row differs from its nearest bound. (For the free row (if any), it is set to Activity.)
Lower Bound is the lower bound specified for the variable. None indicates that bl(j)bigbndblj-bigbnd.
Upper Bound is the upper bound specified for the variable. None indicates that bu(j)bigbndbujbigbnd.
Dual Activity is the value of the dual variable πiπi (the Lagrange multiplier for νiνi; see Section [Main Iteration]). For FP problems, πiπi is set to zero.
i gives the index ii of the iith row.
Numerical values are output with a fixed number of digits; they are not guaranteed to be accurate to this precision.

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2013