hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox Chapter Introduction

E04 — Minimizing or Maximizing a Function

Scope of the Chapter

An optimization problem involves minimizing a function (called the objective function) of several variables, possibly subject to restrictions on the values of the variables defined by a set of constraint functions. Most functions in the Library are concerned with function minimization only, since the problem of maximizing a given objective function F(x) is equivalent to minimizing F(x)-F(x). Some functions allow you to specify whether you are solving a minimization or maximization problem, carrying out the required transformation of the objective function in the latter case.
In general functions in this chapter find a local minimum of a function ff, that is a point x*x* s.t. for all xx near x* f(x)f(x*)x* f(x)f(x*).
The Chapter E05 contains functions to find the global minimum of a function ff. At a global minimum x* f(x)f(x*)x* f(x)f(x*) for all xx.
The Chapter H contains functions typically regarded as belonging to the field of operations research.
This introduction is only a brief guide to the subject of optimization designed for the casual user. Anyone with a difficult or protracted problem to solve will find it beneficial to consult a more detailed text, such as Gill et al. (1981) or Fletcher (1987).
If you are unfamiliar with the mathematics of the subject you may find some sections difficult at first reading; if so, you should concentrate on Sections [Types of Optimization Problems], [Geometric Representation and Terminology], [Scaling], [Analysis of Computed Results] and [Recommendations on Choice and Use of Available Functions].

Background to the Problems

Types of Optimization Problems

The solution of optimization problems by a single, all-purpose, method is cumbersome and inefficient. Optimization problems are therefore classified into particular categories, where each category is defined by the properties of the objective and constraint functions, as illustrated by some examples below.
Properties of Objective Function Properties of Constraints
Nonlinear Nonlinear
Sums of squares of nonlinear functions Sparse linear
Quadratic Linear
Sums of squares of linear functions Bounds
Linear None
For instance, a specific problem category involves the minimization of a nonlinear objective function subject to bounds on the variables. In the following sections we define the particular categories of problems that can be solved by functions contained in this chapter. Not every category is given special treatment in the current version of the Library; however, the long-term objective is to provide a comprehensive set of functions to solve problems in all such categories.

Unconstrained minimization

In unconstrained minimization problems there are no constraints on the variables. The problem can be stated mathematically as follows:
minimize F(x)
x
minimizexF(x)
where xRnxRn, that is, x = (x1,x2,,xn)T x = (x1,x2,,xn)T .

Nonlinear least squares problems

Special consideration is given to the problem for which the function to be minimized can be expressed as a sum of squared functions. The least squares problem can be stated mathematically as follows:
minimize 
( m )
fTf = fi2(x)
i = 1
,  xRn
x
minimizex {fTf=i=1mfi2(x)} ,  xRn
where the iith element of the mm-vector ff is the function fi(x)fi(x).

Minimization subject to bounds on the variables

These problems differ from the unconstrained problem in that at least one of the variables is subject to a simple bound (or restriction) on its value, e.g., x510x510, but no constraints of a more general form are present.
The problem can be stated mathematically as follows:
minimize F(x),  xRn
x
minimizex F(x),  xRn
subject to lixiuilixiui, for i = 1,2,,ni=1,2,,n.
This format assumes that upper and lower bounds exist on all the variables. By conceptually allowing ui = + ui=+ and li = li=- all the variables need not be restricted.

Minimization subject to linear constraints

A general linear constraint is defined as a constraint function that is linear in more than one of the variables, e.g., 3x1 + 2x243x1+2x24. The various types of linear constraint are reflected in the following mathematical statement of the problem:
minimize F(x),  xRn
x
minimizex F(x),  xRn
subject to the
equality constraints: aiT x = bi aiT x=bi i = 1,2,,m1i=1,2,,m1;
inequality constraints: aiT xbi aiT xbi i = m1 + 1,m1 + 2,,m2i=m1+1,m1+2,,m2;
  aiT xbi aiT xbi i = m2 + 1,m2 + 2,,m3i=m2+1,m2+2,,m3;
range constraints: sj aiT xtj sj aiT xtj i = m3 + 1,m3 + 2,,m4;i=m3+1,m3+2,,m4;
    j = 1,2,,m4m3;j=1,2,,m4-m3;
bounds constraints: lixiuilixiui i = 1,2,,ni=1,2,,n
where each aiai is a vector of length nn; bibi, sjsj and tjtj are constant scalars; and any of the categories may be empty.
Although the bounds on xixi could be included in the definition of general linear constraints, we prefer to distinguish between them for reasons of computational efficiency.
If F(x)F(x) is a linear function, the linearly-constrained problem is termed a linear programming problem (LP); if F(x)F(x) is a quadratic function, the problem is termed a quadratic programming problem (QP). For further discussion of LP and QP problems, including the dual formulation of such problems, see Dantzig (1963).

Minimization subject to nonlinear constraints

A problem is included in this category if at least one constraint function is nonlinear, e.g., x12 + x3 + x420x12+x3+x4-20. The mathematical statement of the problem is identical to that for the linearly-constrained case, except for the addition of the following constraints:
equality constraints: ci(x) = 0ci(x)=0 i = 1,2,,m5i=1,2,,m5;
inequality constraints: ci(x)0ci(x)0 i = m5 + 1,m5 + 2,,m6i=m5+1,m5+2,,m6;
range constraints: vjci(x)wjvjci(x)wj i = m6 + 1,m6 + 2,,m7i=m6+1,m6+2,,m7,
    j = 1,2,,m7m6j=1,2,,m7-m6
where each cici is a nonlinear function; vjvj and wjwj are constant scalars; and any category may be empty. Note that we do not include a separate category for constraints of the form ci(x)0ci(x)0, since this is equivalent to ci(x)0-ci(x)0.
Although the general linear constraints could be included in the definition of nonlinear constraints, again we prefer to distinguish between them for reasons of computational efficiency.
If F(x)F(x) is a nonlinear function, the nonlinearly-constrained problem is termed a nonlinear programming problem (NLP). For further discussion of NLP problems, see Gill et al. (1981) or Fletcher (1987).

Minimization subject to bounds on the objective function

In all of the above problem categories it is assumed that
aF(x)b
aF(x)b
where a = a=- and b = + b=+. Problems in which aa and/or bb are finite can be solved by adding an extra constraint of the appropriate type (i.e., linear or nonlinear) depending on the form of F(x)F(x). Further advice is given in Section [Function Evaluations at Infeasible Points].

Multi-objective optimization

Sometimes a problem may have two or more objective functions which are to be optimized at the same time. Such problems are called multi-object, multi-criteria or multi-attribute optimization. If the constraints are linear and the objectives are all linear then the terminology ‘goal programming’ is also used.
Techniques used in this chapter and in Chapter E05 may be employed to address such problems.

Geometric Representation and Terminology

