h02ce obtains integer solutions to sparse linear programming and quadratic programming problems.
Syntax
C# 

public static void h02ce( int n, int m, int nnz, int iobj, int ncolh, H..::..H02CE_QPHX qphx, double[] a, int[] ha, int[] ka, double[] bl, double[] bu, string start, string[] names, int nname, string[] crname, ref int ns, double[] xs, int[] intvar, int lintvr, int mdepth, int[] istate, out int miniz, out int minz, out double obj, double[] clamda, int strtgy, int[] iz, double[] z, H..::..H02CE_MONIT monit, H..::..h02ceOptions options, out int ifail ) 
Visual Basic 

Public Shared Sub h02ce ( _ n As Integer, _ m As Integer, _ nnz As Integer, _ iobj As Integer, _ ncolh As Integer, _ qphx As H..::..H02CE_QPHX, _ a As Double(), _ ha As Integer(), _ ka As Integer(), _ bl As Double(), _ bu As Double(), _ start As String, _ names As String(), _ nname As Integer, _ crname As String(), _ ByRef ns As Integer, _ xs As Double(), _ intvar As Integer(), _ lintvr As Integer, _ mdepth As Integer, _ istate As Integer(), _ <OutAttribute> ByRef miniz As Integer, _ <OutAttribute> ByRef minz As Integer, _ <OutAttribute> ByRef obj As Double, _ clamda As Double(), _ strtgy As Integer, _ iz As Integer(), _ z As Double(), _ monit As H..::..H02CE_MONIT, _ options As H..::..h02ceOptions, _ <OutAttribute> ByRef ifail As Integer _ ) 
Visual C++ 

public: static void h02ce( int n, int m, int nnz, int iobj, int ncolh, H..::..H02CE_QPHX^ qphx, array<double>^ a, array<int>^ ha, array<int>^ ka, array<double>^ bl, array<double>^ bu, String^ start, array<String^>^ names, int nname, array<String^>^ crname, int% ns, array<double>^ xs, array<int>^ intvar, int lintvr, int mdepth, array<int>^ istate, [OutAttribute] int% miniz, [OutAttribute] int% minz, [OutAttribute] double% obj, array<double>^ clamda, int strtgy, array<int>^ iz, array<double>^ z, H..::..H02CE_MONIT^ monit, H..::..h02ceOptions^ options, [OutAttribute] int% ifail ) 
F# 

static member h02ce : n : int * m : int * nnz : int * iobj : int * ncolh : int * qphx : H..::..H02CE_QPHX * a : float[] * ha : int[] * ka : int[] * bl : float[] * bu : float[] * start : string * names : string[] * nname : int * crname : string[] * ns : int byref * xs : float[] * intvar : int[] * lintvr : int * mdepth : int * istate : int[] * miniz : int byref * minz : int byref * obj : float byref * clamda : float[] * strtgy : int * iz : int[] * z : float[] * monit : H..::..H02CE_MONIT * options : H..::..h02ceOptions * ifail : int byref > unit 
Parameters
 n
 Type: System..::..Int32On entry: $n$, the number of variables (excluding slacks). This is the number of columns in the linear constraint matrix $A$.Constraint: ${\mathbf{n}}\ge 1$.
 m
 Type: System..::..Int32On entry: $m$, the number of general linear constraints (or slacks). This is the number of rows in $A$, including the free row (if any; see iobj).Constraint: ${\mathbf{m}}\ge 1$.
 nnz
 Type: System..::..Int32On entry: the number of nonzero elements in $A$.Constraint: $1\le {\mathbf{nnz}}\le {\mathbf{n}}\times {\mathbf{m}}$.
 iobj
 Type: System..::..Int32On entry: if ${\mathbf{iobj}}>0$, row iobj of $A$ is a free row containing the nonzero elements of the vector $c$ appearing in the linear objective term ${c}^{\mathrm{T}}x$.If ${\mathbf{iobj}}=0$, there is no free row, i.e., the problem is either an FP problem (in which case iobj must be set to zero), or a QP problem with $c=0$.Constraint: $0\le {\mathbf{iobj}}\le {\mathbf{m}}$.
 ncolh
 Type: System..::..Int32On entry: ${n}_{H}$, the number of leading nonzero columns of the Hessian matrix $H$. For FP and LP problems, ncolh must be set to zero.Constraint: $0\le {\mathbf{ncolh}}\le {\mathbf{n}}$.
 qphx
 Type: NagLibrary..::..H..::..H02CE_QPHXFor QP problems, you must supply a version of qphx to compute the matrix product $Hx$. If $H$ has rows and columns consisting entirely of zeros, it is most efficient to order the variables $x={\left(y\text{\hspace{1em}}z\right)}^{\mathrm{T}}$ so thatwhere the nonlinear variables $y$ appear first as shown. For LP problems, qphx will never be called by h02ce.
$$Hx=\left(\begin{array}{cc}{H}_{1}& 0\\ 0& 0\end{array}\right)\left(\begin{array}{c}y\\ z\end{array}\right)=\left(\begin{array}{c}{H}_{1}y\\ 0\end{array}\right)\text{,}$$ A delegate of type H02CE_QPHX.
 a
 Type: array<System..::..Double>[]()[][]An array of size [nnz]On entry: the nonzero elements of $A$, ordered by increasing column index. Note that multiple elements with the same row and column indices are not allowed.On exit: used as internal workspace prior to being restored and hence is unchanged.
 ha
 Type: array<System..::..Int32>[]()[][]An array of size [nnz]On entry: ${\mathbf{ha}}\left[\mathit{i}\right]$ must contain the row index of the nonzero element stored in ${\mathbf{a}}\left[\mathit{i}\right]$, for $\mathit{i}=1,2,\dots ,{\mathbf{nnz}}$. Note that the row indices for a column may be supplied in any order.Constraint: $1\le {\mathbf{ha}}\left[\mathit{i}\right]\le {\mathbf{m}}$, for $\mathit{i}=0,1,\dots ,{\mathbf{nnz}}1$.
 ka
 Type: array<System..::..Int32>[]()[][]An array of size [${\mathbf{n}}+1$]On entry: ${\mathbf{ka}}\left[\mathit{j}\right]$ must contain the index in a of the start of the $\mathit{j}$th column, for $\mathit{j}=1,2,\dots ,{\mathbf{n}}$. To specify the $j$th column as empty, set ${\mathbf{ka}}\left[j\right]={\mathbf{ka}}\left[j+1\right]$. Note that the first and last elements of ka must be such that ${\mathbf{ka}}\left[0\right]=1$ and ${\mathbf{ka}}\left[{\mathbf{n}}\right]={\mathbf{nnz}}+1$.Constraints:
 ${\mathbf{ka}}\left[0\right]=1$;
 ${\mathbf{ka}}\left[\mathit{j}\right]\ge 1$, for $\mathit{j}=1,2,\dots ,{\mathbf{n}}1$;
 ${\mathbf{ka}}\left[{\mathbf{n}}\right]={\mathbf{nnz}}+1$;
 $0\le {\mathbf{ka}}\left[\mathit{j}+1\right]{\mathbf{ka}}\left[\mathit{j}\right]\le {\mathbf{m}}$, for $\mathit{j}=0,1,\dots ,{\mathbf{n}}1$.
 bl
 Type: array<System..::..Double>[]()[][]An array of size [${\mathbf{n}}+{\mathbf{m}}$]On entry: $l$, the lower bounds for all the variables and general constraints, in the following order. The first n elements of bl must contain the bounds on the variables $x$, and the next m elements the bounds for the general linear constraints $Ax$ (or slacks $s$) and the free row (if any). To specify a nonexistent lower bound (i.e., ${l}_{j}=\infty $), set ${\mathbf{bl}}\left[j\right]\le \mathit{bigbnd}$, where $\mathit{bigbnd}$ is the value of the optional parameter Infinite Bound Size ($\text{default value}={10}^{20}$). To specify the $j$th constraint as an equality, set ${\mathbf{bl}}\left[j\right]={\mathbf{bu}}\left[j\right]=\beta $, say, where $\left\beta \right<\mathit{bigbnd}$. Note that the lower bound corresponding to the free row must be set to $\infty $ and stored in ${\mathbf{bl}}\left[{\mathbf{n}}+{\mathbf{iobj}}1\right]$.Constraint: if ${\mathbf{iobj}}>0$, ${\mathbf{bl}}\left[{\mathbf{n}}+{\mathbf{iobj}}1\right]\le \mathit{bigbnd}$(See also the description for bu.)
 bu
 Type: array<System..::..Double>[]()[][]An array of size [${\mathbf{n}}+{\mathbf{m}}$]On entry: $u$, the upper bounds for all the variables and general constraints, in the following order. The first n elements of bl must contain the bounds on the variables $x$, and the next m elements the bounds for the general linear constraints $Ax$ (or slacks $s$) and the free row (if any). To specify a nonexistent upper bound (i.e., ${u}_{j}=+\infty $), set ${\mathbf{bu}}\left[j\right]\ge \mathit{bigbnd}$. Note that the upper bound corresponding to the free row must be set to $+\infty $ and stored in ${\mathbf{bu}}\left[{\mathbf{n}}+{\mathbf{iobj}}1\right]$.On exit: used as internal workspace prior to being restored and hence is unchanged.Constraints:
 if ${\mathbf{iobj}}>0$, ${\mathbf{bu}}\left[{\mathbf{n}}+{\mathbf{iobj}}1\right]\ge \mathit{bigbnd}$;
 ${\mathbf{bl}}\left[\mathit{j}\right]\le {\mathbf{bu}}\left[\mathit{j}\right]$, for $\mathit{j}=0,1,\dots ,{\mathbf{n}}+{\mathbf{m}}1$;
 if ${\mathbf{bl}}\left[j\right]={\mathbf{bu}}\left[j\right]=\beta $, $\left\beta \right<\mathit{bigbnd}$.
 start
 Type: System..::..StringOn entry: indicates how a starting basis is to be obtained.
 ${\mathbf{start}}=\text{"C"}$
 An internal crash procedure will be used to choose an initial basis matrix $B$.
 ${\mathbf{start}}=\text{"W"}$
 A basis is already defined in istate (probably from a previous call).
