NAG CL Interface
e04wdc (nlp2_​solve)

Note: this function uses optional parameters to define choices in the problem specification and in the details of the algorithm. If you wish to use default settings for all of the optional parameters, you need only read Sections 1 to 10 of this document. If, however, you wish to reset some or all of the settings please refer to Section 11 for a detailed description of the algorithm, to Section 12 for a detailed description of the specification of the optional parameters and to Section 13 for a detailed description of the monitoring information produced by the function.

1 Purpose

e04wdc is designed to minimize an arbitrary smooth function subject to constraints (which may include simple bounds on the variables, linear constraints and smooth nonlinear constraints) using a sequential quadratic programming (SQP) method. As many first derivatives as possible should be supplied by you; any unspecified derivatives are approximated by finite differences. It is not intended for large sparse problems.
e04wdc may also be used for unconstrained, bound-constrained and linearly constrained optimization.
e04wdc uses forward communication for evaluating the objective function, the nonlinear constraint functions, and any of their derivatives.
The initialization function e04wcc must have been called before to calling e04wdc.

2 Specification

#include <nag.h>
void  e04wdc (Integer n, Integer nclin, Integer ncnln, Integer tda, Integer tdcj, Integer tdh, const double a[], const double bl[], const double bu[],
void (*confun)(Integer *mode, Integer ncnln, Integer n, Integer tdcj, const Integer needc[], const double x[], double ccon[], double cjac[], Integer nstate, Nag_Comm *comm),
void (*objfun)(Integer *mode, Integer n, const double x[], double *objf, double grad[], Integer nstate, Nag_Comm *comm),
Integer *majits, Integer istate[], double ccon[], double cjac[], double clamda[], double *objf, double grad[], double h[], double x[], Nag_E04State *state, Nag_Comm *comm, NagError *fail)
The function may be called by the names: e04wdc, nag_opt_nlp2_solve or nag_opt_nlp_solve.
Before calling e04wdc, or any of the option setting functions e04wec, e04wfc, e04wgc or e04whc, e04wcc must be called. The specification for e04wcc is:
#include <nag.h>
void  nag_opt_nlp_init (Nag_E04State *state, NagError *fail)
The contents of state must not be altered between calls of the functions e04wcc, e04wdc, e04wec, e04wgc or e04whc.

3 Description

e04wdc is designed to solve nonlinear programming problems – the minimization of a smooth nonlinear function subject to a set of constraints on the variables. e04wdc is suitable for small dense problems. The problem is assumed to be stated in the following form:
minimize xRn Fx   subject to   l x ALx cx u, (1)
where F x (the objective function) is a nonlinear scalar function, AL is an nL by n constant matrix, and c x is an nN -vector of nonlinear constraint functions. (The matrix AL and the vector c x may be empty.) The objective function and the constraint functions are assumed to be smooth, here meaning at least twice-continuously differentiable. (The method of e04wdc will usually solve (1) if there are only isolated discontinuities away from the solution.) We also write rx for the vector of combined functions:
rx = x ALx cx T .  
Note that although the bounds on the variables could be included in the definition of the linear constraints, we prefer to distinguish between them for reasons of computational efficiency. For the same reason, the linear constraints should not be included in the definition of the nonlinear constraints. Upper and lower bounds are specified for all the variables and for all the constraints. An equality constraint on ri can be specified by setting li = ui . If certain bounds are not present, the associated elements of l or u can be set to special values that will be treated as - or + . (See the description of the optional parameter Infinite Bound Size.)
A typical invocation of e04wdc is:
nag_opt_nlp2_init(&state, ...);
nag_opt_nlp2_option_file(ispecs, &state, ...);
nag_opt_nlp2_solve(n, nclin, ncnln, ...);
where e04wec reads a file of optional definitions.
Figure 1 illustrates the feasible region for the j th pair of constraints lj rj x uj . The quantity of δ is the Feasibility Tolerance, which can be set by you (see Section 12). The constraints lj rj uj are considered ‘satisfied’ if rj lies in Regions 2, 3 or 4, and ‘inactive’ if rj lies in Region 3. The constraint rj lj is considered ‘active’ in Region 2, and ‘violated’ in Region 1. Similarly, rj uj is active in Region 4, and violated in Region 5. For equality constraints ( lj = uj ), Regions 2 and 4 are the same and Region 3 is empty.
Illustration of the constraints lj ≤ rj x ≤ uj
Figure 1: Illustration of the constraints lj rj x uj
If there are no nonlinear constraints in (1) and F is linear or quadratic, then it will generally be more efficient to use one of e04mfc, e04ncc or e04nfc. If the problem is large and sparse and does have nonlinear constraints, then e04vhc should be used, since e04wdc treats all matrices as dense.
You must supply an initial estimate of the solution to (1), together with functions that define Fx and cx with as many first partial derivatives as possible; unspecified derivatives are approximated by finite differences; see Section 12.1 for a discussion of the optional parameter Derivative Level.
The objective function is defined by objfun, and the nonlinear constraints are defined by confun. Note that if there are any nonlinear constraints then the first call to confun will precede the first call to objfun.
For maximum reliability, it is preferable for you to provide all partial derivatives (see Chapter 8 of Gill et al. (1981), for a detailed discussion). If all gradients cannot be provided, it is similarly advisable to provide as many as possible. While developing objfun and confun, the optional parameter Verify Level should be used to check the calculation of any known gradients.
The method used by e04wdc is based on NPOPT, which is part of the SNOPT package described in Gill et al. (2005b), and the algorithm it uses is described in detail in Section 11.

4 References

Eldersveld S K (1991) Large-scale sequential quadratic programming algorithms PhD Thesis Department of Operations Research, Stanford University, Stanford
Fourer R (1982) Solving staircase linear programs by the simplex method Math. Programming 23 274–313
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 and Saunders M A (2005a) Users' guide for SQOPT 7: a Fortran package for large-scale linear and quadratic programming Report NA 05-1 Department of Mathematics, University of California, San Diego https://www.ccom.ucsd.edu/~peg/papers/sqdoc7.pdf
Gill P E, Murray W and Saunders M A (2005b) Users' guide for SNOPT 7.1: a Fortran package for large-scale linear nonlinear programming Report NA 05-2 Department of Mathematics, University of California, San Diego https://www.ccom.ucsd.edu/~peg/papers/sndoc7.pdf
Gill P E, Murray W, Saunders M A and Wright M H (1986) Users' guide for NPSOL (Version 4.0): a Fortran package for nonlinear programming Report SOL 86-2 Department of Operations Research, Stanford University
Gill P E, Murray W, Saunders M A and Wright M H (1992) Some theoretical properties of an augmented Lagrangian merit function Advances in Optimization and Parallel Computing (ed P M Pardalos) 101–128 North Holland
Gill P E, Murray W and Wright M H (1981) Practical Optimization Academic Press
Hock W and Schittkowski K (1981) Test Examples for Nonlinear Programming Codes. Lecture Notes in Economics and Mathematical Systems 187 Springer–Verlag

5 Arguments

1: n Integer Input
On entry: n, the number of variables.
Constraint: n>0.
2: nclin Integer Input
On entry: nL, the number of general linear constraints.
Constraint: nclin0.
3: ncnln Integer Input
On entry: nN, the number of nonlinear constraints.
Constraint: ncnln0.
4: tda Integer Input
On entry: the stride separating matrix column elements in the array a.
Constraints:
  • if nclin>0, tdan;
  • otherwise tda1.
5: tdcj Integer Input
On entry: the stride separating matrix column elements in the array cjac.
Constraints:
  • if ncnln>0, tdcjn;
  • otherwise tdcj1.
6: tdh Integer Input
On entry: the stride separating matrix column elements in the array h.
Constraint: tdhn unless the optional parameter Hessian Limited Memory is in effect. If Hessian Limited Memory is in effect, array h is not referenced
7: a[dim] const double Input
Note: the dimension, dim, of the array a must be at least max1,nclin×tda.
The i,jth element of the matrix A is stored in a[i-1×tda+j-1].
On entry: the ith row of a contains the ith row of the matrix AL of general linear constraints in (1). That is, the ith row contains the coefficients of the ith general linear constraint, for i=1,2,,nclin.
If nclin=0, the array a is not referenced.
8: bl[n+nclin+ncnln] const double Input
9: bu[n+nclin+ncnln] const double Input
On entry: bl must contain the lower bounds and bu the upper bounds for all the constraints, in the following order. The first n elements of each array must contain the bounds on the variables, the next nL elements the bounds for the general linear constraints (if any) and the next nN elements the bounds for the general nonlinear constraints (if any). To specify a nonexistent lower bound (i.e., lj=- ), set bl[j-1] -bigbnd , and to specify a nonexistent upper bound (i.e., uj=+ ), set bu[j-1] bigbnd ; where bigbnd is the optional parameter Infinite Bound Size. To specify the j th constraint as an equality, set bl[j-1]=bu[j-1]=β , say, where β < bigbnd .
Constraints:
  • bl[j-1]bu[j-1], for j=1,2,,n+nclin+ncnln;
  • if bl[j-1]=bu[j-1]=β, β<bigbnd.
