e05jb is designed to find the global minimum or maximum of an arbitrary function, subject to simple boundconstraints using a multilevel coordinate search method. Derivatives are not required, but convergence is only guaranteed if the objective function is continuous in a neighbourhood of a global optimum. It is not intended for large problems.
The initialization method (E05JAF not in this release) must have been called before calling e05jb.
Syntax
C# 

public static void e05jb( int n, E05..::..E05JB_OBJFUN objfun, int ibound, int iinit, double[] bl, double[] bu, double[,] list, int[] numpts, int[] initpt, E05..::..E05JB_MONIT monit, double[] x, out double obj, E05..::..e05jbOptions options, out int ifail ) 
Visual Basic 

Public Shared Sub e05jb ( _ n As Integer, _ objfun As E05..::..E05JB_OBJFUN, _ ibound As Integer, _ iinit As Integer, _ bl As Double(), _ bu As Double(), _ list As Double(,), _ numpts As Integer(), _ initpt As Integer(), _ monit As E05..::..E05JB_MONIT, _ x As Double(), _ <OutAttribute> ByRef obj As Double, _ options As E05..::..e05jbOptions, _ <OutAttribute> ByRef ifail As Integer _ ) 
Visual C++ 

public: static void e05jb( int n, E05..::..E05JB_OBJFUN^ objfun, int ibound, int iinit, array<double>^ bl, array<double>^ bu, array<double,2>^ list, array<int>^ numpts, array<int>^ initpt, E05..::..E05JB_MONIT^ monit, array<double>^ x, [OutAttribute] double% obj, E05..::..e05jbOptions^ options, [OutAttribute] int% ifail ) 
F# 

static member e05jb : n : int * objfun : E05..::..E05JB_OBJFUN * ibound : int * iinit : int * bl : float[] * bu : float[] * list : float[,] * numpts : int[] * initpt : int[] * monit : E05..::..E05JB_MONIT * x : float[] * obj : float byref * options : E05..::..e05jbOptions * ifail : int byref > unit 
Parameters
 n
 Type: System..::..Int32On entry: $n$, the number of variables.Constraint: ${\mathbf{n}}>0$.
 objfun
 Type: NagLibrary..::..E05..::..E05JB_OBJFUNobjfun must evaluate the objective function $F\left(\mathbf{x}\right)$ for a specified $n$vector $\mathbf{x}$.
A delegate of type E05JB_OBJFUN.
 ibound
 Type: System..::..Int32On entry: indicates whether the facility for dealing with bounds of special forms is to be used. ibound must be set to one of the following values.
 ${\mathbf{ibound}}=0$
 You will supply $\mathbf{\ell}$ and $\mathbf{u}$ individually.
 ${\mathbf{ibound}}=1$
 There are no bounds on $\mathbf{x}$.
 ${\mathbf{ibound}}=2$
 There are semiinfinite bounds $0\le \mathbf{x}$.
 ${\mathbf{ibound}}=3$
 There are constant bounds $\mathbf{\ell}={\ell}_{1}$ and $\mathbf{u}={u}_{1}$.
Note that it only makes sense to fix any components of $\mathbf{x}$ when ${\mathbf{ibound}}=0$.Constraint: ${\mathbf{ibound}}=0$, $1$, $2$ or $3$.
 iinit
 Type: System..::..Int32On entry: selects which initialization method to use.
 ${\mathbf{iinit}}=0$
 Simple initialization (boundary and midpoint), with
${\mathbf{numpts}}\left[i1\right]=3$, ${\mathbf{initpt}}\left[i1\right]=2$ and
${\mathbf{list}}[i1,j1]=\left({\mathbf{bl}}\left[i1\right],\left({\mathbf{bl}}\left[i1\right]+{\mathbf{bu}}\left[i1\right]\right)/2,{\mathbf{bu}}\left[i1\right]\right)$,
for $i=1,2,\dots ,{\mathbf{n}}$ and $j=1,2,3$.  ${\mathbf{iinit}}=1$
 Simple initialization (offboundary and midpoint), with
${\mathbf{numpts}}\left[i1\right]=3$, ${\mathbf{initpt}}\left[i1\right]=2$ and
${\mathbf{list}}[i1,j1]=\phantom{\rule{0ex}{0ex}}\left(\left(5{\mathbf{bl}}\left[i1\right]+{\mathbf{bu}}\left[i1\right]\right)/6,\left({\mathbf{bl}}\left[i1\right]+{\mathbf{bu}}\left[i1\right]\right)/2,\left({\mathbf{bl}}\left[i1\right]+5{\mathbf{bu}}\left[i1\right]\right)/6\right)$,
for $i=1,2,\dots ,{\mathbf{n}}$ and $j=1,2,3$.  ${\mathbf{iinit}}=2$
 Initialization using linesearches.
 ${\mathbf{iinit}}=3$
 You are providing your own initialization list.
 ${\mathbf{iinit}}=4$
 Generate a random initialization list.