Constraint: ${\mathbf{start}}=\text{"C"}$ or $\text{"W"}$.
 names
 Type: array<System..::..String>[]()[][]An array of size [$5$]On entry: a set of names associated with the socalled MPSX form of the problem.
 ${\mathbf{names}}\left[0\right]$
 Must contain the name for the problem (or be blank).
 ${\mathbf{names}}\left[1\right]$
 Must contain the name for the free row (or be blank).
 ${\mathbf{names}}\left[2\right]$
 Must contain the name for the constraint righthand side (or be blank).
 ${\mathbf{names}}\left[3\right]$
 Must contain the name for the ranges (or be blank).
 ${\mathbf{names}}\left[4\right]$
 Must contain the name for the bounds (or be blank).
 nname
 Type: System..::..Int32On entry: the number of column (i.e., variable) and row names supplied in the array names.
 ${\mathbf{nname}}=1$
 There are no names. Default names will be used in the printed output.
 ${\mathbf{nname}}={\mathbf{n}}+{\mathbf{m}}$
 All names must be supplied.
Constraint: ${\mathbf{nname}}=1$ or ${\mathbf{n}}+{\mathbf{m}}$.
 crname
 Type: array<System..::..String>[]()[][]An array of size [nname]On entry: the optional column and row names.If ${\mathbf{nname}}=1$, crname is not referenced and the printed output will use default names for the columns and rows.
 ns
 Type: System..::..Int32%On entry: ${n}_{S}$, the number of superbasics. For QP problems, ns need not be specified if ${\mathbf{start}}=\text{"C"}$, but must retain its value from a previous call when ${\mathbf{start}}=\text{"W"}$. For FP and LP problems, ns need not be initialized.On exit: the final number of superbasics. This will be zero for FP and LP problems.
 xs
 Type: array<System..::..Double>[]()[][]An array of size [${\mathbf{n}}+{\mathbf{m}}$]On entry: the initial values of the variables and slacks $\left(x,s\right)$. (See the description for istate.)On exit: ${\mathbf{xs}}\left[\mathit{i}1\right]$ contains the final value of ${x}_{\mathit{i}}$, for $\mathit{i}=1,2,\dots ,n$.
 intvar
 Type: array<System..::..Int32>[]()[][]An array of size [lintvr]On entry: specifies which components of the solution vector $x$ are constrained to be integer. Specifically, if $k$ elements of $x$ are required to take integer values then ${\mathbf{intvar}}\left[\mathit{i}\right]={l}_{\mathit{i}}$, for $\mathit{i}=1,2,\dots ,k$, where ${l}_{i}$ is the integer index such that ${x}_{{l}_{i}}$ is integer. If $k<{\mathbf{lintvr}}$ then ${\mathbf{intvar}}\left[k+1\right]$ must be set to $1$ to signal the end of the integer variable indices.The order in which the indices of those components of $x$ required to be integer is presented determines the order in which the subproblems are treated and solved. As such it can be a powerful tool to assist the method in achieving a solution efficiently. The general advice is to enter the important integer variables in the model early in intvar; secondary or less important variables should be entered near the end of the list. However some experimentation might be required to find the optimal order.
 lintvr
 Type: System..::..Int32On entry: $k$, the number of components of $x$ required to be integer. If $k=0$, then lintvr must be set to $1$ and ${\mathbf{intvar}}\left[0\right]$ set to $1$.
 mdepth
 Type: System..::..Int32On entry: specifies the maximum depth the tree of subproblems may be developed.Suggested value: ${\mathbf{mdepth}}=2\times {\mathbf{n}}+20$.Constraint: ${\mathbf{mdepth}}>0$.
 istate
 Type: array<System..::..Int32>[]()[][]An array of size [${\mathbf{n}}+{\mathbf{m}}$]On entry: if ${\mathbf{start}}=\text{"C"}$, the first n elements of istate and xs must specify the initial states and values, respectively, of the variables $x$. (The slacks $s$ need not be initialized.) An internal crash procedure is then used to select an initial basis matrix $B$. The initial basis matrix will be triangular (neglecting certain small elements in each column). It is chosen from various rows and columns of columns of $\left(AI\right)$. Possible values for ${\mathbf{istate}}\left[j\right]$ are as follows:If nothing special is known about the problem, or there is no wish to provide special information, you may set ${\mathbf{istate}}\left[\mathit{j}\right]=0$ and ${\mathbf{xs}}\left[\mathit{j}\right]=0.0$, for $\mathit{j}=1,2,\dots ,{\mathbf{n}}$. All variables will then be eligible for the initial basis. Less trivially, to say that the $j$th variable will probably be equal to one of its bounds, set ${\mathbf{istate}}\left[j\right]=4$ and ${\mathbf{xs}}\left[j\right]={\mathbf{bl}}\left[j\right]$ or ${\mathbf{istate}}\left[j\right]=5$ and ${\mathbf{xs}}\left[j\right]={\mathbf{bu}}\left[j\right]$ as appropriate.
${\mathbf{istate}}\left[j\right]$ State of ${\mathbf{xs}}\left[j\right]$ during crash procedure 0 or $1$ Eligible for the basis 2 Ignored 3 Eligible for the basis (given preference over $0$ or $1$) 4 or $5$ Ignored Following the crash procedure, variables for which ${\mathbf{istate}}\left[j\right]=2$ are made superbasic. Other variables not selected for the basis are then made nonbasic at the value ${\mathbf{xs}}\left[j\right]$ if ${\mathbf{bl}}\left[j\right]\le {\mathbf{xs}}\left[j\right]\le {\mathbf{bu}}\left[j\right]$, or at the value ${\mathbf{bl}}\left[j\right]$ or ${\mathbf{bu}}\left[j\right]$ closest to ${\mathbf{xs}}\left[j\right]$.Constraints: if ${\mathbf{start}}=\text{"C"}$, $0\le {\mathbf{istate}}\left[\mathit{j}\right]\le 5$, for $\mathit{j}=0,1,\dots ,{\mathbf{n}}1$;
 if ${\mathbf{start}}=\text{"W"}$, $0\le {\mathbf{istate}}\left[\mathit{j}\right]\le 3$, for $\mathit{j}=0,1,\dots ,{\mathbf{n}}+{\mathbf{m}}1$.
