e04rlf 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.
The routine may be called by the names e04rlf or nagf_opt_handle_set_nlnhess.
After the handle has been initialized (e.g., e04raf has been called),
and a nonlinear objective function and/or
the th ()
nonlinear constraint function has been registered with e04rgfande04rkf,
e04rlf may be used to define the sparsity structure (pattern) of the Hessians
of those functions or of their Lagrangian function. Define:
e04rlf can be used to define the following sparsity structures:
the Hessian of the Lagrangian function ,
the Hessian of the objective function , or
the Hessian of the th constraint function
In general, each of the symmetric Hessian matrices will have its own sparsity structure. These structures can be given in separate e04rlf 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 e04stf). 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 e04rkf 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. e04rlf 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 e04rlf 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 e04rlf.
See Section 3.1 in the E04 Chapter Introduction for more details about the NAG optimization modelling suite.
1: – Type (c_ptr)Input
On entry: the handle to the problem. It needs to be initialized (e.g., by e04raf) and must not be changed between calls to the NAG optimization modelling suite.
2: – IntegerInput
On entry: specifies the functions for which a Hessian sparsity structure is provided in nnzh, irowh and icolh.
The sparsity structure of the Hessian of the Lagrangian is provided.
The sparsity structure of the Hessian of the objective function is provided.
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 subroutines 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 e04stf.
Note: , the number of nonlinear constraints registered with the handle.
3: – IntegerInput
On entry: the number of nonzero elements in the upper triangle of the matrix .
4: – Integer arrayInput
5: – Integer arrayInput
On entry: arrays irowh and icolh store the nonzeros of the upper triangle of the matrix 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 where and
, for . No particular order is expected, but elements should not repeat.
, for .
6: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
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.
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.
On entry, .
On entry, .
On entry, , and .
On entry, , and .
Constraint: (elements within the upper triangle).
On entry, , and .
On entry, more than one element of structural matrix has row index and column index .
Constraint: each element of structural matrix must have a unique row and column index.
An unexpected error has been triggered by this routine. Please
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
8Parallelism and Performance
e04rlf is not threaded in any implementation.
Internal changes have been made to this routine 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.