10: confun function, supplied by the user External Function
confun must calculate the vector cx of nonlinear constraint functions and (optionally) its Jacobian, c x , for a specified n-vector x. If there are no nonlinear constraints (i.e., ncnln=0), e04wdc will never call confun, so it may be specified as NULLFN. If there are nonlinear constraints, the first call to confun will occur before the first call to objfun.
If all constraint gradients (Jacobian elements) are known (i.e., Derivative Level=2 or 3), any constant elements may be assigned to cjac once only at the start of the optimization. An element of cjac that is not subsequently assigned in confun will retain its initial value throughout. Constant elements may be loaded in cjac during the first call to confun (signalled by the value of nstate=1). The ability to preload constants is useful when many Jacobian elements are identically zero, in which case cjac may be initialized to zero and nonzero elements may be reset by confun.
It must be emphasized that, if Derivative Level<2, unassigned elements of cjac are not treated as constant; they are estimated by finite differences, at nontrivial expense.
The specification of confun is:
void  confun (Integer *mode, Integer ncnln, Integer n, Integer tdcj, const Integer needc[], const double x[], double ccon[], double cjac[], Integer nstate, Nag_Comm *comm)
1: mode Integer * Input/Output
On entry: is set by e04wdc to indicate which values must be assigned during each call of confun. Only the following values need be assigned, for each value of i such that needc[i-1]>0:
mode=0
The components of ccon corresponding to positive values in needc must be set. Other components and the array cjac are ignored.
mode=1
The known components of the rows of cjac corresponding to positive values in needc must be set. Other rows of cjac and the array ccon will be ignored.
mode=2
Only the elements of ccon corresponding to positive values of needc need to be set (and similarly for the known components of the rows of cjac).
On exit: may be used to indicate that you are unable or unwilling to evaluate the constraint functions at the current x .
During the linesearch, the constraint functions are evaluated at points of the form x=xk + αpk after they have already been evaluated satisfactorily at xk . At any such α , if you set mode=-1 , e04wdc will evaluate the functions at some point closer to xk (where they are more likely to be defined).
If for some reason you wish to terminate the current problem, set mode<-1 .
2: ncnln Integer Input
On entry: nN, the number of nonlinear constraints.
3: n Integer Input
On entry: n, the number of variables.
4: tdcj Integer Input
On entry: the stride used in the array cjac.
5: needc[ncnln] const Integer Input
On entry: the indices of the elements of ccon and/or cjac that must be evaluated by confun. If needc[i-1]>0, the ith element of ccon and/or the available elements of the ith row of cjac (see argument mode) must be evaluated at x.
6: x[n] const double Input
On entry: x, the vector of variables at which the constraint functions and/or the available elements of the constraint Jacobian are to be evaluated.
7: ccon[max1,ncnln] double Output
On exit: if needc[i-1] > 0 and mode=0 or 2, ccon[i-1] must contain the value of the ith constraint at x. The remaining elements of ccon, corresponding to the non-positive elements of needc, are ignored.
8: cjac[ncnln×tdcj] double Input/Output
On entry: the elements of cjac are set to special values that enable e04wdc to detect whether they are reset by confun.
On exit: if needc[i-1] > 0 and mode=1 or 2, the i th row of cjac must contain the available elements of the vector ci given by
ci= ci x1 , ci x2 , , ci xn T ,  
where ci xj is the partial derivative of the ith constraint with respect to the jth variable, evaluated at the point x. See also the argument nstate. The remaining rows of cjac, corresponding to non-positive elements of needc, are ignored.
If all elements of the constraint Jacobian are known (i.e., Derivative Level=2 or 3), any constant elements may be assigned to cjac one time only at the start of the optimization. An element of cjac that is not subsequently assigned in confun will retain its initial value throughout. Constant elements may be loaded into cjac during the first call to confun (signalled by the value nstate=1). The ability to preload constants is useful when many Jacobian elements are identically zero, in which case cjac may be initialized to zero and nonzero elements may be reset by confun.
Note that constant nonzero elements do affect the values of the constraints. Thus, if cjac[i-1×tdcj+j-1] is set to a constant value, it need not be reset in subsequent calls to confun, but the value cjac[i-1×tdcj+j-1] × x[j-1] must nonetheless be added to ccon[i-1] . For example, if cjac[0]=2 and cjac[1]=-5, then the term 2 × x[0] - 5 × x[1] must be included in the definition of ccon[0] .
It must be emphasized that, if Derivative Level=0 or 1, unassigned elements of cjac are not treated as constant; they are estimated by finite differences, at nontrivial expense. If you do not supply a value for the optional parameter Difference Interval, an interval for each element of x is computed automatically at the start of the optimization. The automatic procedure can usually identify constant elements of cjac, which are then computed once only by finite differences.
9: nstate Integer Input
On entry: if nstate=1, then e04wdc is calling confun for the first time. This argument setting allows you to save computation time if certain data must be read or calculated only once.
10: comm Nag_Comm *
Pointer to structure of type Nag_Comm; the following members are relevant to confun.
userdouble *
iuserInteger *
pPointer 
The type Pointer will be void *. Before calling e04wdc you may allocate memory and initialize these pointers with various quantities for use by confun when called from e04wdc (see Section 3.1.1 in the Introduction to the NAG Library CL Interface).
Note: confun should not return floating-point NaN (Not a Number) or infinity values, since these are not handled by e04wdc. If your code inadvertently does return any NaNs or infinities, e04wdc is likely to produce unexpected results.
confun should be tested separately before being used in conjunction with e04wdc. See also the description of the optional parameter Verify Level.
11: objfun function, supplied by the user External Function
objfun must calculate the objective function Fx and (optionally) its gradient gx = F x for a specified n-vector x.
The specification of objfun is:
void  objfun (Integer *mode, Integer n, const double x[], double *objf, double grad[], Integer nstate, Nag_Comm *comm)
1: mode Integer * Input/Output
On entry: is set by e04wdc to indicate which values must be assigned during each call of objfun. Only the following values need be assigned:
mode=0
objf.
mode=1
All available elements of grad.
mode=2
objf and all available elements of grad.
On exit: may be used to indicate that you are unable or unwilling to evaluate the objective function at the current x .
During the linesearch, the function is evaluated at points of the form x=xk + αpk after they have already been evaluated satisfactorily at xk . For any such x , if you set mode=-1 , e04wdc will reduce α and evaluate the functions again (closer to xk , where they are more likely to be defined).
If for some reason you wish to terminate the current problem, set mode<-1 .
2: n Integer Input
On entry: n, the number of variables.
3: x[n] const double Input
On entry: x, the vector of variables at which the objective function and/or all available elements of its gradient are to be evaluated.
4: objf double * Output
On exit: if mode=0 or 2, objf must be set to the value of the objective function at x.
5: grad[n] double Input/Output
On entry: the elements of grad are set to special values.
On exit: if mode=1 or 2, grad must return the available elements of the gradient evaluated at x, i.e., grad[i-1] contains the partial derivative F xi .
6: nstate Integer Input
On entry: if nstate=1, then e04wdc is calling objfun for the first time. This argument setting allows you to save computation time if certain data must be read or calculated only once.
7: comm Nag_Comm *
Pointer to structure of type Nag_Comm; the following members are relevant to objfun.
userdouble *
iuserInteger *
pPointer 
The type Pointer will be void *. Before calling e04wdc you may allocate memory and initialize these pointers with various quantities for use by objfun when called from e04wdc (see Section 3.1.1 in the Introduction to the NAG Library CL Interface).
Note: objfun should not return floating-point NaN (Not a Number) or infinity values, since these are not handled by e04wdc. If your code inadvertently does return any NaNs or infinities, e04wdc is likely to produce unexpected results.
objfun should be tested separately before being used in conjunction with e04wdc. See also the description of the optional parameter Verify Level.
12: majits Integer * Output
On exit: the number of major iterations performed.
13: istate[n+nclin+ncnln] Integer Input/Output
On entry: is an integer array that need not be initialized if e04wdc is called with the Cold Start option (the default).
If optional parameter Warm Start has been chosen, every element of istate must be set. If e04wdc has just been called on a problem with the same dimensions, istate already contains valid values. Otherwise, istate[j-1] should indicate whether either of the constraints rj x lj or rj x uj is expected to be active at a solution of (1).
The ordering of istate is the same as for bl, bu and rx, i.e., the first n components of istate refer to the upper and lower bounds on the variables, the next nclin refer to the bounds on ALx , and the last ncnln refer to the bounds on cx . Possible values of istate[i-1] follow:
0 Neither rj x lj nor rj x uj is expected to be active.
1 rj x lj is expected to be active.
2 rj x uj is expected to be active.
3 This may be used if lj=uj . Normally an equality constraint rj x=lj=uj is active at a solution.
The values 1, 2 or 3 all have the same effect when bl[j-1]=bu[j-1] . If necessary, e04wdc will override your specification of istate, so that a poor choice will not cause the algorithm to fail.
On exit: describes the status of the constraints lrxu . For the jth lower or upper bound, j=1,2,,n+nclin+ncnln, the possible values of istate[j-1] are as follows (see Figure 1). δ is the appropriate feasibility tolerance.
-2 (Region 1) The lower bound is violated by more than δ .
-1 (Region 5) The upper bound is violated by more than δ .
-0 (Region 3) Both bounds are satisfied by more than δ .
-1 (Region 2) The lower bound is active (to within δ ).
-2 (Region 4) The upper bound is active (to within δ ).
-3 (Region 2=Region 4) The bounds are equal and the equality constraint is satisfied (to within δ ).
These values of istate are labelled in the printed solution according to Table 1.
Region 1 2 3 4 5 24
istate[j-1] -2 1 0 2 -1 3
Printed solution -- LL FR UL ++ EQ
Table 1
Labels used in the printed solution for the regions in Figure 1
14: ccon[max1,ncnln] double Input/Output
On entry: ccon need not be initialized if the (default) optional parameter Cold Start is used.
For a Warm Start, and if ncnln>0, ccon contains values of the nonlinear constraint functions ci, for i=1,2,,ncnln, calculated in a previous call to e04wdc.
On exit: if ncnln>0, ccon[i-1] contains the value of the ith nonlinear constraint function ci at the final iterate, for i=1,2,,ncnln.
If ncnln=0, the array ccon is not referenced.
15: cjac[dim] double Input/Output
Note: the dimension, dim, of the array cjac must be at least max1,ncnln×tdcj.
On entry: in general, cjac need not be initialized before the call to e04wdc. However, if Derivative Level=2 or 3, any constant elements of cjac may be initialized. Such elements need not be reassigned on subsequent calls to confun.
On exit: if ncnln>0, cjac contains the Jacobian matrix of the nonlinear constraint functions at the final iterate, i.e., cjac[i-1×tdcj+j-1] contains the partial derivative of the ith constraint function with respect to the jth variable, for i=1,2,,ncnln and j=1,2,,n. (See the discussion of argument cjac under confun.)
If ncnln=0, the array cjac is not referenced.
16: clamda[n+nclin+ncnln] double Input/Output
On entry: need not be set if the (default) optional parameter Cold Start is used.
If the optional parameter Warm Start has been chosen, clamda[j-1] must contain a multiplier estimate for each nonlinear constraint, with a sign that matches the status of the constraint specified by the istate array, for j=n+nclin+1,,n+nclin+ncnln. The remaining elements need not be set. If the jth constraint is defined as ‘inactive’ by the initial value of the istate array (i.e., istate[j-1]=0), clamda[j-1] should be zero; if the jth constraint is an inequality active at its lower bound (i.e., istate[j-1]=1), clamda[j-1] should be non-negative; if the jth constraint is an inequality active at its upper bound (i.e., istate[j-1]=2), clamda[j-1] should be non-positive. If necessary, the function will modify clamda to match these rules.
On exit: the values of the QP multipliers from the last QP subproblem. clamda[j-1] should be non-negative if istate[j-1]=1 and non-positive if istate[j-1]=2.
17: objf double * Output
On exit: the value of the objective function at the final iterate.
18: grad[n] double Output
On exit: the gradient of the objective function (or its finite difference approximation) at the final iterate.
19: h[dim] double Input/Output
Note: the dimension, dim, of the array h must be at least n×tdh.
On entry: h need not be initialized if the (default) optional parameter Cold Start is used, and will be set to the identity.
If the optional parameter Warm Start has been chosen, h provides the initial approximation of the Hessian of the Lagrangian, i.e., h[i-1×tdh+j-1] 2 L x,λ xi xj , where L x,λ=Fx - cx T λ and λ is an estimate of the Lagrange multipliers. h must be a positive definite matrix.
On exit: contains the Hessian of the Lagrangian at the final estimate x .
20: x[n] double Input/Output
On entry: an initial estimate of the solution.
On exit: the final estimate of the solution.
21: state Nag_E04State * Communication Structure
state contains internal information required for functions in this suite. It must not be modified in any way.
22: comm Nag_Comm *
The NAG communication argument (see Section 3.1.1 in the Introduction to the NAG Library CL Interface).
23: fail NagError * Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
e04wdc returns with fail.code= NE_NOERROR if the iterates have converged to a point x that satisfies the first-order Kuhn–Tucker (see Section 13.2) conditions to the accuracy requested by the Major Optimality Tolerance, i.e., the projected gradient and active constraint residuals are negligible at x.
You should check whether the following four conditions are satisfied:
  1. (i)the final value of rgNorm (see Section 13.2) is significantly less than that at the starting point;
  2. (ii)during the final major iterations, the values of Step and Minors (see Section 13.1) are both one;
  3. (iii)the last few values of both rgNorm and SumInf (see Section 13.2) become small at a fast linear rate; and
  4. (iv)condHz (see Section 13.1) is small.
If all these conditions hold, x is almost certainly a local minimum of (1).
One caution about ‘Optimal solutions’. Some of the variables or slacks may lie outside their bounds more than desired, especially if scaling was requested. Max Primal infeas in the Print file refers to the largest bound infeasibility and which variable is involved. If it is too large, consider restarting with a smaller Minor Feasibility Tolerance (say 10 times smaller) and perhaps Scale Option=0.
Similarly, Max Dual infeas in the Print file indicates which variable is most likely to be at a nonoptimal value. Broadly speaking, if
Max Dual infeas / Max pi = 10-d ,  
then the objective function would probably change in the d th significant digit if optimization could be continued. If d seems too large, consider restarting with a smaller Major Optimality Tolerance.
Finally, Nonlinear constraint violn in the Print file shows the maximum infeasibility for nonlinear rows. If it seems too large, consider restarting with a smaller Major Feasibility Tolerance.

