NAG FL Interface
e05ucf (nlp_​multistart_​sqp)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

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.

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)
Real (Kind=nag_wp), Intent (In) :: a(lda,*), bl(n+nclin+ncnln), bu(n+nclin+ncnln)
Real (Kind=nag_wp), 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(*)
Real (Kind=nag_wp), Intent (Out) :: objf(nb)
Logical, Intent (In) :: repeat
External :: confun, objfun, start
C Header Interface
#include <nag.h>
void  e05ucf_ (const Integer *n, const Integer *nclin, const Integer *ncnln, const double a[], const Integer *lda, const double bl[], const double bu[],
void (NAG_CALL *confun)(Integer *mode, const Integer *ncnln, const Integer *n, const Integer *ldcjsl, const Integer needc[], const double x[], double c[], double cjsl[], const Integer *nstate, Integer iuser[], double ruser[]),
void (NAG_CALL *objfun)(Integer *mode, const Integer *n, const double x[], double *objf, double objgrd[], const Integer *nstate, Integer iuser[], double ruser[]),
const Integer *npts, double x[], const Integer *ldx,
void (NAG_CALL *start)(const Integer *npts, double quas[], const Integer *n, const logical *repeat, const double bl[], const double bu[], Integer iuser[], double ruser[], Integer *mode),
const logical *repeat, const Integer *nb, double objf[], double objgrd[], const Integer *ldobjd, Integer iter[], double c[], const Integer *ldc, double cjac[], const Integer *ldcjac, const Integer *sdcjac, double r[], const Integer *ldr, const Integer *sdr, double clamda[], const Integer *ldclda, Integer istate[], const Integer *listat, Integer iopts[], double opts[], Integer iuser[], double ruser[], Integer info[], Integer *ifail)
The routine may be called by the names e05ucf or nagf_glopt_nlp_multistart_sqp.
Before calling e05ucf, the optional parameter arrays iopts and opts must be initialized for use with e05ucf by calling e05zkf with optstr set to ‘Initialize = e05ucf’. Optional parameters may be specified by calling e05zkf before the call to e05ucf.

3 Description

The problem is assumed to be stated in the following form:
minimizexRn ​ ​ F(x)  subject to  l ( x ALx c(x) ) u, (1)
where F(x) (the objective function) is a nonlinear function, AL is an nL×n linear constraint matrix, and c(x) is an nN element vector of nonlinear constraint functions. (The matrix AL and the vector c(x) may be empty.) The objective function and the constraint functions are assumed to be smooth, i.e., at least twice-continuously differentiable. (This routine will usually solve (1) if there are only isolated discontinuities away from the solution.)
e05ucf solves a user-specified number of local optimization problems with different starting points. You may specify the starting points via the subroutine start. If a random number generator is used to generate the starting points then the argument repeat allows you to specify whether a repeatable set of points are generated or whether different starting points are generated on different calls. The resulting local minima are ordered and the best nb results returned in order of ascending values of the resulting objective function values at the minima. Thus the value returned in position 1 will be the best result obtained. If a sufficient number of different points are chosen then this is likely to be be the global minimum. Please note that the default version of start uses a random number generator to generate the starting points.

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

1: n Integer Input
On entry: n, the number of variables.
Constraint: n>0.
2: nclin Integer Input
On entry: nL, the number of general linear constraints.
Constraint: nclin0.
3: ncnln Integer Input
On entry: nN, the number of nonlinear constraints.
Constraint: ncnln0.
4: a(lda,*) Real (Kind=nag_wp) array Input
Note: the second dimension of the array a must be at least n if nclin>0, and at least 1 otherwise.
On entry: the matrix AL of general linear constraints in (1). That is, the ith row contains the coefficients of the ith general linear constraint, for i=1,2,,nclin.
If nclin=0, the array a is not referenced.
5: lda Integer Input
On entry: the first dimension of the array a as declared in the (sub)program from which e05ucf is called.
Constraint: ldanclin.
6: bl(n+nclin+ncnln) Real (Kind=nag_wp) array Input
7: bu(n+nclin+ncnln) Real (Kind=nag_wp) array Input
On entry: bl must contain the lower bounds and bu the upper bounds for all the constraints in the following order. The first n elements of each array must contain the bounds on the variables, the next nL elements the bounds for the general linear constraints (if any) and the next nN elements the bounds for the general nonlinear constraints (if any). To specify a nonexistent lower bound (i.e., lj=-), set bl(j)-bigbnd, and to specify a nonexistent upper bound (i.e., uj=+), set bu(j)bigbnd; the default value of bigbnd is 1020, but this may be changed by the optional parameter Infinite Bound Size. To specify the jth constraint as an equality, set bl(j)=bu(j)=β, say, where |β|<bigbnd.
Constraints:
  • bl(j)bu(j), for j=1,2,,n+nclin+ncnln;
  • if bl(j)=bu(j)=β, |β|<bigbnd.