If ‘infinite’ values (as determined by the value of the optional parameter Infinite Bound Size) are detected by e05jb when you are using a simple initialization method (${\mathbf{iinit}}=0$ or $1$), a safeguarded initialization procedure will be attempted, to avoid overflow.Suggested value: ${\mathbf{iinit}}=0$Constraint: ${\mathbf{iinit}}=0$, $1$, $2$, $3$ or $4$.
 bl
 Type: array<System..::..Double>[]()[][]An array of size [n]On entry: ${\mathbf{bl}}$ is $\mathbf{\ell}$, the array of lower bounds. ${\mathbf{bu}}$ is $\mathbf{u}$, the array of upper bounds.If ${\mathbf{ibound}}=0$, you must set ${\mathbf{bl}}\left[\mathit{i}1\right]$ to ${\ell}_{\mathit{i}}$ and ${\mathbf{bu}}\left[\mathit{i}1\right]$ to ${u}_{\mathit{i}}$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$. If a particular ${x}_{i}$ is to be unbounded below, the corresponding ${\mathbf{bl}}\left[i1\right]$ should be set to $\mathit{infbnd}$, where $\mathit{infbnd}$ is the value of the optional parameter Infinite Bound Size. Similarly, if a particular ${x}_{i}$ is to be unbounded above, the corresponding ${\mathbf{bu}}\left[i1\right]$ should be set to $\mathit{infbnd}$.On exit: unless ${\mathbf{ifail}}={1}$ or ${2}$ on exit, bl and bu are the actual arrays of bounds used by e05jb.Constraints:
 if ${\mathbf{ibound}}=0$, ${\mathbf{bl}}\left[\mathit{i}1\right]\le {\mathbf{bu}}\left[\mathit{i}1\right]$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$;
 if ${\mathbf{ibound}}=3$, ${\mathbf{bl}}\left[0\right]<{\mathbf{bu}}\left[0\right]$.
 bu
 Type: array<System..::..Double>[]()[][]An array of size [n]On entry: ${\mathbf{bl}}$ is $\mathbf{\ell}$, the array of lower bounds. ${\mathbf{bu}}$ is $\mathbf{u}$, the array of upper bounds.If ${\mathbf{ibound}}=0$, you must set ${\mathbf{bl}}\left[\mathit{i}1\right]$ to ${\ell}_{\mathit{i}}$ and ${\mathbf{bu}}\left[\mathit{i}1\right]$ to ${u}_{\mathit{i}}$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$. If a particular ${x}_{i}$ is to be unbounded below, the corresponding ${\mathbf{bl}}\left[i1\right]$ should be set to $\mathit{infbnd}$, where $\mathit{infbnd}$ is the value of the optional parameter Infinite Bound Size. Similarly, if a particular ${x}_{i}$ is to be unbounded above, the corresponding ${\mathbf{bu}}\left[i1\right]$ should be set to $\mathit{infbnd}$.On exit: unless ${\mathbf{ifail}}={1}$ or ${2}$ on exit, bl and bu are the actual arrays of bounds used by e05jb.Constraints:
 if ${\mathbf{ibound}}=0$, ${\mathbf{bl}}\left[\mathit{i}1\right]\le {\mathbf{bu}}\left[\mathit{i}1\right]$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$;
 if ${\mathbf{ibound}}=3$, ${\mathbf{bl}}\left[0\right]<{\mathbf{bu}}\left[0\right]$.
 list
 Type: array<System..::..Double,2>[,](,)[,][,]On entry: this parameter need not be set on entry if you wish to use one of the preset initialization methods (${\mathbf{iinit}}\ne 3$).list is the ‘initialization list’: whenever a subbox in the algorithm is split for the first time (either during the initialization procedure or later), for each nonfixed coordinate $i$ the split is done at the values ${\mathbf{list}}[i1,0:{\mathbf{numpts}}\left[i1\right]1]$, as well as at some adaptively chosen intermediate points. The array sections ${\mathbf{list}}[\mathit{i}1,0:{\mathbf{numpts}}\left[\mathit{i}1\right]1]$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$, must be in ascending order with each entry being distinct. In this context, ‘distinct’ should be taken to mean relative to the saferange parameter (see x02am).On exit: unless ${\mathbf{ifail}}={1}$, ${2}$ or ${}{999}$ on exit, the actual initialization data used by e05jb. If you wish to monitor the contents of list you are advised to do so solely through monit, not through the output value here.Constraint: if ${\mathbf{x}}\left[\mathit{i}1\right]$ is not fixed, ${\mathbf{list}}[\mathit{i}1,0:{\mathbf{numpts}}\left[\mathit{i}1\right]1]$ is in ascending order with each entry being distinct, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$${\mathbf{bl}}\left[\mathit{i}1\right]\le {\mathbf{list}}[\mathit{i}1,\mathit{j}1]\le {\mathbf{bu}}\left[\mathit{i}1\right]$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$ and $\mathit{j}=1,2,\dots ,{\mathbf{numpts}}\left[\mathit{i}1\right]$.
 numpts
 Type: array<System..::..Int32>[]()[][]An array of size [n]On entry: this parameter need not be set on entry if you wish to use one of the preset initialization methods (${\mathbf{iinit}}\ne 3$).numpts encodes the number of splitting points in each nonfixed dimension.On exit: unless ${\mathbf{ifail}}={1}$, ${2}$ or ${}{999}$ on exit, the actual initialization data used by e05jb.Constraints:
 if ${\mathbf{x}}\left[\mathit{i}1\right]$ is not fixed, ${\mathbf{numpts}}\left[\mathit{i}1\right]\le {\mathbf{sdlist}}$;
 ${\mathbf{numpts}}\left[\mathit{i}1\right]\ge 3$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$.
 initpt
 Type: array<System..::..Int32>[]()[][]An array of size [n]On entry: this parameter need not be set on entry if you wish to use one of the preset initialization methods (${\mathbf{iinit}}\ne 3$).You must designate a point stored in list that you wish e05jb to consider as an ‘initial point’ for the purposes of the splitting procedure. Call this initial point ${\mathbf{x}}^{*}$. The coordinates of ${\mathbf{x}}^{*}$ correspond to a set of indices ${J}_{\mathit{i}}$, for $\mathit{i}=1,2,\dots ,n$, such that ${\mathbf{x}}_{\mathit{i}}^{*}$ is stored in ${\mathbf{list}}[\mathit{i}1,{J}_{\mathit{i}}1]$, for $\mathit{i}=1,2,\dots ,n$. You must set ${\mathbf{initpt}}\left[\mathit{i}1\right]={J}_{\mathit{i}}$, for $\mathit{i}=1,2,\dots ,n$.On exit: unless ${\mathbf{ifail}}={1}$, ${2}$ or ${}{999}$ on exit, the actual initialization data used by e05jb.Constraint: if ${\mathbf{x}}\left[\mathit{i}1\right]$ is not fixed, $1\le {\mathbf{initpt}}\left[\mathit{i}1\right]\le {\mathbf{sdlist}}$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$.
 monit
 Type: NagLibrary..::..E05..::..E05JB_MONITmonit may be used to monitor the optimization process. It is invoked upon every successful completion of the procedure in which a subbox is considered for splitting. It will also be called just before e05jb exits if that splitting procedure was not successful.If no monitoring is required, monit may be the dummy monitoring method E05JBK supplied by the NAG Library.
A delegate of type E05JB_MONIT.
 x
 Type: array<System..::..Double>[]()[][]An array of size [n]On exit: if ${\mathbf{ifail}}={0}$, contains an estimate of the global optimum (see also [Accuracy]).
 obj
 Type: System..::..Double%
 options
 Type: NagLibrary..::..E05..::..e05jbOptionsAn Object of type E05.e05jbOptions. Used to configure optional parameters to this method.
 ifail
 Type: System..::..Int32%On exit: ${\mathbf{ifail}}={0}$ unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
