NAG AD Library
e04kf_a1w_f (handle_solve_bounds_foas_a1w)

Note: a1w denotes that first order adjoints are computed in working precision; this has the corresponding argument type nagad_a1w_w_rtype. Also available is the t1w (first order tangent linear) mode, the interface of which is implied by replacing a1w by t1w throughout this document. Additionally, the p0w (passive interface, as alternative to the FL interface) mode is available and can be inferred by replacing of active types by the corresponding passive types. The method of codifying AD implementations in the routine name and corresponding argument types is described in the NAG AD Library Introduction.
Settings help

AD Name Style:


AD Specification Language:

1 Purpose

e04kf_a1w_f is the adjoint version of the primal routine e04kff.

2 Specification

Fortran Interface
Subroutine e04kf_a1w_f ( ad_handle, handle, objfun, objgrd, monit, nvar, x, rinfo, stats, iuser, ruser, cpuser, ifail)
Integer, Intent (In) :: nvar
Integer, Intent (Inout) :: iuser(*), ifail
Type (nagad_a1w_w_rtype), Intent (Inout) :: x(nvar), ruser(*)
Type (nagad_a1w_w_rtype), Intent (Out) :: rinfo(100), stats(100)
Type (c_ptr), Intent (Inout) :: ad_handle
Type (c_ptr), Intent (In) :: handle, cpuser
External :: objfun, objgrd, monit
C++ Header Interface
#include <nagad.h>
void e04kf_a1w_f_ ( void *&ad_handle, void *handle,
void (NAG_CALL objfun)(void *&ad_handle, const Integer &nvar, const nagad_a1w_w_rtype x[], nagad_a1w_w_rtype &fx, Integer &inform, Integer iuser[], nagad_a1w_w_rtype ruser[], void *cpuser),
void (NAG_CALL objgrd)(void *&ad_handle, const Integer &nvar, const nagad_a1w_w_rtype x[], const Integer &nnzfd, nagad_a1w_w_rtype fdx[], Integer &inform, Integer iuser[], nagad_a1w_w_rtype ruser[], void *cpuser),
void (NAG_CALL monit)(void *&ad_handle, const Integer &nvar, const nagad_a1w_w_rtype x[], Integer &inform, const nagad_a1w_w_rtype rinfo[], const nagad_a1w_w_rtype stats[], Integer iuser[], nagad_a1w_w_rtype ruser[], void *cpuser),
const Integer &nvar, nagad_a1w_w_rtype x[], nagad_a1w_w_rtype rinfo[], nagad_a1w_w_rtype stats[], Integer iuser[], nagad_a1w_w_rtype ruser[], void *cpuser, Integer &ifail)
The routine may be called by the names e04kf_a1w_f or nagf_opt_handle_solve_bounds_foas_a1w. The corresponding t1w and p0w variants of this routine are also available.

3 Description