On exit: the final states of the variables and slacks $\left(x,s\right)$ from the solution of the last subproblem tackled. The significance of each possible value of ${\mathbf{istate}}\left[j\right]$ is as follows:If $\mathtt{Ninf}=0$ (see [Description of the Printed Output]), basic and superbasic variables may be outside their bounds by as much as the value of the optional parameter Feasibility Tolerance ($\text{default value}=\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left({10}^{6},\sqrt{\epsilon}\right)$, where $\epsilon $ is the machine precision). Note that unless the optional parameter ${\mathbf{Scale\; Option}}=0$ ($\text{default value}=2$) is specified, the Feasibility Tolerance applies to the variables of the scaled problem. In this case, the variables of the original problem may be as much as $0.1$ outside their bounds, but this is unlikely unless the problem is very badly scaled.${\mathbf{istate}}\left[j\right]$ State of variable $j$ Normal value of ${\mathbf{xs}}\left[j\right]$ $0$ Nonbasic ${\mathbf{bl}}\left[j\right]$ $1$ Nonbasic ${\mathbf{bu}}\left[j\right]$ $2$ Superbasic Between ${\mathbf{bl}}\left[j\right]$ and ${\mathbf{bu}}\left[j\right]$ $3$ Basic Between ${\mathbf{bl}}\left[j\right]$ and ${\mathbf{bu}}\left[j\right]$ Very occasionally some nonbasic variables may be outside their bounds by as much as the Feasibility Tolerance, and there may be some nonbasic variables for which ${\mathbf{xs}}\left[j\right]$ lies strictly between its bounds.If $\mathtt{Ninf}>0$, some basic and superbasic variables may be outside their bounds by an arbitrary amount (bounded by Sinf (see [Description of the Printed Output]) if ${\mathbf{Scale\; Option}}=0$).
 miniz
 Type: System..::..Int32%
 minz
 Type: System..::..Int32%
 obj
 Type: System..::..Double%
 clamda
 Type: array<System..::..Double>[]()[][]An array of size [${\mathbf{n}}+{\mathbf{m}}$]On exit: a set of Lagrangemultipliers for the bounds on the variables and the general constraints. More precisely, the first n elements contain the multipliers (reduced costs) for the bounds on the variables, and the next m elements contain the multipliers (shadow prices) for the general linear constraints.
 strtgy
 Type: System..::..Int32On entry: defines the branching strategy adopted by the method.
 ${\mathbf{strtgy}}=0$
 Each subproblem first explored imposes a tighter upper bound on the component of $x$.
 ${\mathbf{strtgy}}=1$
 Each subproblem first explored imposes a tighter lower bound on the component of $x$.
 ${\mathbf{strtgy}}=2$
 Each branch explored imposes a tighter upper bound on the component of $x$ if its fractional part is less than $0.5$, otherwise it imposes a tighter lower bound.
 ${\mathbf{strtgy}}=3$
 Random choice is made between first exploring a tighter lower bound or a tighter upper bound subproblem.
Constraint: ${\mathbf{strtgy}}=0$, $1$, $2$ or $3$.
 iz
 Type: array<System..::..Int32>[]()[][]An array of size [leniz]the dimension of the array iz.Constraint: ${\mathbf{leniz}}\ge 1$.
 z
 Type: array<System..::..Double>[]()[][]An array of size [lenz]the dimension of the array z.Constraint: ${\mathbf{lenz}}\ge 1$.The amounts of workspace provided (i.e., leniz and lenz) and required (i.e., miniz and minz) are (by default) output on the current advisory message unit (as defined by (X04ABF not in this release)). Since the minimum values of leniz and lenz required to start solving the problem are returned in miniz and minz, respectively, you may prefer to obtain appropriate values from the output of a preliminary run with leniz and lenz set to $1$. (h02ce will then terminate with ${\mathbf{ifail}}={14}$.)
 monit
 Type: NagLibrary..::..H..::..H02CE_MONITTo provide feedback on the progress of the branch and bound process. Additionally monit provides, via its parameter halt, the ability to terminate the process. (You might choose to do this when an integer solution is found, rather than search for a better solution.) If you do not require any intermediate output then monit may be the dummy method (H02CEY not in this release).
A delegate of type H02CE_MONIT.
 options
 Type: NagLibrary..::..H..::..h02ceOptionsAn Object of type H.h02ceOptions. Used to configure optional parameters to this method.
 ifail
 Type: System..::..Int32%On exit: ${\mathbf{ifail}}={0}$ unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
h02ce is designed to obtain integer solutions to a class of quadratic programming problems addressed by e04nk. Specifically it solves the following problem:
where $x={\left({x}_{1},{x}_{2},\dots ,{x}_{n}\right)}^{\mathrm{T}}$ is a set of variables (some of which may be required to be integer), $A$ is an $m$ by $n$ matrix and the objective function $f\left(x\right)$ may be specified in a variety of ways depending upon the particular problem to be solved. The optional parameter Maximize may be used to specify an alternative problem in which $f\left(x\right)$ is maximized. The possible forms for $f\left(x\right)$ are listed in Table 1, in which the prefixes LP and QP stand for ‘linear programming’ and ‘quadratic programming’ respectively, $c$ is an $n$element vector and $H$ is the $n$ by $n$ secondderivative matrix ${\nabla}^{2}f\left(x\right)$ (the Hessian matrix).
$$\begin{array}{l}\underset{x\in {R}^{n}}{\mathrm{minimize}}\phantom{\rule{0.25em}{0ex}}f\left(x\right)\text{\hspace{1em} subject to \hspace{1em}}l\le \left\{\begin{array}{c}x\\ Ax\end{array}\right\}\le u\text{,}\end{array}$$  (1) 
Problem type  Objective function $f\left(x\right)$  Hessian matrix $H$ 
LP  ${c}^{\mathrm{T}}x$  Not applicable 
QP  ${c}^{\mathrm{T}}x+\frac{1}{2}{x}^{\mathrm{T}}Hx$  Symmetric positive semidefinite 
For LP and QP problems, the unique global minimum value of $f\left(x\right)$ is found. For QP problems, you must also provide a method that computes $Hx$ for any given vector $x$. ($H$ need not be stored explicitly.)
(It is not expected that the feasibility problem of e04nk would be relevant here.)
The method employs a ‘Branch and Bound’ technique to enforce the integer constraints. In this technique the problem is first solved without the integer constraints. If a variable is found to be nonintegral when it is required to have an integer value then two additional problems are constructed. One bounds the variable above by the nearest integer value below the optimal value previously obtained. The second problem is formed by bounding the variable below by the nearest integer value above the optimal value. This process is continued until an integer solution is found. At this point you may elect to stop, or may continue to search for better integer solutions by examining any other subproblems that remain to be explained.
In practice the method tries to compute an integer solution as quickly as possible using a depthfirst approach, since this helps determine a realistic cutoff value. If we have a cutoff value, say the value of the function at this first integer solution, and any subproblem, $W$ say, has a solution value greater than this cutoff value, then subsequent subproblems of $W$ must have solutions greater than the value of the solution at $W$ and therefore need not be computed. Thus a knowledge of a good cutoff value can result in fewer subproblems being solved and thus speed up the operation of the method. (See the description of monit in [Parameters] for details of how you can supply your own cutoff value.)
Each subproblem is solved using (E04NKA not in this release). You are referred to the method document for e04nk for details of the algorithm used.
References
Gill P E, Hammarling S, Murray W, Saunders M A and Wright M H (1986) Users' guide for LSSOL (Version 1.0) Report SOL 861 Department of Operations Research, Stanford University
Gill P E and Murray W (1978) Numerically stable methods for quadratic programming Math. Programming 14 349–372
Gill P E, Murray W, Saunders M A and Wright M H (1986) Some theoretical properties of an augmented Lagrangian merit function Report SOL 86–6R Department of Operations Research, Stanford University
Gill P E, Murray W, Saunders M A and Wright M H (1989) A practical anticycling procedure for linearly constrained optimization Math. Programming 45 437–474
Gill P E, Murray W, Saunders M A and Wright M H (1991) Inertiacontrolling methods for general quadratic programming SIAM Rev. 33 1–36
Hock W and Schittkowski K (1981) Test Examples for Nonlinear Programming Codes. Lecture Notes in Economics and Mathematical Systems 187 Springer–Verlag
Lawson C L, Hanson R J, Kincaid D R and Krogh F T (1979) Basic linear algebra supbrograms for Fortran usage ACM Trans. Math. Software 5 308–325
Murtagh B A and Saunders M A (1983) MINOS 5.0 user's guide Report SOL 8320 Department of Operations Research, Stanford University
Error Indicators and Warnings
Errors or warnings detected by the method:
 ${\mathbf{ifail}}=1$
 Halted at your request.
 ${\mathbf{ifail}}=0$
 Successful exit.
 ${\mathbf{ifail}}=1$
 Input parameter error immediately detected.
 ${\mathbf{ifail}}=2$
 No integer solution found.
 ${\mathbf{ifail}}=3$
 mdepth is too small.
 ${\mathbf{ifail}}=4$
 The problem is unbounded (or badly scaled). The objective function is not bounded below in the feasible region.
 ${\mathbf{ifail}}=5$
 The problem is infeasible. The general constraints cannot all be satisfied simultaneously to within the value of the optional parameter Feasibility Tolerance ($\text{default value}=\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left({10}^{6},\sqrt{\epsilon}\right)$, where $\epsilon $ is the machine precision).
 ${\mathbf{ifail}}=6$
 Too many iterations. The value of the optional parameter Iteration Limit ($\text{default value}=\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(50,5\left(n+m\right)\right)$) is too small.
 ${\mathbf{ifail}}=7$
 The reduced Hessian matrix ${{\mathbf{z}}}^{\mathrm{T}}HZ$ (see [Definition of the Working Set and Search Direction]) exceeds its assigned dimension. The value of the optional parameter Superbasics Limit ($\text{default value}=\mathrm{min}\phantom{\rule{0.125em}{0ex}}\left({n}_{H}+1,n\right)$) is too small.
 ${\mathbf{ifail}}=8$
 The Hessian matrix $H$ appears to be indefinite. Check that qphx has been coded correctly and that all relevant elements of $Hx$ have been assigned their correct values.
 ${\mathbf{ifail}}=9$
 An input parameter is invalid for an internal call to e04nk.
 ${\mathbf{ifail}}=10$
 Numerical error in trying to satisfy the general constraints. The basis is very illconditioned.
 ${\mathbf{ifail}}=11$
 ${\mathbf{ifail}}=12$
 ${\mathbf{ifail}}=13$
 The basis is singular after $15$ attempts to factorize it (adding slacks where necessary). Either the problem is badly scaled or the value of the optional parameter LU Factor Tolerance ($\text{default value}=100.0$) is too large.
 ${\mathbf{ifail}}=14$
 ${\mathbf{ifail}}=15$
 ${\mathbf{ifail}}=16$
 An internal error has occurred. Contact NAG with details of your program.