To illustrate the nature of optimization problems it is useful to consider the following example in two dimensions:
F(x) = ex1(4x12 + 2x22 + 4x1x2 + 2x2 + 1).
F(x)=ex1(4x12+2x22+4x1x2+2x2+1).
(This function is used as the example function in the documentation for the unconstrained functions.)
Figure 1
Figure 1
Figure 1 is a contour diagram of F(x)F(x). The contours labelled F0,F1,,F4F0,F1,,F4 are isovalue contours, or lines along which the function F(x)F(x) takes specific constant values. The point x* = ((1/2),1)Tx*=(12,-1)T is a local unconstrained minimum, that is, the value of F(x*)F(x*) ( = 0=0) is less than at all the neighbouring points. A function may have several such minima. The lowest of the local minima is termed a global minimum. In the problem illustrated in Figure 1, x*x* is the only local minimum. The point xsxs is said to be a saddle point because it is a minimum along the line AB, but a maximum along CD.
If we add the constraint x10x10 (a simple bound) to the problem of minimizing F(x)F(x), the solution remains unaltered. In Figure 1 this constraint is represented by the straight line passing through x1 = 0x1=0, and the shading on the line indicates the unacceptable region (i.e., x1 < 0x1<0). The region in RnRn satisfying the constraints of an optimization problem is termed the feasible region. A point satisfying the constraints is defined as a feasible point.
If we add the nonlinear constraint c1(x) : x1 + x2x1x2(3/2)0c1(x):x1+x2-x1x2-320, represented by the curved shaded line in Figure 1, then x*x* is not a feasible point because c1(x*) < 0c1(x*)<0. The solution of the new constrained problem is xb(1.1825,1.7397)Txb(1.1825,-1.7397)T, the feasible point with the smallest function value (where F(xb)3.0607F(xb)3.0607).

Gradient vector

The vector of first partial derivatives of F(x)F(x) is called the gradient vector, and is denoted by g(x)g(x), i.e.,
g(x) = [(F(x))/(x1),(F(x))/(x2),,(F(x))/(xn)]T.
g(x)=[ F(x) x1 , F(x) x2 ,, F(x) xn ]T.
For the function illustrated in Figure 1,
g(x) =
[ F(x) + ex_1(8x1 + 4x2) ex_1 (4x2 + 4x1 + 2) ]
.
g(x)=[ F(x)+ex1(8x1+ 4x2) ex1 (4x2+ 4x1+ 2) ] .
The gradient vector is of importance in optimization because it must be zero at an unconstrained minimum of any function with continuous first derivatives.

Hessian matrix

The matrix of second partial derivatives of a function is termed its Hessian matrix. The Hessian matrix of F(x)F(x) is denoted by G(x)G(x), and its (i,j)(i,j)th element is given by 2F(x) / xixj2F(x)/xixj. If F(x)F(x) has continuous second derivatives, then G(x)G(x) must be positive definite at any unconstrained minimum of FF.

Jacobian matrix; matrix of constraint normals

In nonlinear least squares problems, the matrix of first partial derivatives of the vector-valued function f(x)f(x) is termed the Jacobian matrix of f(x)f(x) and its (i,j)(i,j)th component is fi / xjfi/xj.
The vector of first partial derivatives of the constraint ci(x)ci(x) is denoted by
ai(x) = [(ci(x))/(x1),(ci(x))/(x2),,(ci(x))/(xn)]T.
ai(x)=[ ci(x) x1 , ci(x) x2 ,, ci(x) xn ]T.
The matrix whose columns are the vectors {ai}{ai} is termed the matrix of constraint normals. At a point x^, the vector ai()ai(x^) is orthogonal (normal) to the isovalue contour of ci(x)ci(x) passing through x^; this relationship is illustrated for a two-dimensional function in Figure 2.
Figure 2
Figure 2
Note that if ci(x)ci(x) is a linear constraint involving aiT x aiT x , then its vector of first partial derivatives is simply the vector aiai.

Sufficient Conditions for a Solution

All nonlinear functions will be assumed to have continuous second derivatives in the neighbourhood of the solution.

Unconstrained minimization

The following conditions are sufficient for the point x*x* to be an unconstrained local minimum of F(x)F(x):
(i) g(x*) = 0g(x*)=0; and
(ii) G(x*)G(x*) is positive definite,
where gg denotes the Euclidean length of gg

Minimization subject to bounds on the variables

At the solution of a bounds-constrained problem, variables which are not on their bounds are termed free variables. If it is known in advance which variables are on their bounds at the solution, the problem can be solved as an unconstrained problem in just the free variables; thus, the sufficient conditions for a solution are similar to those for the unconstrained case, applied only to the free variables.
Sufficient conditions for a feasible point x*x* to be the solution of a bounds-constrained problem are as follows:
(i) g(x*) = 0g-(x*)=0; and
(ii) G(x*)G-(x*) is positive definite; and
(iii) gj(x*) < 0,xj = ujgj(x*)<0,xj=uj; gj(x*) > 0,xj = ljgj(x*)>0,xj=lj,
where g(x)g-(x) is the gradient of F(x)F(x) with respect to the free variables, and G(x)G-(x) is the Hessian matrix of F(x)F(x) with respect to the free variables. The extra condition (iii) ensures that F(x)F(x) cannot be reduced by moving off one or more of the bounds.

Linearly-constrained minimization

For the sake of simplicity, the following description does not include a specific treatment of bounds or range constraints, since the results for general linear inequality constraints can be applied directly to these cases.
At a solution x*x*, of a linearly-constrained problem, the constraints which hold as equalities are called the active or binding constraints. Assume that there are tt active constraints at the solution x*x*, and let A^ denote the matrix whose columns are the columns of AA corresponding to the active constraints, with b^ the vector similarly obtained from bb; then
Tx* = .
A^Tx*=b^.
The matrix ZZ is defined as an n × (nt)n×(n-t) matrix satisfying:
TZ = 0;
ZTZ = I.
A^TZ=0; ZTZ=I.
The columns of ZZ form an orthogonal basis for the set of vectors orthogonal to the columns of A^.
Define
At the solution of a linearly-constrained problem, the projected gradient vector must be zero, which implies that the gradient vector g(x*)g(x*) can be written as a linear combination of the columns of A^, i.e., g(x*) = i = 1tλi * i = λ*g(x*)=i=1tλi*a^i=A^λ*. The scalar λi * λi* is defined as the Lagrange multiplier corresponding to the iith active constraint. A simple interpretation of the iith Lagrange multiplier is that it gives the gradient of F(x)F(x) along the iith active constraint normal; a convenient definition of the Lagrange multiplier vector (although not a recommended method for computation) is:
λ* = (T)1Tg(x*).
λ*=(A^TA^)-1A^Tg(x*).
Sufficient conditions for x*x* to be the solution of a linearly-constrained problem are:
(i) x*x* is feasible, and Tx* = A^Tx*=b^; and
(ii) gZ(x*) = 0gZ(x*)=0, or equivalently, g(x*) = λ*g(x*)=A^λ*; and
(iii) GZ(x*)GZ(x*) is positive definite; and
(iv) λi * > 0λi*>0 if λi * λi* corresponds to a constraint iT x* i a^iT x* b^i ;
λi * < 0λi*<0 if λi * λi* corresponds to a constraint iT x* i a^iT x* b^i .
The sign of λi * λi* is immaterial for equality constraints, which by definition are always active.

