NAG CL Interface
e04rgc (handle_​set_​nlnobj)

Settings help

CL Name Style:


1 Purpose

e04rgc is a part of the NAG optimization modelling suite and declares the objective function of the problem as a nonlinear function with a particular gradient sparsity structure.

2 Specification

#include <nag.h>
void  e04rgc (void *handle, Integer nnzfd, const Integer idxfd[], NagError *fail)
The function may be called by the names: e04rgc or nag_opt_handle_set_nlnobj.

3 Description

After the handle has been initialized (e.g., e04rac has been called), e04rgc may be used to declare the objective function of the problem as a nonlinear function and define the sparsity pattern (list of nonzero elements) of its gradient. If the objective function has already been defined, it will be overwritten and its Hessian (or the Hessian of the Lagrangian) will be removed. If e04rgc is called with no nonzeroes in the sparsity pattern, any existing objective function is removed, no new one is added and the problem will be solved as a feasible point problem.
This objective function will typically be used for nonlinear programming problems (NLP) of the kind:
minimize xn f(x)   (a) subject to lgg(x)ug,   (b) lBBxuB.   (c) lxxux   (d) (1)
The values of the nonlinear objective function f(x) and the nonzero values of its gradient f xi (matching the sparsity pattern) evaluated at particular points in the decision variable space will be communicated to the NLP solver by user-supplied functions (e.g., objfun and objgrd for e04stc). 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: nnzfd Integer Input
On entry: the number of nonzero elements in the sparse gradient vector of the objective function.
Constraint: nnzfd0.
3: idxfd[nnzfd] const Integer Input
On entry: the one-based indices of the nonzero elements of the sparse gradient vector. The indices must be stored in ascending order. Note that n is the current number of decision variables in the model.
If nnzfd=0, the objective is assumed to be zero and the array idxfd will not be referenced and may be NULL.
Constraints:
  • 1idxfd[i-1]n, for i=1,2,,nnzfd;
  • idxfd[i-1]<idxfd[i], for i=1,2,,nnzfd-1.
4: 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, nnzfd=value.
Constraint: nnzfd0.
NE_INTARR
On entry, i=value, idxfd[i-1]=value and n=value.
Constraint: 1idxfd[i-1]n.
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_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_INCREASING
On entry, i=value, idxfd[i-1]=value and idxfd[i]=value.
Constraint: idxfd[i-1]<idxfd[i] (ascending order).
NE_PHASE
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.
e04rgc 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 Section 10 in e04stc, e04kfc or e04jdc.