6 Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
Internal error: memory allocation failed when attempting to allocate workspace sizes value and value. Please contact NAG.
NE_ALLOC_INSUFFICIENT
Internal memory allocation was insufficient. Please contact NAG.
NE_BAD_PARAM
Basis file dimensions do not match this problem.
On entry, argument value had an illegal value.
NE_BASIS_FAILURE
An error has occurred in the basis package, perhaps indicating incorrect setup of arrays. Set the optional parameter Print File and examine the output carefully for further information.
NE_DERIV_ERRORS
User-supplied function computes incorrect constraint derivatives.
User-supplied function computes incorrect objective derivatives.
If the message refers to the derivatives of the objective function, then a check has been made on some individual elements of the objective gradient array at the first point that satisfies the linear constraints. At least one component gradj-1 is being set to a value that disagrees markedly with its associated forward-difference estimate F xj . (The relative difference between the computed and estimated values is 1.0 or more.) This exit is a safeguard, since e04wdc will usually fail to make progress when the computed gradients are seriously inaccurate. In the process it may expend considerable effort before terminating with fail.code= NE_NUM_DIFFICULTIES.
Check the function and gradient computation very carefully in objfun. A simple omission could explain everything. If F or a component F xj is very large, then give serious thought to scaling the function or the nonlinear variables.
If you feel certain that the computed grad[j-1] is correct (and that the forward-difference estimate is therefore wrong), you can specify Verify Level=0 to prevent individual elements from being checked. However, the optimization procedure may have difficulty.
If the message refers to derivatives of the constraints, then at least one of the computed constraint derivatives is significantly different from an estimate obtained by forward-differencing the vector cx . Follow the advice given above, trying to ensure that the arrays ccon and cjac are being set correctly in confun.
NE_E04WCC_NOT_INIT
The initialization function e04wcc has not been called.
NE_INT
On entry, n=value.
Constraint: n>0.
On entry, nclin=value.
Constraint: nclin0.
On entry, ncnln=value.
Constraint: ncnln0.
On entry, tda=value.
Constraint: tda>0.
On entry, tdcj=value.
Constraint: tdcj>0.
On entry, tdh=value.
Constraint: tdh>0.
NE_INT_2
On entry, nclin=value and n=value.
Constraint: n>0.
On entry, ncnln=value and n=value.
Constraint: n>0.
On entry, tda=value and nclin=value.
Constraint: tdanclin.
On entry, tdcj=value and ncnln=value.
Constraint: tdcjncnln.
On entry, tdh=value and n=value.
Constraint: tdhn.
NE_INT_3
On entry, tda=value, nclin=value and n=value.
Constraint: if nclin>0, tdan;
otherwise tda1.
On entry, tdcj=value, ncnln=value and n=value.
Constraint: if ncnln>0, tdcjn;
otherwise tdcj1.
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
An unexpected error has occurred. Set the optional parameter Print File and examine the output carefully for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
NE_NOT_REQUIRED_ACC
The requested accuracy could not be achieved.
A feasible solution has been found, but the requested accuracy in the dual infeasibilities could not be achieved. An abnormal termination has occurred, but e04wdc is within 10-2 of satisfying the Major Optimality Tolerance. Check that the Major Optimality Tolerance is not too small.
NE_NUM_DIFFICULTIES
Numerical difficulties have been encountered and no further progress can be made.
Numerical difficulties have been encountered and no further progress can be made.
Several circumstances could lead to this exit.
  1. 1.The user-supplied functions objfun or confun could be returning accurate function values but inaccurate gradients (or vice versa). This is the most likely cause. Study the comments given for fail.code= NE_DERIV_ERRORS, and do your best to ensure that the coding is correct.
  2. 2.The function and gradient values could be consistent, but their precision could be too low. For example, accidental use of a real data type when double precision was intended would lead to a relative function precision of about 10-6 instead of something like 10-15 . The default Major Optimality Tolerance of 2×10-6 would need to be raised to about 10-3 for optimality to be declared (at a rather suboptimal point). Of course, it is better to revise the function coding to obtain as much precision as economically possible.
  3. 3.If function values are obtained from an expensive iterative process, they may be accurate to rather few significant figures, and gradients will probably not be available. One should specify
    • Function Precision t
    • Major Optimality Tolerance t
    but even then, if t is as large as 10-5 or 10-6 (only 5 or 6 significant figures), the same exit condition may occur. At present the only remedy is to increase the accuracy of the function calculation.
  4. 4.An LU factorization of the basis has just been obtained and used to recompute the basic variables xB , given the present values of the superbasic and nonbasic variables. A step of ‘iterative refinement’ has also been applied to increase the accuracy of xB . However, a row check has revealed that the resulting solution does not satisfy the current constraints Ax-s=0 sufficiently well.
    This probably means that the current basis is very ill-conditioned. If there are some linear constraints and variables, try Scale Option=1 if scaling has not yet been used.
    For certain highly structured basis matrices (notably those with band structure), a systematic growth may occur in the factor U . Consult the description of Umax and Growth in Section 13.4 and set the LU Factor Tolerance to 2.0 (or possibly even smaller, but not less than 1.0).
  5. 5.The first factorization attempt will have found the basis to be structurally or numerically singular. (Some diagonals of the triangular matrix U were respectively zero or smaller than a certain tolerance.) The associated variables are replaced by slacks and the modified basis is refactorized, but singularity persists. This must mean that the problem is badly scaled, or the LU Factor Tolerance is too much larger than 1.0. This is highly unlikely to occur.
NE_REAL_2
On entry, bounds bl and bu for value are equal and infinite. bl=bu=value and bigbnd=value.
On entry, bounds for value are inconsistent. bl=value and bu=value.
NE_UNBOUNDED
The problem appears to be unbounded. The constraint violation limit has been reached.
The problem appears to be unbounded. The objective function is unbounded.
The problem appears to be unbounded (or badly scaled).
For linear problems, unboundedness is detected by the simplex method when a nonbasic variable can be increased or decreased by an arbitrary amount without causing a basic variable to violate a bound. Consider adding an upper or lower bound to the variable. Also, examine the constraints that have nonzeros in the associated column, to see if they have been formulated as intended.
Very rarely, the scaling of the problem could be so poor that numerical error will give an erroneous indication of unboundedness. Consider using the optional parameter Scale Option.
For nonlinear problems, e04wdc monitors both the size of the current objective function and the size of the change in the variables at each step. If either of these is very large (as judged by the ‘Unbounded’ parameters (see Section 12)), the problem is terminated and declared unbounded. To avoid large function values, it may be necessary to impose bounds on some of the variables in order to keep them away from singularities in the nonlinear functions.
The message may indicate an abnormal termination while enforcing the limit on the constraint violations. This exit implies that the objective is not bounded below in the feasible region defined by expanding the bounds by the value of the Violation Limit.
NE_USER_STOP
User-supplied constraint function requested termination.
User-supplied objective function requested termination.
You have indicated the wish to terminate solution of the current problem by setting mode to a value < -1 on exit from objfun or confun.
NE_USRFUN_UNDEFINED
Unable to proceed into undefined region of user-supplied function.
User-supplied function is undefined at the first feasible point.
User-supplied function is undefined at the initial point.
You have indicated that the problem functions are undefined by assigning the value mode=-1 on exit from objfun or confun. e04wdc attempts to evaluate the problem functions closer to a point at which the functions are already known to be defined. This exit occurs if e04wdc is unable to find a point at which the functions are defined. This will occur in the case of:
  • undefined functions with no recovery possible;
  • undefined functions at the first point;
  • undefined functions at the first feasible point; or
  • undefined functions when checking derivatives.
NW_LIMIT_REACHED
Iteration limit reached.
Major iteration limit reached.
The value of the optional parameter Superbasics Limit is too small.
Either the Iterations Limit or the Major Iterations Limit was exceeded before the required solution could be found. Check the iteration log to be sure that progress was being made. If so, and if you caused a basis file to be saved by using the optional parameter New Basis File, consider restarting the run using the optional parameter Old Basis File to see whether further progress can be made. If you have no basis file available, you might rerun the problem after increasing the optional parameters Minor Iterations Limit and/or Major Iterations Limit.
If none of the above limits have been reached, this error may mean that the problem appears to be more nonlinear than anticipated. The current set of basic and superbasic variables have been optimized as much as possible and a pricing operation (where a nonbasic variable is selected to become superbasic) is necessary to continue, but it can't continue as the number of superbasic variables has already reached the limit specified by the optional parameter Superbasics Limit. In general, raise the Superbasics Limit s by a reasonable amount, bearing in mind the storage needed for the reduced Hessian. (The Reduced Hessian Dimension h will also increase to s unless specified otherwise, and the associated storage will be about 12s2 words.) In some cases you may have to set h<s to conserve storage, but beware that the rate of convergence will probably fall off severely.
NW_NOT_FEASIBLE
The linear constraints appear to be infeasible.
The problem appears to be infeasible. Infeasibilites have been minimized.
The problem appears to be infeasible. Nonlinear infeasibilites have been minimized.
The problem appears to be infeasible. The linear equality constraints could not be satisfied.
When the constraints are linear, this message is based on a relatively reliable indicator of infeasibility. Feasibility is measured with respect to the upper and lower bounds on the variables and slacks. Among all the points satisfying the general constraints Ax-s=0 (see (5) and (6) in Section 11.2), there is apparently no point that satisfies the bounds on x and s . Violations as small as the Minor Feasibility Tolerance are ignored, but at least one component of x or s violates a bound by more than the tolerance.
When nonlinear constraints are present, infeasibility is much harder to recognize correctly. Even if a feasible solution exists, the current linearization of the constraints may not contain a feasible point. In an attempt to deal with this situation, when solving each QP subproblem, e04wdc is prepared to relax the bounds on the slacks associated with nonlinear rows.
If a QP subproblem proves to be infeasible or unbounded (or if the Lagrange multiplier estimates for the nonlinear constraints become large), e04wdc enters so-called ‘nonlinear elastic’ mode. The subproblem includes the original QP objective and the sum of the infeasibilities – suitably weighted using the optional parameter Elastic Weight. In elastic mode, some of the bounds on the nonlinear rows are ‘elastic’ – i.e., they are allowed to violate their specific bounds. Variables subject to elastic bounds are known as elastic variables. An elastic variable is free to violate one or both of its original upper or lower bounds. If the original problem has a feasible solution and the elastic weight is sufficiently large, a feasible point eventually will be obtained for the perturbed constraints, and optimization can continue on the subproblem. If the nonlinear problem has no feasible solution, e04wdc will tend to determine a ‘good’ infeasible point if the elastic weight is sufficiently large. (If the elastic weight were infinite, e04wdc would locally minimize the nonlinear constraint violations subject to the linear constraints and bounds.)
Unfortunately, even though e04wdc locally minimizes the nonlinear constraint violations, there may still exist other regions in which the nonlinear constraints are satisfied. Wherever possible, nonlinear constraints should be defined in such a way that feasible points are known to exist when the constraints are linearized.

7 Accuracy

If fail.code= NE_NOERROR on exit, then the vector returned in the array x is an estimate of the solution to an accuracy of approximately Major Optimality Tolerance.

8 Parallelism and Performance

e04wdc makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

9 Further Comments

This section describes the final output produced by e04wdc. Intermediate and other output are given in Section 13.

9.1 The Final Output

If Print File=0, the final output, including a listing of the status of every variable and constraint will be sent to the Print File. The following describes the output for each variable. A full stop (.) is printed for any numerical value that is zero.
Variable gives the name (Variable) and index j, for j=1,2,,n, of the variable.
State gives the state of the variable (FR if neither bound is in the working set, EQ if a fixed variable, LL if on its lower bound, UL if on its upper bound, TF if temporarily fixed at its current value). If Value lies outside the upper or lower bounds by more than the Feasibility Tolerance, State will be ++ or -- respectively. (The latter situation can occur only when there is no feasible point for the bounds and linear constraints.)
A key is sometimes printed before State.
A Alternative optimum possible. The variable is active at one of its bounds, but its Lagrange multiplier is essentially zero. This means that if the variable were allowed to start moving away from its bound then there would be no change to 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 free, but it is equal to (or very close to) one of its bounds.
I Infeasible. The variable is currently violating one of its bounds by more than the Feasibility Tolerance.
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-1]-bigbnd.
Upper bound is the upper bound specified for the variable. None indicates that bu[j-1]bigbnd.
Lagr multiplier is the Lagrange multiplier for the associated bound. This will be zero if State is FR unless bl[j-1]-bigbnd and bu[j-1]bigbnd, in which case the entry will be blank. If x is optimal, the multiplier should be non-negative if State is LL and non-positive if State is UL.
Slack is the difference between the variable Value and the nearer of its (finite) bounds bl[j-1] and bu[j-1]. A blank entry indicates that the associated variable is not bounded (i.e., bl[j-1]-bigbnd and bu[j-1]bigbnd).
The meaning of the output for linear and nonlinear constraints is the same as that given above for variables, with bl[j-1] and bu[j-1] replaced by bl[n+j-1] and bu[n+j-1] respectively, and with the following changes in the heading:
Linear constrnt gives the name (lincon) and index j, for j=1,2,,nL, of the linear constraint.
Nonlin constrnt gives the name (nlncon) and index (j-nL), for j=nL+1,,nL+nN, of the nonlinear 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 Slack column to become positive.
Numerical values are output with a fixed number of digits; they are not guaranteed to be accurate to this precision.

10 Example

This example is based on Problem 71 in Hock and Schittkowski (1981) and involves the minimization of the nonlinear function
Fx=x1x4x1+x2+x3+x3  
subject to the bounds
1x1 5 1x2 5 1x3 5 1x4 5,  
to the general linear constraint
x1+x2+x3+x420,  
and to the nonlinear constraints
x12+x22+x32+x42 40, x1x2x3x4 25.  
The initial point, which is infeasible, is
x0 = 1,5,5,1 T ,  
with Fx0=16.
The optimal solution (to five figures) is
x*=1.0,4.7430,3.8211,1.3794T,  
and Fx*=17.014. One bound constraint and both nonlinear constraints are active at the solution.

10.1 Program Text

Program Text (e04wdce.c)

10.2 Program Data

Program Data (e04wdce.d)

10.3 Program Results