Accuracy
h02ce implements a numerically stable activeset strategy and returns solutions that are as accurate as the condition of the problem warrants on the machine.
Parallelism and Performance
None.
Further Comments
This section contains a description of the printed output.
Description of the Printed Output
This section describes the (default) intermediate printout and final printout produced by h02ce. The intermediate printout is a subset of the monitoring information produced by the method at every iteration (see [Description of Monitoring Information]). You can control the level of printed output (see the description of the optional parameter Print Level in [Description of the Optional Parameters]). Note that the intermediate printout and final printout are produced only if ${\mathbf{Print\; Level}}\ge 10$ (the default).
The following line of summary output ($\text{}<80$ characters) is produced at every iteration. In all cases, the values of the quantities printed are those in effect on
completion of the given iteration.
Itn  is the iteration count. 
Step  is the step taken along the computed search direction. If a constraint is added during the current iteration, Step will be the step to the nearest constraint. When the problem is of type LP, the step can be greater than one during the optimality phase. 
Ninf  is the number of violated constraints (infeasibilities). This will be zero during the optimality phase. 
Sinf/Objective 
is the value of the current objective function. If $x$ is not feasible, Sinf gives a weighted sum of the magnitudes of constraint violations. If $x$ is feasible, Objective is the value of the objective function. The output line for the final iteration of the feasibility phase (i.e., the first iteration for which Ninf is zero) will give the value of the true objective at the first feasible point. During the optimality phase, the value of the objective function will be nonincreasing. During the feasibility phase, the number of constraint infeasibilities will not increase until either a feasible point is found, or the optimality of the multipliers implies that no feasible point exists. Once optimal multipliers are obtained, the number of infeasibilities can increase, but the sum of infeasibilities will either remain constant or be reduced until the minimum sum of infeasibilities is found.

Norm rg  is $\Vert {d}_{S}\Vert $, the Euclidean norm of the reduced gradient (see [The Main Iteration]). During the optimality phase, this norm will be approximately zero after a unit step. For FP and LP problems, Norm rg is not printed. 
The final printout includes a listing of the status of every variable and constraint.
The following describes the printout for each variable. A full stop (.) is printed for any numerical value that is zero.
Variable  gives the name of the variable. If ${\mathbf{nname}}=1$, a default name is assigned to the $\mathit{j}$th variable, for $\mathit{j}=1,2,\dots ,n$. If ${\mathbf{nname}}={\mathbf{n}}+{\mathbf{m}}$, the name supplied in ${\mathbf{crname}}\left[j\right]$ is assigned to the $j$th variable.  
State 
gives the state of the variable (LL if nonbasic on its lower bound, UL if nonbasic on its upper bound, EQ if nonbasic and fixed, FR if nonbasic and strictly between its bounds, BS if basic and SBS if superbasic).
A key is sometimes printed before State to give some additional information about the state of a variable. Note that unless the optional parameter ${\mathbf{Scale\; Option}}=0$ ($\text{default value}=2$) is specified, the tests for assigning a key are applied to the variables of the scaled problem.


