NAG AD Library
e05uc_a1w_f (nlp_multistart_sqp_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

e05uc_a1w_f is the adjoint version of the primal routine e05ucf.

2 Specification

Fortran Interface
Integer, Intent (In) :: n, nclin, ncnln, lda, npts, ldx, nb, ldobjd, ldc, ldcjac, sdcjac, ldr, sdr, ldclda, listat
Integer, Intent (Inout) :: iopts(740), iuser(*), ifail
Integer, Intent (Out) :: iter(nb), istate(listat,nb), info(nb)
Type (nagad_a1w_w_rtype), Intent (In) :: a(lda,*), bl(n+nclin+ncnln), bu(n+nclin+ncnln)
Type (nagad_a1w_w_rtype), Intent (Inout) :: x(ldx,nb), objgrd(ldobjd,nb), c(ldc,nb), cjac(ldcjac,sdcjac,nb), r(ldr,sdr,nb), clamda(ldclda,nb), opts(485), ruser(*)
Type (nagad_a1w_w_rtype), Intent (Out) :: objf(nb)
Logical, Intent (In) :: repeat
Type (c_ptr), Intent (Inout) :: ad_handle
External :: confun, objfun, start
C++ Header Interface
#include <nagad.h>
void e05uc_a1w_f_ ( void *&ad_handle, const Integer &n, const Integer &nclin, const Integer &ncnln, const nagad_a1w_w_rtype a[], const Integer &lda, const nagad_a1w_w_rtype bl[], const nagad_a1w_w_rtype bu[],
void (NAG_CALL confun)(void *&ad_handle, Integer &mode, const Integer &ncnln, const Integer &n, const Integer &ldcjsl, const Integer needc[], const nagad_a1w_w_rtype x[], nagad_a1w_w_rtype c[], nagad_a1w_w_rtype cjsl[], const Integer &nstate, Integer iuser[], nagad_a1w_w_rtype ruser[]),
void (NAG_CALL objfun)(void *&ad_handle, Integer &mode, const Integer &n, const nagad_a1w_w_rtype x[], nagad_a1w_w_rtype &objf, nagad_a1w_w_rtype objgrd[], const Integer &nstate, Integer iuser[], nagad_a1w_w_rtype ruser[]),
const Integer &npts, nagad_a1w_w_rtype x[], const Integer &ldx,
void (NAG_CALL start)(void *&ad_handle, const Integer &npts, nagad_a1w_w_rtype quas[], const Integer &n, const logical &repeat, const nagad_a1w_w_rtype bl[], const nagad_a1w_w_rtype bu[], Integer &mode, Integer iuser[], nagad_a1w_w_rtype ruser[]),
const logical &repeat, const Integer &nb, nagad_a1w_w_rtype objf[], nagad_a1w_w_rtype objgrd[], const Integer &ldobjd, Integer iter[], nagad_a1w_w_rtype c[], const Integer &ldc, nagad_a1w_w_rtype cjac[], const Integer &ldcjac, const Integer &sdcjac, nagad_a1w_w_rtype r[], const Integer &ldr, const Integer &sdr, nagad_a1w_w_rtype clamda[], const Integer &ldclda, Integer istate[], const Integer &listat, Integer iopts[], nagad_a1w_w_rtype opts[], Integer info[], Integer iuser[], nagad_a1w_w_rtype ruser[], Integer &ifail)
The routine may be called by the names e05uc_a1w_f or nagf_glopt_nlp_multistart_sqp_a1w. The corresponding t1w and p0w variants of this routine are also available.

3 Description

e05uc_a1w_f is the adjoint version of the primal routine e05ucf.
e05ucf is designed to find the global minimum of an arbitrary smooth function subject to constraints (which may include simple bounds on the variables, linear constraints and smooth nonlinear constraints) by generating a number of different starting points and performing a local search from each using sequential quadratic programming. For further information see Section 3 in the documentation for e05ucf.

4 References

Dennis J E Jr and Moré J J (1977) Quasi-Newton methods, motivation and theory SIAM Rev. 19 46–89
Dennis J E Jr and Schnabel R B (1981) A new derivation of symmetric positive-definite secant updates nonlinear programming (eds O L Mangasarian, R R Meyer and S M Robinson) 4 167–199 Academic Press
Dennis J E Jr and Schnabel R B (1983) Numerical Methods for Unconstrained Optimization and Nonlinear Equations Prentice–Hall
Fletcher R (1987) Practical Methods of Optimization (2nd Edition) Wiley
Gill P E, Hammarling S, Murray W, Saunders M A and Wright M H (1986) Users' guide for LSSOL (Version 1.0) Report SOL 86-1 Department of Operations Research, Stanford University
Gill P E, Murray W, Saunders M A and Wright M H (1984) Users' guide for SOL/QPSOL version 3.2 Report SOL 84–5 Department of Operations Research, Stanford University
Gill P E, Murray W, Saunders M A and Wright M H (1986a) Some theoretical properties of an augmented Lagrangian merit function Report SOL 86–6R Department of Operations Research, Stanford University
Gill P E, Murray W, Saunders M A and Wright M H (1986b) Users' guide for NPSOL (Version 4.0): a Fortran package for nonlinear programming Report SOL 86-2 Department of Operations Research, Stanford University
Gill P E, Murray W and Wright M H (1981) Practical Optimization Academic Press
Powell M J D (1974) Introduction to constrained optimization Numerical Methods for Constrained Optimization (eds P E Gill and W Murray) 1–28 Academic Press
Powell M J D (1983) Variable metric methods in constrained optimization Mathematical Programming: the State of the Art (eds A Bachem, M Grötschel and B Korte) 288–311 Springer–Verlag

5 Arguments

In addition to the arguments present in the interface of the primal routine, e05uc_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: n – Integer Input
3: nclin – Integer Input
4: ncnln – Integer Input
5: a(lda, *) – Type (nagad_a1w_w_rtype) array Input
6: lda – Integer Input
7: bl(n+nclin+ncnln) – Type (nagad_a1w_w_rtype) array Input
8: bu(n+nclin+ncnln) – Type (nagad_a1w_w_rtype) array Input
9: confun – Subroutine External Procedure
The specification of confun is:
Fortran Interface
Subroutine confun ( ad_handle, mode, ncnln, n, ldcjsl, needc, x, c, cjsl, nstate, iuser, ruser)
Integer, Intent (In) :: ncnln, n, ldcjsl, needc(ncnln), nstate
Integer, Intent (Inout) :: mode, iuser(*)
Type (nagad_a1w_w_rtype), Intent (In) :: x(n)
Type (nagad_a1w_w_rtype), Intent (Inout) :: cjsl(ldcjsl,n), ruser(*)
Type (nagad_a1w_w_rtype), Intent (Out) :: c(ncnln)
Type (c_ptr), Intent (Inout) :: ad_handle
C++ Header Interface
#include <nagad.h>
void confun ( void *&ad_handle, Integer &mode, const Integer &ncnln, const Integer &n, const Integer &ldcjsl, const Integer needc[], const nagad_a1w_w_rtype x[], nagad_a1w_w_rtype c[], nagad_a1w_w_rtype cjsl[], const Integer &nstate, Integer iuser[], nagad_a1w_w_rtype ruser[])
1: ad_handle – Type (c_ptr) Input/Output
On entry: a handle to the AD configuration data object.
2: mode – Integer Input/Output
3: ncnln – Integer Input
4: n – Integer Input
5: ldcjsl – Integer Input
6: needc – Integer array Input
7: xType (nagad_a1w_w_rtype) array Input
8: cType (nagad_a1w_w_rtype) array Output
9: cjslType (nagad_a1w_w_rtype) array Input/Output
10: nstate – Integer Input
11: iuser – Integer array User Workspace
12: ruserType (nagad_a1w_w_rtype) array User Workspace
10: objfun – Subroutine External Procedure
The specification of objfun is:
Fortran Interface
Subroutine objfun ( ad_handle, mode, n, x, objf, objgrd, nstate, iuser, ruser)
Integer, Intent (In) :: n, nstate
Integer, Intent (Inout) :: mode, iuser(*)
Type (nagad_a1w_w_rtype), Intent (In) :: x(n)
Type (nagad_a1w_w_rtype), Intent (Inout) :: objgrd(n), ruser(*)
Type (nagad_a1w_w_rtype), Intent (Out) :: objf
Type (c_ptr), Intent (Inout) :: ad_handle
C++ Header Interface
#include <nagad.h>
void objfun ( void *&ad_handle, Integer &mode, const Integer &n, const nagad_a1w_w_rtype x[], nagad_a1w_w_rtype &objf, nagad_a1w_w_rtype objgrd[], const Integer &nstate, Integer iuser[], nagad_a1w_w_rtype ruser[])
1: ad_handle – Type (c_ptr) Input/Output
On entry: a handle to the AD configuration data object.
2: mode – Integer Input/Output
3: n – Integer Input
4: xType (nagad_a1w_w_rtype) array Input
5: objfType (nagad_a1w_w_rtype) Output
6: objgrdType (nagad_a1w_w_rtype) array Input/Output
7: nstate – Integer Input
8: iuser – Integer array User Workspace
9: ruserType (nagad_a1w_w_rtype) array User Workspace
11: npts – Integer Input
12: x(ldx, nb) – Type (nagad_a1w_w_rtype) array Output
13: ldx – Integer Input
14: start – Subroutine External Procedure
The specification of start is:
Fortran Interface
Subroutine start ( ad_handle, npts, quas, n, repeat, bl, bu, mode, iuser, ruser)
Integer, Intent (In) :: npts, n
Integer, Intent (Inout) :: iuser(*), mode
Type (nagad_a1w_w_rtype), Intent (In) :: bl(n), bu(n)
Type (nagad_a1w_w_rtype), Intent (Inout) :: quas(n,npts), ruser(*)
Logical, Intent (In) :: repeat
Type (c_ptr), Intent (Inout) :: ad_handle
C++ Header Interface
#include <nagad.h>
void start ( void *&ad_handle, const Integer &npts, nagad_a1w_w_rtype quas[], const Integer &n, const logical &repeat, const nagad_a1w_w_rtype bl[], const nagad_a1w_w_rtype bu[], Integer &mode, Integer iuser[], nagad_a1w_w_rtype ruser[])
1: ad_handle – Type (c_ptr) Input/Output
On entry: a handle to the AD configuration data object.
2: npts – Integer Input
3: quasType (nagad_a1w_w_rtype) array Input/Output
4: n – Integer Input
5: repeat – logical Input
6: blType (nagad_a1w_w_rtype) array Input
7: buType (nagad_a1w_w_rtype) array Input
8: iuser – Integer array User Workspace
9: ruserType (nagad_a1w_w_rtype) array User Workspace
10: mode – Integer Input/Output
15: repeat – logical Input
16: nb – Integer Input
17: objf(nb) – Type (nagad_a1w_w_rtype) array Output
18: objgrd(ldobjd, nb) – Type (nagad_a1w_w_rtype) array Output
19: ldobjd – Integer Input
20: iter(nb) – Integer array Output
21: c(ldc, nb) – Type (nagad_a1w_w_rtype) array Output
22: ldc – Integer Input
23: cjac(ldcjac, sdcjac, nb) – Type (nagad_a1w_w_rtype) array Output
24: ldcjac – Integer Input
25: sdcjac – Integer Input
26: r(ldr, sdr, nb) – Type (nagad_a1w_w_rtype) array Output
27: ldr – Integer Input
28: sdr – Integer Input
29: clamda(ldclda, nb) – Type (nagad_a1w_w_rtype) array Output
30: ldclda – Integer Input
31: istate(listat, nb) – Integer array Output
32: listat – Integer Input
33: iopts(740) – Integer array Communication Array
34: opts(485) – Type (nagad_a1w_w_rtype) array Communication Array
35: info(nb) – Integer array Output
36: iuser(*) – Integer array User Workspace
37: ruser(*) – Type (nagad_a1w_w_rtype) array User Workspace
38: ifail – Integer Input/Output

6 Error Indicators and Warnings

e05uc_a1w_f preserves all error codes from e05ucf 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

e05uc_a1w_f is not threaded in any implementation.

9 Further Comments

None.

10 Example

The following examples are variants of the example for e05ucf, modified to demonstrate calling the NAG AD Library.

10.1 Adjoint mode (a1w)

LanguageSource FileDataResults
Fortrane05uc_a1w_fe.f90e05uc_a1w_fe.de05uc_a1w_fe.r
C++e05uc_a1w_hcppe.cppe05uc_a1w_hcppe.de05uc_a1w_hcppe.r

10.2 Tangent mode (t1w)

LanguageSource FileDataResults
Fortrane05uc_t1w_fe.f90e05uc_t1w_fe.de05uc_t1w_fe.r
C++e05uc_t1w_hcppe.cppe05uc_t1w_hcppe.de05uc_t1w_hcppe.r

10.3 Passive mode (p0w)

LanguageSource FileDataResults
Fortrane05uc_p0w_fe.f90e05uc_p0w_fe.de05uc_p0w_fe.r
C++e05uc_p0w_hcppe.cppe05uc_p0w_hcppe.de05uc_p0w_hcppe.r