Program Results (e04wdce.r)
Note: the remainder of this document is intended for more advanced users. Section 11 contains a detailed description of the algorithm which may be needed in order to understand Sections 12 and 13. Section 12 describes the optional parameters which may be set by calls to e04wfc, e04wgc and/or e04whc. Section 13 describes the quantities which can be requested to monitor the course of the computation.

11 Algorithmic Details

Here we summarise the main features of the SQP algorithm used in e04wdc and introduce some terminology used in the description of the function and its arguments. The SQP algorithm is fully described in Gill et al. (2002).

11.1 Constraints and Slack Variables

The upper and lower bounds on the nL + nN components of ALx cx are said to define the general constraints of the problem. e04wdc converts the general constraints to equalities by introducing a set of slack variables s = s1,s2,, s nL + nN T . For example, the linear constraint 5 2x1 + 3x2 is replaced by 2x1 + 3x2 - s1 = 0 together with the bounded slack 5 s1 . The minimization problem (1) can therefore be written in the equivalent form
minimize x,s Fx  subject to ​ ALx cx - s = 0 ,  l x s u . (2)
The general constraints become the equalities ALx - sL = 0 and cx - sN = 0 , where sL and sN are the linear and nonlinear slacks.

11.2 Major Iterations

The basic structure of the SQP algorithm involves major and minor iterations. The major iterations generate a sequence of iterates xk that satisfy the linear constraints and converge to a point that satisfies the nonlinear constraints and the first-order conditions for optimality. At each iterate xk a QP subproblem is used to generate a search direction towards the next iterate xk+1 . The constraints of the subproblem are formed from the linear constraints ALx - sL = 0 and the linearized constraint
cxk + c xk x-xk - sN = 0 , (3)
where c xk denotes the Jacobian matrix, whose elements are the first derivatives of cx evaluated at xk . The QP constraints therefore comprise the nL + nN linear constraints
ALx - sL = 0 , c xk x - sN = -cxk + c xk xk , (4)
where x and s are bounded above and below by u and l as before. If the nL + nN × n matrix A and nL + nN -vector b are defined as
A = AL c xk  and  b = 0 -cxk + c xk xk , (5)
then the QP subproblem can be written as
minimize x,s q x,xk = gkT x-xk + 12 x-xk Hk x-xk  subject to ​ Ax - s = b ,  l x s u , (6)
where q x,xk is a quadratic approximation to a modified Lagrangian function (see Gill et al. (2002)). The matrix Hk is a quasi-Newton approximation to the Hessian of the Lagrangian. A BGFS update is applied after each major iteration. If some of the variables enter the Lagrangian linearly the Hessian will have some zero rows and columns. If the nonlinear variables appear first, then only the leading nN rows and columns of the Hessian need to be approximated.

11.3 Minor Iterations

Solving the QP subproblem is itself an iterative procedure. Here, the iterations of the QP solver e04nqc form the minor iterations of the SQP method. e04nqc uses a reduced-Hessian active-set method implemented as a reduced-gradient method. At each minor iteration, the constraints Ax-s=b are partitioned into the form
BxB + SxS + NxN = b , (7)
where the basis matrix B is square and nonsingular, and the matrices S and N are the remaining columns of A -I . The vectors xB , xS and xN are the associated basic, superbasic and nonbasic variables respectively; they are a permutation of the elements of x and s . At a QP subproblem, the basic and superbasic variables will lie somewhere between their bounds, while the nonbasic variables will normally be equal to one of their bounds. At each iteration, xS 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 QP objective (or the sum of infeasibilities). The basic variables are then adjusted in order to ensure that x,s continues to satisfy Ax-s=b . The number of superbasic variables ( nS , say) therefore indicates the number of degrees of freedom remaining after the constraints have been satisfied. In broad terms, nS is a measure of how nonlinear the problem is. In particular, nS will always be zero for LP problems.
If it appears that no improvement can be made with the current definition of B , S and N , a nonbasic variable is selected to be added to S , and the process is repeated with the value of nS 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 nS is decreased by one.
Associated with each of the nL + nN equality constraints Ax-s=b are the dual variables π . Similarly, each variable in x,s has an associated reduced gradient dj . The reduced gradients for the variables x are the quantities g-ATπ , where g is the gradient of the QP objective, and the reduced gradients for the slacks are the dual variables π . The QP subproblem is optimal if dj0 for all nonbasic variables at their lower bounds, dj0 for all nonbasic variables at their upper bounds, and dj=0 for other variables, including superbasics. In practice, an approximate QP solution x^k,s^k,π^k is found by relaxing these conditions.

11.4 The Merit Function

After a QP subproblem has been solved, new estimates of the solution are computed using a linesearch on the augmented Lagrangian merit function
M x,s,π = Fx - πT cx - sN + 12 cx - sN T D cx - sN , (8)
where D is a diagonal matrix of penalty parameters Dii 0 , and π now refers to dual variables for the nonlinear constraints in (1). If xk,sk,πk denotes the current solution estimate and x^k,s^k,π^k denotes the QP solution, the linesearch determines a step αk 0<αk1 such that the new point
xk+1 sk+1 πk+1 = xk sk πk + αk x^k - xk s^k - sk π^k - πk (9)
gives a sufficient decrease in the merit function M . When necessary, the penalties in D are increased by the minimum-norm perturbation that ensures descent for M (see Gill et al. (1992)). The value of sN is adjusted to minimize the merit function as a function of s before the solution of the QP subproblem (see Gill et al. (1986) and Eldersveld (1991)).

11.5 Treatment of Constraint Infeasibilities

e04wdc makes explicit allowance for infeasible constraints. First, infeasible linear constraints are detected by solving the linear program
minimize x,v,w eT v+w  subject to ​ l x ALx - v + w u ,  v0 ,  w0 , (10)
where e is a vector of ones, and the nonlinear constraint bounds are temporarily excluded from l and u . This is equivalent to minimizing the sum of the general linear constraint violations subject to the bounds on x . (The sum is the 1 -norm of the linear constraint violations. In the linear programming literature, the approach is called elastic programming.)
The linear constraints are infeasible if the optimal solution of (10) has v0 or w0 . e04wdc then terminates without computing the nonlinear functions.
Otherwise, all subsequent iterates satisfy the linear constraints. (Such a strategy allows linear constraints to be used to define a region in which the functions can be safely evaluated.) e04wdc proceeds to solve nonlinear problems as given, using search directions obtained from the sequence of QP subproblems (see (6)).
If a QP subproblem proves to be infeasible or unbounded (or if the dual variables π for the nonlinear constraints become large), e04wdc enters ‘elastic’ mode and thereafter solves the problem
minimize x,v,w Fx + γ eT v+w  subject to ​ l x ALx cx -v+w u ,  v0 ,  w0 , (11)
where γ is a non-negative argument (the elastic weight), and Fx + γ eT v+w is called a composite objective (the 1 penalty function for the nonlinear constraints).
The value of γ may increase automatically by multiples of 10 if the optimal v and w continue to be nonzero. If γ is sufficiently large, this is equivalent to minimizing the sum of the nonlinear constraint violations subject to the linear constraints and bounds.
The initial value of γ is controlled by the optional parameter Elastic Weight.

12 Optional Parameters

Several optional parameters in e04wdc define choices in the problem specification or the algorithm logic. In order to reduce the number of formal arguments of e04wdc 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 12.1.
Optional parameters may be specified by calling one, or more, of the functions e04wec, e04wfc and e04wgc before a call to e04wdc.
e04wec reads options from an external options file, with Begin and End as the first and last lines respectively and each intermediate line defining a single optional parameter. For example,
Begin
   Print Level = 5
End
The call
nag_opt_nlp2_option_file(ioptns, &state, &fail);
can then be used to read the file on the descriptor ioptns as returned by a call of x04acc. fail.code= NE_NOERROR on successful exit. e04wec should be consulted for a full description of this method of supplying optional parameters.
e04wfc, e04wgc or e04whc can be called to supply options directly, one call being necessary for each optional parameter. e04wfc, e04wgc or e04whc 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 e04wdc (unless they define invalid values) and so remain in effect for subsequent calls to e04wdc, unless altered by you.

