After the
handle has been initialized (e.g.,
e04rac has been called),
and a nonlinear objective function
$f\left(x\right)$ and/or
the
$i$th (
$1\le i\le {m}_{g}$)
nonlinear constraint function
${g}_{i}\left(x\right)$ has been registered with
e04rgc and
e04rkc,
then
e04rlc may be used to define the sparsity structure (pattern) of the Hessians
of those functions or of their Lagrangian function. Define:

${\nabla}^{2}f\left(x\right)\equiv \left(\begin{array}{cccc}\frac{{\partial}^{2}f\left(x\right)}{{\partial}^{2}{x}_{1}}& \frac{{\partial}^{2}f\left(x\right)}{\partial {x}_{2}\partial {x}_{1}}& \dots & \frac{{\partial}^{2}f\left(x\right)}{\partial {x}_{n}\partial {x}_{1}}\\ \frac{{\partial}^{2}f\left(x\right)}{\partial {x}_{1}\partial {x}_{2}}& \frac{{\partial}^{2}f\left(x\right)}{{\partial}^{2}{x}_{2}}& \dots & \frac{{\partial}^{2}f\left(x\right)}{\partial {x}_{n}\partial {x}_{2}}\\ \vdots & \vdots & \ddots & \vdots \\ \frac{{\partial}^{2}f\left(x\right)}{\partial {x}_{1}\partial {x}_{n}}& \frac{{\partial}^{2}f\left(x\right)}{\partial {x}_{2}\partial {x}_{n}}& \dots & \frac{{\partial}^{2}f\left(x\right)}{{\partial}^{2}{x}_{n}}\end{array}\right)$, and
${\nabla}^{2}{g}_{i}\left(x\right)\equiv \left(\begin{array}{cccc}\frac{{\partial}^{2}{g}_{i}\left(x\right)}{{\partial}^{2}{x}_{1}}& \frac{{\partial}^{2}{g}_{i}\left(x\right)}{\partial {x}_{2}\partial {x}_{1}}& \dots & \frac{{\partial}^{2}{g}_{i}\left(x\right)}{\partial {x}_{n}\partial {x}_{1}}\\ \frac{{\partial}^{2}{g}_{i}\left(x\right)}{\partial {x}_{1}\partial {x}_{2}}& \frac{{\partial}^{2}{g}_{i}\left(x\right)}{{\partial}^{2}{x}_{2}}& \dots & \frac{{\partial}^{2}{g}_{i}\left(x\right)}{\partial {x}_{n}\partial {x}_{2}}\\ \vdots & \vdots & \ddots & \vdots \\ \frac{{\partial}^{2}{g}_{i}\left(x\right)}{\partial {x}_{1}\partial {x}_{n}}& \frac{{\partial}^{2}{g}_{i}\left(x\right)}{\partial {x}_{2}\partial {x}_{n}}& \dots & \frac{{\partial}^{2}{g}_{i}\left(x\right)}{{\partial}^{2}{x}_{n}}\end{array}\right)$ for $1\le i\le {m}_{g}$
 e04rlc can be used to define the following sparsity structures:
 the Hessian of the Lagrangian function $\sigma {\nabla}^{2}f\left(x\right)+{\displaystyle \sum _{i=1}^{{m}_{g}}}{\lambda}_{i}{\nabla}^{2}{g}_{i}\left(x\right)$,
 the Hessian of the objective function ${\nabla}^{2}f\left(x\right)$, or
 the Hessian of the $i$th constraint function ${\nabla}^{2}{g}_{i}\left(x\right)$
with
$1\le i\le {m}_{g}$.
In general, each of the symmetric
$n\times n$ Hessian matrices will have its own sparsity structure. These structures can be given in separate
e04rlc calls, or merged together in the Lagrangian and given in one call. The nonzero values of the Hessians at particular points will be communicated to the NLP solver by usersupplied functions (e.g.,
hess for
e04stc). The values will need to be provided in the order matching the sparsity pattern.
Note that the Hessians are automatically deleted whenever the underlying functions change. For example, if
e04rkc is called to redefine the nonlinear constraints, all individual constraints Hessians or Hessian of the Lagrangian would be deleted. If a nonlinear objective function was changed to linear, the Hessian of the objective function or of the Lagrangian would be deleted.
e04rlc can work either with individual Hessians or with the Hessian of the Lagrangian but not both. Therefore, if the Hessian of the Lagrangian was defined and
e04rlc was called to define an individual Hessian of the constraint, the Hessian of the Lagrangian would be removed, and vice versa. Hessians can be redefined by multiple calls of
e04rlc.
See
Section 4.1 in the
E04 Chapter Introduction for more details about the NAG optimization modelling suite.
None.
 NE_ALLOC_FAIL

Dynamic memory allocation failed.
See
Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
 NE_BAD_PARAM

On entry, argument $\u27e8\mathit{\text{value}}\u27e9$ had an illegal value.
 NE_HANDLE

The supplied
handle does not define a valid handle to the data structure for the NAG optimization modelling suite. It has not been properly initialized or it has been corrupted.
 NE_INT

On entry, ${\mathbf{nnzh}}=\u27e8\mathit{\text{value}}\u27e9$.
Constraint: ${\mathbf{nnzh}}>0$.
 NE_INT_2

On entry, ${\mathbf{idf}}=\u27e8\mathit{\text{value}}\u27e9$.
Constraint: $1\le {\mathbf{idf}}\le \u27e8\mathit{\text{value}}\u27e9$.
 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.
 NE_INVALID_CS

On entry, $i=\u27e8\mathit{\text{value}}\u27e9$, ${\mathbf{icolh}}\left[\mathit{i}1\right]=\u27e8\mathit{\text{value}}\u27e9$ and $n=\u27e8\mathit{\text{value}}\u27e9$.
Constraint: $1\le {\mathbf{icolh}}\left[\mathit{i}1\right]\le n$.
On entry, $i=\u27e8\mathit{\text{value}}\u27e9$, ${\mathbf{irowh}}\left[\mathit{i}1\right]=\u27e8\mathit{\text{value}}\u27e9$ and ${\mathbf{icolh}}\left[\mathit{i}1\right]=\u27e8\mathit{\text{value}}\u27e9$.
Constraint: ${\mathbf{irowh}}\left[\mathit{i}1\right]\le {\mathbf{icolh}}\left[\mathit{i}1\right]$ (elements within the upper triangle).
On entry, $i=\u27e8\mathit{\text{value}}\u27e9$, ${\mathbf{irowh}}\left[\mathit{i}1\right]=\u27e8\mathit{\text{value}}\u27e9$ and $n=\u27e8\mathit{\text{value}}\u27e9$.
Constraint: $1\le {\mathbf{irowh}}\left[\mathit{i}1\right]\le n$.
On entry, more than one element of structural matrix $H$ has row index $\u27e8\mathit{\text{value}}\u27e9$ and column index $\u27e8\mathit{\text{value}}\u27e9$.
Constraint: each element of structural matrix $H$ must have a unique row and column index.
 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_PHASE

Neither nonlinear objective nor nonlinear constraints are present. The structure of the Hessian cannot be defined.
No nonlinear objective has been defined, its Hessian cannot be set.
The problem cannot be modified right now, the solver is running.
Not applicable.
Internal changes have been made to this function as follows:
 At Mark 27.1: Previously, it was not possible to modify the Hessians once they were set or to edit the model once a solver had been called. These limitations have been removed and the associated error codes were removed.
For details of all known issues which have been reported for the NAG Library please refer to the
Known Issues.