This manual relates to an old release of the Library.
The documentation for the current release is also available on this site.

NAG AD Library
e04kf (handle_solve_bounds_foas)

Settings help

AD Name Style:


AD Specification Language:

1 Purpose

e04kf is the AD Library version of the primal routine e04kff. Based (in the C++ interface) on overload resolution, e04kf can be used for primal, tangent and adjoint evaluation. It supports tangents and adjoints of first order.

2 Specification

C++ Interface
#include <dco.hpp>
#include <nagad.h>
namespace nag {
namespace ad {
template <typename OBJFUN_T, typename OBJGRD_T, typename MONIT_T>
void e04kf ( handle_t &ad_handle, void *handle, OBJFUN_T &&objfun, OBJGRD_T &&objgrd, MONIT_T &&monit, const Integer &nvar, ADTYPE x[], ADTYPE rinfo[], ADTYPE stats[], Integer &ifail)
}
}
The function is overloaded on ADTYPE which represents the type of active arguments. ADTYPE may be any of the following types:
double,
dco::ga1s<double>::type,
dco::gt1s<double>::type
Note: this function can be used with AD tools other than dco/c++. For details, please contact NAG.

3 Description

e04kf is the AD Library version of the primal routine e04kff.
e04kff is a solver from the NAG optimization modelling suite for bound-constrained large-scale Nonlinear Programming (NLP) problems. It is a first-order active-set method (FOAS) that has low memory requirements and thus is suitable for very large-scale problems. For further information see Section 3 in the documentation for e04kff.

4 References

Dai Y-H and Kou C-X (2013) A Nonlinear Conjugate Gradient Algorithm with an Optimal Property and an Improved Wolfe Line Search SIAM J. Optim. 23(1) 296–320
Gill P E and Leonard M W (2003) Limited-Memory Reduced-Hessian Methods for Large-Scale Unconstrained Optimization SIAM J. Optim. 14(2) 380–401
Hager W W and Zhang H (2005) A New Conjugate Gradient Method with Guaranteed Descent and an Efficient Line Search SIAM J. Optim. 16(1) 170–192
Hager W W and Zhang H (2006a) Algorithm 851: CG DESCENT, a Conjugate Gradient Method with Guaranteed Descent ACM Trans. Math. Software 32(1) 113–137
Hager W W and Zhang H (2006b) A New Active Set Algorithm for Box Constrained Optimization SIAM J. Optim. 17(2) 525–557
Hager W W and Zhang H (2013) The Limited Memory Conjugate Gradient Method SIAM J. Optim. 23(4) 2150–2168
Nocedal J and Wright S J (2006) Numerical Optimization (2nd Edition) Springer Series in Operations Research, Springer, New York

5 Arguments

In addition to the arguments present in the interface of the primal routine, e04kf includes some arguments specific to AD.
A brief summary of the AD specific arguments is given below. For the remainder, links are provided to the corresponding argument from the primal routine. A tooltip popup for all arguments can be found by hovering over the argument name in Section 2 and in this section.
1: ad_handlenag::ad::handle_t Input/Output
On entry: a configuration object that holds information on the differentiation strategy. Details on setting the AD strategy are described in AD handle object in the NAG AD Library Introduction.
2: handle – Type(c_ptr) Input
3: objfun – Callable Input
objfun needs to be callable with the specification listed below. This can be a C++ lambda, a functor or a (static member) function pointer. If using a lambda, parameters can be captured safely by reference. No copies of the callable are made internally.
If a null pointer is used as the argument, then a NAG supplied routine will be used as the argument for this parameter (C++ only).
The specification of objfun is:
C++ Interface
auto objfun = [&]( const handle_t &ad_handle, const Integer &nvar, const ADTYPE x[], ADTYPE &fx, Integer &inform)
1: ad_handlenag::ad::handle_t Input/Output
On entry: a handle to the AD handle object.
2: nvar – Integer Input
3: xADTYPE array Input
4: fxADTYPE Output
5: inform – Integer Input/Output
4: objgrd – Callable Input
objgrd needs to be callable with the specification listed below. This can be a C++ lambda, a functor or a (static member) function pointer. If using a lambda, parameters can be captured safely by reference. No copies of the callable are made internally.
If a null pointer is used as the argument, then a NAG supplied routine will be used as the argument for this parameter (C++ only).
The specification of objgrd is:
C++ Interface
auto objgrd = [&]( const handle_t &ad_handle, const Integer &nvar, const ADTYPE x[], const Integer &nnzfd, ADTYPE fdx[], Integer &inform)
1: ad_handlenag::ad::handle_t Input/Output
On entry: a handle to the AD handle object.
2: nvar – Integer Input
3: xADTYPE array Input
4: nnzfd – Integer Input
5: fdxADTYPE array Input/Output
6: inform – Integer Input/Output
5: monit – Callable Input
monit needs to be callable with the specification listed below. This can be a C++ lambda, a functor or a (static member) function pointer. If using a lambda, parameters can be captured safely by reference. No copies of the callable are made internally.
If a null pointer is used as the argument, then a NAG supplied routine will be used as the argument for this parameter (C++ only).
The specification of monit is:
C++ Interface
auto monit = [&]( const handle_t &ad_handle, const Integer &nvar, const ADTYPE x[], Integer &inform, const ADTYPE rinfo[], const ADTYPE stats[])
1: ad_handlenag::ad::handle_t Input/Output
On entry: a handle to the AD handle object.
2: nvar – Integer Input
3: xADTYPE array Input
4: inform – Integer Input/Output
5: rinfoADTYPE array Input
6: statsADTYPE array Input
6: nvar – Integer Input
7: x(nvar) – ADTYPE array Input/Output
Please consult Overwriting of Inputs in the NAG AD Library Introduction.
8: rinfo(100) – ADTYPE array Output
9: stats(100) – ADTYPE array Output
10: ifail – Integer Input/Output

6 Error Indicators and Warnings

e04kf preserves all error codes from e04kff and in addition can return:
ifail=-89
An unexpected AD error has been triggered by this routine. Please contact NAG.
See Error Handling in the NAG AD Library Introduction for further information.
ifail=-199
The routine was called using a strategy that has not yet been implemented.
See AD Strategies in the NAG AD Library Introduction for further information.
ifail=-444
A C++ exception was thrown.
The error message will show the details of the C++ exception text.
ifail=-899
Dynamic memory allocation failed for AD.
See Error Handling in the NAG AD Library Introduction for further information.

7 Accuracy

Not applicable.

8 Parallelism and Performance

e04kf is not threaded in any implementation.

9 Further Comments

None.

10 Example

A NAG AD Library example is not yet available, please refer to the NAG AD Library Introduction for information on calling routines from the AD Library.