e04kf_a1w_f is the adjoint 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_a1w_f 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_handle – Type (c_ptr) Input/Output
On entry: a handle to the AD configuration data object, as created by x10aa_a1w_f.
2: handle – Type(c_ptr) Input
3: objfun – Subroutine External Procedure
The specification of objfun is:
Fortran Interface
Subroutine objfun ( ad_handle, nvar, x, fx, inform, iuser, ruser, cpuser)
Integer, Intent (In) :: nvar
Integer, Intent (Inout) :: inform, iuser(*)
Type (nagad_a1w_w_rtype), Intent (In) :: x(nvar)
Type (nagad_a1w_w_rtype), Intent (Inout) :: ruser(*)
Type (nagad_a1w_w_rtype), Intent (Out) :: fx
Type (c_ptr), Intent (Inout) :: ad_handle
Type (c_ptr), Intent (In) :: cpuser
C++ Header Interface
#include <nagad.h>
void objfun ( void *&ad_handle, const Integer &nvar, const nagad_a1w_w_rtype x[], nagad_a1w_w_rtype &fx, Integer &inform, Integer iuser[], nagad_a1w_w_rtype ruser[], void *cpuser)
1: ad_handle – Type (c_ptr) Input/Output
On entry: a handle to the AD configuration data object.
2: nvar – Integer Input
3: xType (nagad_a1w_w_rtype) array Input
4: fxType (nagad_a1w_w_rtype) Output
5: inform – Integer Input/Output
6: iuser – Integer array User Workspace
7: ruserType (nagad_a1w_w_rtype) array User Workspace
8: cpuser – Type(c_ptr) User Workspace
4: objgrd – Subroutine External Procedure
The specification of objgrd is:
Fortran Interface
Subroutine objgrd ( ad_handle, nvar, x, nnzfd, fdx, inform, iuser, ruser, cpuser)
Integer, Intent (In) :: nvar, nnzfd
Integer, Intent (Inout) :: inform, iuser(*)
Type (nagad_a1w_w_rtype), Intent (In) :: x(nvar)
Type (nagad_a1w_w_rtype), Intent (Inout) :: fdx(nnzfd), ruser(*)
Type (c_ptr), Intent (Inout) :: ad_handle
Type (c_ptr), Intent (In) :: cpuser
C++ Header Interface
#include <nagad.h>
void objgrd ( void *&ad_handle, const Integer &nvar, const nagad_a1w_w_rtype x[], const Integer &nnzfd, nagad_a1w_w_rtype fdx[], Integer &inform, Integer iuser[], nagad_a1w_w_rtype ruser[], void *cpuser)
1: ad_handle – Type (c_ptr) Input/Output
On entry: a handle to the AD configuration data object.
2: nvar – Integer Input
3: xType (nagad_a1w_w_rtype) array Input
4: nnzfd – Integer Input
5: fdxType (nagad_a1w_w_rtype) array Input/Output
6: inform – Integer Input/Output
7: iuser – Integer array User Workspace
8: ruserType (nagad_a1w_w_rtype) array User Workspace
9: cpuser – Type(c_ptr) User Workspace
5: monit – Subroutine External Procedure
The specification of monit is:
Fortran Interface
Subroutine monit ( ad_handle, nvar, x, inform, rinfo, stats, iuser, ruser, cpuser)
Integer, Intent (In) :: nvar
Integer, Intent (Inout) :: inform, iuser(*)
Type (nagad_a1w_w_rtype), Intent (In) :: x(nvar), rinfo(100), stats(100)
Type (nagad_a1w_w_rtype), Intent (Inout) :: ruser(*)
Type (c_ptr), Intent (Inout) :: ad_handle
Type (c_ptr), Intent (In) :: cpuser
C++ Header Interface
#include <nagad.h>
void monit ( void *&ad_handle, const Integer &nvar, const nagad_a1w_w_rtype x[], Integer &inform, const nagad_a1w_w_rtype rinfo[], const nagad_a1w_w_rtype stats[], Integer iuser[], nagad_a1w_w_rtype ruser[], void *cpuser)
1: ad_handle – Type (c_ptr) Input/Output
On entry: a handle to the AD configuration data object.
2: nvar – Integer Input
3: xType (nagad_a1w_w_rtype) array Input
4: inform – Integer Input/Output
5: rinfoType (nagad_a1w_w_rtype) array Input
6: statsType (nagad_a1w_w_rtype) array Input
7: iuser – Integer array User Workspace
8: ruserType (nagad_a1w_w_rtype) array User Workspace
9: cpuser – Type(c_ptr) User Workspace
6: nvar – Integer Input
7: x(nvar) – Type (nagad_a1w_w_rtype) array Input/Output
8: rinfo(100) – Type (nagad_a1w_w_rtype) array Output
9: stats(100) – Type (nagad_a1w_w_rtype) array Output
10: iuser(*) – Integer array User Workspace
11: ruser(*) – Type (nagad_a1w_w_rtype) array User Workspace
12: cpuser – Type(c_ptr) User Workspace
13: ifail – Integer Input/Output

6 Error Indicators and Warnings

e04kf_a1w_f 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 Section 4.8.2 in the NAG AD Library Introduction for further information.
ifail=-899
Dynamic memory allocation failed for AD.
See Section 4.8.1 in the NAG AD Library Introduction for further information.

7 Accuracy

Not applicable.

8 Parallelism and Performance

e04kf_a1w_f 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.