NAG CL Interface
e04rlc (handle_​set_​nlnhess)

Settings help

CL Name Style:


1 Purpose

e04rlc is a part of the NAG optimization modelling suite and defines or redefines either the structure of the Hessians of the nonlinear objective and constraints or the structure of the Hessian of the Lagrangian.

2 Specification

#include <nag.h>
void  e04rlc (void *handle, Integer idf, Integer nnzh, const Integer irowh[], const Integer icolh[], NagError *fail)
The function may be called by the names: e04rlc or nag_opt_handle_set_nlnhess.

3 Description

After the handle has been initialized (e.g., e04rac has been called), and a nonlinear objective function f(x) and/or the ith (1img) nonlinear constraint function gi(x) 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:
In general, each of the symmetric n×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 user-supplied 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.

4 References

None.

5 Arguments

1: handle void * Input
On entry: the handle to the problem. It needs to be initialized (e.g., by e04rac) and must not be changed between calls to the NAG optimization modelling suite.
2: idf Integer Input
On entry: specifies the functions for which a Hessian sparsity structure is provided in nnzh, irowh and icolh.
idf=−1
The sparsity structure of the Hessian of the Lagrangian is provided.
idf=0
The sparsity structure of the Hessian of the objective function is provided.
idf>0
The sparsity structure of the Hessian of the idfth constraint function is provided.
The value of idf will also determine how an NLP solver will call the user-supplied functions that evaluate these nonzeros at particular points of the decision variable space, i.e., whether the solver will expect the nonzero values of the objective and constraint Hessians in separate calls or merged in the Lagrangian Hessian, in one call. See, for example, hess of e04stc.
Constraint: −1idfmg.
Note: mg, the number of nonlinear constraints registered with the handle.
3: nnzh Integer Input
On entry: the number of nonzero elements in the upper triangle of the matrix H.
Constraint: nnzh>0.
4: irowh[nnzh] const Integer Input
5: icolh[nnzh] const Integer Input
On entry: arrays irowh and icolh store the nonzeros of the upper triangle of the matrix H in coordinate storage (CS) format (see Section 2.1.1 in the F11 Chapter Introduction). irowh specifies one-based row indices, icolh specifies one-based column indices and specifies the values of the nonzero elements in such a way that hij=H[l-1] where i=irowh[l-1] and j=icolh[l-1], for l=1,2,,nnzh. No particular order is expected, but elements should not repeat.
Constraint: 1irowh[l-1]icolh[l-1]n, for l=1,2,,nnzh.
6: fail NagError * Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).

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.
NE_BAD_PARAM
On entry, argument value 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, nnzh=value.
Constraint: nnzh>0.
NE_INT_2
On entry, idf=value.
Constraint: −1idfvalue.
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=value, icolh[i-1]=value and n=value.
Constraint: 1icolh[i-1]n.
On entry, i=value, irowh[i-1]=value and icolh[i-1]=value.
Constraint: irowh[i-1]icolh[i-1] (elements within the upper triangle).
On entry, i=value, irowh[i-1]=value and n=value.
Constraint: 1irowh[i-1]n.
On entry, more than one element of structural matrix H has row index value and column index value.
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.

7 Accuracy

Not applicable.

8 Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
e04rlc is not threaded in any implementation.

9 Further Comments

9.1 Internal Changes

Internal changes have been made to this function as follows:
For details of all known issues which have been reported for the NAG Library please refer to the Known Issues.

10 Example

See e04stc.