e05jb is designed to solve modestly sized global optimization problems having simple boundconstraints only; it finds the global optimum of a nonlinear function subject to a set of bound constraints on the variables. Without loss of generality, the problem is assumed to be stated in the following form:
where $F\left(\mathbf{x}\right)$ (the objective function) is a nonlinear scalar function (assumed to be continuous in a neighbourhood of a global minimum), and the bound vectors are elements of ${\stackrel{}{R}}^{n}$, where $\stackrel{}{R}$ denotes the extended reals $R\cup \left\{\infty ,\infty \right\}$. Relational operators between vectors are interpreted elementwise.
$$\underset{\mathbf{x}\in {R}^{n}}{\mathrm{minimize}}\phantom{\rule{0.25em}{0ex}}F\left(\mathbf{x}\right)\text{\hspace{1em} subject to \hspace{1em}}\mathbf{\ell}\le \mathbf{x}\le \mathbf{u}\text{\hspace{1em} and \hspace{1em}}\mathbf{\ell}\le \mathbf{u}\text{,}$$ 
The optional parameter Maximize should be set if you wish to solve maximization, rather than minimization, problems.
If certain bounds are not present, the associated elements of $\mathbf{\ell}$ or $\mathbf{u}$ can be set to special values that will be treated as $\infty $ or $+\infty $. See the description of the optional parameter Infinite Bound Size. Phrases in this document containing terms like ‘unbounded values’ should be understood to be taken relative to this optional parameter.
A typical excerpt from a method calling e05jb is:
where (E05JDF not in this release) sets the optional parameter and value specified in optstr.
The initialization method (E05JAF not in this release) does not need to be called before each invocation of e05jb. You should be aware that a call to the initialization method will reset each optional parameter to its default value, and, if you are using repeatable randomized initialization lists (see the description of the parameter iinit), the random state stored in
the array comm
will be destroyed.
You must supply a method that evaluates $F\left(\mathbf{x}\right)$; derivatives are not required.
The method used by e05jb is based on MCS, the Multilevel Coordinate Search method described in Huyer and Neumaier (1999), and the algorithm it uses is described in detail in [Algorithmic Details].
References
Huyer W and Neumaier A (1999) Global optimization by multilevel coordinate search Journal of Global Optimization 14 331–355
Error Indicators and Warnings
Errors or warnings detected by the method:
 ${\mathbf{ifail}}=1$

Initialization method (E05JAF not in this release) has not been called.On entry, ${\mathbf{lcomm}}=\u2329\mathit{\text{value}}\u232a$.
Constraint: ${\mathbf{lcomm}}\ge 100$.
 ${\mathbf{ifail}}=2$

A value of Splits Limit ($\mathit{smax}$) smaller than ${n}_{r}+3$ was set: $\mathit{smax}=\u2329\mathit{\text{value}}\u232a$, ${n}_{r}=\u2329\mathit{\text{value}}\u232a$.On entry, ${\mathbf{ibound}}=\u2329\mathit{\text{value}}\u232a$.
Constraint: ${\mathbf{ibound}}=0$, $1$, $2$ or $3$.On entry, ${\mathbf{ibound}}=0$ or $3$ and ${\mathbf{bl}}\left[i1\right]=\u2329\mathit{\text{value}}\u232a$, ${\mathbf{bu}}\left[i1\right]=\u2329\mathit{\text{value}}\u232a$ and $i=\u2329\mathit{\text{value}}\u232a$.
Constraint: if ${\mathbf{ibound}}=0$ then ${\mathbf{bl}}\left[\mathit{i}1\right]\le {\mathbf{bu}}\left[\mathit{i}1\right]$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$; if ${\mathbf{ibound}}=3$ then ${\mathbf{bl}}\left[0\right]<{\mathbf{bu}}\left[0\right]$.On entry, ${\mathbf{ibound}}=3$ and ${\mathbf{bl}}\left[0\right]={\mathbf{bu}}\left[0\right]=\u2329\mathit{\text{value}}\u232a$.
Constraint: if ${\mathbf{ibound}}=3$ then ${\mathbf{bl}}\left[0\right]<{\mathbf{bu}}\left[0\right]$.On entry, ${\mathbf{iinit}}=\u2329\mathit{\text{value}}\u232a$.
Constraint: ${\mathbf{iinit}}=0$, $1$, $2$, $3$ or $4$.On entry, ${\mathbf{iinit}}=2$ and ${\mathbf{sdlist}}=\u2329\mathit{\text{value}}\u232a$.
Constraint: if ${\mathbf{iinit}}=2$ then ${\mathbf{sdlist}}\ge 192$.On entry, ${\mathbf{iinit}}=\u2329\mathit{\text{value}}\u232a$ and ${\mathbf{sdlist}}=\u2329\mathit{\text{value}}\u232a$.
Constraint: if ${\mathbf{iinit}}\ne 2$ then ${\mathbf{sdlist}}\ge 3$.On entry, ${\mathbf{n}}=\u2329\mathit{\text{value}}\u232a$.
Constraint: ${\mathbf{n}}>0$.On entry, usersupplied ${\mathbf{initpt}}\left[i1\right]=\u2329\mathit{\text{value}}\u232a$, $i=\u2329\mathit{\text{value}}\u232a$.
Constraint: if ${\mathbf{x}}\left[i1\right]$ is not fixed then ${\mathbf{initpt}}\left[\mathit{i}1\right]\ge 1$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$.On entry, usersupplied ${\mathbf{initpt}}\left[i1\right]=\u2329\mathit{\text{value}}\u232a$, $i=\u2329\mathit{\text{value}}\u232a$ and ${\mathbf{sdlist}}=\u2329\mathit{\text{value}}\u232a$.
Constraint: if ${\mathbf{x}}\left[i1\right]$ is not fixed then ${\mathbf{initpt}}\left[\mathit{i}1\right]\le {\mathbf{sdlist}}$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$.On entry, usersupplied ${\mathbf{list}}[i1,j1]=\u2329\mathit{\text{value}}\u232a$, $i=\u2329\mathit{\text{value}}\u232a$, $j=\u2329\mathit{\text{value}}\u232a$, and ${\mathbf{bl}}\left[i1\right]=\u2329\mathit{\text{value}}\u232a$.
Constraint: if ${\mathbf{x}}\left[i1\right]$ is not fixed then ${\mathbf{list}}[\mathit{i}1,\mathit{j}1]\ge {\mathbf{bl}}\left[\mathit{i}1\right]$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$ and $\mathit{j}=1,2,\dots ,{\mathbf{numpts}}\left[\mathit{i}1\right]$.On entry, usersupplied ${\mathbf{list}}[i1,j1]=\u2329\mathit{\text{value}}\u232a$, $i=\u2329\mathit{\text{value}}\u232a$, $j=\u2329\mathit{\text{value}}\u232a$, and ${\mathbf{bu}}\left[i1\right]=\u2329\mathit{\text{value}}\u232a$.
Constraint: if ${\mathbf{x}}\left[i1\right]$ is not fixed then ${\mathbf{list}}[\mathit{i}1,\mathit{j}1]\le {\mathbf{bu}}\left[\mathit{i}1\right]$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$ and $\mathit{j}=1,2,\dots ,{\mathbf{numpts}}\left[\mathit{i}1\right]$.On entry, usersupplied ${\mathbf{numpts}}\left[i1\right]=\u2329\mathit{\text{value}}\u232a$, $i=\u2329\mathit{\text{value}}\u232a$.
Constraint: if ${\mathbf{x}}\left[i1\right]$ is not fixed then ${\mathbf{numpts}}\left[\mathit{i}1\right]\ge 3$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$.On entry, usersupplied ${\mathbf{numpts}}\left[i1\right]=\u2329\mathit{\text{value}}\u232a$, $i=\u2329\mathit{\text{value}}\u232a$ and ${\mathbf{sdlist}}=\u2329\mathit{\text{value}}\u232a$.
Constraint: if ${\mathbf{x}}\left[i1\right]$ is not fixed then ${\mathbf{numpts}}\left[\mathit{i}1\right]\le {\mathbf{sdlist}}$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$.On entry, usersupplied section ${\mathbf{list}}[i,1:{\mathbf{numpts}}\left[i1\right]]$ contained $\mathit{ndist}$ distinct elements, and $\mathit{ndist}<{\mathbf{numpts}}\left[i1\right]$: $\mathit{ndist}=\u2329\mathit{\text{value}}\u232a$, ${\mathbf{numpts}}\left[i1\right]=\u2329\mathit{\text{value}}\u232a$, $i=\u2329\mathit{\text{value}}\u232a$.On entry, usersupplied section ${\mathbf{list}}[i,1:{\mathbf{numpts}}\left[i1\right]]$ was not in ascending order: ${\mathbf{numpts}}\left[i1\right]=\u2329\mathit{\text{value}}\u232a$, $i=\u2329\mathit{\text{value}}\u232a$.The number of nonfixed variables ${n}_{r}=0$.
Constraint: ${n}_{r}>0$.
 ${\mathbf{ifail}}=3$

