NAG AD Library
e05jb_a1w_f (bnd_mcs_solve_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

e05jb_a1w_f is the adjoint version of the primal routine e05jbf.

2 Specification

Fortran Interface
Subroutine e05jb_a1w_f ( ad_handle, n, objfun, ibound, iinit, bl, bu, sdlist, list, numpts, initpt, monit, x, obj, comm, lcomm, iuser, ruser, ifail)
Integer, Intent (In) :: n, ibound, iinit, sdlist, lcomm
Integer, Intent (Inout) :: numpts(n), initpt(n), iuser(*), ifail
Type (nagad_a1w_w_rtype), Intent (Inout) :: bl(n), bu(n), list(n,sdlist), comm(lcomm), ruser(*)
Type (nagad_a1w_w_rtype), Intent (Out) :: x(n), obj
Type (c_ptr), Intent (Inout) :: ad_handle
External :: objfun, monit
C++ Header Interface
#include <nagad.h>
void e05jb_a1w_f_ ( void *&ad_handle, const Integer &n,
void (NAG_CALL objfun)(void *&ad_handle, const Integer &n, const nagad_a1w_w_rtype x[], nagad_a1w_w_rtype &f, const Integer &nstate, Integer &inform, Integer iuser[], nagad_a1w_w_rtype ruser[]),
const Integer &ibound, const Integer &iinit, nagad_a1w_w_rtype bl[], nagad_a1w_w_rtype bu[], const Integer &sdlist, nagad_a1w_w_rtype list[], Integer numpts[], Integer initpt[],
void (NAG_CALL monit)(void *&ad_handle, const Integer &n, const Integer &ncall, const nagad_a1w_w_rtype xbest[], const Integer icount[], const Integer &ninit, const nagad_a1w_w_rtype list[], const Integer numpts[], const Integer initpt[], const Integer &nbaskt, const nagad_a1w_w_rtype xbaskt[], const nagad_a1w_w_rtype boxl[], const nagad_a1w_w_rtype boxu[], const Integer &nstate, Integer &inform, Integer iuser[], nagad_a1w_w_rtype ruser[]),
nagad_a1w_w_rtype x[], nagad_a1w_w_rtype &obj, nagad_a1w_w_rtype comm[], const Integer &lcomm, Integer iuser[], nagad_a1w_w_rtype ruser[], Integer &ifail)
The routine may be called by the names e05jb_a1w_f or nagf_glopt_bnd_mcs_solve_a1w. The corresponding t1w and p0w variants of this routine are also available.

3 Description

e05jb_a1w_f is the adjoint version of the primal routine e05jbf.
e05jbf is designed to find the global minimum or maximum of an arbitrary function, subject to simple bound-constraints using a multi-level coordinate search method. Derivatives are not required, but convergence is only guaranteed if the objective function is continuous in a neighbourhood of a global optimum. It is not intended for large problems.
The initialization routine e05jaf must have been called before calling e05jbf. For further information see Section 3 in the documentation for e05jbf.

4 References

Huyer W and Neumaier A (1999) Global optimization by multi-level coordinate search Journal of Global Optimization 14 331–355

5 Arguments

In addition to the arguments present in the interface of the primal routine, e05jb_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: objfun – Subroutine External Procedure
The specification of objfun is:
Fortran Interface
Subroutine objfun ( ad_handle, n, x, f, nstate, inform, iuser, ruser)
Integer, Intent (In) :: n, nstate
Integer, Intent (Inout) :: iuser(*)
Integer, Intent (Out) :: inform
Type (nagad_a1w_w_rtype), Intent (In) :: x(n)
Type (nagad_a1w_w_rtype), Intent (Inout) :: ruser(*)
Type (nagad_a1w_w_rtype), Intent (Out) :: f
Type (c_ptr), Intent (Inout) :: ad_handle
C++ Header Interface
#include <nagad.h>
void objfun ( void *&ad_handle, const Integer &n, const nagad_a1w_w_rtype x[], nagad_a1w_w_rtype &f, const Integer &nstate, Integer &inform, 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: n – Integer Input
3: xType (nagad_a1w_w_rtype) array Input
4: fType (nagad_a1w_w_rtype) Output
5: nstate – Integer Input
6: iuser – Integer array User Workspace
7: ruserType (nagad_a1w_w_rtype) array User Workspace
8: inform – Integer Output
4: ibound – Integer Input
5: iinit – Integer Input
6: bl(n) – Type (nagad_a1w_w_rtype) array Input/Output
7: bu(n) – Type (nagad_a1w_w_rtype) array Input/Output
8: sdlist – Integer Input
9: list(n, sdlist) – Type (nagad_a1w_w_rtype) array Input/Output
10: numpts(n) – Integer array Input/Output
11: initpt(n) – Integer array Input/Output
12: monit – Subroutine External Procedure
The specification of monit is:
Fortran Interface
Integer, Intent (In) :: n, ncall, icount(6), ninit, numpts(n), initpt(n), nbaskt, nstate
Integer, Intent (Inout) :: iuser(*)
Integer, Intent (Out) :: inform
Type (nagad_a1w_w_rtype), Intent (In) :: xbest(n), list(n,ninit), xbaskt(n,nbaskt), boxl(n), boxu(n)
Type (nagad_a1w_w_rtype), Intent (Inout) :: ruser(*)
Type (c_ptr), Intent (Inout) :: ad_handle
C++ Header Interface
#include <nagad.h>
void monit ( void *&ad_handle, const Integer &n, const Integer &ncall, const nagad_a1w_w_rtype xbest[], const Integer icount[], const Integer &ninit, const nagad_a1w_w_rtype list[], const Integer numpts[], const Integer initpt[], const Integer &nbaskt, const nagad_a1w_w_rtype xbaskt[], const nagad_a1w_w_rtype boxl[], const nagad_a1w_w_rtype boxu[], const Integer &nstate, Integer &inform, 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: n – Integer Input
3: ncall – Integer Input
4: xbestType (nagad_a1w_w_rtype) array Input
5: icount – Integer array Input
6: ninit – Integer Input
7: listType (nagad_a1w_w_rtype) array Input
8: numpts – Integer array Input
9: initpt – Integer array Input
10: nbaskt – Integer Input
11: xbasktType (nagad_a1w_w_rtype) array Input
12: boxlType (nagad_a1w_w_rtype) array Input
13: boxuType (nagad_a1w_w_rtype) array Input
14: nstate – Integer Input
15: iuser – Integer array User Workspace
16: ruserType (nagad_a1w_w_rtype) array User Workspace
17: inform – Integer Output
13: x(n) – Type (nagad_a1w_w_rtype) array Output
14: objType (nagad_a1w_w_rtype) Output
15: comm(lcomm) – Type (nagad_a1w_w_rtype) array Communication Array
16: lcomm – Integer Input
17: iuser(*) – Integer array User Workspace
18: ruser(*) – Type (nagad_a1w_w_rtype) array User Workspace
19: ifail – Integer Input/Output

6 Error Indicators and Warnings

e05jb_a1w_f preserves all error codes from e05jbf 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

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