Nonlinearly-constrained minimization

For nonlinearly-constrained problems, much of the terminology is defined exactly as in the linearly-constrained case. The set of active constraints at xx again means the set of constraints that hold as equalities at xx, with corresponding definitions of c^ and A^: the vector (x)c^(x) contains the active constraint functions, and the columns of (x)A^(x) are the gradient vectors of the active constraints. As before, ZZ is defined in terms of (x)A^(x) as a matrix such that:
TZ = 0;
ZTZ = I
A^TZ=0; ZTZ=I
where the dependence on xx has been suppressed for compactness.
The projected gradient vector gZ(x)gZ(x) is the vector ZTg(x)ZTg(x). At the solution x*x* of a nonlinearly-constrained problem, the projected gradient must be zero, which implies the existence of Lagrange multipliers corresponding to the active constraints, i.e., g(x*) = (x*)λ*g(x*)=A^(x*)λ*.
The Lagrangian function is given by:
L(x,λ) = F(x)λT(x).
L(x,λ)=F(x)-λTc^(x).
We define gL(x)gL(x) as the gradient of the Lagrangian function; GL(x)GL(x) as its Hessian matrix, and L(x)G^L(x) as its projected Hessian matrix, i.e., L = ZTGLZG^L=ZTGLZ.
Sufficient conditions for x*x* to be the solution of a nonlinearly-constrained problem are:
(i) x*x* is feasible, and (x*) = 0c^(x*)=0; and
(ii) gZ(x*) = 0gZ(x*)=0, or, equivalently, g(x*) = (x*)λ*g(x*)=A^(x*)λ*; and
(iii) L(x*)G^L(x*) is positive definite; and
(iv) λi * > 0λi*>0 if λi * λi* corresponds to a constraint of the form i0c^i0.
The sign of λi * λi* is immaterial for equality constraints, which by definition are always active.
Note that condition (ii) implies that the projected gradient of the Lagrangian function must also be zero at x*x*, since the application of ZTZT annihilates the matrix (x*)A^(x*).

Background to Optimization Methods

All the algorithms contained in this chapter generate an iterative sequence {x(k)}{x (k) } that converges to the solution x*x* in the limit, except for some special problem categories (i.e., linear and quadratic programming). To terminate computation of the sequence, a convergence test is performed to determine whether the current estimate of the solution is an adequate approximation. The convergence tests are discussed in Section [Analysis of Computed Results].
Most of the methods construct a sequence {x(k)}{x (k) } satisfying:
x(k + 1) = x(k) + α(k)p(k),
x (k+1) =x (k) +α (k) p (k) ,
where the vector p(k)p (k)  is termed the direction of search, and α(k)α (k)  is the steplength. The steplength α(k)α (k)  is chosen so that F(x(k + 1)) < F(x(k))F(x (k+1) )<F(x (k) ) and is computed using one of the techniques for one-dimensional optimization referred to in Section [One-dimensional optimization].

One-dimensional optimization

The Library contains two special functions for minimizing a function of a single variable. Both functions are based on safeguarded polynomial approximation. One function requires function evaluations only and fits a quadratic polynomial whilst the other requires function and gradient evaluations and fits a cubic polynomial. See Section 4.1 of Gill et al. (1981).

Methods for unconstrained optimization

The distinctions among methods arise primarily from the need to use varying levels of information about derivatives of F(x)F(x) in defining the search direction. We describe three basic approaches to unconstrained problems, which may be extended to other problem categories. Since a full description of the methods would fill several volumes, the discussion here can do little more than allude to the processes involved, and direct you to other sources for a full explanation.
(a) Newton-type Methods (Modified Newton Methods)
Newton-type methods use the Hessian matrix G(x(k))G(x (k) ), or a finite difference approximation to G(x(k))G(x (k) ), to define the search direction. The functions in the Library either require a function that computes the elements of G(x(k))G(x (k) ) directly, or they approximate G(x(k))G(x (k) ) by finite differences.
Newton-type methods are the most powerful methods available for general problems and will find the minimum of a quadratic function in one iteration. See Sections 4.4 and 4.5.1 of Gill et al. (1981).
(b) Quasi-Newton Methods
Quasi-Newton methods approximate the Hessian G(x(k))G(x(k)) by a matrix B(k)B(k) which is modified at each iteration to include information obtained about the curvature of FF along the current search direction p(k)p(k). Although not as robust as Newton-type methods, quasi-Newton methods can be more efficient because G(x(k))G(x(k)) is not computed directly, or approximated by finite differences. Quasi-Newton methods minimize a quadratic function in nn iterations, where nn is the number of variables. See Section 4.5.2 of Gill et al. (1981).
(c) Conjugate-gradient Methods
Unlike Newton-type and quasi-Newton methods, conjugate-gradient methods do not require the storage of an nn by nn matrix and so are ideally suited to solve large problems. Conjugate-gradient type methods are not usually as reliable or efficient as Newton-type, or quasi-Newton methods. See Section 4.8.3 of Gill et al. (1981).

Methods for nonlinear least squares problems

These methods are similar to those for unconstrained optimization, but exploit the special structure of the Hessian matrix to give improved computational efficiency.
Since
m
F(x) = fi2(x)
i = 1
F(x)=i=1mfi2(x)
the Hessian matrix G(x)G(x) is of the form
G(x) = 2
( m )
J(x)TJ(x) + fi(x)Gi(x)
i = 1
,
G(x) = 2 ( J(x)T J(x) + i=1m fi(x) Gi(x) ) ,
where J(x)J(x) is the Jacobian matrix of f(x)f(x), and Gi(x)Gi(x) is the Hessian matrix of fi(x)fi(x).
In the neighbourhood of the solution, f(x)f(x) is often small compared to J(x)TJ(x) J(x)T J(x)  (for example, when f(x)f(x) represents the goodness-of-fit of a nonlinear model to observed data). In such cases, 2 J(x)T J(x) 2 J(x)T J(x)  may be an adequate approximation to G(x)G(x), thereby avoiding the need to compute or approximate second derivatives of {fi(x)}{fi(x)}. See Section 4.7 of Gill et al. (1981).

Methods for handling constraints

Bounds on the variables are dealt with by fixing some of the variables on their bounds and adjusting the remaining free variables to minimize the function. By examining estimates of the Lagrange multipliers it is possible to adjust the set of variables fixed on their bounds so that eventually the bounds active at the solution should be correctly identified. This type of method is called an active set method. One feature of such methods is that, given an initial feasible point, all approximations x(k)x (k)  are feasible. This approach can be extended to general linear constraints. At a point, xx, the set of constraints which hold as equalities being used to predict, or approximate, the set of active constraints is called the working set.
Nonlinear constraints are more difficult to handle. If at all possible, it is usually beneficial to avoid including nonlinear constraints during the formulation of the problem. The methods currently implemented in the Library handle nonlinearly constrained problems by transforming them into a sequence of quadratic programming problems. A feature of such methods is that x(k)x (k)  is not guaranteed to be feasible except in the limit, and this is certainly true of the functions currently in the Library. See Chapter 6, particularly Sections 6.4 and 6.5, of Gill et al. (1981).
Anyone interested in a detailed description of methods for optimization should consult the references.