A finite initialization list could not be computed internally. Consider reformulating the bounds on the problem, try providing your own initialization list, use the randomization option (${\mathbf{iinit}}=4$) or vary the value of Infinite Bound Size.The usersupplied initialization list contained infinite values, as determined by the optional parameter Infinite Bound Size.
 ${\mathbf{ifail}}=4$

The division procedure completed but your target value could not be reached.
Despite every subbox being processed Splits Limit times, the target value you provided in Target Objective Value could not be found to the tolerances given in Target Objective Error and Target Objective Safeguard. You could try reducing Splits Limit or the objective tolerances.
 ${\mathbf{ifail}}=5$

The function evaluations limit was exceeded.
Approximately Function Evaluations Limit function calls have been made without your chosen termination criterion being satisfied.
 ${\mathbf{ifail}}=6$

Usersupplied monitoring method requested termination.Usersupplied objective function requested termination.
 ${\mathbf{ifail}}=7$

An error occurred during initialization. It is likely that points from the initialization list are very close together. Try relaxing the bounds on the variables or use a different initialization method.An error occurred during linesearching. It is likely that your objective function is badly scaled: try rescaling it. Also, try relaxing the bounds or use a different initialization method. If the problem persists, please contact NAG quoting error code $\u2329\mathit{\text{value}}\u232a$.
 ${\mathbf{ifail}}=999$

Dynamic memory allocation failed.
 ${\mathbf{ifail}}=9000$
 An error occured, see message report.
 ${\mathbf{ifail}}=6000$
 Invalid Parameters $\u2329\mathit{\text{value}}\u232a$
 ${\mathbf{ifail}}=4000$
 Invalid dimension for array $\u2329\mathit{\text{value}}\u232a$
 ${\mathbf{ifail}}=8000$
 Negative dimension for array $\u2329\mathit{\text{value}}\u232a$
 ${\mathbf{ifail}}=6000$
 Invalid Parameters $\u2329\mathit{\text{value}}\u232a$
