nag_opt_handle_set_nlnconstr (e04rkc) is a part of the NAG optimization modelling suite and defines the number of nonlinear constraints of the problem as well as the sparsity structure of their first derivatives.
After the initialization function
nag_opt_handle_init (e04rac) has been called, nag_opt_handle_set_nlnconstr (e04rkc) may be used to define the nonlinear constraints
of the problem unless the nonlinear constraints have already been defined. This will typically be used for nonlinear programming problems (NLP) of the kind:
where
is the number of the decision variables
,
is the number of the nonlinear constraints (in
(1)(b)) and
,
and
are
-dimensional vectors. Linear constraints (
(1)(c)), which require no separate gradient information, can be introduced by
nag_opt_handle_set_linconstr (e04rjc) and Box constraints (
(1)(d)) can be introduced by
nag_opt_handle_set_simplebounds (e04rhc).
Note that upper and lower bounds are specified for all the constraints. This form allows full generality in specifying various types of constraint. In particular, the
th constraint may be defined as an equality by setting
. If certain bounds are not present, the associated elements
or
may be set to special values that are treated as
or
. See the description of the optional parameter
of the solver
nag_opt_handle_solve_ipopt (e04stc). Its value is denoted as
further in this text. Note that the bounds are interpreted based on its value at the time of calling this function and any later alterations to
will not affect these constraints.
Since each nonlinear constraint is most likely to involve a small subset of the decision variables, the partial derivatives of the constraint functions with respect to those variables are best expressed as a sparse Jacobian matrix of rows and columns. The row and column positions of all the nonzero derivatives must be registered with the handle through nag_opt_handle_set_nlnconstr (e04rkc).
The values of the nonlinear constraint functions and their nonzero gradients at particular points in the decision variable space will be communicated to the NLP solver by user-supplied functions (e.g.,
confun and
congrd for
nag_opt_handle_solve_ipopt (e04stc)).
None.
- NE_ALLOC_FAIL
-
Dynamic memory allocation failed.
See
Section 2.3.1.2 in How to Use the NAG Library and its Documentation for further information.
- NE_ALREADY_DEFINED
-
A set of nonlinear constraints has already been defined.
- NE_BAD_PARAM
-
On entry, argument had an illegal value.
- NE_BOUND
-
On entry, , , .
Constraint: .
On entry, , and .
Constraint: .
On entry, , , .
Constraint: .
- 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 initialized by
nag_opt_handle_init (e04rac) or it has been corrupted.
- NE_INT
-
On entry, .
Constraint: .
On entry, .
Constraint: .
- 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.
An unexpected error has been triggered by this function. Please contact
NAG.
See
Section 2.7.6 in How to Use the NAG Library and its Documentation for further information.
- NE_INVALID_CS
-
On entry, , and .
Constraint: .
On entry, , and .
Constraint: .
On entry, more than one element of structural Jacobian matrix has row index and column index .
Constraint: each element of structural Jacobian matrix 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 2.7.5 in How to Use the NAG Library and its Documentation for further information.
- NE_PHASE
-
The Hessian of the nonlinear objective has already been defined, nonlinear constraints cannot be added.
The problem cannot be modified in this phase any more, the solver has already been called.
Not applicable.
nag_opt_handle_set_nlnconstr (e04rkc) is not threaded in any implementation.
Parts of the code for
nag_opt_handle_solve_ipopt (e04stc) are distributed according to terms imposed by another licensor. Please refer to
Library Licensors for further details.
See
Section 10 in nag_opt_handle_solve_ipopt (e04stc).