Methods for handling multi-objective optimization

Suppose we have objective functions fi(x)fi(x), i > 1i>1, all of which we need to minimize at the same time. There are two main approaches to this problem:
(a) Combine the individual objectives into one composite objective. Typically this might be a weighted sum of the objectives, e.g.,
w1 f1(x) + w2 f2(x) + + wn fn(x)
w1 f1(x) + w2 f2(x) + + wn fn(x)
Here you choose the weights to express the relative importance of the corresponding objective. Ideally each of the fi(x)fi(x) should be of comparable size at a solution.
(b) Order the objectives in order of importance. Suppose fifi are ordered such that fi(x)fi(x) is more important than fi + 1(x)fi+1(x), for i = 1,2,,n1i=1,2,,n-1. Then in the lexicographical approach to multi-objective optimization a sequence of subproblems are solved. Firstly solve the problem for objective function f1(x)f1(x) and denote by r1r1 the value of this minimum. If (i1)(i-1) subproblems have been solved with results ri1ri-1 then subproblem ii becomes min (fi(x))min(fi(x)) subject to rkfk(x)rkrkfk(x)rk, for k = 1,2,,i1k=1,2,,i-1 plus the other constraints.
Clearly the bounds on fkfk might be relaxed at your discretion.
In general, if NAG functions from the Chapter E04 are used then only local minima are found. This means that a better solution to an individual objective might be found without worsening the optimal solutions to the other objectives. Ideally you seek a Pareto solution; one in which an improvement in one objective can only be achieved by a worsening of another objective.
To obtain a Pareto solution functions from Chapter E05 might be used or, alternatively, a pragmatic attempt to derive a global minimum might be tried (see nag_glopt_nlp_multistart_sqp (e05uc)). In this approach a variety of different minima are computed for each subproblem by starting from a range of different starting points. The best solution achieved is taken to be the global minimum. The more starting points chosen the greater confidence you might have in the computed global minimum.

Scaling

Scaling (in a broadly defined sense) often has a significant influence on the performance of optimization methods. Since convergence tolerances and other criteria are necessarily based on an implicit definition of ‘small’ and ‘large’, problems with unusual or unbalanced scaling may cause difficulties for some algorithms. Although there are currently no user-callable scaling functions in the Library, scaling is automatically performed by default in the functions which solve sparse LP, QP or NLP problems and in some newer dense solver functions. The following sections present some general comments on problem scaling.

Transformation of variables

One method of scaling is to transform the variables from their original representation, which may reflect the physical nature of the problem, to variables that have certain desirable properties in terms of optimization. It is generally helpful for the following conditions to be satisfied:
(i) the variables are all of similar magnitude in the region of interest;
(ii) a fixed change in any of the variables results in similar changes in F(x)F(x). Ideally, a unit change in any variable produces a unit change in F(x)F(x);
(iii) the variables are transformed so as to avoid cancellation error in the evaluation of F(x)F(x).
Normally, you should restrict yourself to linear transformations of variables, although occasionally nonlinear transformations are possible. The most common such transformation (and often the most appropriate) is of the form
xnew = Dxold,
xnew=Dxold,
where DD is a diagonal matrix with constant coefficients. Our experience suggests that more use should be made of the transformation
xnew = Dxold + v,
xnew=Dxold+v,
where vv is a constant vector.
Consider, for example, a problem in which the variable x3x3 represents the position of the peak of a Gaussian curve to be fitted to data for which the extreme values are 150150 and 170170; therefore x3x3 is known to lie in the range 150150170170. One possible scaling would be to define a new variable x3x-3, given by
x3 = (x3)/170.
x-3=x3170.
A better transformation, however, is given by defining x3x-3 as
x3 = (x3160)/10.
x-3=x3-16010.
Frequently, an improvement in the accuracy of evaluation of F(x)F(x) can result if the variables are scaled before the functions to evaluate F(x)F(x) are coded. For instance, in the above problem just mentioned of Gaussian curve-fitting, x3x3 may always occur in terms of the form (x3xm)(x3-xm), where xmxm is a constant representing the mean peak position.

Scaling the objective function

The objective function has already been mentioned in the discussion of scaling the variables. The solution of a given problem is unaltered if F(x)F(x) is multiplied by a positive constant, or if a constant value is added to F(x)F(x). It is generally preferable for the objective function to be of the order of unity in the region of interest; thus, if in the original formulation F(x)F(x) is always of the order of 10 + 510+5 (say), then the value of F(x)F(x) should be multiplied by 10510-5 when evaluating the function within an optimization function. If a constant is added or subtracted in the computation of F(x)F(x), usually it should be omitted, i.e., it is better to formulate F(x)F(x) as x12 + x22x12+x22 rather than as x12 + x22 + 1000x12+x22+1000 or even x12 + x22 + 1x12+x22+1. The inclusion of such a constant in the calculation of F(x)F(x) can result in a loss of significant figures.

Scaling the constraints

A ‘well scaled’ set of constraints has two main properties. Firstly, each constraint should be well-conditioned with respect to perturbations of the variables. Secondly, the constraints should be balanced with respect to each other, i.e., all the constraints should have ‘equal weight’ in the solution process.
The solution of a linearly- or nonlinearly-constrained problem is unaltered if the iith constraint is multiplied by a positive weight wiwi. At the approximation of the solution determined by a Library function, any active linear constraints will (in general) be satisfied ‘exactly’ (i.e., to within the tolerance defined by machine precision) if they have been properly scaled. This is in contrast to any active nonlinear constraints, which will not (in general) be satisfied ‘exactly’ but will have ‘small’ values (for example, 1(x*) = 108c^1(x*)=10-8, 2(x*) = 106c^2(x*)=-10 -6, and so on). In general, this discrepancy will be minimized if the constraints are weighted so that a unit change in xx produces a similar change in each constraint.
A second reason for introducing weights is related to the effect of the size of the constraints on the Lagrange multiplier estimates and, consequently, on the active set strategy. This means that different sets of weights may cause an algorithm to produce different sequences of iterates. Additional discussion is given in Gill et al. (1981).

Analysis of Computed Results

Convergence criteria

The convergence criteria inevitably vary from function to function, since in some cases more information is available to be checked (for example, is the Hessian matrix positive definite?), and different checks need to be made for different problem categories (for example, in constrained minimization it is necessary to verify whether a trial solution is feasible). Nonetheless, the underlying principles of the various criteria are the same; in non-mathematical terms, they are:
(i) is the sequence {x(k)}{x (k) } converging?
(ii) is the sequence {F(k)}{F (k) } converging?
(iii) are the necessary and sufficient conditions for the solution satisfied?
The decision as to whether a sequence is converging is necessarily speculative. The criterion used in the present functions is to assume convergence if the relative change occurring between two successive iterations is less than some prescribed quantity. Criterion (iii) is the most reliable but often the conditions cannot be checked fully because not all the required information may be available.

Checking results