Accuracy
If ${\mathbf{ifail}}={0}$ on exit, then the vector returned in the array x is an estimate of the solution $\mathbf{x}$ whose function value satisfies your termination criterion: the function value was static for Static Limit sweeps through levels, or
where $\mathit{objval}$ is the value of the optional parameter Target Objective Value, $\mathit{objerr}$ is the value of the optional parameter Target Objective Error, and $\mathit{objsfg}$ is the value of the optional parameter Target Objective Safeguard.
$$F\left(\mathbf{x}\right)\mathit{objval}\le \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(\mathit{objerr}\times \left\mathit{objval}\right,\mathit{objsfg}\right)\text{,}$$ 
Parallelism and Performance
None.
Further Comments
For each invocation of e05jb, local workspace arrays of fixed length are allocated internally. The total size of these arrays amounts to $13{n}_{r}+\mathit{smax}1$ integer elements, where $\mathit{smax}$ is the value of the optional parameter Splits Limit and ${n}_{r}$ is the number of nonfixed variables, and $\left(2+{n}_{r}\right){\mathbf{sdlist}}+2{\mathbf{n}}+21{n}_{r}+3{n}_{r}^{2}+1$ real elements. In addition, if you are using randomized initialization lists (see the description of the parameter iinit), a further $21$ integer elements are allocated internally.
In order to keep track of the regions of the search space that have been visited while looking for a global optimum, e05jb internally allocates arrays of increasing sizes depending on the difficulty of the problem. Two of the main factors that govern the amount allocated are the number of subboxes (call this quantity $\mathit{nboxes}$) and the number of points in the ‘shopping basket’ (the parameter nbaskt on entry to monit). Safe, pessimistic upper bounds on these two quantities are so large as to be impractical. In fact, the worstcase number of subboxes for even the most simple initialization list (when ${\mathbf{ninit}}=3$ on entry to monit) grows like ${{n}_{r}}^{{n}_{r}}$. Thus e05jb does not attempt to estimate in advance the final values of $\mathit{nboxes}$ or nbaskt for a given problem. There are a total of $5$ integer arrays and $4+{n}_{r}+{\mathbf{ninit}}$ real arrays whose lengths depend on $\mathit{nboxes}$, and there are a total of $2$ integer arrays and $3+{\mathbf{n}}+{n}_{r}$ real arrays whose lengths depend on nbaskt. e05jb makes a fixed initial guess that the maximum number of subboxes required will be $10000$ and that the maximum number of points in the ‘shopping basket’ will be $1000$. If ever a greater amount of subboxes or more room in the ‘shopping basket’ is required, e05jb performs reallocation, usually doubling the size of the inadequatelysized arrays. Clearly this process requires periods where the original array and its extension exist in memory simultaneously, so that the data within can be copied, which compounds the complexity of e05jb's memory usage. It is possible (although not likely) that if your problem is particularly difficult to solve, or of a large size (hundreds of variables), you may run out of memory.
Example
This example finds the global minimum of the ‘peaks’ function in two dimensions
on the box $\left[3,3\right]\times \left[3,3\right]$.
$$F\left(x,y\right)=3{\left(1x\right)}^{2}\mathrm{exp}\left({x}^{2}{\left(y+1\right)}^{2}\right)10\left(\frac{x}{5}{x}^{3}{y}^{5}\right)\mathrm{exp}\left({x}^{2}{y}^{2}\right)\frac{1}{3}\mathrm{exp}\left({\left(x+1\right)}^{2}{y}^{2}\right)$$ 
The function $F$ has several local minima and one global minimum in the given box. The global minimum is approximately located at $\left(0.23,1.63\right)$, where the function value is approximately $6.55$.
We use default values for all the optional parameters, and we instruct e05jb to use the simple initialization list corresponding to ${\mathbf{iinit}}=0$. In particular, this will set for us the initial point $\left(0,0\right)$ (see []).
Example program (C#): e05jbe.cs
Algorithmic Details
Here we summarise the main features of the MCS algorithm used in e05jb, and we introduce some terminology used in the description of the method and its arguments. We assume throughout that we will only do any work in coordinates $i$ in which ${x}_{i}$ is free to vary. The MCS algorithm is fully described in Huyer and Neumaier (1999).
Initialization and Sweeps
Each subbox is determined by a basepoint $\mathbf{x}$ and an opposite point $\mathbf{y}$. We denote such a subbox by $B\left[\mathbf{x},\mathbf{y}\right]$. The basepoint is allowed to belong to more than one subbox, is usually a boundary point, and is often a vertex.
An initialization procedure produces an initial set of subboxes. Whenever a subbox is split along a coordinate $i$ for the first time (in the initialization procedure or later), the splitting is done at three or more userdefined values ${\left\{{x}_{i}^{j}\right\}}_{j}$ at which the objective function is sampled, and at some adaptively chosen intermediate points. At least four children are generated. More precisely, we assume that we are given
and a vector $\mathbf{p}$ that, for each $i$, locates within ${\left\{{x}_{i}^{j}\right\}}_{j}$ the $i$th coordinate of an initial point ${\mathbf{x}}^{0}$; that is, if ${x}_{i}^{0}={x}_{i}^{j}$ for some $j=1,2,\dots ,{L}_{i}$, then ${p}_{i}=j$. A good guess for the global optimum can be used as ${\mathbf{x}}^{0}$.
$${\ell}_{i}\le {x}_{i}^{1}<{x}_{i}^{2}<\cdots <{x}_{i}^{{L}_{i}}\le {u}_{i}\text{,\hspace{1em}}{L}_{i}\ge 3\text{,\hspace{1em} for}i=1,2,\dots ,n$$ 
The initialization points and the vectors $\mathbf{\ell}$ and $\mathbf{p}$ are collectively called the initialization list (and sometimes we will refer to just the initialization points as ‘the initialization list’, whenever this causes no confusion). The initialization data may be input by you, or they can be set to sensible default values by e05jb: if you provide them yourself, ${\mathbf{list}}[i1,j1]$ should contain ${x}_{i}^{j}$, ${\mathbf{numpts}}\left[i1\right]$ should contain ${L}_{i}$, and ${\mathbf{initpt}}\left[i1\right]$ should contain
${p}_{\mathit{i}}$, for $\mathit{i}=1,2,\dots ,n$ and $\mathit{j}=1,2,\dots ,{L}_{\mathit{i}}$; if you wish e05jb to use one of its preset initialization methods, you could choose one of two simple, threepoint methods (see Figure 1). If the list generated by one of these methods contains infinite values, attempts are made to generate a safeguarded list using the function $\mathrm{subint}\left(x,y\right)$ (which is also used during the splitting procedure, and is described in [Splitting]). If infinite values persist, e05jb exits with ${\mathbf{ifail}}={3}$. There is also the option to generate an initialization list with the aid of linesearches (by setting ${\mathbf{iinit}}=2$). Starting with the absolutely smallest point in the root box, linesearches are made along each coordinate. For each coordinate, the local minimizers found by the linesearches are put into the initialization list. If there were fewer than three minimizers, they are augmented by closeby values. The final preset initialization option (${\mathbf{iinit}}=4$) generates a randomized list, so that independent multiple runs may be made if you suspect a global optimum has not been found. Each call to the initialization method (E05JAF not in this release) resets the initialstate vector for the Wichmann–Hill basegenerator that is used. Depending on whether you set the optional parameter Repeatability to $'\mathrm{ON}'$ or $'\mathrm{OFF}'$, the random state is initialized to give a repeatable or nonrepeatable sequence. Then, a random integer between $3$ and sdlist is selected, which is then used to determine the number of points to be generated in each coordinate; that is, numpts becomes a constant vector, set to this value. The components of list are then generated, from a uniform distribution on the root box if the box is finite, or else in a safeguarded fashion if any bound is infinite. The array ${\mathbf{initpt}}$ is set to point to the best point in list.
Given an initialization list (preset or otherwise), e05jb evaluates $F$ at ${\mathbf{x}}^{0}$, and sets the initial estimate of the global minimum, ${\mathbf{x}}^{*}$, to ${\mathbf{x}}^{0}$. Then, for $i=1,2,\dots ,n$, the objective function $F$ is evaluated at ${L}_{i}1$ points that agree with ${\mathbf{x}}^{*}$ in all but the $i$th coordinate. We obtain pairs
$\left({\hat{\mathbf{x}}}^{\mathit{j}},{f}_{i}^{\mathit{j}}\right)$, for $\mathit{j}=1,2,\dots ,{L}_{i}$, with: ${\mathbf{x}}^{*}={\hat{\mathbf{x}}}^{{j}_{1}}$, say; with, for $j\ne {j}_{1}$,
and with
$${\hat{x}}_{k}^{j}=\left\{\begin{array}{ll}{x}_{k}^{*}& \text{if}k\ne i\text{;}\\ {x}_{k}^{j}& \text{otherwise;}\end{array}\right.$$ 
$${f}_{i}^{j}=F\left({\hat{\mathbf{x}}}^{j}\right)\text{.}$$ 
The point having the smallest function value is renamed ${\mathbf{x}}^{*}$ and the procedure is repeated with the next coordinate.
Once e05jb has a full set of initialization points and function values, it can generate an initial set of subboxes. Recall that the root box is $B\left[\mathbf{x},\mathbf{y}\right]=\left[\mathbf{\ell},\mathbf{u}\right]$, having basepoint $\mathbf{x}={\mathbf{x}}^{0}$. The opposite point $\mathbf{y}$ is a corner of $\left[\mathbf{\ell},\mathbf{u}\right]$ farthest away from $\mathbf{x}$, in some sense. The point $\mathbf{x}$ need not be a vertex of $\left[\mathbf{\ell},\mathbf{u}\right]$, and $\mathbf{y}$ is entitled to have infinite coordinates. We loop over each coordinate $i$, splitting the current box along coordinate $i$ into $2{L}_{i}2$, $2{L}_{i}1$ or $2{L}_{i}$ subintervals with exactly one of the ${\hat{x}}_{i}^{j}$ as endpoints, depending on whether two, one or none of the ${\hat{x}}_{i}^{j}$ are on the boundary. Thus, as well as splitting at
${\hat{x}}_{i}^{\mathit{j}}$, for $\mathit{j}=1,2,\dots ,{L}_{i}$, we split at additional points
${z}_{i}^{\mathit{j}}$, for $\mathit{j}=2,3,\dots ,{L}_{i}$. These additional ${z}_{i}^{j}$ are such that
where $q$ is the goldensection ratio $\left(\sqrt{5}1\right)/2$, and the exponent $m$ takes the value $1$ or $2$, chosen so that the subbox with the smaller function value gets the larger fraction of the interval. Each child subbox gets as basepoint the point obtained from ${\mathbf{x}}^{*}$ by changing ${x}_{i}^{*}$ to the ${x}_{i}^{j}$ that is a boundary point of the corresponding $i$th coordinate interval; this new basepoint therefore has function value ${f}_{i}^{j}$. The opposite point is derived from $\mathbf{y}$ by changing ${y}_{i}$ to the other end of that interval.
$${z}_{i}^{j}={\hat{x}}_{i}^{j1}+{q}^{m}\left({\hat{x}}_{i}^{j}{\hat{x}}_{i}^{j1}\right)\text{, \hspace{1em}}j=2,\dots ,{L}_{i}\text{,}$$ 
e05jb can now rank the coordinates based on an estimated variability of $F$. For each $i$ we compute the union of the ranges of the quadratic interpolant through any three consecutive ${\hat{x}}_{i}^{j}$, taking the difference between the upper and lower bounds obtained as a measure of the variability of $F$ in coordinate $i$. A vector $\mathbf{\pi}$ is populated in such a way that coordinate $i$ has the ${\pi}_{i}$th highest estimated variability. For tiebreaks, when the ${\mathbf{x}}^{*}$ obtained after splitting coordinate $i$ belongs to two subboxes, the one that contains the minimizer of the quadratic models is designated the current subbox for coordinate $i+1$.
Boxes are assigned levels in the following manner. The root box is given level $1$. When a subbox of level $s$ is split, the child with the smaller fraction of the goldensection split receives level $s+2$; all other children receive level $s+1$. The box with the better function value is given the larger fraction of the splitting interval and the smaller level because then it is more likely to be split again more quickly. We see that after the initialization procedure the first level is empty and the nonsplit boxes have levels $2,\dots ,{n}_{r}+2$, so it is meaningful to choose ${s}_{\mathrm{max}}$ much larger than ${n}_{r}$. Note that the internal structure of e05jb demands that ${s}_{\mathrm{max}}$ be at least ${n}_{r}+3$.
Examples of initializations in two dimensions are given in Figure 1. In both cases the initial point is ${\mathbf{x}}^{0}=\left(\mathbf{\ell}+\mathbf{u}\right)/2$; on the left the initialization points are
while on the right the points are
$${\mathbf{x}}^{1}=\mathbf{\ell}\text{,\hspace{1em}}{\mathbf{x}}^{2}=\left(\mathbf{\ell}+\mathbf{u}\right)/2\text{,\hspace{1em}}{\mathbf{x}}^{3}=\mathbf{u}\text{,}$$ 
$${\mathbf{x}}^{1}=\left(5\mathbf{\ell}+\mathbf{u}\right)/6\text{,\hspace{1em}}{\mathbf{x}}^{2}=\left(\mathbf{\ell}+\mathbf{u}\right)/2\text{,\hspace{1em}}{\mathbf{x}}^{3}=\left(\mathbf{\ell}+5\mathbf{u}\right)/6\text{.}$$ 
In Figure 1, basepoints and levels after initialization are displayed. Note that these initialization lists correspond to ${\mathbf{iinit}}=0$ and ${\mathbf{iinit}}=1$, respectively.
Figure 1: Examples of the initialization procedure
After initialization, a series of sweeps through levels is begun. A sweep is defined by three steps:
(i)  scan the list of nonsplit subboxes. Fill a record list $\mathbf{b}$ according to ${b}_{s}=0$ if there is no box at level $s$, and with ${b}_{s}$ pointing to a subbox with the lowest function value among all subboxes with level $s$ otherwise, for $0<s<{s}_{\mathrm{max}}$; 
(ii)  the subbox with label ${b}_{s}$ is a candidate for splitting. If the subbox is not to be split, according to the rules described in [Splitting], increase its level by $1$ and update ${b}_{s+1}$ if necessary. If the subbox is split, mark it so, insert its children into the list of subboxes, and update $\mathbf{b}$ if any child with level ${s}^{\prime}$ yields a strict improvement of $F$ over those subboxes at level ${s}^{\prime}$; 
(iii)  increment $s$ by $1$. If $s={s}_{\mathrm{max}}$ then displaying monitoring information and start a new sweep; else if ${b}_{s}=0$ then repeat this step; else display monitoring information and go to the previous step. 
Clearly, each sweep ends after at most ${s}_{\mathrm{max}}1$ visits of the third step.
Splitting
Each subbox is stored by e05jb as a set of information about the history of the subbox: the label of its parent, a label identifying which child of the parent it is, etc. Whenever a subbox $B\left[\mathbf{x},\mathbf{y}\right]$ of level $s<{s}_{\mathrm{max}}$ is a candidate for splitting, as described in [Initialization and Sweeps], we recover $\mathbf{x}$, $\mathbf{y}$, and the number, ${n}_{j}$, of times coordinate $j$ has been split in the history of $B$. Subbox $B$ could be split in one of two ways.
(i)  Splitting by rank
If $s>2{n}_{r}\left(\mathrm{min}\phantom{\rule{0.25em}{0ex}}\u200a{n}_{j}+1\right)$, the box is always split. The splitting index is set to a coordinate $i$ such that ${n}_{i}=\mathrm{min}\phantom{\rule{0.25em}{0ex}}\u200a{n}_{j}$. 
(ii)  Splitting by expected gain
If $s\le 2{n}_{r}\left(\mathrm{min}\phantom{\rule{0.25em}{0ex}}\u200a{n}_{j}+1\right)$, the subbox could be split along a coordinate where a maximal gain in function value is expected. This gain is estimated according to a local separable quadratic model obtained by fitting to $2{n}_{r}+1$ function values. If the expected gain is too small the subbox is not split at all, and its level is increased by $1$. 
Eventually, a subbox that is not eligible for splitting by expected gain will reach level $2{n}_{r}\left(\mathrm{min}\phantom{\rule{0.25em}{0ex}}\u200a{n}_{j}+1\right)+1$ and then be split by rank, as long as ${s}_{\mathrm{max}}$ is large enough. As ${s}_{\mathrm{max}}\to \infty $, the rule for splitting by rank ensures that each coordinate is split arbitrarily often.
Before describing the details of each splitting method, we introduce the procedure for correctly handling splitting at adaptive points and for dealing with unbounded intervals. Suppose we want to split the $i$th coordinate interval $\u25af\left\{{x}_{i},{y}_{i}\right\}$, where we define $\u25af\left\{{x}_{i},{y}_{i}\right\}=\left[\mathrm{min}\phantom{\rule{0.125em}{0ex}}\left({x}_{i},{y}_{i}\right),\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left({x}_{i},{y}_{i}\right)\right]$, for ${x}_{i}\in R$ and ${y}_{i}\in \stackrel{}{R}$, and where $\mathbf{x}$ is the basepoint of the subbox being considered. The descendants of the subbox should shrink sufficiently fast, so we should not split too close to ${x}_{i}$. Moreover, if ${y}_{i}$ is large we want the new splitting value to not be too large, so we force it to belong to some smaller interval $\u25af\left\{{\xi}^{\prime},{\xi}^{\prime \prime}\right\}$, determined by
where the function $\mathrm{subint}$ is defined by
$${\xi}^{\prime \prime}=\mathrm{subint}\left({x}_{i},{y}_{i}\right)\text{,\hspace{1em}}{\xi}^{\prime}={x}_{i}+\left({\xi}^{\prime \prime}{x}_{i}\right)/10\text{,}$$ 
$$\mathrm{subint}\left(x,y\right)=\left\{\begin{array}{ll}\mathrm{sign}\left(y\right)& \text{if}1000\leftx\right<1\text{ and}\lefty\right>1000\text{;}\\ 10\mathrm{sign}\left(y\right)\leftx\right& \text{if}1000\leftx\right\ge 1\text{ and}\lefty\right>1000\leftx\right\text{;}\\ y& \text{otherwise.}\end{array}\right.$$ 
Splitting by rank
Consider a subbox $B$ with level $s>2{n}_{r}\left(\mathrm{min}\phantom{\rule{0.25em}{0ex}}\u200a{n}_{j}+1\right)$. Although the subbox has reached a high level, there is at least one coordinate along which it has not been split very often. Among the $i$ such that ${n}_{i}=\mathrm{min}\phantom{\rule{0.25em}{0ex}}\u200a{n}_{j}$ for $B$, select the splitting index to be the coordinate with the lowest ${\pi}_{i}$ (and hence highest variability rank). ‘Splitting by rank’ refers to the ranking of the coordinates by ${n}_{i}$ and ${\pi}_{i}$.
If ${n}_{i}=0$, so that $B$ has never been split along coordinate $i$, the splitting is done according to the initialization list and the adaptively chosen goldensection split points, as described in [Initialization and Sweeps]. Also as covered there, new basepoints and opposite points are generated. The children having the smaller fraction of the goldensection split (that is, those with larger function values) are given level $\mathrm{min}\phantom{\rule{0.125em}{0ex}}\left\{s+2,{s}_{\mathrm{max}}\right\}$. All other children are given level $s+1$.
Otherwise, $B$ ranges between ${x}_{i}$ and ${y}_{i}$ in the $i$th coordinate direction. The splitting value is selected to be ${z}_{i}={x}_{i}+2\left(\mathrm{subint}\left({x}_{i},{y}_{i}\right){x}_{i}\right)/3$; we are not attempting to split based on a large reduction in function value, merely in order to reduce the size of a large interval, so ${z}_{i}$ may not be optimal. Subbox $B$ is split at ${z}_{i}$ and the goldensection split point, producing three parts and requiring only one additional function evaluation, at the point ${\mathbf{x}}^{\prime}$ obtained from $\mathbf{x}$ by changing the $i$th coordinate to ${z}_{i}$. The child with the smaller fraction of the goldensection split is given level $\mathrm{min}\phantom{\rule{0.125em}{0ex}}\left\{s+2,{s}_{\mathrm{max}}\right\}$, while the other two parts are given level $s+1$. Basepoints are assigned as follows: the basepoint of the first child is taken to be $\mathbf{x}$, and the basepoint of the second and third children is the point ${\mathbf{x}}^{\prime}$. Opposite points are obtained by changing ${y}_{i}$ to the other end of the $i$th coordinateinterval of the corresponding child.
Splitting by expected gain
When a subbox $B$ has level $s\le 2{n}_{r}\left(\mathrm{min}\phantom{\rule{0.25em}{0ex}}\u200a{n}_{j}+1\right)$, we compute the optimal splitting index and splitting value from a local separable quadratic used as a simple local approximation of the objective function. To fit this curve, for each coordinate we need two additional points and their function values. Such data may be recoverable from the history of $B$: whenever the $i$th coordinate was split in the history of $B$, we obtained values that can be used for the current quadratic interpolation in coordinate $i$.
We loop over $i$; for each coordinate we pursue the history of $B$ back to the root box, and we take the first two points and function values we find, since these are expected to be closest to the current basepoint $\mathbf{x}$. If the current coordinate has not yet been split we use the initialization list. Then we generate a local separable model $e\left(\mathbf{\xi}\right)$ for $F\left(\mathbf{\xi}\right)$ by interpolation at $\mathbf{x}$ and the $2{n}_{r}$ additional points just collected:
$$e\left(\mathbf{\xi}\right)=F\left(\mathbf{x}\right)+\sum _{i=1}^{n}{e}_{i}\left({\xi}_{i}\right)\text{.}$$ 
We define the expected gain ${\hat{e}}_{i}$ in function value when we evaluate at a new point obtained by changing coordinate $i$ in the basepoint, for each $i$, based on two cases:
(i)  ${n}_{i}=0$. We compute the expected gain as
Again, we split according to the initialization list, with the new basepoints and opposite points being as before. 

(ii)  ${n}_{i}>0$. Now, the $i$th component of our subbox ranges from ${x}_{i}$ to ${y}_{i}$. Using the quadratic partial correction function
If the expected best function value ${f}_{\mathrm{exp}}$ satisfies
We now have a splitting index and a splitting value ${z}_{i}$. The subbox is split at ${z}_{i}$ as long as ${z}_{i}\ne {y}_{i}$, and at the goldensection split point; two or three children are produced. The larger fraction of the goldensection split receives level $s+1$, while the smaller fraction receives level $\mathrm{min}\phantom{\rule{0.125em}{0ex}}\left\{s+2,{s}_{\mathrm{max}}\right\}$. If it is the case that ${z}_{i}\ne {y}_{i}$ and the third child is larger than the smaller of the two children from the goldensection split, the third child receives level $s+1$. Otherwise it is given the level $\mathrm{min}\phantom{\rule{0.125em}{0ex}}\left\{s+2,{s}_{\mathrm{max}}\right\}$. The basepoint of the first child is set to $\mathbf{x}$, and the basepoint of the second (and third if it exists) is obtained by changing the $i$th coordinate of $\mathbf{x}$ to ${z}_{i}$. The opposite points are again derived by changing ${y}_{i}$ to the other end of the $i$th coordinate interval of $B$.
If equation (1) does not hold, we expect no improvement. We do not split, and we increase the level of $B$ by $1$. 
Local Search
The local optimization algorithm used by e05jb uses linesearches along directions that are determined by minimizing quadratic models, all subject to bound constraints. Triples of vectors are computed using coordinate searches based on linesearches. These triples are used in triple search procedures to build local quadratic models for $F$. A trustregiontype approach to minimize these models is then carried out, and more information about the coordinate search and the triple search can be found in Huyer and Neumaier (1999).
The local search starts by looking for better points without being too local, by making a triple search using points found by a coordinate search. This yields a new point and function value, an approximation of the gradient of the objective, and an approximation of the Hessian of the objective. Then the quadratic model for $F$ is minimized over a small box, with the solution to that minimization problem then being used as a linesearch direction to minimize the objective. A measure $r$ is computed to quantify the predictive quality of the quadratic model.
The third stage is the checking of termination criteria. The local search will stop if more than $\mathit{loclim}$ visits to this part of the local search have occurred, where $\mathit{loclim}$ is the value of the optional parameter Local Searches Limit. If that is not the case, it will stop if the limit on function calls has been exceeded (see the description of the optional parameter Function Evaluations Limit). The final criterion checks if no improvement can be made to the function value, or whether the approximated gradient $\mathbf{g}$ is small, in the sense that
$${\left\mathbf{g}\right}^{\mathrm{T}}\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(\left\mathbf{x}\right,\left{\mathbf{x}}_{\mathrm{old}}\right\right)<\mathit{loctol}\left({f}_{0}f\right)\text{.}$$ 
The vector ${\mathbf{x}}_{\mathrm{old}}$ is the best point at the start of the current loop in this iterative localsearch procedure, the constant $\mathit{loctol}$ is the value of the optional parameter Local Searches Tolerance, $f$ is the objective value at $\mathbf{x}$, and ${f}_{0}$ is the smallest function value found by the initialization procedure.
Next, e05jb attempts to move away from the boundary, if any components of the current point lie there, using linesearches along the offending coordinates. Local searches are terminated if no improvement could be made.
The fifth stage carries out another triple search, but this time it does not use points from a coordinate search, rather points lying within the trustregion box are taken.
The final stage modifies the trustregion box to be bigger or smaller, depending on the quality of the quadratic model, minimizes the new quadratic model on that box, and does a linesearch in the direction of the minimizer. The value of $r$ is updated using the new data, and then we go back to the third stage (checking of termination criteria).