12.1 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.
Optional parameters used to specify files (e.g., optional parameters Dump File and Print File) have type Nag_FileID (see Section 3.1.1 in the Introduction to the NAG Library CL Interface). This ID value must either be set to 0 (the default value) in which case there will be no output, or will be as returned by a call of x04acc.
Central Difference IntervalrDefault =εr13
When Derivative Level < 3 , the central-difference interval r is used near an optimal solution to obtain more accurate (but more expensive) estimates of gradients. Twice as many function evaluations are required compared to forward differencing. The interval used for the j th variable is hj=r 1+ xj . The resulting derivative estimates should be accurate to Or2 , unless the functions are badly scaled.
If you supply a value for this optional parameter, a small value between 0.0 and 1.0 is appropriate.
Check FrequencyiDefault =60
Every i th minor iteration after the most recent basis factorization, a numerical test is made to see if the current solution x satisfies the general linear constraints (the linear constraints and the linearized nonlinear constraints, if any). The constraints are of the form Ax-s=b , where s is the set of slack variables. To perform the numerical test, the residual vector r=b-Ax+s is computed. If the largest component of r is judged to be too large, the current basis is refactorized and the basic variables are recomputed to satisfy the general constraints more accurately. If i0, the value of i=99999999 is used and effectively no checks are made.
Check Frequency=1 is useful for debugging purposes, but otherwise this option should not be needed.
Cold Start Default
Warm Start
This option controls the specification of the initial working set in the procedure for finding a feasible point for the linear constraints and bounds and in the first QP subproblem thereafter. With a Cold Start, the first working set is chosen by e04wdc based on the values of the variables and constraints at the initial point. Broadly speaking, the initial working set will include equality constraints and bounds or inequality constraints that violate or ‘nearly’ satisfy their bounds (to within Crash Tolerance).
With a Warm Start, you must set the istate array and define clamda and h as discussed in Section 5. istate values associated with bounds and linear constraints determine the initial working set of the procedure to find a feasible point with respect to the bounds and linear constraints. istate values associated with nonlinear constraints determine the initial working set of the first QP subproblem after such a feasible point has been found. e04wdc will override your specification of istate if necessary, so that a poor choice of the working set will not cause a fatal error. For instance, any elements of istate which are set to -2, -1 or 4 will be reset to zero, as will any elements which are set to 3 when the corresponding elements of bl and bu are not equal. A warm start will be advantageous if a good estimate of the initial working set is available – for example, when e04wdc is called repeatedly to solve related problems.
Crash OptioniDefault =3
Crash TolerancerDefault =0.1
If a Cold Start is specified, an internal Crash procedure is used to select an initial basis from certain rows and columns of the constraint matrix A -I . The optional parameter Crash Option i determines which rows and columns of A are eligible initially, and how many times the Crash procedure is called. Columns of -I are used to pad the basis where necessary.
i Meaning
0 The initial basis contains only slack variables: B=I.
1 The Crash procedure is called once, looking for a triangular basis in all rows and columns of A.
2 The Crash procedure is called twice (if there are nonlinear constraints). The first call looks for a triangular basis in linear rows, and the iteration proceeds with simplex iterations until the linear constraints are satisfied. The Jacobian is then evaluated for the first major iteration and the Crash procedure is called again to find a triangular basis in the nonlinear rows (retaining the current basis for linear rows).
3 The Crash procedure is called up to three times (if there are nonlinear constraints). The first two calls treat linear equalities and linear inequalities separately. As before, the last call treats nonlinear rows before the first major iteration.
If i1 , certain slacks on inequality rows are selected for the basis first. (If i2 , numerical values are used to exclude slacks that are close to a bound). The Crash procedure then makes several passes through the columns of A , 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.
The Crash Tolerance r allows the starting Crash procedure to ignore certain ‘small’ nonzeros in each column of A . If amax is the largest element in column j , other nonzeros of aij in the columns are ignored if aij amax × r . (To be meaningful, r must be in the range 0r<1 .)
When r>0.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 containing more columns of A and fewer (arbitrary) slacks. A feasible solution may be reached sooner on some problems.
For example, suppose the first m columns of A form the matrix shown under LU Factor Tolerance; i.e., a tridiagonal matrix with entries -1, 4, -1. To help the Crash procedure choose all m columns for the initial basis, we would specify a Crash Tolerance of r for some value of r>0.5.
Defaults
This special keyword may be used to reset all optional parameters to their default values.
Derivative LeveliDefault =3
Optional parameter Derivative Level specifies which nonlinear function gradients are known analytically and will be supplied to e04wdc by user-supplied functions objfun and confun.
i Meaning
3 All objective and constraint gradients are known.
2 All constraint gradients are known, but some or all components of the objective gradient are unknown.
1 The objective gradient is known, but some or all of the constraint gradients are unknown.
0 Some components of the objective gradient are unknown and some of the constraint gradients are unknown.
The value i=3 should be used whenever possible. It is the most reliable and will usually be the most efficient.
If i=0 or 2 , e04wdc will estimate the missing components of the objective gradient, using finite differences. This may simplify the coding of objfun. However, it could increase the total run-time substantially (since a special call to objfun is required for each missing element), and there is less assurance that an acceptable solution will be located. If the nonlinear variables are not well scaled, it may be necessary to specify a non-default optional parameter Difference Interval.
If i=0 or 1 , e04wdc will estimate missing elements of the Jacobian. For each column of the Jacobian, one call to confun is needed to estimate all missing elements in that column, if any.
At times, central differences are used rather than forward differences. (This is not under your control.)
Derivative Linesearch Default
Nonderivative Linesearch
At each major iteration a linesearch is used to improve the merit function. Optional parameter Derivative Linesearch uses safeguarded cubic interpolation and requires both function and gradient values to compute estimates of the step αk . If some analytic derivatives are not provided, or optional parameter Nonderivative Linesearch is specified, e04wdc employs a linesearch based upon safeguarded quadratic interpolation, which does not require gradient evaluations.
A nonderivative linesearch can be slightly less robust on difficult problems, and it is recommended that the default be used if the functions and derivatives can be computed at approximately the same cost. If the gradients are very expensive relative to the functions, a nonderivative linesearch may give a significant decrease in computation time.
If Nonderivative Linesearch is selected, e04wdc signals the evaluation of the linesearch by calling objfun with mode=0. If the potential saving provided by a nonderivative linesearch is to be realised, it is essential that objfun be coded so that derivatives are not computed when mode=0.
Difference IntervalrDefault =εr
This alters the interval r used to estimate gradients by forward differences. It does so in the following circumstances:
In all cases, a derivative with respect to xj is estimated by perturbing that component of x to the value xj + r 1 + xj , and then evaluating Fx or cx at the perturbed point. The resulting gradient estimates should be accurate to Or unless the functions are badly scaled. Judicious alteration of r may sometimes lead to greater accuracy.
If you supply a value for this optional parameter, a small value between 0.0 and 1.0 is appropriate.
Dump Filei1Default =0
Load Filei2Default =0
(See Section 3.1.1 in the Introduction to the NAG Library CL Interface for further information on NAG data types.)
Optional parameters Dump File and Load File are similar to optional parameters Punch File and Insert File, but they record solution information in a manner that is more direct and more easily modified. A full description of information recorded in optional parameters Dump File and Load File is given in Gill et al. (2005a).
If Dump File>0, the last solution obtained will be output to the file associated with ID i1.
If Load File>0, the file associated with ID i2, containing basis information, will be read. The file will usually have been output previously as a Dump File. The file will not be accessed if optional parameters Old Basis File or Insert File are specified.
Elastic WeightrDefault =104
This keyword determines the initial weight γ associated with the problem (11) (see Section 11.5).
At major iteration k , if elastic mode has not yet started, a scale factor σk=1 + gxk is defined from the current objective gradient. Elastic mode is then started if the QP subproblem is infeasible, or the QP dual variables are larger in magnitude than σkr . The QP is resolved in elastic mode with γ=σkr .
Thereafter, major iterations continue in elastic mode until they converge to a point that is optimal for (11) (see Section 11.5). If the point is feasible for equation (1) v=w=0 , it is declared locally optimal. Otherwise, γ is increased by a factor of 10 and major iterations continue. If γ has already reached a maximum allowable value, equation (1) is declared locally infeasible.
Expand FrequencyiDefault =10000
This option is part of the anti-cycling procedure designed to make progress even on highly degenerate problems.
For linear models, the strategy is to force a positive step at every iteration, at the expense of violating the bounds on the variables by a small amount. Suppose that the optional parameter Minor Feasibility Tolerance is δ . Over a period of i iterations, the tolerance actually used by e04wdc increases from 0.5δ to δ (in steps of 0.5δ/i ).
For nonlinear models, the same procedure is used for iterations in which there is only one superbasic variable. (Cycling can occur only 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 i helps reduce the number of slightly infeasible nonbasic variables (most of which are eliminated during a resetting procedure). However, it also diminishes the freedom to choose a large pivot element (see optional parameter Pivot Tolerance).
Factorization FrequencyiDefault =50
At most i basis changes will occur between factorizations of the basis matrix.
With linear programs, the basis factors are usually updated every iteration. The default i is reasonable for typical problems. Higher values up to i=100 (say) may be more efficient on well-scaled problems.
When the objective function is nonlinear, fewer basis updates will occur as an optimum is approached. The number of iterations between basis factorizations will therefore increase. During these iterations a test is made regularly (according to the optional parameter Check Frequency) to ensure that the general constraints are satisfied. If necessary the basis will be refactorized before the limit of i updates is reached.
Function PrecisionrDefault =ε0.8
The relative function precision εr is intended to be a measure of the relative accuracy with which the functions can be computed. For example, if Fx is computed as 1000.56789 for some relevant x and if the first 6 significant digits are known to be correct, the appropriate value for εr would be 1.0e−6 .
(Ideally the functions Fx or cix should have magnitude of order 1. If all functions are substantially less than 1 in magnitude, εr should be the absolute precision. For example, if Fx=1.23456789e−4 at some point and if the first 6 significant digits are known to be correct, the appropriate value for εr would be 1.0e−10 .)
The default value of εr is appropriate for simple analytic functions.
In some cases the function values will be the result of extensive computation, possibly involving a costly iterative procedure that can provide few digits of precision. Specifying an appropriate Function Precision may lead to savings, by allowing the linesearch procedure to terminate when the difference between function values along the search direction becomes as small as the absolute error in the values.
Hessian Full Memory Default if n75
Hessian Limited Memory Default if n>75
These options select the method for storing and updating the approximate Hessian. (e04wdc uses a quasi-Newton approximation to the Hessian of the Lagrangian. A BFGS update is applied after each major iteration.)
If Hessian Full Memory is specified, the approximate Hessian is treated as a dense matrix and the BFGS updates are applied explicitly. This option is most efficient when the number of variables n is not too large (say, less than 75). In this case, the storage requirement is fixed and one can expect 1-step Q-superlinear convergence to the solution.
Hessian Limited Memory should be used on problems where n is very large. In this case a limited-memory procedure is used to update a diagonal Hessian approximation Hr a limited number of times. (Updates are accumulated as a list of vector pairs. They are discarded at regular intervals after Hr has been reset to their diagonal.)
Hessian FrequencyiDefault =99999999
If optional parameter Hessian Full Memory is in effect and i BFGS updates have already been carried out, the Hessian approximation is reset to the identity matrix. (For certain problems, occasional resets may improve convergence, but in general they should not be necessary.)
Hessian Full Memory and Hessian Frequency=10 have a similar effect to Hessian Limited Memory and Hessian Updates=10 (except that the latter retains the current diagonal during resets).
Hessian UpdatesiDefault =Hessian Frequency if Hessian Full Memory, 10 otherwise
If optional parameter Hessian Limited Memory is in effect and i BFGS updates have already been carried out, all but the diagonal elements of the accumulated updates are discarded and the updating process starts again.
Broadly speaking, the more updates stored, the better the quality of the approximate Hessian. However, the more vectors stored, the greater the cost of each QP iteration. The default value is likely to give a robust algorithm without significant expense, but faster convergence can sometimes be obtained with significantly fewer updates (e.g., i=5 ).
Infinite Bound SizerDefault =1020
If r>0, r defines the ‘infinite’ bound bigbnd in the definition of the problem constraints. Any upper bound greater than or equal to bigbnd will be regarded as + (and similarly any lower bound less than or equal to -bigbnd will be regarded as -). If r<0, the default value is used.
Iterations LimitiDefault = max10000, 10 maxn,nL+nN
The value of i specifies the maximum number of minor iterations allowed (i.e., iterations of the simplex method or the QP algorithm), summed over all major iterations. (See also the description of the optional parameter Minor Iterations Limit.)
Linesearch TolerancerDefault =0.9
This tolerance, r , controls the accuracy with which a step length will be located along the direction of search each iteration. At the start of each linesearch a target directional derivative for the merit function is identified. This parameter determines the accuracy to which this target value is approximated, and it must be a value in the range 0.0r1.0 .
The default value r=0.9 requests just moderate accuracy in the linesearch.
If the nonlinear functions are cheap to evaluate, a more accurate search may be appropriate; try r=0.1 , ​ 0.01 ​ or ​ 0.001 .
If the nonlinear functions are expensive to evaluate, a less accurate search may be appropriate. If all gradients are known, try r=0.99 . (The number of major iterations might increase, but the total number of function evaluations may decrease enough to compensate.)
If not all gradients are known, a moderately accurate search remains appropriate. Each search will require only 1–5 function values (typically), but many function calls will then be needed to estimate missing gradients for the next iteration.
Nolist Default
List
Optional parameter List enables printing of each optional parameter specification as it is supplied. Nolist suppresses this printing.
LU Density Tolerancer1Default =0.6
LU Singularity Tolerancer2Default =ε23
The density tolerance, r1 , is used during LU factorization of the basis matrix B. Columns of L and rows of U are formed one at a time, and the remaining rows and columns of the basis are altered appropriately. At any stage, if the density of the remaining matrix exceeds r1 , the Markowitz strategy for choosing pivots is terminated, and the remaining matrix is factored by a dense LU procedure. Raising the density tolerance towards 1.0 may give slightly sparser LU factors, with a slight increase in factorization time.
The singularity tolerance, r2 , helps guard against ill-conditioned basis matrices. After B is refactorized, the diagonal elements of U are tested as follows: if ujj r2 or ujj < r2 maxi uij , the j th column of the basis is replaced by the corresponding slack variable. (This is most likely to occur after a restart.)
LU Factor Tolerancer1Default =1.10
LU Update Tolerancer2Default =1.10
The values of r1 and r2 affect the stability of the basis factorization B=LU, during refactorization and updates respectively. The lower triangular matrix L is a product of matrices of the form
1 0 μ 1  
where the multipliers μ will satisfy μri. The default values of r1 and r2 usually strike a good compromise between stability and sparsity. They must satisfy r1, r21.0.
For large and relatively dense problems, r1=10.0 or 5.0 (say) may give a useful improvement in stability without impairing sparsity to a serious degree.
For certain very regular structures (e.g., band matrices) it may be necessary to reduce r1​ and/or ​r2 in order to achieve stability. For example, if the columns of A include a sub-matrix of the form
4 -1 -1 4 -1 -1 4 -1 -1 4 -1 -1 4 ,  
one should set both r1 and r2 to values in the range 1.0ri<4.0.
LU Partial Pivoting Default
LU Complete Pivoting
LU Rook Pivoting
The LU factorization implements a Markowitz-type search for pivots that locally minimize the fill-in subject to a threshold pivoting stability criterion. The default option is to use threshhold partial pivoting. The optional parameters LU Rook Pivoting and LU Complete Pivoting are more expensive than partial pivoting but are more stable and better at revealing rank, as long as LU Factor Tolerance is not too large (say <2.0). When numerical difficulties are encountered, e04wdc automatically reduces the LU tolerance towards 1.0 and switches (if necessary) to rook or complete pivoting, before reverting to the default or specified options at the next refactorization (with System Information Yes, relevant messages are output to the Print File).
Major Feasibility TolerancerDefault = max10-6,ε
This tolerance, r , specifies how accurately the nonlinear constraints should be satisfied. The default value is appropriate when the linear and nonlinear constraints contain data to about that accuracy.
Let vmax be the maximum nonlinear constraint violation, normalized by the size of the solution, which is required to satisfy
vmax/=maxi vi / x r , (12)
where vi is the violation of the i th nonlinear constraint i=1:nL .
In the major iteration log (see Section 13.2, vmax appears as the quantity labelled ‘Feasible’. If some of the problem functions are known to be of low accuracy, a larger Major Feasibility Tolerance may be appropriate.
Major Optimality TolerancerDefault = 2 max10-6,ε
This tolerance, r , specifies the final accuracy of the dual variables. On successful termination, e04wdc will have computed a solution x,s,π such that
cmax=maxj cj / π r , (13)
where cj is an estimate of the complementarity slackness for variable j where j=1:n+nL+nN. The values ci are computed from the final QP solution using the reduced gradients dj=gj - πT aj (where gj is the j th component of the objective gradient, aj is the associated column of the constraint matrix A -I , and π is the set of QP dual variables):
cj = - dj min xj - lj ,1 if ​ dj0 ; -dj min uj - xj ,1 if ​ dj<0 . (14)
In the Print File, cmax appears as the quantity labelled ‘Optimal’.
Major Iterations LimitiDefault = max1000, 3 maxn, nL + nN
This is the maximum number of major iterations allowed. It is intended to guard against an excessive number of linearizations of the constraints. If i=0, optimality and feasibility are checked.
Major Print LeveliDefault =000001
This controls the amount of output to the optional parameters Print File and Summary File at each major iteration. Major Print Level=0 suppresses most output, except for error messages. Major Print Level=1 gives normal output for linear and nonlinear problems, and Major Print Level=11 gives additional details of the Jacobian factorization that commences each major iteration.
In general, the value being specified may be thought of as a binary number of the form
Major Print Level  JFDXbs  
where each letter stands for a digit that is either 0 or 1 as follows:
s a single line that gives a summary of each major iteration. (This entry in JFDXbs is not strictly binary since the summary line is printed whenever JFDXbs 1 );
b basis statistics, i.e., information relating to the basis matrix whenever it is refactorized. (This output is always provided if JFDXbs 10 );
X xk , the nonlinear variables involved in the objective function or the constraints. These appear under the heading ‘Jacobian variables’;
D πk , the dual variables for the nonlinear constraints. These appear under the heading ‘Multiplier estimates’;
F cxk , the values of the nonlinear constraint functions;
J Jxk , the Jacobian matrix. This appears under the heading ‘x and Jacobian’.
To obtain output of any items JFDXbs , set the corresponding digit to 1, otherwise to 0.
If J=1 , the Jacobian matrix will be output column-wise at the start of each major iteration. Column j will be preceded by the value of the corresponding variable xj and a key to indicate whether the variable is basic, superbasic or nonbasic. (Hence if J=1 , there is no reason to specify X=1 unless the objective contains more nonlinear variables than the Jacobian.) A typical line of output is
3 1.250000e+01 BS 1 1.00000e+00 4 2.00000e+00
which would mean that x3 is basic at value 12.5, and the third column of the Jacobian has elements of 1.0 and 2.0 in rows 1 and 4.
Major Step LimitrDefault =2.0
This parameter limits the change in x during a linesearch. It applies to all nonlinear problems, once a ‘feasible solution’ or ‘feasible subproblem’ has been found. A linesearch determines a step α over the range 0<αβ , where β is 1 if there are nonlinear constraints, or is the step to the nearest upper or lower bound on x if all the constraints are linear. Normally, the first step length tried is α1 = min1,β .
  1. 1.In some cases, such as fx=a ebx or fx=a xb , even a moderate change in the components of x can lead to floating-point overflow. The parameter r is therefore used to define a limit β¯=r1+x / p (where p is the search direction), and the first evaluation of fx is at the potentially smaller step length α1 = min1,β¯,β .
  2. 2.Wherever possible, upper and lower bounds on x should be used to prevent evaluation of nonlinear functions at meaningless points. The optional parameter Major Step Limit provides an additional safeguard. The default value r=2.0 should not affect progress on well behaved problems, but setting r=0.1​ or ​0.01 may be helpful when rapidly varying functions are present. A ‘good’ starting point may be required. An important application is to the class of nonlinear least squares problems.
  3. 3.In cases where several local optima exist, specifying a small value for r may help locate an optimum near the starting point.
Minimize Default
Maximize
Feasible Point
The keywords Minimize and Maximize specify the required direction of optimization. It applies to both linear and nonlinear terms in the objective.
The keyword Feasible Point means ‘Ignore the objective function, while finding a feasible point for the linear and nonlinear constraints’. It can be used to check that the nonlinear constraints are feasible without altering the call to e04wdc.
Minor Feasibility Tolerance
Feasibility TolerancerDefault = max10-6,ε
e04wdc tries to ensure that all variables eventually satisfy their upper and lower bounds to within this tolerance, r . This includes slack variables. Hence, general linear constraints should also be satisfied to within r .
Feasibility with respect to nonlinear constraints is judged by the optional parameter Major Feasibility Tolerance (not by r ).
If the bounds and linear constraints cannot be satisfied to within r , the problem is declared infeasible. If the corresponding sum of infeasibilities is quite small, it may be appropriate to raise r by a factor of 10 or 100. Otherwise, some error in the data should be suspected.
Nonlinear functions will be evaluated only at points that satisfy the bounds and linear constraints. If there are regions where a function is undefined, every attempt should be made to eliminate these regions from the problem.
For example, if fx=x1 + logx2 , it is essential to place lower bounds on both variables. If r=1.0e−6 , the bounds x1 10-5 and x2 10-4 might be appropriate. (The log singularity is more serious. In general, keep x as far away from singularities as possible.)
If Scale Option 1 , feasibility is defined in terms of the scaled problem (since it is then more likely to be meaningful).
In reality, e04wdc uses r as a feasibility tolerance for satisfying the bounds on x and s in each QP subproblem. If the sum of infeasibilities cannot be reduced to zero, the QP subproblem is declared infeasible. e04wdc is then in elastic mode thereafter (with only the linearized nonlinear constraints defined to be elastic). See the description of the optional parameter Elastic Weight.
Minor Iterations LimitiDefault =500
If the number of minor iterations for the optimality phase of the QP subproblem exceeds i , then all nonbasic QP variables that have not yet moved are frozen at their current values and the reduced QP is solved to optimality.
Note that more than i minor iterations may be necessary to solve the reduced QP to optimality. These extra iterations are necessary to ensure that the terminated point gives a suitable direction for the linesearch.
In the major iteration log (see Section 13.2) a t at the end of a line indicates that the corresponding QP was artificially terminated using the limit i .
Compare with the optional parameter Iterations Limit, which defines an independent absolute limit on the total number of minor iterations (summed over all QP subproblems).
Minor Print LeveliDefault =1
This controls the amount of output to the Print File and the Summary File during solution of the QP subproblems. The value of i has the following effect:
i Output
0 No minor iteration output except error messages.
1 A single line of output at each minor iteration (controlled by optional parameters Print Frequency and Summary Frequency.
10 Basis factorization statistics generated during the periodic refactorization of the basis (see the optional parameter Factorization Frequency). Statistics for the first factorization each major iteration are controlled by the optional parameter Major Print Level.
New Basis Filei1Default =0
Backup Basis Filei2Default =0
Save Frequencyi3Default =100
(See Section 3.1.1 in the Introduction to the NAG Library CL Interface for further information on NAG data types.)
New Basis File and Backup Basis File are sometimes referred to as basis maps. They contain the most compact representation of the state of each variable. They are intended for restarting the solution of a problem at a point that was reached by an earlier run. For nontrivial problems, it is advisable to save basis maps at the end of a run, in order to restart the run if necessary.
If New Basis File>0, a basis map will be saved on the New Basis File every i3 th iteration. The first record of the file will contain the word PROCEEDING if the run is still in progress. A basis map will also be saved at the end of a run, with some other word indicating the final solution status.
If Backup Basis File>0, it is intended as a safeguard against losing the results of a long run. Suppose that a New Basis File is being saved every 100 (Save Frequency) iterations, and that e04wdc is about to save such a basis at iteration 2000. It is conceivable that the run may be interrupted during the next few milliseconds (in the middle of the save). In this case the Basis file will be corrupted and the run will have been essentially wasted.
To eliminate this risk, both a New Basis File and a Backup Basis File may be specified using calls of x04acc.
The current basis will then be saved every 100 iterations, first on the New Basis File and then immediately on the Backup Basis File. If the run is interrupted at iteration 2000 during the save on the New Basis File, there will still be a usable basis on the Backup Basis File (corresponding to iteration 1900).
Note that a new basis will be saved in New Basis File at the end of a run if it terminates normally, but it will not be saved in Backup Basis File. In the above example, if an optimum solution is found at iteration 2050 (or if the iteration limit is 2050), the final basis in the New Basis File will correspond to iteration 2050, but the last basis saved in the Backup Basis File will be the one for iteration 2000.
A full description of information recorded in New Basis File and Backup Basis File is given in Gill et al. (2005a).
New Superbasics LimitiDefault =99
This option causes early termination of the QP subproblems if the number of free variables has increased significantly since the first feasible point. If the number of new superbasics is greater than i , the nonbasic variables that have not yet moved are frozen and the resulting smaller QP is solved to optimality.
In the major iteration log (see Section 13.1), a t at the end of a line indicates that the QP was terminated early in this way.
Old Basis FileiDefault =0
(See Section 3.1.1 in the Introduction to the NAG Library CL Interface for further information on NAG data types.)
If Old Basis File>0, the basis maps information will be obtained from the file associated with ID i. The file will usually have been output previously as a New Basis File or Backup Basis File. A full description of information recorded in New Basis File and Backup Basis File is given in Gill et al. (2005a).
The file will not be acceptable if the number of rows or columns in the problem has been altered.
Partial PriceiDefault =1
This parameter is recommended for large problems that have significantly more variables than constraints. It reduces the work required for each ‘pricing’ operation (where a nonbasic variable is selected to become superbasic). When i=1 , all columns of the constraint matrix A -I are searched. Otherwise, A and I are partitioned to give i roughly equal segments Aj and Ij , for j=1,2,,i. If the previous pricing search was successful on Aj-1 and Ij-1 , the next search begins on the segments Aj and Ij . (All subscripts here are modulo i .) 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 become superbasic. If nothing is found, the search continues on the next segments Aj+1 and Ij+1 , and so on.
For time-stage models having t time periods, Partial Price t (or t/2 or t/3 ) may be appropriate.
Pivot TolerancerDefault =ε23
During the solution of QP subproblems, the pivot tolerance is used to prevent columns entering the basis if they would cause the basis to become almost singular.
When x changes to x+αp for some search direction p , a ‘ratio test’ determines which component of x reaches an upper or lower bound first. The corresponding element of p is called the pivot element. Elements of p are ignored (and therefore cannot be pivot elements) if they are smaller than the pivot tolerance r .
It is common for two or more variables to reach a bound at essentially the same time. In such cases, the Minor Feasibility Tolerance (say, t ) provides some freedom to maximize the pivot element and thereby improve numerical stability. Excessively small values of t should therefore not be specified. To a lesser extent, the Expand Frequency (say, f ) also provides some freedom to maximize the pivot element. Excessively large values of f should therefore not be specified.
Print FileiDefault =0
(See Section 3.1.1 in the Introduction to the NAG Library CL Interface for further information on NAG data types.)
If Print File>0, the following information is output to a file associated with ID i during the solution of each problem:
These items are described in Sections 9 and 13. Further brief output may be directed to the Summary File.
Print FrequencyiDefault =100
If i>0 , one line of the iteration log will be printed every i th iteration. A value such as i=10 is suggested for those interested only in the final solution. If i0, the value of i=99999999 is used and effectively no checks are made.
Proximal Point MethodiDefault =1
i=1​ or ​2 specifies minimization of x-x0 1 or 12 x-x022 when the starting point x0 is changed to satisfy the linear constraints (where x0 refers to nonlinear variables).
Punch Filei1Default =0
Insert Filei2Default =0
(See Section 3.1.1 in the Introduction to the NAG Library CL Interface for further information on NAG data types.)
The Punch File from a previous run may be used as an Insert File for a later run on the same problem. A full description of information recorded in Insert File and Punch File is given in Gill et al. (2005a).
If Punch File>0, the final solution obtained will be output to the file associated with ID i1. For linear programs, this format is compatible with various commercial systems.
If Insert File>0, the file associated with ID i2, containing basis information, will be read. The file will usually have been output previously as a Punch File. The file will not be accessed if Old Basis File is specified.
QPSolver Cholesky Default
QPSolver CG
QPSolver QN
Specifies the active-set algorithm used to solve subproblem (11) (see Section 11.5). QPSolver Cholesky holds the full Cholesky factor R of the reduced Hessian ZTHZ. As the QP iterations proceed, the dimension of R changes with the number of superbasic variables. If the number of superbasic variables needs to increase beyond the value of Reduced Hessian Dimension, the reduced Hessian cannot be stored and the solver switches to QPSolver CG. The Cholesky solver is reactivated if the number of superbasics stabilizes at a value less than Reduced Hessian Dimension.
QPSolver QN solves the QP using a quasi-Newton method. In this case, R is the factor of a quasi-Newton approximate Hessian.
QPSolver CG uses an active-set method similar to QPSolver QN, but uses the conjugate-gradient method to solve all systems involving the reduced Hessian.
The Cholesky QP solver is the most robust, but may require a significant amount of computation if there are many superbasics.
The quasi-Newton QP solver does not require computation of the exact R at the start of the subproblem in (11). It may be appropriate when the number of superbasics is large but relatively few iterations are needed to reach a solution (e.g., if e04wdc is called with a Warm Start).
The conjugate-gradient QP solver is appropriate for problems with many degrees of freedom (say, more than 2000 superbasics).
Reduced Hessian DimensioniDefault = min2000,n
This specifies that an i by i triangular matrix R (to define the reduced Hessian according to RT R = ZT HZ ) is to be available for use by the Cholesky QP solver.
Scale OptioniDefault =0
Scale TolerancerDefault =0.9
Scale Print
Three scale options are available as follows:
i Meaning
0 No scaling. This is recommended if it is known that x and the constraint matrix never have very large elements (say, larger than 100).
1 The constraints and variables are scaled by an iterative procedure that attempts to make the matrix coefficients as close as possible to 1.0 (see Fourer (1982)). This will sometimes improve the performance of the solution procedures.
2 The constraints and variables are scaled by the iterative procedure. Also, a certain additional scaling is performed that may be helpful if the right-hand side b or the solution x is large. This takes into account columns of A -I that are fixed or have positive lower bounds or negative upper bounds.
Optional parameter Scale Tolerance affects how many passes might be needed through the constraint matrix. On each pass, the scaling procedure computes the ratio of the largest and smallest nonzero coefficients in each column:
ρj=maxj aij / mini aij aij 0 .  
If maxj ρj is less than r times its previous value, another scaling pass is performed to adjust the row and column scales. Raising r from 0.9 to 0.99 (say) usually increases the number of scaling passes through A . At most 10 passes are made. The value of r should lie in the range 0<r<1.
Scale Print causes the row scales ri and column scales cj to be printed to Print File, if System Information Yes has been specified. The scaled matrix coefficients are a¯ ij = aij cj / ri, and the scaled bounds on the variables and slacks are l¯j = lj / cj , u¯j = uj / cj , where cj = rj-n if j>n.
Solution FileiDefault =0
(See Section 3.1.1 in the Introduction to the NAG Library CL Interface for further information on NAG data types.)
If Solution File>0, the final solution will be output to the file associated with ID i.
To see more significant digits in the printed solution, it will sometimes be useful to specify that the Solution File refers to the Print File.
Start Objective Check At VariableiDefault =1
Stop Objective Check At VariableiDefault =n
Start Constraint Check At VariableiDefault =1
Stop Constraint Check At VariableiDefault =n
These keywords take effect only if Verify Level>0. They may be used to contol the verification of gradient elements computed by function objfun and/or Jacobian elements computed by function confun. For eample, if the first 30 elements of the objective gradient appeared to be correct in an earlier run, so that only element 31 remains questionable, it is reasonable to specify Start Objective Check At Variable=31. If the first 30 variables appear linearly in the objective, so that the corresponding gradient elements are constant, the above choice would also be appropriate.
Summary Filei1Default =0
Summary Frequencyi2Default =100
(See Section 3.1.1 in the Introduction to the NAG Library CL Interface for further information on NAG data types.)
If Summary File>0, a brief log will be output to the file associated with i1, including one line of information every i2 th iteration. In an interactive environment, it is useful to direct this output to the terminal, to allow a run to be monitored online. (If something looks wrong, the run can be manually terminated.) Further details are given in Section 13.6.
Superbasics LimitiDefault = n
This option places a limit on the storage allocated for superbasic variables. Ideally, i should be set slightly larger than the ‘number of degrees of freedom’ expected at an optimal solution.
For nonlinear problems, the number of degrees of freedom is often called the ‘number of independent variables’. Normally, i need not be greater than nN+1 , where nN is the number of nonlinear variables. For many problems, i may be considerably smaller than nN. This will save storage if nN is very large.
Suppress Parameters
Normally e04wdc prints the options file as it is being read, and then prints a complete list of the available keywords and their final values. The optional parameter Suppress Parameters tells e04wdc not to print the full list.
System Information No Default
System Information Yes
This option prints additional information on the progress of major and minor iterations, and Crash statistics. See Section 13.
Timing LeveliDefault =0
If i>0 , some timing information will be output to the Print file, if Print File>0.
Unbounded Objectiver1Default =1.0e+15
Unbounded Step Sizer2Default =bigbnd
These parameters are intended to detect unboundedness in nonlinear problems. During a linesearch, F is evaluated at points of the form x+αp , where x and p are fixed and α varies. If F exceeds r1 or α exceeds r2 , iterations are terminated with the exit message fail.code= NE_UNBOUNDED.
If singularities are present, unboundedness in Fx may be manifested by a floating-point overflow (during the evaluation of Fx+αp ), before the test against r1 can be made.
Unboundedness in x is best avoided by placing finite upper and lower bounds on the variables.
Verify LeveliDefault =0
This option refers to finite difference checks on the derivatives computed by the user-supplied functions. Derivatives are checked at the first point that satisfies all bounds and linear constraints.
i Meaning
0 Only a ‘cheap’ test will be performed, requiring two calls to confun.
1 Individual gradients will be checked (with a more reliable test). A key of the form OK or Bad? indicates whether or not each component appears to be correct.
2 Individual columns of the problem Jacobian will be checked.
3 Options 2 and 1 will both occur (in that order).
-1 Derivative checking is disabled.
Verify Level=3 should be specified whenever a new user function is being developed. Missing derivatives are not checked, so they result in no overhead.
Violation LimitrDefault =1.0e+6
This keyword defines an absolute limit on the magnitude of the maximum constraint violation, r , after the linesearch. On completion of the linesearch, the new iterate xk+1 satisfies the condition
vi xk+1 r ​ ​ max1, vi x0 ,  
where x0 is the point at which the nonlinear constraints are first evaluated and vix is the i th nonlinear constraint violation vix = max0, li - cix , cix - ui .
The effect of this violation limit is to restrict the iterates to lie in an expanded feasible region whose size depends on the magnitude of r . This makes it possible to keep the iterates within a region where the objective is expected to be well defined and bounded below. If the obective is bounded below for all values of the variables, r may be any large positive value.

13 Description of Monitoring Information

e04wdc produces monitoring information, statistical information and information about the solution. Section 9.1 contains the final output information sent to unit Print File. This section contains other output information.

13.1 Major Iteration Log

This section describes the output to unit Print File if Major Print Level > 0 . One line of information is output every k th major iteration, where k is Print Frequency.
Label Description
Itns is the cumulative number of minor iterations.
Major is the current major iteration number.
Minors is the number of iterations required by both the feasibility and optimality phases of the QP subproblem. Generally, Minors will be 1 in the later iterations, since theoretical analysis predicts that the correct active set will be identified near the solution (see Section 11).
Step is the step length α taken along the current search direction p . The variables x have just been changed to x + α p . On reasonably well-behaved problems, the unit step will be taken as the solution is approached.
nCon or nObj nCon is the number of times confun has been called to evaluate the nonlinear problem functions. Evaluations needed for the estimation of the derivatives by finite differences are not included. nCon is printed as a guide to the amount of work required for the linesearch. If nN , the number of nonlinear constraints, is zero, nCon does not appear, but is replaced by nObj. This quantity is the number of calls made to objfun.
Feasible is the value of vmax (see (12)), the maximum component of the scaled nonlinear constraint residual (see the description of the optional parameter Major Feasibility Tolerance). The solution is regarded as acceptably feasible if Feasible is less than the Major Feasibility Tolerance. In this case, the entry is contained in parentheses.
If the constraints are linear, all iterates are feasible and this entry is not printed.
Optimal is the value of cmax (see (13)), the maximum complementary gap (see the description of the optional parameter Major Optimality Tolerance). It is an estimate of the degree of nonoptimality of the reduced costs. Both Feasible and Optimal are small in the neighbourhood of a solution.
MeritFunction or Objective is the value of the augmented Lagrangian merit function (see (8)). This function will decrease at each iteration unless it was necessary to increase the penalty parameters (see Section 11.4). As the solution is approached, MeritFunction will converge to the value of the objective at the solution.
In elastic mode, the merit function is a composite function involving the constraint violations weighted by the elastic weight.
If the constraints are linear, this item is labelled Objective, the value of the objective function. It will decrease monotonically to its optimal value.
L+U is the number of nonzeros representing the basis factors L and U on completion of the QP subproblem.
If nonlinear constraints are present, the basis factorization B = LU is computed at the start of the first minor iteration. At this stage, L+U = lenL + lenU , where lenL (see Section 13.4) is the number of subdiagonal elements in the columns of a lower triangular matrix and lenU (see Section 13.4) is the number of diagonal and superdiagonal elements in the rows of an upper-triangular matrix.
As columns of B are replaced during the minor iterations, L+U may fluctuate up or down but, in general, will tend to increase. As the solution is approached and the minor iterations decrease towards zero, L+U will reflect the number of nonzeros in the LU factors at the start of the QP subproblem.
If the constraints are linear, refactorization is subject only to the Factorization Frequency, and L+U will tend to increase between factorizations.
BSwap is the number of columns of the basis matrix B that were swapped with columns of S to improve the condition of B . The swaps are determined by an LU factorization of the rectangular matrix BS = B S T with stability being favoured more than sparsity.
nS is the current number of superbasic variables.
condHz is an estimate of the condition number of RTR , itself an estimate of ZTHZ , the reduced Hessian of the Lagrangian. The condition number is the square of the ratio of the largest and smallest diagonals of the upper triangular matrix R , this being a lower bound on the condition number of RTR . condHz gives a rough indication of whether or not the optimization procedure is having difficulty. If ε is the relative machine precision being used, the SQP algorithm will make slow progress if condHz becomes as large as ε-1/2 108 , and will probably fail to find a better solution if condHz reaches ε-3/4 1012 .
To guard against high values of condHz, attention should be given to the scaling of the variables and the constraints. In some cases it may be necessary to add upper or lower bounds to certain variables to keep them a reasonable distance from singularities in the nonlinear functions or their derivatives.
Penalty is the Euclidean norm of the vector of penalty parameters used in the augmented Lagrangian merit function (not printed if there are no nonlinear constraints).
The summary line may include additional code characters that indicate what happened during the course of the major iteration. These will follow the separator ‘_’ in the output.
Label Description
c central differences have been used to compute the unknown components of the objective and constraint gradients. A switch to central differences is made if either the linesearch gives a small step, or x is close to being optimal. In some cases, it may be necessary to re-solve the QP subproblem with the central difference gradient and Jacobian.
d during the linesearch it was necessary to decrease the step in order to obtain a maximum constraint violation conforming to the value of Violation Limit.
D you set mode=-1 on exit from objfun, indicating that the linesearch needed to be done with a smaller value of the step length α.
l the norm wise change in the variables was limited by the value of the Major Step Limit. If this output occurs repeatedly during later iterations, it may be worthwhile increasing the value of Major Step Limit.
i if e04wdc is not in elastic mode, an i signifies that the QP subproblem is infeasible. This event triggers the start of nonlinear elastic mode, which remains in effect for all subsequent iterations. Once in elastic mode, the QP subproblems are associated with the elastic problem (11) (see Section 11.5).
If e04wdc is already in elastic mode, an i indicates that the minimizer of the elastic subproblem does not satisfy the linearized constraints. (In this case, a feasible point for the usual QP subproblem may or may not exist.)
M an extra evaluation of the problem functions was needed to define an acceptable positive definite quasi-Newton update to the Lagrangian Hessian. This modification is only done when there are nonlinear constraints.
m this is the same as M except that it was also necessary to modify the update to include an augmented Lagrangian term.
n no positive definite BFGS update could be found. The approximate Hessian is unchanged from the previous iteration.
R the approximate Hessian has been reset by discarding all but the diagonal elements. This reset will be forced periodically by the Hessian Frequency and Hessian Updates keywords. However, it may also be necessary to reset an ill-conditioned Hessian from time to time.
r the approximate Hessian was reset after ten consecutive major iterations in which no BFGS update could be made. The diagonals of the approximate Hessian are retained if at least one update has been done since the last reset. Otherwise, the approximate Hessian is reset to the identity matrix.
s a self-scaled BFGS update was performed. This update is used when the Hessian approximation is diagonal, and hence always follows a Hessian reset.
t the minor iterations were terminated because of the Minor Iterations Limit.
T the minor iterations were terminated because of the New Superbasics Limit.
u the QP subproblem was unbounded.
w a weak solution of the QP subproblem was found.
z the Superbasics Limit was reached.

13.2 Minor Iteration Log

If Minor Print Level > 0 , one line of information is output to the Print file every k th minor iteration, where k is the specified Print Frequency. A heading is printed before the first such line following a basis factorization. The heading contains the items described below. In this description, a pricing operation is the process by which a nonbasic variable is selected to become superbasic (in addition to those already in the superbasic set). The selected variable is denoted by jq. Variable jq often becomes basic immediately. Otherwise it remains superbasic, unless it reaches its opposite bound and returns to the nonbasic set.
If Partial Price is in effect, variable jq is selected from App or Ipp , the pp th segments of the constraint matrix A -I .
Label Description
Itn the current iteration number.
LPmult or QPmult is the reduced cost (or reduced gradient) of the variable jq selected by the pricing procedure at the start of the present iteration. Algebraically, the reduced gradient is dj = gj - πT aj for j = jq , where gj is the gradient of the current objective function, π is the vector of dual variables for the QP subproblem, and aj is the j th column of A -I .
Note that the reduced cost is the 1-norm of the reduced-gradient vector at the start of the iteration, just after the pricing procedure.
LPstep or QPstep is the step length α taken along the current search direction p . The variables x have just been changed to x + α p . Write Step to stand for LPStep or QPStep, depending on the problem. If a variable is made superbasic during the current iteration ( +SBS>0 ), Step will be the step to the nearest bound. During the solution of (11), the step can be greater than 1 only if the reduced Hessian is not positive definite.
nInf is the number of infeasibilities after the present iteration. This number will not increase unless the iterations are in elastic mode.
SumInf is the sum of infeasibilities after the present iteration, if nInf>0 . The value usually decreases at each nonzero Step, but if it decreases by 2 or more, SumInf may occasionally increase.
rgNorm is the norm of the reduced-gradient vector at the start of the iteration. (It is the norm of the vector with elements dj for variables j in the superbasic set.) During the solution of subproblem (11) this norm will be approximately zero after a unit step. (The heading is not printed if the problem is linear.)
LPobjective, QPobjective or Elastic QPobj the QP objective function after the present iteration. In elastic mode, the heading is changed to Elastic QPobj. In either case, the value printed decreases monotonically.
+SBS is the variable jq selected by the pricing operation to be added to the superbasic set.
-SBS is the superbasic variable chosen to become nonbasic.
-BS is the basis variable removed (if any) to become nonbasic.
Pivot if column aq replaces the r th column of the basis B , Pivot is the r th element of a vector y satisfying By=aq . Wherever possible, Step is chosen to avoid extremely small values of Pivot (since they cause the basis to be nearly singular). In rare cases, it may be necessary to increase the Pivot Tolerance to exclude very small elements of y from consideration during the computation of Step.
L+U is the number of nonzeros representing the basis factors L and U . Immediately after a basis factorization B=LU , L+U is lenL+lenU, the number of subdiagonal elements in the columns of a lower triangular matrix and the number of diagonal and superdiagonal elements in the rows of an upper-triangular matrix. Further nonzeros are added to L when various columns of B are later replaced. As columns of B are replaced, the matrix U is maintained explicitly (in sparse form). The value of L will steadily increase, whereas the value of U may fluctuate up or down. Thus the value of L+U may fluctuate up or down (in general, it will tend to increase).
ncp is the number of compressions required to recover storage in the data structure for U . This includes the number of compressions needed during the previous basis factorization.
nS is the current number of superbasic variables. (The heading is not printed if the problem is linear.)
condHz see Section 13.1. (The heading is not printed if the problem is linear.)

13.3 Crash Statistics

If Major Print Level 10 and System Information Yes has been specified, the following items are output to the Print file when Cold Start and no Backup Basis file is loaded. They refer to the number of columns that the Crash procedure selects during selected passes through A while searching for a triangular basis matrix.
Label Description
Slacks is the number of slacks selected initially.
Free cols is the number of free columns in the basis.
Preferred is the number of ‘preferred’ columns in the basis (i.e., istate[j-1]=3 for some jn ).
Unit is the number of unit columns in the basis.
Double is the number of columns in the basis containing 2 nonzeros.
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).

13.4 Basis Factorization Statistics

If Major Print Level 10 , the first seven items in the list below are output to the Print file whenever the basis B or the rectangular matrix BS = B S T is factorized before solution of the next QP subproblem. See Section 12.1 for a full description of an optional parameter.
Gaussian elimination is used to compute a sparse LU factorization of B or BS , where PLPT and PUQ are lower and upper triangular matrices for some permutation matrices P and Q . Stability is ensured as described under the optional parameter LU Factor Tolerance.
If Minor Print Level 10 , the same items are printed during the QP solution whenever the current B is factorized. In addition, if System Information Yes has been specified, the entries from Elems onwards are also printed.
Label Description
Factor the number of factorizations since the start of the run.
Demand a code giving the reason for the present factorization, as follows:
Code Meaning
0 First LU factorization.
1 The number of updates reached the Factorization Frequency.
2 The nonzeros in the updated factors have increased significantly.
7 Not enough storage to update factors.
10 Row residuals too large (see the description of the optional parameter Check Frequency).
11 Ill-conditioning has caused inconsistent results.
Itn is the current minor iteration number.
Nonlin is the number of nonlinear variables in the current basis B .
Linear is the number of linear variables in B .
Slacks is the number of slack variables in B .
B BR BS or BT factorize is the type of LU factorization.
B periodic factorization of the basis B .
BR more careful rank-revealing factorization of B using threshold rook pivoting. This occurs mainly at the start, if the first basis factors seem singular or ill-conditioned. Followed by a normal B factorize.
BS BS is factorized to choose a well-conditioned B from the current B S . Followed by a normal B factorize.
BT same as BS except the current B is tried first and accepted if it appears to be not much more ill-conditioned than after the previous BS factorize.
m is the number of rows in B or BS .
n is the number of columns in B or BS . Preceded by ‘=’ or ‘>’ respectively.
Elems is the number of nonzero elements in B or BS .
Amax is the largest nonzero in B or BS .
Density is the percentage nonzero density of B or BS .
Merit/MerRP/MerCP is the average Markowitz merit count for the elements chosen to be the diagonals of PUQ . Each merit count is defined to be c-1 r-1 where c and r 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 n such quantities. It gives an indication of how much work was required to preserve sparsity during the factorization. If LU Complete Pivoting or LU Rook Pivoting has been selected, this heading is changed to MerCP, respectively MerRP.
lenL is the number of nonzeros in L .
L+U is the number of nonzeros representing the basis factors L and U . Immediately after a basis factorization B=LU , L+U is lenL+lenU, the number of subdiagonal elements in the columns of a lower triangular matrix and the number of diagonal and superdiagonal elements in the rows of an upper-triangular matrix. Further nonzeros are added to L when various columns of B are later replaced. As columns of B are replaced, the matrix U is maintained explicitly (in sparse form). The value of L will steadily increase, whereas the value of U may fluctuate up or down. Thus the value of L+U may fluctuate up or down (in general, it will tend to increase).
Cmpressns is the number of times the data structure holding the partially factored matrix needed to be compressed to recover unused storage. Ideally this number should be zero. If it is more than 3 or 4, the amount of workspace available to e04wdc should be increased for efficiency.
Incres is the percentage increase in the number of nonzeros in L and U relative to the number of nonzeros in B or BS .
Utri is the number of triangular rows of B or BS at the top of U .
lenU the number of nonzeros in U , including its diagonals.
Ltol is the largest subdiagonal element allowed in L . This is the specified LU Factor Tolerance or a smaller value that is currently being used for greater stability.
Umax the maximum nonzero element in U .
Ugrwth is the ratio Umax/Amax , which ideally should not be substantially larger than 10.0 or 100.0. If it is orders of magnitude larger, it may be advisable to reduce the LU Factor Tolerance to 5.0, 4.0, 3.0 or 2.0, say (but bigger than 1.0).
As long as Lmax is not large (say 5.0 or less), maxAmax,Umax / DUmin gives an estimate of the condition number B . If this is extremely large, the basis is nearly singular. Slacks are used to replace suspect columns of B and the modified basis is refactored.
Ltri is the number of triangular columns of B or BS at the left of L .
dense1 is the number of columns remaining when the density of the basis matrix being factorized reached 0.3.
Lmax is the actual maximum subdiagonal element in L (bounded by Ltol).
Akmax is the largest nonzero generated at any stage of the LU factorization. (Values much larger than Amax indicate instability.) Akmax is not printed if LU Partial Pivoting is selected.
Agrwth is the ratio Akmax/Amax . Values much larger than 100 (say) indicate instability. Growth is not printed if LU Partial Pivoting is selected.
bump is the size of the block to be factorized nontrivially after the triangular rows and columns of B or BS have been removed.
dense2 is the number of columns remaining when the density of the basis matrix being factorized reached 0.6. (The Markowitz pivot strategy searches fewer columns at that stage.)
DUmax is the largest diagonal of PUQ .
DUmin is the smallest diagonal of PUQ .
condU the ratio DUmax/DUmin , which estimates the condition number of U (and of B if Ltol is less than 5.0, say).

13.5 The Solution File

At the end of a run, the final solution may be output as a Solution file, according to Solution File. Some header information appears first to identify the problem and the final state of the optimization procedure. A ROWS section and a COLUMNS section then follow, giving one line of information for each row and column. The format used is similar to certain commercial systems, though there is no industry standard.
The maximum record length is 111 characters.
To reduce clutter, a full stop (.) is printed for any numerical value that is exactly zero. The values ±1 are also printed specially as 1.0 and -1.0 . Infinite bounds ( ± 1020 or larger) are printed as None.
A Solution file is intended to be read from disk by a self-contained program that extracts and saves certain values as required for possible further computation. Typically, the first 14 records would be ignored. Each subsequent record may be read. The end of the ROWS section is marked by a record that starts with a 1 and is otherwise blank. If this and the next 4 records are skipped, the COLUMNS section can then be read under the same format.

13.5.1 The ROWS section

General linear constraints take the form l Ax u . The i th constraint is therefore of the form
α νi x β ,  
where νi is the i th row of A .
Internally, the constraints take the form Ax - s = 0 , where s is the set of slack variables (which happen to satisfy the bounds l s u ). For the i th constraint it is the slack variable si that is directly available, and it is sometimes convenient to refer to its state. Nonlinear constraints α cix+ vix β are treated similarly, except that the row activity and degree of infeasibility are computed directly from cix + vix rather than si . A fullstop (.) is printed for any numerical value that is exactly zero.
Label Description
Number is the value of n+i. (This is used internally to refer to si in the intermediate output.)
Row gives the name of the ith row.
State the state of the ith row relative to the bounds α and β . The various states possible are as follows:
LL the row is at its lower limit, α .
UL the row is at its upper limit, β .
EQ the limits are the same ( α=β ).
FR si is nonbasic and currently zero, even though it is free to take any value between its bounds α and β .
BS si is basic.
SBS si is superbasic.
A key is sometimes printed before State. Note that unless the optional parameter Scale 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 Major 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 vix (or cix + vix for nonlinear rows) 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 Limit is α, the lower bound on the row.
Upper Limit is β, the upper bound on the row.
Dual Activity is the value of the dual variable πi (the Lagrange multiplier for the i th constraint). The full vector π always satisfies BTπ = gB , where B is the current basis matrix and gB contains the associated gradients for the current objective function. For FP problems, πi is set to zero.
i gives the index i of the ith row.

13.5.2 The COLUMNS section

Let the j th component of x be the variable xj and assume that it satisfies the bounds α xj β . A fullstop (.) is printed for any numerical value that is exactly zero.
Label Description
Number is the column number j. (This is used internally to refer to xj in the intermediate output.)
Column gives the name of xj.
State the state of xj relative to the bounds α and β . The various states possible are as follows:
LL xj is nonbasic at its lower limit, α .
UL xj is nonbasic at its upper limit, β .
EQ xj is nonbasic and fixed at the value α = β .
FR xj is nonbasic at some value strictly between its bounds: α<xj<β .
BS xj is basic. Usually α<xj<β .
SBS xj is superbasic. Usually α<xj<β .
A key is sometimes printed before State. Note that unless the optional parameter Scale 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 Major 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 xj at the final iterate.
Obj Gradient is the value of gj at the final iterate. For FP problems, gj is set to zero.
Lower Limit is the lower bound specified for the variable. None indicates that bl[j-1]-bigbnd.
Upper Limit is the upper bound specified for the variable. None indicates that bu[j-1]bigbnd.
Reduced Gradnt is the value of the reduced gradient dj = gj - πT aj where aj is the j th column of the constraint matrix. For FP problems, dj is set to zero.
m + j is the value of m+j.
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 Slack Activity column to become positive.
Numerical values are output with a fixed number of digits; they are not guaranteed to be accurate to this precision.

13.6 The Summary File

If Summary File>0, the following information is output to the Summary File. (It is a brief summary of the output directed to unit Print File):