Value  is the value of the variable at the final iterate.  
Lower Bound  is the lower bound specified for the variable. None indicates that ${\mathbf{bl}}\left[j\right]\le \mathit{bigbnd}$.  
Upper Bound  is the upper bound specified for the variable. None indicates that ${\mathbf{bu}}\left[j\right]\ge \mathit{bigbnd}$.  
Lagr Mult  is the Lagrangemultiplier for the associated bound. This will be zero if State is FR. If $x$ is optimal, the multiplier should be nonnegative if State is LL, nonpositive if State is UL, and zero if State is BS or SBS.  
Residual  is the difference between the variable Value and the nearer of its (finite) bounds ${\mathbf{bl}}\left[j\right]$ and ${\mathbf{bu}}\left[j\right]$. A blank entry indicates that the associated variable is not bounded (i.e., ${\mathbf{bl}}\left[j\right]\le \mathit{bigbnd}$ and ${\mathbf{bu}}\left[j\right]\ge \mathit{bigbnd}$). 
The meaning of the printout for linear constraints is the same as that given above for variables, with ‘variable’ replaced by ‘constraint’, $n$ replaced by $m$, ${\mathbf{crname}}\left[j\right]$ replaced by ${\mathbf{crname}}\left[n+j\right]$, ${\mathbf{bl}}\left[j\right]$ and ${\mathbf{bu}}\left[j\right]$ are replaced by ${\mathbf{bl}}\left[n+j\right]$ and ${\mathbf{bu}}\left[n+j\right]$ respectively, and with the following change in the heading.
Constrnt  gives the name of the linear constraint. 
Note that movement off a constraint (as opposed to a variable moving away from its bound) can be interpreted as allowing the entry in the Residual column to become positive.
Numerical values are output with a fixed number of digits; they are not guaranteed to be accurate to this precision.
Example
This example minimizes the quadratic function $f\left(x\right)={c}^{\mathrm{T}}x+\frac{1}{2}{x}^{\mathrm{T}}Hx$, where
subject to the bounds
to the linear constraints
and the variables ${x}_{2}$, ${x}_{3}$, ${x}_{4}$, ${x}_{5}$, ${x}_{6}$, ${x}_{7}$, are constrained to be integer.
$$c={\left(200.0,2000.0,2000.0,2000.0,2000.0,400.0,400.0\right)}^{\mathrm{T}}$$ 
$$H=\left(\begin{array}{rrrrrrr}2& 0& 0& 0& 0& 0& 0\\ 0& 2& 0& 0& 0& 0& 0\\ 0& 0& 2& 2& 0& 0& 0\\ 0& 0& 2& 2& 0& 0& 0\\ 0& 0& 0& 0& 2& 0& 0\\ 0& 0& 0& 0& 0& 2& 2\\ 0& 0& 0& 0& 0& 2& 2\end{array}\right)$$ 
$$\begin{array}{l}\phantom{0}\phantom{0}0\le {x}_{1}\le \phantom{0}200\\ \phantom{0}\phantom{0}0\le {x}_{2}\le 2500\\ 400\le {x}_{3}\le \phantom{0}800\\ 100\le {x}_{4}\le \phantom{0}700\\ \phantom{0}\phantom{0}0\le {x}_{5}\le 1500\\ \phantom{0}\phantom{0}0\le {x}_{6}\\ \phantom{0}\phantom{0}0\le {x}_{7}\end{array}$$ 
$$\begin{array}{rrrrrrrrrrrrrrrrr}& & {x}_{1}& +& {x}_{2}& +& {x}_{3}& +& {x}_{4}& +& {x}_{5}& +& {x}_{6}& +& {x}_{7}& =& 2000\hfill \\ & & 0.15{x}_{1}& +& 0.04{x}_{2}& +& 0.02{x}_{3}& +& 0.04{x}_{4}& +& 0.02{x}_{5}& +& 0.01{x}_{6}& +& 0.03{x}_{7}& \le & 60\hfill \\ & & 0.03{x}_{1}& +& 0.05{x}_{2}& +& 0.08{x}_{3}& +& 0.02{x}_{4}& +& 0.06{x}_{5}& +& 0.01{x}_{6}& & & \le & 100\hfill \\ & & 0.02{x}_{1}& +& 0.04{x}_{2}& +& 0.01{x}_{3}& +& 0.02{x}_{4}& +& 0.02{x}_{5}& & & & & \le & 40\hfill \\ & & 0.02{x}_{1}& +& 0.03{x}_{2}& & & & & +& 0.01{x}_{5}& & & & & \le & 30\hfill \\ 1500\hfill & \le & 0.70{x}_{1}& +& 0.75{x}_{2}& +& 0.80{x}_{3}& +& 0.75{x}_{4}& +& 0.80{x}_{5}& +& 0.97{x}_{6}& & & & & & \\ 250\hfill & \le & 0.02{x}_{1}& +& 0.06{x}_{2}& +& 0.08{x}_{3}& +& 0.12{x}_{4}& +& 0.02{x}_{5}& +& 0.01{x}_{6}& +& 0.97{x}_{7}& \le & 300\hfill \end{array}$$ 
The initial point, which is infeasible, is
The optimal solution (to five figures) is
One bound constraint and one linear constraint are active at the solution. Note that the Hessian matrix $H$ is positive semidefinite.
$${x}_{0}={\left(0.0,0.0,0.0,0.0,0.0,0.0,0.0\right)}^{\mathrm{T}}\text{.}$$ 
$${x}^{*}={\left(0.0,355.0,645.0,164.0,410.0,275.0,151.0\right)}^{\mathrm{T}}\text{.}$$ 
Example program (C#): h02cee.cs
Algorithmic Details
This section contains a detailed description of the method used by h02ce.
Overview
h02ce employs a Branch and Bound technique (see [Description]) based on an inertiacontrolling method to solve the subproblems that maintains a Cholesky factorization of the reduced Hessian (see below). The method is similar to that of Gill and Murray (1978), and is described in detail by Gill et al. (1991). Here we briefly summarise the main features of the method. Where possible, explicit reference is made to the names of variables that are parameters of the method or appear in the printed output.
The method used has two distinct phases: finding an initial feasible point by minimizing the sum of infeasibilities (the feasibility phase), and minimizing the quadratic objective function within the feasible region (the optimality phase). The computations in both phases are performed by the same methods. The twophase nature of the algorithm is reflected by changing the function being minimized from the sum of infeasibilities (the printed quantity Sinf; see [Description of Monitoring Information]) to the quadratic objective function (the printed quantity Objective; see [Description of Monitoring Information]).
In general, an iterative process is required to solve a quadratic program. Given an iterate $\left(x,s\right)$ in both the original variables $x$ and the slack variables $s$, a new iterate $\left(\stackrel{}{x},\stackrel{}{s}\right)$ is defined by
where the step length
$\alpha $ is a nonnegative scalar (the printed quantity Step; see [Description of Monitoring Information]), and $p$ is called the search direction. (For simplicity, we shall consider a typical iteration and avoid reference to the index of the iteration.) Once an iterate is feasible (i.e., satisfies the constraints), all subsequent iterates remain feasible.
$$\left(\begin{array}{c}\stackrel{}{x}\\ \stackrel{}{s}\end{array}\right)=\left(\begin{array}{c}x\\ s\end{array}\right)+\alpha p\text{,}$$  (2) 
Definition of the Working Set and Search Direction
At each iterate $\left(x,s\right)$, a working set of constraints is defined to be a linearly independent subset of the constraints that are satisfied ‘exactly’ (to within the value of the optional parameter Feasibility Tolerance; see [Description of the Optional Parameters]). The working set is the current prediction of the constraints that hold with equality at a solution of the LP or QP problem. Let ${m}_{W}$ denote the number of constraints in the working set (including bounds), and let $W$ denote the associated ${m}_{W}$ by $\left(n+m\right)$ working set matrix consisting of the ${m}_{W}$ gradients of the working set constraints.
The search direction is defined so that constraints in the working set remain unaltered for any value of the step length. It follows that $p$ must satisfy the identity
This characterisation allows $p$ to be computed using any $n$ by ${n}_{{\mathbf{z}}}$ fullrank matrix $Z$ that spans the null space of $W$. (Thus, ${n}_{{\mathbf{z}}}=n{m}_{W}$ and $WZ=0$.) The null space matrix $Z$ is defined from a sparse $LU$ factorization of part of $W$ (see (6) and (7) below). The direction $p$ will satisfy (3) if
where ${p}_{{\mathbf{z}}}$ is any ${n}_{{\mathbf{z}}}$vector.
$$Wp=0\text{.}$$  (3) 
$$p=Z{p}_{Z}\text{,}$$  (4) 
The working set contains the constraints $Axs=0$ and a subset of the upper and lower bounds on the variables $\left(x,s\right)$. Since the gradient of a bound constraint ${x}_{j}\ge {l}_{j}$ or ${x}_{j}\le {u}_{j}$ is a vector of all zeros except for $\pm 1$ in position $j$, it follows that the working set matrix contains the rows of $\left(AI\right)$ and the unit rows associated with the upper and lower bounds in the working set.
The working set matrix $W$ can be represented in terms of a certain column partition of the matrix $\left(AI\right)$. As in [Description] we partition the constraints $Axs=0$ so that
where $B$ is a square nonsingular basis and ${x}_{B}$, ${x}_{S}$ and ${x}_{{\mathbf{n}}}$ are the basic, superbasic and nonbasic variables respectively. The nonbasic variables are equal to their upper or lower bounds at $\left(x,s\right)$, and the superbasic variables are independent variables that are chosen to improve the value of the current objective function. The number of superbasic variables is ${n}_{S}$ (the printed quantity Ns; see [Description of Monitoring Information]). Given values of ${x}_{N}$ and ${x}_{S}$, the basic variables ${x}_{B}$ are adjusted so that $\left(x,s\right)$ satisfies (5).
$$B{x}_{B}+S{x}_{S}+N{x}_{N}=0\text{,}$$  (5) 
If $P$ is a permutation matrix such that $\left(AI\right)P=\left(B\text{\hspace{1em}}S\text{\hspace{1em}}N\right)$, then the working set matrix $W$ satisfies
where ${I}_{N}$ is the identity matrix with the same number of columns as $N$.
$$WP=\left(\begin{array}{ccc}B& S& N\\ 0& 0& {I}_{N}\end{array}\right)\text{,}$$  (6) 
The null space matrix $Z$ is defined from a sparse $LU$ factorization of part of $W$. In particular, ${\mathbf{z}}$ is maintained in ‘reduced gradient’ form, using the LUSOL package (see Gill et al. (1986)) to maintain sparse $LU$ factors of the basis matrix $B$ that alters as the working set $W$ changes. Given the permutation $P$, the null space basis is given by
This matrix is used only as an operator, i.e., it is never computed explicitly. Products of the form $Zv$ and ${Z}^{\mathrm{T}}g$ are obtained by solving with $B$ or ${B}^{\mathrm{T}}$. This choice of $Z$ implies that ${n}_{Z}$, the number of ‘degrees of freedom’ at $\left(x,s\right)$, is the same as ${n}_{S}$, the number of superbasic variables.
$$Z=P\left(\begin{array}{c}{B}^{1}S\\ I\\ 0\end{array}\right)\text{.}$$  (7) 
Let ${g}_{Z}$ and ${H}_{Z}$ denote the reduced gradient and reduced Hessian of the objective function:
where $g$ is the objective gradient at $\left(x,s\right)$. Roughly speaking, ${g}_{{\mathbf{z}}}$ and ${H}_{{\mathbf{z}}}$ describe the first and second derivatives of an ${n}_{S}$dimensional unconstrained problem for the calculation of ${p}_{Z}$. (The condition estimator of ${H}_{Z}$ is the quantity Cond Hz in the monitoring file output; see [Description of Monitoring Information].)
$${g}_{Z}={Z}^{\mathrm{T}}g\text{\hspace{1em} and \hspace{1em}}{H}_{Z}={Z}^{\mathrm{T}}HZ\text{,}$$  (8) 
At each iteration, an upper triangular factor $R$ is available such that ${H}_{Z}={R}^{\mathrm{T}}R$. Normally, $R$ is computed from ${R}^{\mathrm{T}}R={Z}^{\mathrm{T}}HZ$ at the start of the optimality phase and then updated as the QP working set changes. For efficiency, the dimension of $R$ should not be excessive (say, ${n}_{S}\le 1000$). This is guaranteed if the number of nonlinear variables is ‘moderate’.
If the QP problem contains linear variables, $H$ is positive semidefinite and $R$ may be singular with at least one zero diagonal element. However, an inertiacontrolling strategy is used to ensure that only the last diagonal element of $R$ can be zero. (See Gill et al. (1991) for a discussion of a similar strategy for indefinite quadratic programming.)
If the initial $R$ is singular, enough variables are fixed at their current value to give a nonsingular $R$. This is equivalent to including temporary bound constraints in the working set. Thereafter, $R$ can become singular only when a constraint is deleted from the working set (in which case no further constraints are deleted until $R$ becomes nonsingular).
The Main Iteration
If the reduced gradient is zero, $\left(x,s\right)$ is a constrained stationary point on the working set. During the feasibility phase, the reduced gradient will usually be zero only at a vertex (although it may be zero elsewhere in the presence of constraint dependencies). During the optimality phase, a zero reduced gradient implies that $x$ minimizes the quadratic objective function when the constraints in the working set are treated as equalities. At a constrained stationary point, Lagrangemultipliers $\lambda $ are defined from the equations
A Lagrangemultiplier ${\lambda}_{j}$ corresponding to an inequality constraint in the working set is said to be optimal if ${\lambda}_{j}\le \sigma $ when the associated constraint is at its upper bound, or if ${\lambda}_{j}\ge \sigma $ when the associated constraint is at its lower bound, where $\sigma $ depends on the value of the optional parameter Optimality Tolerance (see [Description of the Optional Parameters]). If a multiplier is nonoptimal, the objective function (either the true objective or the sum of infeasibilities) can be reduced by continuing the minimization with the corresponding constraint excluded from the working set. (This step is sometimes referred to as ‘deleting’ a constraint from the working set.) If optimal multipliers occur during the feasibility phase but the sum of infeasibilities is nonzero, there is no feasible point and the method terminates immediately with ${\mathbf{ifail}}={3}$ (see [Error Indicators and Warnings]).
$${W}^{\mathrm{T}}\lambda =g\left(x\right)\text{.}$$  (9) 
The special form (6) of the working set allows the multiplier vector $\lambda $, the solution of (9), to be written in terms of the vector
where $\pi $ satisfies the equations ${B}^{\mathrm{T}}\pi ={g}_{B}$, and ${g}_{B}$ denotes the basic elements of $g$. The elements of $\pi $ are the Lagrangemultipliers ${\lambda}_{j}$ associated with the equality constraints $Axs=0$. The vector ${d}_{N}$ of nonbasic elements of $d$ consists of the Lagrangemultipliers ${\lambda}_{j}$ associated with the upper and lower bound constraints in the working set. The vector ${d}_{S}$ of superbasic elements of $d$ is the reduced gradient ${g}_{{\mathbf{z}}}$ in (8). The vector ${d}_{B}$ of basic elements of $d$ is zero, by construction. (The Euclidean norm of ${d}_{S}$ and the final values of ${d}_{S}$, $g$ and $\pi $ are the quantities Norm rg, Reduced Gradnt, Obj Gradient and Dual Activity in the monitoring file output; see [Description of Monitoring Information].)
$$d=\left(\begin{array}{c}g\\ 0\end{array}\right){\left(\begin{array}{cc}A& I\end{array}\right)}^{\mathrm{T}}\pi =\left(\begin{array}{c}g{A}^{\mathrm{T}}\pi \\ \pi \end{array}\right)\text{,}$$  (10) 
If the reduced gradient is not zero, Lagrangemultipliers need not be computed and the search direction is given by $p=Z{p}_{{\mathbf{z}}}$ (see (7) and (11)). The step length is chosen to maintain feasibility with respect to the satisfied constraints.
There are two possible choices for ${p}_{{\mathbf{z}}}$, depending on whether or not ${H}_{{\mathbf{z}}}$ is singular. If ${H}_{{\mathbf{z}}}$ is nonsingular, $R$ is nonsingular and ${p}_{{\mathbf{z}}}$ in (4) is computed from the equations
where ${g}_{{\mathbf{z}}}$ is the reduced gradient at $x$. In this case, $\left(x,s\right)+p$ is the minimizer of the objective function subject to the working set constraints being treated as equalities. If $\left(x,s\right)+p$ is feasible, $\alpha $ is defined to be unity. In this case, the reduced gradient at $\left(\stackrel{}{x},\stackrel{}{s}\right)$ will be zero, and Lagrangemultipliers are computed at the next iteration. Otherwise, $\alpha $ is set to ${\alpha}_{{\mathbf{m}}}$, the step to the ‘nearest’ constraint along $p$. This constraint is added to the working set at the next iteration.
$${R}^{\mathrm{T}}R{p}_{Z}={g}_{Z}\text{,}$$  (11) 
If ${H}_{{\mathbf{z}}}$ is singular, then $R$ must also be singular, and an inertiacontrolling strategy is used to ensure that only the last diagonal element of $R$ is zero. (See Gill et al. (1991) for a discussion of a similar strategy for indefinite quadratic programming.) In this case, ${p}_{{\mathbf{z}}}$ satisfies
which allows the objective function to be reduced by any step of the form $\left(x,s\right)+\alpha p$, where $\alpha >0$. The vector $p=Z{p}_{Z}$ is a direction of unbounded descent for the QP problem in the sense that the QP objective is linear and decreases without bound along $p$. If no finite step of the form $\left(x,s\right)+\alpha p$ (where $\alpha >0$) reaches a constraint not in the working set, the QP problem is unbounded and the method terminates immediately with ${\mathbf{ifail}}={2}$ (see [Error Indicators and Warnings]). Otherwise, $\alpha $ is defined as the maximum feasible step along $p$ and a constraint active at $\left(x,s\right)+\alpha p$ is added to the working set for the next iteration.
$${p}_{Z}^{\mathrm{T}}{H}_{Z}{p}_{Z}=0\text{\hspace{1em} and \hspace{1em}}{g}_{Z}^{\mathrm{T}}{p}_{Z}\le 0\text{,}$$  (12) 
Miscellaneous
If the basis matrix is not chosen carefully, the condition of the null space matrix $Z$ in (7) could be arbitrarily high. To guard against this, the method implements a ‘basis repair’ feature in which the LUSOL package (see Gill et al. (1986)) is used to compute the rectangular factorization
returning just the permutation $P$ that makes $PL{P}^{\mathrm{T}}$ unit lower triangular. The pivot tolerance is set to require
${\leftPL{P}^{\mathrm{T}}\right}_{ij}\le 2$, and the permutation is used to define $P$ in (6). It can be shown that $\Vert Z\Vert $ is likely to be little more than unity. Hence, ${\mathbf{z}}$ should be wellconditioned regardless of the condition of
$W$. This feature is applied at the beginning of the optimality phase if a potential $BS$ ordering is known.
$${\left(\begin{array}{cc}B& S\end{array}\right)}^{\mathrm{T}}=LU\text{,}$$  (13) 
The EXPAND procedure (see Gill et al. (1989)) is used to reduce the possibility of cycling at a point where the active constraints are nearly linearly dependent. Although there is no absolute guarantee that cycling will not occur, the probability of cycling is extremely small (see Gill et al. (1986)). The main feature of EXPAND is that the feasibility tolerance is increased at the start of every iteration. This allows a positive step to be taken at every iteration, perhaps at the expense of violating the bounds on $\left(x,s\right)$ by a small amount.
Suppose that the value of the optional parameter Feasibility Tolerance is $\delta $. Over a period of $K$ iterations (where $K$ is the value of the optional parameter Expand Frequency; see [Description of the Optional Parameters]), the feasibility tolerance actually used by h02ce (i.e., the working feasibility tolerance) increases from $0.5\delta $ to $\delta $ (in steps of $0.5\delta /K$).
At certain stages the following ‘resetting procedure’ is used to remove small constraint infeasibilities. First, all nonbasic variables are moved exactly onto their bounds. A count is kept of the number of nontrivial adjustments made. If the count is nonzero, the basic variables are recomputed. Finally, the working feasibility tolerance is reinitialized to $0.5\delta $.
If a problem requires more than $K$ iterations, the resetting procedure is invoked and a new cycle of iterations is started. (The decision to resume the feasibility phase or optimality phase is based on comparing any constraint infeasibilities with $\delta $.)
The resetting procedure is also invoked when h02ce reaches an apparently optimal, infeasible or unbounded solution, unless this situation has already occurred twice. If any nontrivial adjustments are made, iterations are continued.
The EXPAND procedure not only allows a positive step to be taken at every iteration, but also provides a potential choice of constraints to be added to the working set. All constraints at a distance $\alpha $ (where $\alpha \le {\alpha}_{{\mathbf{m}}}$) along $p$ from the current point are then viewed as acceptable candidates for inclusion in the working set. The constraint whose normal makes the largest angle with the search direction is added to the working set. This strategy helps keep the basis matrix $B$ wellconditioned.
Description of Monitoring Information
This section describes the intermediate printout and final printout which constitutes the monitoring information produced by h02ce. (See also the description of the optional parameters Monitoring File and Print Level in [Description of the Optional Parameters].) You can control the level of printed output.
When ${\mathbf{Print\; Level}}=5$ or $\text{}\ge 10$ and ${\mathbf{Monitoring\; File}}\ge 0$, the following line of intermediate printout ($\text{}<120$ characters) is produced at every iteration on the unit number specified by Monitoring File. Unless stated otherwise, the values of the quantities printed are those in effect on completion of the given iteration.
Itn  is the iteration count. 
pp  is the partial price indicator. The variable selected by the last pricing operation came from the ppth partition of $A$ and $I$. Note that pp is reset to zero whenever the basis is refactorized. 
dj  is the value of the reduced gradient (or reduced cost) for the variable selected by the pricing operation at the start of the current iteration. 
+S  is the variable selected by the pricing operation to be added to the superbasic set. 
S  is the variable chosen to leave the superbasic set. 
B  is the variable removed from the basis (if any) to become nonbasic. 
B  is the variable chosen to leave the set of basics (if any) in a special basic $\leftrightarrow $ superbasic swap. The entry under S has become basic if this entry is nonzero, and nonbasic otherwise. The swap is done to ensure that there are no superbasic slacks. 
Step  is the value of the step length $\alpha $ taken along the computed search direction $p$. The variables $x$ have been changed to $x+\alpha p$. If a variable is made superbasic during the current iteration (i.e., +S is positive), Step will be the step to the nearest bound. During the optimality phase, the step can be greater than unity only if the reduced Hessian is not positive definite. 
Pivot  is the $r$th element of a vector $y$ satisfying $By={a}_{q}$ whenever ${a}_{q}$ (the $q$th column of the constraint matrix $\left(AI\right)$) replaces the $r$th column of the basis matrix $B$. Wherever possible, Step is chosen so as to avoid extremely small values of Pivot (since they may cause the basis to be nearly singular). In extreme cases, it may be necessary to increase the value of the optional parameter Pivot Tolerance ($\text{default value}={\epsilon}^{0.67}$, where $\epsilon $ is the machine precision) to exclude very small elements of $y$ from consideration during the computation of Step. 
Ninf  is the number of violated constraints (infeasibilities). This will be zero during the optimality phase. 
Sinf/Objective 
is the value of the current objective function. If $x$ is not feasible, Sinf gives a weighted sum of the magnitudes of constraint violations. If $x$ is feasible, Objective is the value of the objective function. The output line for the final iteration of the feasibility phase (i.e., the first iteration for which Ninf is zero) will give the value of the true objective at the first feasible point. During the optimality phase, the value of the objective function will be nonincreasing. During the feasibility phase, the number of constraint infeasibilities will not increase until either a feasible point is found, or the optimality of the multipliers implies that no feasible point exists. Once optimal multipliers are obtained, the number of infeasibilities can increase, but the sum of infeasibilities will either remain constant or be reduced until the minimum sum of infeasibilities is found.

L  is the number of nonzeros in the basis factor $L$. Immediately after a basis factorization $B=LU$, this is lenL, the number of subdiagonal elements in the columns of a lower triangular matrix. Further nonzeros are added to L when various columns of $B$ are later replaced. (Thus, L increases monotonically.) 
U  is the number of nonzeros in the basis factor $U$. Immediately after a basis factorization, this is lenU, the number of diagonal and superdiagonal elements in the rows of an upper triangular matrix. As columns of $B$ are replaced, the matrix $U$ is maintained explicitly (in sparse form). The value of U may fluctuate up or down; in general, it will tend to increase. 
Ncp  is the number of compressions required to recover workspace in the data structure for $U$. This includes the number of compressions needed during the previous basis factorization. Normally, Ncp should increase very slowly. If it does not, increase lenz by at least $\mathtt{L}+\mathtt{U}$ and rerun h02ce (possibly using ${\mathbf{start}}=\text{"W"}$; see [Parameters]). 
Norm rg  is $\Vert {d}_{S}\Vert $, the Euclidean norm of the reduced gradient (see [The Main Iteration]). During the optimality phase, this norm will be approximately zero after a unit step. For FP and LP problems, Norm rg is not printed. 
Ns  is the current number of superbasic variables. For FP and LP problems, Ns is not printed. 
Cond Hz  is a lower bound on the condition number of the reduced Hessian (see [Definition of the Working Set and Search Direction]). The larger this number, the more difficult the problem. For FP and LP problems, Cond Hz is not printed. 
When ${\mathbf{Print\; Level}}\ge 20$ and ${\mathbf{Monitoring\; File}}\ge 0$, the following lines of intermediate printout ($\text{}<120$ characters) are produced on the unit number specified by Monitoring File whenever the matrix $B$ or ${B}_{S}={\left(\begin{array}{cc}B& S\end{array}\right)}^{\mathrm{T}}$ is factorized. Gaussian elimination is used to compute an $LU$ factorization of $B$ or ${B}_{S}$, where $PL{P}^{\mathrm{T}}$ is a lower triangular matrix and $PUQ$ is an upper triangular matrix for some permutation matrices $P$ and $Q$. The factorization is stabilized in the manner described under the LU Factor Tolerance ($\text{default value}=100.0$; see [Description of the Optional Parameters]).
Factorize  is the factorization count.  
Demand 
is a code giving the reason for the present factorization as follows:


Iteration  is the iteration count.  
Nonlinear  is the number of nonlinear variables in $B$ (not printed if ${B}_{S}$ is factorized).  
Linear  is the number of linear variables in $B$ (not printed if ${B}_{S}$ is factorized).  
Slacks  is the number of slack variables in $B$ (not printed if ${B}_{S}$ is factorized).  
Elems  is the number of nonzeros in $B$ (not printed if ${B}_{S}$ is factorized).  
Density  is the percentage nonzero density of $B$ (not printed if ${B}_{S}$ is factorized). More precisely, $\mathtt{Density}=100\times \mathtt{Elems}/{\left(\mathtt{Nonlinear}+\mathtt{Linear}+\mathtt{Slacks}\right)}^{2}$.  
Compressns  is the number of times the data structure holding the partially factorized matrix needed to be compressed, in order to recover unused workspace. Ideally, it should be zero. If it is more than $3$ or $4$, increase leniz and lenz and rerun h02ce (possibly using ${\mathbf{start}}=\text{"W"}$; see [Parameters]).  
Merit  is the average Markowitz merit count for the elements chosen to be the diagonals of $PUQ$. Each merit count is defined to be $\left(c1\right)\left(r1\right)$, 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 m such quantities. It gives an indication of how much work was required to preserve sparsity during the factorization.  
lenL  is the number of nonzeros in $L$.  
lenU  is the number of nonzeros in $U$.  
Increase  is the percentage increase in the number of nonzeros in $L$ and $U$ relative to the number of nonzeros in $B$. More precisely, $\mathtt{Increase}=100\times \left(\mathtt{lenL}+\mathtt{lenU}\mathtt{Elems}\right)/\mathtt{Elems}$.  
m  is the number of rows in the problem. Note that $\mathtt{m}=\mathtt{Ut}+\mathtt{Lt}+\mathtt{bp}$.  
Ut  is the number of triangular rows of $B$ at the top of $U$.  
d1  is the number of columns remaining when the density of the basis matrix being factorized reached $0.3$.  
Lmax  is the maximum subdiagonal element in the columns of $L$ (not printed if ${B}_{S}$ is factorized). This will not exceed the value of the LU Factor Tolerance.  
Bmax  is the maximum nonzero element in $B$ (not printed if ${B}_{S}$ is factorized).  
BSmax  is the maximum nonzero element in ${B}_{S}$ (not printed if $B$ is factorized).  
Umax 
is the maximum nonzero element in $U$, excluding elements of $B$ that remain in $U$ unchanged. (For example, if a slack variable is in the basis, the corresponding row of $B$ will become a row of $U$ without modification. Elements in such rows will not contribute to Umax. If the basis is strictly triangular, none of the elements of $B$ will contribute, and Umax will be zero.) Ideally, Umax should not be significantly larger than Bmax. If it is several orders of magnitude larger, it may be advisable to reset the LU Factor Tolerance to a value near $1.0$. Umax is not printed if ${B}_{S}$ is factorized.


Umin  is the magnitude of the smallest diagonal element of $PUQ$ (not printed if ${B}_{S}$ is factorized).  
Growth 
is the value of the ratio $\mathtt{Umax}/\mathtt{Bmax}$, which should not be too large. Providing Lmax is not large (say $\text{}<10.0$), the ratio $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(\mathtt{Bmax},\mathtt{Umax}\right)/\mathtt{Umin}$ is an estimate of the condition number of $B$. If this number is extremely large, the basis is nearly singular and some numerical difficulties could occur in subsequent computations. (However, an effort is made to avoid near singularity by using slacks to replace columns of $B$ that would have made Umin extremely small, and the modified basis is refactorized.) Growth is not printed if ${B}_{S}$ is factorized.


Lt  is the number of triangular columns of $B$ at the beginning of $L$.  
bp  is the size of the ‘bump’ or block to be factorized nontrivially after the triangular rows and columns have been removed.  
d2  is the number of columns remaining when the density of the basis matrix being factorized reached $0.6$. 
When ${\mathbf{Print\; Level}}\ge 20$ and ${\mathbf{Monitoring\; File}}\ge 0$, the following lines of intermediate printout ($\text{}<80$ characters) are produced on the unit number specified by Monitoring File whenever ${\mathbf{start}}=\text{"C"}$ (see [Parameters]). They refer to the number of columns selected by the crash procedure during each of several passes through $A$, whilst searching for a triangular basis matrix.
Slacks  is the number of slacks selected initially. 
Free cols  is the number of free columns in the basis. 
Preferred  is the number of ‘preferred’ columns in the basis (i.e., ${\mathbf{istate}}\left[j\right]=3$ for some $j\le n$). 
Unit  is the number of unit columns in the basis. 
Double  is the number of double columns in the basis. 
Triangle  is the number of triangular columns in the basis. 
Pad  is the number of slacks used to pad the basis. 
When ${\mathbf{Print\; Level}}\ge 20$ and ${\mathbf{Monitoring\; File}}\ge 0$, the following lines of intermediate printout ($\text{}<80$ characters) are produced on the unit number specified by Monitoring File. They refer to the elements of the names array (see [Parameters]).
Name  gives the name for the problem (blank if none). 
Objective  gives the name of the free row for the problem (blank if none). 
RHS  gives the name of the constraint righthand side for the problem (blank if none). 
Ranges  gives the name of the ranges for the problem (blank if none). 
Bounds  gives the name of the bounds for the problem (blank if none). 
When ${\mathbf{Print\; Level}}=1$ or $\text{}\ge 10$ and ${\mathbf{Monitoring\; File}}\ge 0$, the following lines of final printout ($\text{}<120$ characters) are produced on the unit number specified by Monitoring File.
Let ${a}_{\mathit{j}}$ denote the $\mathit{j}$th column of $A$, for $\mathit{j}=1,2,\dots ,n$. The following describes the printout for each column (or variable). A full stop (.) is printed for any numerical value that is zero.
Number  is the column number $j$. (This is used internally to refer to ${x}_{j}$ in the intermediate output.)  
Column  gives the name of ${x}_{j}$.  
State 
gives the state of the variable (LL if nonbasic on its lower bound, UL if nonbasic on its upper bound, EQ if nonbasic and fixed, FR if nonbasic and strictly between its bounds, BS if basic and SBS if superbasic).
A key is sometimes printed before State to give some additional information about the state of ${x}_{j}$. Note that unless the optional parameter ${\mathbf{Scale\; Option}}=0$ ($\text{default value}=2$) is specified, the tests for assigning a key are applied to the variables of the scaled problem.


Activity  is the value of ${x}_{j}$ at the final iterate.  
Obj Gradient  is the value of ${g}_{j}$ at the final iterate. For FP problems, ${g}_{j}$ is set to zero.  
Lower Bound  is the lower bound specified for the variable. None indicates that ${\mathbf{bl}}\left[j\right]\le \mathit{bigbnd}$.  
Upper Bound  is the upper bound specified for the variable. None indicates that ${\mathbf{bu}}\left[j\right]\ge \mathit{bigbnd}$.  
Reduced Gradnt  is the value of ${d}_{j}$ at the final iterate (see [The Main Iteration]). For FP problems, ${d}_{j}$ is set to zero.  
m + j  is the value of $m+j$. 
Let ${v}_{\mathit{i}}$ denote the $\mathit{i}$th row of $A$, for $\mathit{i}=1,2,\dots ,m$. The following describes the printout for each row (or constraint). A full stop (.) is printed for any numerical value that is zero.
Number  is the value of $n+i$. (This is used internally to refer to ${s}_{i}$ in the intermediate output.)  
Row  gives the name of ${\nu}_{i}$.  
State 
gives the state of the variable (LL if active on its lower bound, UL if active on its upper bound, EQ if active and fixed, BS if inactive when ${s}_{i}$ is basic and SBS if inactive when ${s}_{i}$ is superbasic).
A key is sometimes printed before State to give some additional information about the state of ${s}_{i}$. Note that unless the optional parameter ${\mathbf{Scale\; Option}}=0$ ($\text{default value}=2$) is specified, the tests for assigning a key are applied to the variables of the scaled problem.


Activity  is the value of ${v}_{i}$ at the final iterate.  
Slack Activity  is the value by which ${v}_{i}$ differs from its nearest bound. (For the free row (if any), it is set to Activity.)  
Lower Bound  is the lower bound specified for the variable. None indicates that ${\mathbf{bl}}\left[j\right]\le \mathit{bigbnd}$.  
Upper Bound  is the upper bound specified for the variable. None indicates that ${\mathbf{bu}}\left[j\right]\ge \mathit{bigbnd}$.  
i  gives the index $i$ of ${v}_{i}$. 
Numerical values are output with a fixed number of digits; they are not guaranteed to be accurate to this precision.