Little a priori guidance can be given as to the quality of the solution found by a nonlinear optimization algorithm, since no guarantees can be given that the methods will not fail. Therefore, you should always check the computed solution even if the function reports success. Frequently a ‘solution’ may have been found even when the function does not report a success. The reason for this apparent contradiction is that the function needs to assess the accuracy of the solution. This assessment is not an exact process and consequently may be unduly pessimistic. Any ‘solution’ is in general only an approximation to the exact solution, and it is possible that the accuracy you have specified is too stringent.
Further confirmation can be sought by trying to check whether or not convergence tests are almost satisfied, or whether or not some of the sufficient conditions are nearly satisfied. When it is thought that a function has returned a nonzero value of ifail only because the requirements for ‘success’ were too stringent it may be worth restarting with increased convergence tolerances.
For nonlinearly-constrained problems, check whether the solution returned is feasible, or nearly feasible; if not, the solution returned is not an adequate solution.
Confidence in a solution may be increased by resolving the problem with a different initial approximation to the solution. See Section 8.3 of Gill et al. (1981) for further information.

Monitoring progress

Many of the functions in the chapter have facilities to allow you to monitor the progress of the minimization process, and you are encouraged to make use of these facilities. Monitoring information can be a great aid in assessing whether or not a satisfactory solution has been obtained, and in indicating difficulties in the minimization problem or in the ability of the function to cope with the problem.
The behaviour of the function, the estimated solution and first derivatives can help in deciding whether a solution is acceptable and what to do in the event of a return with a nonzero value of ifail.

Confidence intervals for least squares solutions

When estimates of the parameters in a nonlinear least squares problem have been found, it may be necessary to estimate the variances of the parameters and the fitted function. These can be calculated from the Hessian of F(x)F(x) at the solution.
In many least squares problems, the Hessian is adequately approximated at the solution by G = 2JTJG=2JTJ (see Section [Methods for nonlinear least squares problems]). The Jacobian, JJ, or a factorization of JJ is returned by all the comprehensive least squares functions and, in addition, a function is available in the Library to estimate variances of the parameters following the use of most of the nonlinear least squares functions, in the case that G = 2JTJG=2JTJ is an adequate approximation.
Let HH be the inverse of GG, and SS be the sum of squares, both calculated at the solution xx-; an unbiased estimate of the variance of the iith parameter xixi is
varxi = (2S)/(mn)Hii
varx-i=2S m-n Hii
and an unbiased estimate of the covariance of xix-i and xjx-j is
covar(xi,xj) = (2S)/(mn)Hij.
covar(x-i,x-j)=2S m-n Hij.
If x*x* is the true solution, then the 100(1β)%100(1-β)% confidence interval on xx- is
xisqrt(varxi) . t(1β / 2,mn) < xi * < xi + sqrt(varxi) . t(1β / 2,mn),  i = 1,2,,n
x-i-varx-i. t(1-β/2,m-n)<xi*<x-i+varx-i.t(1-β/2,m-n),  i=1,2,,n
where t(1β / 2,mn)t(1-β/2,m-n) is the 100(1β) / 2100(1-β)/2 percentage point of the tt-distribution with mnm-n degrees of freedom.
In the majority of problems, the residuals fifi, for i = 1,2,,mi=1,2,,m, contain the difference between the values of a model function φ(z,x)ϕ(z,x) calculated for mm different values of the independent variable zz, and the corresponding observed values at these points. The minimization process determines the parameters, or constants xx, of the fitted function φ(z,x)ϕ(z,x). For any value, zz-, of the independent variable zz, an unbiased estimate of the variance of φϕ is
nn
varφ = (2S)/(mn)[(φ)/(xi)]z[(φ)/(xj)]zHij.
i = 1j = 1
varϕ=2S m-n i=1n j=1n [ ϕ xi ] z- [ ϕ xj ] z- Hij.
The 100(1β)%100(1-β)% confidence interval on FF at the point zz- is
φ(z,x)sqrt(varφ) . t(β / 2,mn) < φ(z,x*) < φ(z,x) + sqrt(varφ) . t(β / 2,mn).
ϕ(z-,x-)-varϕ.t(β/2,m-n)<ϕ(z-,x*)<ϕ(z-,x-)+varϕ.t(β/2,m-n).
For further details on the analysis of least squares solutions see Bard (1974) and Wolberg (1967).

Recommendations on Choice and Use of Available Functions

The choice of function depends on several factors: the type of problem (unconstrained, etc.); the level of derivative information available (function values only, etc.); your experience (there are easy-to-use versions of some functions); whether or not storage is a problem; whether or not the function is to be used in a multithreaded environment; and whether computational time has a high priority. Not all choices are catered for in the current version of the Library.

Easy-to-use and Comprehensive Functions

Many functions appear in the Library in two forms: a comprehensive form and an easy-to-use form. The objective in the easy-to-use forms is to make the function simple to use by including in the calling sequence only those parameters absolutely essential to the definition of the problem, as opposed to parameters relevant to the solution method. If you are an experienced user the comprehensive functions have additional parameters which enable you to improve their efficiency by ‘tuning’ the method to a particular problem. If you are a casual or inexperienced user, this feature is of little value and may in some cases cause a failure because of a poor choice of some parameters.
In the easy-to-use functions, these extra parameters are determined either by fixing them at a known safe and reasonably efficient value, or by an auxiliary function which generates a ‘good’ value automatically.
For functions introduced since Mark 12 of the Library a different approach has been adopted towards the choice of easy-to-use and comprehensive functions. The optimization function has an easy-to-use parameter list, but additional parameters may be changed from their default values by calling an ‘option’ setting function before the call to the main optimization function. This approach has the advantages of allowing the options to be given in the form of keywords and requiring only those options that are to be different from their default values to be set.

Reverse Communication Functions

Most of the functions in this chapter are called just once in order to compute the minimum of a given objective function subject to a set of constraints on the variables. The objective function and nonlinear constraints (if any) are specified by you and written as functions to a very rigid format described in the relevant function document.
For the majority of applications this is the simplest and most convenient usage. Sometimes however this approach can be restrictive:
(i) when the required format of the function does not allow useful information to be passed conveniently to and from your calling program;
(ii) when the minimization function is being called from another computer language, such as Visual Basic, which does not fully support procedure arguments in a way that is compatible with the Library.
A way around these problems is to utilize reverse communication functions. Instead of performing complete optimizations, these functions perform one step in the solution process before returning to the calling program with an appropriate flag (irevcm) set. The value of irevcm determines whether the minimization process has finished or whether fresh information is required. In the latter case you calculate this information (in the form of a vector or as a scalar, as appropriate) and re-enter the reverse communication function with the information contained in appropriate arguments. Thus you have the responsibility for providing the iterative loop in the minimization process, but as compensation, you have an extremely flexible and basic user-interface to the reverse communication function.
The only reverse communication functions in this chapter are nag_opt_nlp1_rcomm (e04uf), which solve dense NLP problems using a sequential quadratic programming method.

Service Functions