8: confun Subroutine, supplied by the NAG Library or the user. External Procedure
confun must calculate the vector c(x) of nonlinear constraint functions and (optionally) its Jacobian (= c x ) for a specified n-element vector x. If there are no nonlinear constraints (i.e., ncnln=0), confun will never be called by e05ucf and confun may be the dummy routine e04udm. (e04udm is included in the NAG Library.) If there are nonlinear constraints, the first call to confun will occur before the first call to objfun.
The specification of confun is:
Fortran Interface
Subroutine confun ( 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(*)
Real (Kind=nag_wp), Intent (In) :: x(n)
Real (Kind=nag_wp), Intent (Inout) :: cjsl(ldcjsl,n), ruser(*)
Real (Kind=nag_wp), Intent (Out) :: c(ncnln)
C Header Interface
void  confun (Integer *mode, const Integer *ncnln, const Integer *n, const Integer *ldcjsl, const Integer needc[], const double x[], double c[], double cjsl[], const Integer *nstate, Integer iuser[], double ruser[])
1: mode Integer Input/Output
On entry: indicates which values must be assigned during each call of confun. Only the following values need be assigned, for each value of i such that needc(i)>0:
mode=0
c(i).
mode=1
All available elements in the ith row of cjsl.
mode=2
c(i) and all available elements in the ith row of cjsl.
On exit: may be set to a negative value if you wish to abandon the solution to the current local minimization problem. In this case e05ucf will move to the next local minimization problem.
2: ncnln Integer Input
On entry: nN, the number of nonlinear constraints.
3: n Integer Input
On entry: n, the number of variables.
4: ldcjsl Integer Input
On entry: ldcjsl is the same value as ldcjac in the call to e05ucf.
5: needc(ncnln) Integer array Input
On entry: the indices of the elements of c and/or cjsl that must be evaluated by confun. If needc(i)>0, c(i) and/or the available elements of the ith row of cjsl (see argument mode) must be evaluated at x.
6: x(n) Real (Kind=nag_wp) array Input
On entry: x, the vector of variables at which the constraint functions and/or the available elements of the constraint Jacobian are to be evaluated.
7: c(ncnln) Real (Kind=nag_wp) array Output
On exit: if needc(k)>0 and mode=0 or 2, c(k) must contain the value of ck(x). The remaining elements of c, corresponding to the non-positive elements of needc, need not be set.
8: cjsl(ldcjsl,n) Real (Kind=nag_wp) array Input/Output
cjsl may be regarded as a two-dimensional ‘slice’ of the three-dimensional array cjac of e05ucf.
On entry: unless Derivative Level=2 or 3 (the default setting is Derivative Level=3), the elements of cjsl are set to special values which enable e05ucf to detect whether they are changed by confun.
On exit: if needc(k)>0 and mode=1 or 2, the kth row of cjsl must contain the available elements of the vector ck given by
ck= ( ck x1 , ck x2 ,, ck xn ) T,  
where ck xj is the partial derivative of the kth constraint with respect to the jth variable, evaluated at the point x. See also the argument nstate. The remaining rows of cjsl, corresponding to non-positive elements of needc, need not be set.
If all elements of the constraint Jacobian are known (i.e., Derivative Level=2 or 3), any constant elements may be assigned to cjsl one time only at the start of each local optimization. An element of cjsl that is not subsequently assigned in confun will retain its initial value throughout the local optimization. Constant elements may be loaded into cjsl during the first call to confun for the local optimization (signalled by the value nstate=1). The ability to preload constants is useful when many Jacobian elements are identically zero, in which case cjsl may be initialized to zero and nonzero elements may be reset by confun.
Note that constant nonzero elements do affect the values of the constraints. Thus, if cjsl(k,j) is set to a constant value, it need not be reset in subsequent calls to confun, but the value cjsl(k,j)×x(j) must nonetheless be added to c(k). For example, if cjsl(1,1)=2 and cjsl(1,2)=−5 then the term 2×x(1)-5×x(2) must be included in the definition of c(1).
It must be emphasized that, if Derivative Level=0 or 1, unassigned elements of cjsl are not treated as constant; they are estimated by finite differences, at nontrivial expense. If you do not supply a value for the optional parameter Difference Interval, an interval for each element of x is computed automatically at the start of each local optimization. The automatic procedure can usually identify constant elements of cjsl, which are then computed once only by finite differences.
9: nstate Integer Input
On entry: if nstate=1 then e05ucf is calling confun for the first time on the current local optimization problem. This argument setting allows you to save computation time if certain data must be calculated only once.
10: iuser(*) Integer array User Workspace
11: ruser(*) Real (Kind=nag_wp) array User Workspace
confun is called with the arguments iuser and ruser as supplied to e05ucf. You should use the arrays iuser and ruser to supply information to confun.
confun must either be a module subprogram USEd by, or declared as EXTERNAL in, the (sub)program from which e05ucf is called. Arguments denoted as Input must not be changed by this procedure.
Note: confun should not return floating-point NaN (Not a Number) or infinity values, since these are not handled by e05ucf. If your code inadvertently does return any NaNs or infinities, e05ucf is likely to produce unexpected results.
confun should be tested separately before being used in conjunction with e05ucf. See also the description of the optional parameter Verify.
9: objfun Subroutine, supplied by the user. External Procedure
objfun must calculate the objective function F(x) and (optionally) its gradient g(x) = F x for a specified n-vector x.
The specification of objfun is:
Fortran Interface
Subroutine objfun ( mode, n, x, objf, objgrd, nstate, iuser, ruser)
Integer, Intent (In) :: n, nstate
Integer, Intent (Inout) :: mode, iuser(*)
Real (Kind=nag_wp), Intent (In) :: x(n)
Real (Kind=nag_wp), Intent (Inout) :: objgrd(n), ruser(*)
Real (Kind=nag_wp), Intent (Out) :: objf
C Header Interface
void  objfun (Integer *mode, const Integer *n, const double x[], double *objf, double objgrd[], const Integer *nstate, Integer iuser[], double ruser[])
1: mode Integer Input/Output
On entry: indicates which values must be assigned during each call of objfun. Only the following values need be assigned:
mode=0
objf.
mode=1
All available elements of objgrd.
mode=2
objf and all available elements of objgrd.
On exit: may be set to a negative value if you wish to abandon the solution to the current local minimization problem. In this case e05ucf will move to the next local minimization problem.
2: n Integer Input
On entry: n, the number of variables.
3: x(n) Real (Kind=nag_wp) array Input
On entry: x, the vector of variables at which the objective function and/or all available elements of its gradient are to be evaluated.
4: objf Real (Kind=nag_wp) Output
On exit: if mode=0 or 2, objf must be set to the value of the objective function at x.
5: objgrd(n) Real (Kind=nag_wp) array Input/Output
On entry: the elements of objgrd are set to special values which enable e05ucf to detect whether they are changed by objfun.
On exit: if mode=1 or 2, objgrd must return the available elements of the gradient evaluated at x.
6: nstate Integer Input
On entry: if nstate=1 then e05ucf is calling objfun for the first time on the current local optimization problem. This argument setting allows you to save computation time if certain data must be calculated only once.
7: iuser(*) Integer array User Workspace
8: ruser(*) Real (Kind=nag_wp) array User Workspace
objfun is called with the arguments iuser and ruser as supplied to e05ucf. You should use the arrays iuser and ruser to supply information to objfun.
objfun must either be a module subprogram USEd by, or declared as EXTERNAL in, the (sub)program from which e05ucf is called. Arguments denoted as Input must not be changed by this procedure.
Note: objfun should not return floating-point NaN (Not a Number) or infinity values, since these are not handled by e05ucf. If your code inadvertently does return any NaNs or infinities, e05ucf is likely to produce unexpected results.
objfun should be tested separately before being used in conjunction with e05ucf. See also the description of the optional parameter Verify.
10: npts Integer Input
On entry: the number of different starting points to be generated and used. The more points used, the more likely that the best returned solution will be a global minimum.
Constraint: 1nbnpts.
11: x(ldx,nb) Real (Kind=nag_wp) array Output
On exit: x(j,i) contains the final estimate of the ith solution, for j=1,2,,n.
12: ldx Integer Input
On entry: the first dimension of the array x as declared in the (sub)program from which e05ucf is called.
Constraint: ldxn.
13: start Subroutine, supplied by the NAG Library or the user. External Procedure
start must calculate the npts starting points to be used by the local optimizer. If you do not wish to write a routine specific to your problem then e05ucz may be used as the actual argument. e05ucz is supplied in the NAG Library and uses the NAG quasi-random number generators to distribute starting points uniformly across the domain. It is affected by the value of repeat.
The specification of start is:
Fortran Interface
Subroutine start ( npts, quas, n, repeat, bl, bu, iuser, ruser, mode)
Integer, Intent (In) :: npts, n
Integer, Intent (Inout) :: iuser(*), mode
Real (Kind=nag_wp), Intent (In) :: bl(n), bu(n)
Real (Kind=nag_wp), Intent (Inout) :: quas(n,npts), ruser(*)
Logical, Intent (In) :: repeat
C Header Interface
void  start (const Integer *npts, double quas[], const Integer *n, const logical *repeat, const double bl[], const double bu[], Integer iuser[], double ruser[], Integer *mode)
1: npts Integer Input
On entry: indicates the number of starting points.
2: quas(n,npts) Real (Kind=nag_wp) array Input/Output
On entry: all elements of quas will have been set to zero, so only nonzero values need be set subsequently.
On exit: must contain the starting points for the npts local minimizations, i.e., quas(j,i) must contain the jth component of the ith starting point.
3: n Integer Input
On entry: the number of variables.
4: repeat Logical Input
On entry: specifies whether a repeatable or non-repeatable sequence of points are to be generated.
5: bl(n) Real (Kind=nag_wp) array Input
On entry: the lower bounds on the variables. These may be used to ensure that the starting points generated in some sense ‘cover’ the region, but there is no requirement that a starting point be feasible.
6: bu(n) Real (Kind=nag_wp) array Input
On entry: the upper bounds on the variables. (See bl.)
7: iuser(*) Integer array User Workspace
8: ruser(*) Real (Kind=nag_wp) array User Workspace
start is called with the arguments iuser and ruser as supplied to e05ucf. You should use the arrays iuser and ruser to supply information to start.
9: mode Integer Input/Output
On entry: mode will contain 0.
On exit: if you set mode to a negative value then e05ucf will terminate immediately with ifail=9.
start must either be a module subprogram USEd by, or declared as EXTERNAL in, the (sub)program from which e05ucf is called. Arguments denoted as Input must not be changed by this procedure.
Note: start should not return floating-point NaN (Not a Number) or infinity values, since these are not handled by e05ucf. If your code inadvertently does return any NaNs or infinities, e05ucf is likely to produce unexpected results.
14: repeat Logical Input
On entry: is passed as an argument to start and may be used to initialize a random number generator to a repeatable, or non-repeatable, sequence.
15: nb Integer Input
On entry: the number of solutions to be returned. The routine saves up to nb local minima ordered by increasing value of the final objective function. If the defining criterion for ‘best solution’ is only that the value of the objective function is as small as possible then nb should be set to 1. However, if you want to look at other solutions that may have desirable properties then setting nb>1 will produce nb local minima, ordered by increasing value of their objective functions at the minima.
Constraint: 1nbnpts.
16: objf(nb) Real (Kind=nag_wp) array Output
On exit: objf(i) contains the value of the objective function at the final iterate for the ith solution.
17: objgrd(ldobjd,nb) Real (Kind=nag_wp) array Output
On exit: objgrd(j,i) contains the gradient of the objective function for the ith solution at the final iterate (or its finite difference approximation), for j=1,2,,n.
18: ldobjd Integer Input
On entry: the first dimension of the array objgrd as declared in the (sub)program from which e05ucf is called.
Constraint: ldobjdn.
19: iter(nb) Integer array Output
On exit: iter(i) contains the number of major iterations performed to obtain the ith solution. If less than nb solutions are returned then iter(nb) contains the number of starting points that have resulted in a converged solution. If this is close to npts then this might be indicative that fewer than nb local minima exist.
20: c(ldc,nb) Real (Kind=nag_wp) array Output
On exit: if ncnln>0, c(j,i) contains the value of the jth nonlinear constraint function cj at the final iterate, for the ith solution, for j=1,2,,ncnln.
If ncnln=0, c is not referenced.
21: ldc Integer Input
On entry: the first dimension of the array c as declared in the (sub)program from which e05ucf is called.
Constraint: ldcncnln.
22: cjac(ldcjac,sdcjac,nb) Real (Kind=nag_wp) array Output
On exit: if ncnln>0, cjac contains the Jacobian matrices of the nonlinear constraint functions at the final iterate for each of the returned solutions, i.e., cjac(k,j,i) contains the partial derivative of the kth constraint function with respect to the jth variable, for k=1,2,,ncnln and j=1,2,,n, for the ith solution. (See the discussion of argument cjsl under confun.)
If ncnln=0, cjac is not referenced.
23: ldcjac Integer Input
On entry: the first dimension of the array cjac as declared in the (sub)program from which e05ucf is called.
Constraint: ldcjacncnln.
24: sdcjac Integer Input
On entry: the second dimension of the array cjac as declared in the (sub)program from which e05ucf is called.
Constraint: if ncnln>0, sdcjacn.
25: r(ldr,sdr,nb) Real (Kind=nag_wp) array Output
On exit: for each of the nb solutions r will contain a form of the Hessian; for the ith returned solution r(ldr,sdr,i) contains the Hessian that would be returned from the local minimizer. If Hessian=NO, the default, each r(ldr,sdr,i) contains the upper triangular Cholesky factor R of QTHQ, an estimate of the transformed and reordered Hessian of the Lagrangian at x. If Hessian=YES, r(ldr,sdr,i) contains the upper triangular Cholesky factor R of H, the approximate (untransformed) Hessian of the Lagrangian, with the variables in the natural order.
26: ldr Integer Input
On entry: the first dimension of the array r as declared in the (sub)program from which e05ucf is called.
Constraint: ldrn.
27: sdr Integer Input
On entry: the second dimension of the array r as declared in the (sub)program from which e05ucf is called.
Constraint: sdrn.
28: clamda(ldclda,nb) Real (Kind=nag_wp) array Output
On exit: the values of the QP multipliers from the last QP subproblem solved for the ith solution. clamda(j,i) should be non-negative if istate(j,i)=1 and non-positive if istate(j,i)=2.
29: ldclda Integer Input
On entry: the first dimension of the array clamda as declared in the (sub)program from which e05ucf is called.
Constraint: ldcldan+nclin+ncnln.
30: istate(listat,nb) Integer array Output
On exit: istate(j,i) contains the status of the constraints in the QP working set for the ith solution. The significance of each possible value of istate(j,i) is as follows:
istate(j,i) Meaning
-0 The constraint is satisfied to within the feasibility tolerance, but is not in the QP working set.
-1 This inequality constraint is included in the QP working set at its lower bound.
-2 This inequality constraint is included in the QP working set at its upper bound.
-3 This constraint is included in the QP working set as an equality. This value of istate can occur only when bl(j)=bu(j).
31: listat Integer Input
On entry: the first dimension of the array istate as declared in the (sub)program from which e05ucf is called.
Constraint: listatn+nclin+ncnln.
32: iopts(740) Integer array Communication Array
33: opts(485) Real (Kind=nag_wp) array Communication Array
The arrays iopts and opts must not be altered between calls to any of the routines e05ucf and e05zkf.
34: iuser(*) Integer array User Workspace
35: ruser(*) Real (Kind=nag_wp) array User Workspace
iuser and ruser are not used by e05ucf, but are passed directly to confun, objfun and start and may be used to pass information to these routines.
With care, you may also write information back into iuser and ruser. This might be useful, for example, should there be a need to preserve the state of a random number generator.
With SMP-enabled versions of e05ucf the arrays iuser and ruser provided are classified as OpenMP shared memory. Use of iuser and ruser has to take account of this in order to preserve thread safety whenever information is written back to either of these arrays.
36: info(nb) Integer array Output
On exit: info(i) contains one of 0, 1 or 6. Please see the description of each corresponding value of ifail on exit from e04ucf/​e04uca for detailed explanations of these exit values. As usual 0 denotes success.
If ifail=8 on exit, then not all nb solutions have been found, and info(nb) contains the number of solutions actually found.
37: ifail Integer Input/Output
On entry: ifail must be set to 0, −1 or 1 to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of 0 causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of −1 means that an error message is printed while a value of 1 means that it is not.
If halting is not appropriate, the value −1 or 1 is recommended. If message printing is undesirable, then the value 1 is recommended. Otherwise, the value −1 is recommended since useful values can be provided in some output arguments even when ifail0 on exit. When the value -1 or 1 is used it is essential to test the value of ifail on exit.
On exit: ifail=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6 Error Indicators and Warnings

If on entry ifail=0 or −1, explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
Note: in some cases e05ucf may return useful information.
ifail=1
An input value is incorrect. One or more of the following constraints are violated.
  • On entry, bl(i)>bu(i): i=value.
    Constraint: bl(i)bu(i), for all i.
  • On entry, lda=value and nclin=value.
    Constraint: ldanclin.
  • On entry, ldc=value and ncnln=value.
    Constraint: ldcncnln.
  • On entry, ldcjac=value and ncnln=value.
    Constraint: ldcjacncnln.
  • On entry, ldclda=value, n=value, nclin=value and ncnln=value.
    Constraint: ldcldan+nclin+ncnln.
  • On entry, ldobjd=value and n=value.
    Constraint: ldobjdn.
  • On entry, ldr=value and n=value.
    Constraint: ldrn.
  • On entry, ldx=value and n=value.
    Constraint: ldxn.
  • On entry, listat=value, n=value, nclin=value and ncnln=value.
    Constraint: listatn+nclin+ncnln.
  • On entry, n=value.
    Constraint: n>0.
  • On entry, nb=value and npts=value.
    Constraint: 1nbnpts.
  • On entry, nclin=value.
    Constraint: nclin0.
  • On entry, ncnln=value.
    Constraint: ncnln0.
  • On entry, ncnln>0, sdcjac=value and n=value.
    Constraint: if ncnln>0, sdcjacn.
  • On entry, sdr=value and n=value.
    Constraint: sdrn.
ifail=2
No solution obtained. Linear constraints may be infeasible.
e05ucf has terminated without finding any solutions. The majority of calls to the local optimizer have failed to find a feasible point for the linear constraints and bounds, which means that either no feasible point exists for the given value of the optional parameter Linear Feasibility Tolerance (default value ε, where ε is the machine precision), or no feasible point could be found in the number of iterations specified by the optional parameter Minor Iteration Limit. You should check that there are no constraint redundancies. If the data for the constraints are accurate only to an absolute precision σ, you should ensure that the value of the optional parameter Linear Feasibility Tolerance is greater than σ. For example, if all elements of AL are of order unity and are accurate to only three decimal places, Linear Feasibility Tolerance should be at least 10−3.
ifail=3
e05ucf has failed to find any solutions. The majority of local optimizations could not find a feasible point for the nonlinear constraints. The problem may have no feasible solution. This behaviour will occur if there is no feasible point for the nonlinear constraints. (However, there is no general test that can determine whether a feasible point exists for a set of nonlinear constraints.)
No solution obtained. Nonlinear constraints may be infeasible.
ifail=4
No solution obtained. Many potential solutions reach iteration limit.
The Iteration Limit may be changed using e05zkf.
ifail=7
User-supplied derivatives probably wrong.
The user-supplied derivatives of the objective function and/or nonlinear constraints appear to be incorrect.
Large errors were found in the derivatives of the objective function and/or nonlinear constraints. This value of ifail will occur if the verification process indicated that at least one gradient or Jacobian element had no correct figures. You should refer to or enable the printed output to determine which elements are suspected to be in error.
As a first-step, you should check that the code for the objective and constraint values is correct – for example, by computing the function at a point where the correct value is known. However, care should be taken that the chosen point fully tests the evaluation of the function. It is remarkable how often the values x=0 or x=1 are used to test function evaluation procedures, and how often the special properties of these numbers make the test meaningless.
Gradient checking will be ineffective if the objective function uses information computed by the constraints, since they are not necessarily computed before each function evaluation.
Errors in programming the function may be quite subtle in that the function value is ‘almost’ correct. For example, the function may not be accurate to full precision because of the inaccurate calculation of a subsidiary quantity, or the limited accuracy of data upon which the function depends. A common error on machines where numerical calculations are usually performed in double precision is to include even one single precision constant in the calculation of the function; since some compilers do not convert such constants to double precision, half the correct figures may be lost by such a seemingly trivial error.
ifail=8
Only value solutions obtained.
Not all nb solutions have been found. info(nb) contains the number actually found.
ifail=9
User terminated computation from start procedure: mode=value.
If e05ucz has been used as an actual argument for start then the message displayed, when ifail=0 or -1 on entry to e05ucf, will have the following meaning:
998 failure to allocate space, a smaller value of NPTS should be tried.
997 an internal error has occurred. Please contact NAG for assistance.
ifail=10
Failed to initialize optional parameter arrays.
ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
ifail=-399
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
ifail=-999
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

7 Accuracy

If ifail=0 on exit and the value of info(i)=0, then the vector returned in the array x for solution i is an estimate of the solution to an accuracy of approximately Optimality Tolerance.

8 Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
e05ucf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library. In these implementations, this routine may make calls to the user-supplied functions from within an OpenMP parallel region. Thus OpenMP directives within the user functions can only be used if you are compiling the user-supplied function and linking the executable in accordance with the instructions in the Users' Note for your implementation. The user workspace arrays iuser and ruser are classified as OpenMP shared memory and use of iuser and ruser has to take account of this in order to preserve thread safety whenever information is written back to either of these arrays. If at all possible, it is recommended that these arrays are only used to supply read-only data to the user functions when a multithreaded implementation is being used.
e05ucf makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

9 Further Comments

You should be wary of requesting much intermediate output from the local optimizer, since large volumes may be produced if npts is large.
The auxiliary routine e05ucz makes use of the NAG quasi-random Sobol generator (g05ylf and g05ymf). If e05ucz is used as an argument for start (see the description of start) and repeat=.FALSE. then a randomly chosen value for iskip is used, otherwise iskip is set to 100. If repeat is set to .FALSE. and the program is executed several times, each time producing the same best answer, then there is increased probability that this answer is a global minimum. However, if it is important that identical results be obtained on successive runs, then repeat should be set to .TRUE..

9.1 Description of the Printed Output

See Section 9.1 in e04ucf/​e04uca.

10 Example

This example finds the global minimum of the two-dimensional Schwefel function:
minimize xR2 f = j=1 2 xj sin(|xj|)  
subject to the constraints:
−10000<3.0 x1 - 2.0 x2 <10.0 , -1.0 < x12 - x22 + 3.0 x1 x2 < 500000.0 , -0.9 < cos( (x1/200) 2 +(x2/100)) < 0.9 , −500 x1 500 , −500 x2 500 .  

10.1 Program Text

Program Text (e05ucfe.f90)

10.2 Program Data

Program Data (e05ucfe.d)

10.3 Program Results

Program Results (e05ucfe.r)

11 Algorithmic Details

See Section 11 in e04ucf/​e04uca.

12 Optional Parameters

Several optional parameters in e05ucf define choices in the problem specification or the algorithm logic. In order to reduce the number of formal arguments of e05ucf these optional parameters have associated default values that are appropriate for most problems. Therefore, you need only specify those optional parameters whose values are to be different from their default values.
Optional parameters may be specified by calling e05zkf before a call to e05ucf. Before calling e05ucf, the optional parameter arrays iopts and opts must be initialized for use with e05ucf by calling e05zkf with optstr set to ‘Initialize = e05ucf’.
All optional parameters not specified are set to their default values. Optional parameters specified are unaltered by e05ucf (unless they define invalid values) and so remain in effect for subsequent calls to e05ucf.

12.1 Description of the Optional Parameters

e05ucf supports two options that are distinct from those of e04ucf/​e04uca:
Punch UnitiDefault =6
This option allows you to send information arising from an appropriate setting of Out_Level to be sent to the Fortran unit number defined by Punch Unit. If you wish this file to be different to the standard output unit (6) where other output is displayed then this file should be attached by calling x04acf prior to calling e05ucf.
Out_LeveliDefault =0
This option defines the amount of extra information to be sent to the Fortran unit number defined by Punch Unit. The possible choices for i are the following:
i Meaning
0 No extra output.
1 Updated solutions only. This is useful during long runs to observe progress.
2 Successful start points only. This is useful to save the starting points that gave rise to the final solution.
3 Both updated solutions and successful start points.
See Section 12 in e04ucf/​e04uca for details of the other options.
The Warm Start option of e04ucf/​e04uca is not a valid option for use with e05ucf.

13 Description of Monitoring Information

See Section 13 in e04ucf/​e04uca.