One of the most common errors in the use of optimization functions is that user-supplied functions do not evaluate the relevant partial derivatives correctly. Because exact gradient information normally enhances efficiency in all areas of optimization, you are encouraged to provide analytical derivatives whenever possible. However, mistakes in the computation of derivatives can result in serious and obscure run-time errors. Consequently, service functions are provided to perform an elementary check on the gradients you supplied. These functions are inexpensive to use in terms of the number of calls they require to user-supplied functions.
The appropriate checking functions are as follows:
Minimization function Checking function(s)
nag_opt_bounds_mod_deriv_comp (e04kd) nag_opt_check_deriv (e04hc)
nag_opt_bounds_mod_deriv2_comp (e04lb) nag_opt_check_deriv (e04hc) and nag_opt_check_deriv2 (e04hd)
nag_opt_lsq_uncon_quasi_deriv_comp (e04gb) nag_opt_lsq_check_deriv (e04ya)
nag_opt_lsq_uncon_mod_deriv_comp (e04gd) nag_opt_lsq_check_deriv (e04ya)
nag_opt_lsq_uncon_mod_deriv2_comp (e04he) nag_opt_lsq_check_deriv (e04ya) and nag_opt_lsq_check_hessian (e04yb)
It should be noted that functions nag_opt_nlp1_rcomm (e04uf), nag_opt_lsq_gencon_deriv (e04us), nag_opt_nlp2_sparse_solve (e04vh) and nag_opt_nlp2_solve (e04wd) each incorporate a check on the gradients being supplied. This involves verifying the gradients at the first point that satisfies the linear constraints and bounds. There is also an option to perform a more reliable (but more expensive) check on the individual gradient elements being supplied. Note that the checks are not infallible.
A second type of service function computes a set of finite differences to be used when approximating first derivatives. Such differences are required as input parameters by some functions that use only function evaluations.
nag_opt_lsq_uncon_covariance (e04yc) estimates selected elements of the variance-covariance matrix for the computed regression parameters following the use of a nonlinear least squares function.
nag_opt_estimate_deriv (e04xa) estimates the gradient and Hessian of a function at a point, given a function to calculate function values only, or estimates the Hessian of a function at a point, given a function to calculate function and gradient values.

Function Evaluations at Infeasible Points

All the functions for constrained problems will ensure that any evaluations of the objective function occur at points which approximately satisfy any simple bounds or linear constraints. Satisfaction of such constraints is only approximate because functions which estimate derivatives by finite differences may require function evaluations at points which just violate such constraints even though the current iteration just satisfies them.
There is no attempt to ensure that the current iteration satisfies any nonlinear constraints. If you wish to prevent your objective function being evaluated outside some known region (where it may be undefined or not practically computable), you may try to confine the iteration within this region by imposing suitable simple bounds or linear constraints (but beware as this may create new local minima where these constraints are active).
Note also that some functions allow you to return the parameter (iflag or mode) with a negative value to force an immediate clean exit from the minimization function when the objective function (or nonlinear constraints where appropriate) cannot be evaluated.

Related Problems

Apart from the standard types of optimization problem, there are other related problems which can be solved by functions in this or other chapters of the Library.
nag_mip_ilp_dense (h02bb) solves dense integer LP problems, nag_mip_iqp_dense (h02cb) solves dense integer QP problems, nag_mip_iqp_sparse (h02ce) solves sparse integer QP problems and nag_mip_transportation (h03ab) solves a special type of such problem known as a ‘transportation’ problem.
Several functions in Chapters F04 and F08 solve linear least squares problems, i.e., minimizei = 1mri(x)2minimizei=1mri (x) 2 where ri(x) = bij = 1naijxjri(x)=bi-j=1naijxj.
nag_fit_glin_l1sol (e02ga) solves an overdetermined system of linear equations in the l1l1 norm, i.e., minimizes i = 1m|ri(x)|i=1m|ri(x)|, with riri as above, and nag_fit_glinc_l1sol (e02gb) solves the same problem subject to linear inequality constraints.
nag_fit_glin_linf (e02gc) solves an overdetermined system of linear equations in the ll norm, i.e., minimizes maxi |ri(x)|maxi|ri(x)|, with riri as above.
Chapter E05 contains functions for global minimization.
Section [Methods for handling multi-objective optimization] describes how a multi-objective optimization problem might be addressed using functions from this chapter and from Chapter E05.

Choosing Between Variant Functions for Some Problems

As evidenced by the wide variety of functions available in Chapter E04, it is clear that no single algorithm can solve all optimization problems. It is important to try to match the problem to the most suitable function, and that is what the decision trees in Section [Decision Trees] help to do.
Sometimes in Chapter E04 more than one function is available to solve precisely the same minimization problem. Thus, for example, the general nonlinear programming functions nag_opt_nlp1_solve (e04uc) and nag_opt_nlp2_solve (e04wd) are based on similar methods. Experience shows that although both functions can usually solve the same problem and get similar results, sometimes one function will be faster, sometimes one might find a different local minimum to the other, or, in difficult cases, one function may obtain a solution when the other one fails.
After using one of these functions, if the results obtained are unacceptable for some reason, it may be worthwhile trying the other function instead. In the absence of any other information, in the first instance you are recommended to try using nag_opt_nlp1_solve (e04uc), and if that proves unsatisfactory, try using nag_opt_nlp2_solve (e04wd). Although the algorithms used are very similar, the two functions each have slightly different optional arguments which may allow the course of the computation to be altered in different ways.
Other pairs of functions which solve the same kind of problem are nag_opt_qpconvex1_sparse_solve (e04nk) or nag_opt_qpconvex2_sparse_solve (e04nq), for sparse quadratic or linear programming problems, and nag_opt_nlp1_sparse_solve (e04ug) or nag_opt_nlp2_sparse_solve (e04vh), for sparse nonlinear programming. In these cases the argument lists are not so similar as nag_opt_nlp1_solve (e04uc) or nag_opt_nlp2_solve (e04wd), but the same considerations apply.

Decision Trees

Tree 1: Selection chart for unconstrained problems

Only one variable? _
yes
Are first derivatives available? _
yes
nag_opt_one_var_deriv (e04bb)
| no
|
| nag_opt_one_var_func (e04ab)
no
|
Does the function have many discontinuities? _
yes
nag_opt_uncon_simplex (e04cb)
no
|
Is store size a problem? _
yes
nag_opt_uncon_conjgrd_comp (e04dg)
no
|
Is the function a sum of squares? _
yes
Are you an experienced user? _
yes
Are first derivatives available? _
yes
Are second derivatives available? _
yes
nag_opt_lsq_uncon_mod_deriv2_comp (e04he)
| | | no
|
| | | Are there more than ten variables? _
yes
nag_opt_lsq_uncon_quasi_deriv_comp (e04gb)
| | | no
|
| | | nag_opt_lsq_uncon_mod_deriv_comp (e04gd)
| | no
|
| | nag_opt_lsq_uncon_mod_func_comp (e04fc)
| no
|
| Are first derivatives available? _
yes
Are second derivatives available? _
yes
nag_opt_lsq_uncon_mod_deriv2_easy (e04hy)
| | no
|
| | Are there more than ten variables? _
yes
nag_opt_lsq_uncon_quasi_deriv_easy (e04gy)
| | no
|
| | nag_opt_lsq_uncon_mod_deriv_easy (e04gz)
| no
|
| nag_opt_lsq_uncon_mod_func_easy (e04fy)
no
|
Are you an experienced user? _
yes
Are first derivatives available? _
yes
Are second derivatives available? _
yes
nag_opt_bounds_mod_deriv2_comp (e04lb)
| | no
|
| | Is computational cost critical? _
yes
nag_opt_nlp1_solve (e04uc), nag_opt_nlp1_rcomm (e04uf), nag_opt_nlp1_sparse_solve (e04ug), nag_opt_nlp2_sparse_solve (e04vh) or nag_opt_nlp2_solve (e04wd)
| | no
|
| | nag_opt_bounds_mod_deriv_comp (e04kd)
| no
|
| nag_opt_nlp1_solve (e04uc), nag_opt_nlp1_rcomm (e04uf), nag_opt_nlp1_sparse_solve (e04ug), nag_opt_nlp2_sparse_solve (e04vh) or nag_opt_nlp2_solve (e04wd)
no
|
Are first derivatives available? _
yes
Are second derivatives available? _
yes
nag_opt_bounds_mod_deriv2_easy (e04ly)
| no
|
| Is computational cost critical? _
yes
nag_opt_bounds_quasi_deriv_easy (e04ky)
| no
|
| nag_opt_bounds_mod_deriv_easy (e04kz)
no
|
nag_opt_bounds_quasi_func_easy (e04jy)

Tree 2: Selection chart for bound-constrained, linearly-constrained and nonlinearly-constrained problems

Are there any nonlinear constraints? _
yes
Is the objective function a sum of squares? (A least squares problem) _
yes
nag_opt_lsq_gencon_deriv (e04us)
| no
|
| Are the constraints sparse? _
yes
nag_opt_nlp1_sparse_solve (e04ug) or nag_opt_nlp2_sparse_solve (e04vh)
| no
|
| nag_opt_nlp1_solve (e04uc), nag_opt_nlp1_rcomm (e04uf) or nag_opt_nlp2_solve (e04wd)
no
|
Is the objective function linear? (An LP problem) _
yes
See Tree 3
no
|
Is the objective function quadratic? (A QPQP or least squares problem) _
yes
Is the problem a least squares problem? _
yes
Are the constraints simple bounds? _
yes
nag_bnd_lin_lsq (e04pc)
| | no
|
| | nag_opt_lsq_lincon_solve (e04nc)
| no
|
| See Tree 4
no
|
Is the objective function a sum of squares? (A least squares problem) _
yes
nag_opt_lsq_gencon_deriv (e04us)
no
|
Are the constraints simple bounds? _
yes
Are you an experienced user? _
yes
Are first derivatives available? _
yes
Are second derivatives available? _
yes
nag_opt_bounds_mod_deriv2_comp (e04lb)
| | | no
|
| | | nag_opt_bounds_mod_deriv_comp (e04kd), nag_opt_nlp1_solve (e04uc), nag_opt_nlp1_rcomm (e04uf), nag_opt_nlp1_sparse_solve (e04ug) or nag_opt_nlp2_sparse_solve (e04vh)
| | no
|
| | nag_opt_nlp1_solve (e04uc), nag_opt_nlp1_rcomm (e04uf), nag_opt_nlp1_sparse_solve (e04ug), nag_opt_nlp2_sparse_solve (e04vh) or nag_opt_nlp2_solve (e04wd)
| no
|
| Are first derivatives available? _
yes
Are second derivatives available? _
yes
nag_opt_bounds_mod_deriv2_easy (e04ly)
| | no
|
| | Is computational cost critical? _
yes
nag_opt_bounds_quasi_deriv_easy (e04ky)
| | no
|
| | nag_opt_bounds_mod_deriv_easy (e04kz)
| no
|
| nag_opt_bounds_bobyqa_func (e04jc) or nag_opt_bounds_quasi_func_easy (e04jy)
no
|
nag_opt_nlp1_solve (e04uc), nag_opt_nlp1_rcomm (e04uf), nag_opt_nlp1_sparse_solve (e04ug) or nag_opt_nlp2_sparse_solve (e04vh)

Tree 3: Linear programming

Is the objective function linear (an LP problem) and is the linear constraint matrix sparse? _
yes
nag_opt_qpconvex1_sparse_solve (e04nk), nag_opt_qpconvex2_sparse_solve (e04nq), nag_opt_nlp1_sparse_solve (e04ug) or nag_opt_nlp2_sparse_solve (e04vh)
no
|
nag_opt_lp_solve (e04mf)

Tree 4: Quadratic programming

Is the linear constraint matrix sparse? _
yes
nag_opt_qpconvex1_sparse_solve (e04nk), nag_opt_qpconvex2_sparse_solve (e04nq), nag_opt_nlp1_sparse_solve (e04ug) or nag_opt_nlp2_sparse_solve (e04vh)
no
|
Is the problem a convex QPQP problem? _
yes
nag_opt_lsq_lincon_solve (e04nc)
no
|
nag_opt_qp_dense_solve (e04nf)

Functionality Index

Constrained minimum of a sum of squares, nonlinear constraints, 
    using function values and optionally first derivatives, sequential QP method, 
        dense nag_opt_lsq_gencon_deriv (e04us)
Convex QP problem or linearly-constrained linear least squares problem (dense) nag_opt_lsq_lincon_solve (e04nc)
Linear least squares with bounds on the variables nag_bnd_lin_lsq (e04pc)
Linear programming (LP) problem (dense) nag_opt_lp_solve (e04mf)
LP or QP problem (sparse) nag_opt_qpconvex1_sparse_solve (e04nk)
LP or QP problem (sparse) (recommended – see Section [Choosing Between Variant s for Some Problems]) nag_opt_qpconvex2_sparse_solve (e04nq)
Minimum, function of one variable, 
    using first derivative nag_opt_one_var_deriv (e04bb)
    using function values only nag_opt_one_var_func (e04ab)
Minimum, function of several variables, nonlinear constraints, 
    using function values and optionally first derivatives, sequential QP method, 
        dense nag_opt_nlp2_solve (e04wd)
        dense (recommended – see Section [Choosing Between Variant s for Some Problems]) nag_opt_nlp1_solve (e04uc)
        sparse nag_opt_nlp2_sparse_solve (e04vh)
        sparse (recommended – see Section [Choosing Between Variant s for Some Problems]) nag_opt_nlp1_sparse_solve (e04ug)
Minimum, function of several variables, nonlinear constraints (comprehensive), 
    using function values and optionally first derivatives, sequential QP method, 
        reverse communication (dense) nag_opt_nlp1_rcomm (e04uf)
Minimum, function of several variables, simple bounds, 
    using first and second derivatives, modified Newton algorithm nag_opt_bounds_mod_deriv2_comp (e04lb)
Minimum, function of several variables, simple bounds (comprehensive), 
    using first derivatives, modified Newton algorithm nag_opt_bounds_mod_deriv_comp (e04kd)
Minimum, function of several variables, simple bounds (easy-to-use), 
    using first and second derivatives, modified Newton algorithm nag_opt_bounds_mod_deriv2_easy (e04ly)
    using first derivatives, 
        modified Newton algorithm nag_opt_bounds_mod_deriv_easy (e04kz)
        quasi-Newton algorithm nag_opt_bounds_quasi_deriv_easy (e04ky)
    using function values only, by quadratic approximation nag_opt_bounds_bobyqa_func (e04jc)
    using function values only, quasi-Newton algorithm nag_opt_bounds_quasi_func_easy (e04jy)
Quadratic programming (QP) problem (dense) nag_opt_qp_dense_solve (e04nf)
Service functions, 
    check user's function for calculating, 
        first derivatives of function nag_opt_check_deriv (e04hc)
        Hessian of a sum of squares nag_opt_lsq_check_hessian (e04yb)
        Jacobian of first derivatives nag_opt_lsq_check_deriv (e04ya)
        second derivatives of function nag_opt_check_deriv2 (e04hd)
    convert MPS data file defining LP or QP problem to format required by nag_opt_qpconvex2_sparse_solve (e04nq) (recommended) nag_opt_miqp_mps_read (e04mx)
    covariance matrix for nonlinear least squares problem nag_opt_lsq_uncon_covariance (e04yc)
    determine Jacobian sparsity structure before a call of nag_opt_nlp2_sparse_solve (e04vh) nag_opt_nlp2_sparse_jacobian (e04vj)
    estimate gradient and/or Hessian of a function nag_opt_estimate_deriv (e04xa)
    initialization function for, 
         (e04dg) (e04mf) (e04nc) (e04nf) (e04uf) (e04ug) and  (e04us) 
            nag_opt_nlp1_rcomm (e04uf) nag_opt_init (e04wb)
        nag_opt_qpconvex2_sparse_solve (e04nq) nag_opt_qpconvex2_sparse_init (e04np)
        nag_opt_nlp2_sparse_solve (e04vh) nag_opt_nlp2_sparse_init (e04vg)
        nag_opt_nlp2_solve (e04wd) nag_opt_nlp2_init (e04wc)
    retrieve integer optional parameter values used by, 
        nag_opt_qpconvex2_sparse_solve (e04nq) nag_opt_qpconvex2_sparse_option_integer_get (e04nx)
        nag_opt_nlp2_sparse_solve (e04vh) nag_opt_nlp2_sparse_option_integer_get (e04vr)
        nag_opt_nlp2_solve (e04wd) nag_opt_nlp2_option_integer_get (e04wk)
    retrieve real optional parameter values used by, 
        nag_opt_qpconvex2_sparse_solve (e04nq) nag_opt_qpconvex2_sparse_option_double_get (e04ny)
        nag_opt_nlp2_sparse_solve (e04vh) nag_opt_nlp2_sparse_option_double_get (e04vs)
        nag_opt_nlp2_solve (e04wd) nag_opt_nlp2_option_double_get (e04wl)
    supply integer optional parameter values to, 
        nag_opt_qpconvex2_sparse_solve (e04nq) nag_opt_qpconvex2_sparse_option_integer_set (e04nt)
        nag_opt_nlp2_sparse_solve (e04vh) nag_opt_nlp2_sparse_option_integer_set (e04vm)
        nag_opt_nlp2_solve (e04wd) nag_opt_nlp2_option_integer_set (e04wg)
    supply optional parameter values to, 
        nag_opt_uncon_conjgrd_comp (e04dg) nag_opt_uncon_conjgrd_option_string (e04dk)
        nag_opt_lp_solve (e04mf) nag_opt_lp_option_string (e04mh)
        nag_opt_lsq_lincon_solve (e04nc) nag_opt_lsq_lincon_option_string (e04ne)
        nag_opt_qp_dense_solve (e04nf) nag_opt_qp_dense_option_string (e04nh)
        nag_opt_qpconvex1_sparse_solve (e04nk) nag_opt_qpconvex1_sparse_option_string (e04nm)
        nag_opt_qpconvex2_sparse_solve (e04nq) nag_opt_qpconvex2_sparse_option_string (e04ns)
        nag_opt_nlp1_solve (e04uc) nag_opt_nlp1_option_string (e04ue)
        nag_opt_nlp1_sparse_solve (e04ug) nag_opt_nlp1_sparse_option_string (e04uj)
        nag_opt_lsq_gencon_deriv (e04us) nag_opt_lsq_gencon_deriv_option_string (e04ur)
        nag_opt_nlp2_sparse_solve (e04vh) nag_opt_nlp2_sparse_option_string (e04vl)
        nag_opt_nlp2_solve (e04wd) nag_opt_nlp2_option_string (e04wf)
    supply real optional parameter values to, 
        nag_opt_qpconvex2_sparse_solve (e04nq) nag_opt_qpconvex2_sparse_option_double_set (e04nu)
        nag_opt_nlp2_sparse_solve (e04vh) nag_opt_nlp2_sparse_option_double_set (e04vn)
        nag_opt_nlp2_solve (e04wd) nag_opt_nlp2_option_double_set (e04wh)
Unconstrained minimum, function of several variables, 
    using first derivatives, pre-conditioned conjugate gradient algorithm nag_opt_uncon_conjgrd_comp (e04dg)
    using function values only, simplex algorithm nag_opt_uncon_simplex (e04cb)
Unconstrained minimum of a sum of squares (comprehensive): 
    using first derivatives, 
        combined Gauss–Newton and modified Newton algorithm nag_opt_lsq_uncon_mod_deriv_comp (e04gd)
        combined Gauss–Newton and quasi-Newton algorithm nag_opt_lsq_uncon_quasi_deriv_comp (e04gb)
    using function values only, 
        combined Gauss–Newton and modified Newton algorithm nag_opt_lsq_uncon_mod_func_comp (e04fc)
    using second derivatives, 
        combined Gauss–Newton and modified Newton algorithm nag_opt_lsq_uncon_mod_deriv2_comp (e04he)
Unconstrained minimum of a sum of squares (easy-to-use): 
    using first derivatives, 
        combined Gauss–Newton and modified Newton algorithm nag_opt_lsq_uncon_mod_deriv_easy (e04gz)
        combined Gauss–Newton and quasi-Newton algorithm nag_opt_lsq_uncon_quasi_deriv_easy (e04gy)
    using function values only, 
        combined Gauss–Newton and modified Newton algorithm nag_opt_lsq_uncon_mod_func_easy (e04fy)
    using second derivatives, 
        combined Gauss–Newton and modified Newton algorithm nag_opt_lsq_uncon_mod_deriv2_easy (e04hy)

References

Bard Y (1974) Nonlinear Parameter Estimation Academic Press
Dantzig G B (1963) Linear Programming and Extensions Princeton University Press
Fletcher R (1987) Practical Methods of Optimization (2nd Edition) Wiley
Gill P E and Murray W (ed.) (1974) Numerical Methods for Constrained Optimization Academic Press
Gill P E, Murray W and Wright M H (1981) Practical Optimization Academic Press
Murray W (ed.) (1972) Numerical Methods for Unconstrained Optimization Academic Press
Wolberg J R (1967) Prediction Analysis Van Nostrand

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2013