NAG CPP Interface nagcpp::opt::handle_solve_dfls_rcomm (e04fg)
Note:this function usesoptional parametersto define choices in the problem specification and in the details of the algorithm. If you wish to use default settings for all of the optional parameters, you need only read Sections 1 to 10 of this document. If, however, you wish to reset some or all of the settings please refer to Section 11 for a detailed description of the algorithm and to Section 12 for a detailed description of the specification of the optional parameters.
handle_solve_dfls_rcomm is a reverse communication
Derivative-free Optimization (DFO)
solver from the NAG optimization modelling suite (DFLS) for small to medium-scale nonlinear least squares problems with bound constraints.
handle_solve_dfls_rcomm uses reverse communication for function evaluations and monitoring steps. Every time the solver requires an evaluation of the objective function, it pauses its progress, exits and waits for the function to be called again with the objective value provided in the argument rx.
handle_solve_dfls_rcomm is aimed at minimizing a sum of squares objective function subject to bound constraints:
Here the ${r}_{i}\left(x\right)$ are smooth nonlinear functions called residuals and ${l}_{x}$ and ${u}_{x}$ are $n$-dimensional vectors defining bounds on the variables. Typically, in a calibration or data fitting context, the residuals will be defined as the difference between the data points and a nonlinear model (see Section 2.2.3 in the E04 Chapter Introduction).
handle_solve_dfls_rcomm serves as a solver for compatible problems stored as a handle. The handle points to an internal data structure which defines the problem and serves as a means of communication for functions in the NAG optimization modelling suite. To define a compatible problem handle, you must call handle_init followed by handle_set_nlnls to initialize it and optionally call handle_set_simplebounds to define bounds on the variables. If handle_set_simplebounds is not called, all the variables will be considered free by the solver. It should be noted that handle_solve_dfls_rcomm always assumes that the Jacobian of the residuals is dense, therefore, defining a sparse structure for the residuals in the call to handle_set_nlnls will have no effect. See Section 3.1 in the E04 Chapter Introduction for more details about the NAG optimization modelling suite.
The solver allows fixing variables with the definition of the bounds. However, the following constraint must be met in order to be able to call the solver:
for all non-fixed variable ${x}_{i}$, the value of ${u}_{x}\left(i\right)-{l}_{x}\left(i\right)$ must be at least twice the starting trust region radius (see the consistency constraint of the optional parameter DFO Starting Trust Region).
The solver is based on a derivative-free trust region framework. This type of method is well suited for small to medium-scale problems (around 100 variables) for which the derivatives are unavailable or not easy to compute, and/or for which the function evaluations are expensive or noisy. For a detailed description of the algorithm see Section 11.
The algorithm behaviour and solver strategy can be modified by various optional parameters (see Section 12) which can be set by handle_opt_set and e04zpf (no CPP interface) at any time between the initialization of the handle by handle_init and a call to the solver. The optional parameters' names specific for this solver start either with the prefix DFO (Derivative-free Optimization) or DFLS (Derivative-free Least Squares). The default values for these optional parameters are chosen to work well in the general case, but it is recommended you tune them to your particular problem. In particular, if the objective function is known to be noisy, it is highly recommended to set the optional parameter DFO Noisy Problem to $\mathrm{YES}$.
Once the solver has finished, options may be modified for the next solve. The solver may be called repeatedly with various starting points and/or optional parameters.
The underlying algorithm implemented for handle_solve_dfls_rcomm is the same as the one used by e04fff (no CPP interface). handle_solve_dfls_rcomm serves as a reverse communication interface to the derivative-free solver for nonlinear least squares problems.
4References
Cartis C, Fiala J, Marteau B and Roberts L (2018) Improving the Flexibility and Robustness of Model-Based Derivative-Free Optimization Solvers Technical Report University of Oxford
Cartis C and Roberts L (2017) A Derivative-Free Gauss-Newton Method
Conn A R, Scheinberg K and Vicente L N (2009) Introduction to Derivative-Free Optimization, vol. 8 of MPS-SIAM Series on Optimization MPS/SIAM, Philadelphia
Zhang H, Conn A R and Scheinberg K (2010) A Derivative-Free Algorithm for Least-Squares Minimization SIAM J. Optim.20(6) 3555–3576
5Arguments
Note: this function uses reverse communication. Its use involves an initial entry, intermediate exits and re-entries, and a final exit, as indicated by the argument irevcm. Between intermediate exits and re-entries, all arguments other thanthose specified by the value of irevcm must remain unchanged.
Communication structure.
An object of either the derived class CommE04RA or its base class NoneCopyableComm can be supplied.
It is recommended that the derived class is used. If the base class is supplied it must
first be initialized via a call to opt::handle_init (e04ra).
On entry: does not need to be set on the first call of handle_solve_dfls_rcomm. On subsequent calls, irevcm must be set to a positive integer if all the required function evaluations have been correctly provided in rx. Otherwise, if a problem occurred during a monitoring step or while providing objective values, it is possible to set it to a negative value:
${\mathbf{irevcm}}=-1$
If function evaluations were required, the solver will attempt a rescue procedure and request an alternative point. If no function were required (monitoring step), the solver will stop with $\mathbf{errorid}={\mathbf{20}}$.
${\mathbf{irevcm}}\le -2$
The solver will cleanly exit and return the best available point as a well as the solve statistics.
On exit: indicates what action is to be performed before the next call to handle_solve_dfls_rcomm.
On exit: indicates the number of objective evaluations required for the next call of handle_solve_dfls_rcomm in rx. The coordinates of the points to evaluate are provided in the first neval columns of x.
On exit: optimal objective value and various indicators at monitoring steps or at the end of the final iteration. The measures are given in the table below:
$0$
Objective function value $f\left(x\right)$ (sum of the squared residuals).
$1$
$\rho $, the current lower bound of the trust region.
$2$
$\Delta $, the current size of the trust region.
$3$
The number of interpolation points used by the solver.
On exit: solver statistics at monitoring steps or at the end of the final iteration as given in the table below:
$0$
Number of calls to the objective function.
$1$
Total time spent in the solver (including time spent evaluating the objective).
$2$
Total time spent evaluating the objective function.
$3$
Number of steps.
$4-99$
Reserved for future use.
8: $\mathbf{opt}$ – OptionalE04FGInput/Output
Optional parameter container, derived from Optional.
5.1Additional Quantities
1: $\mathbf{maxeval}$
The maximum number of function evaluations that can be requested at the same time.
2: $\mathbf{nvar}$
$n$, the current number of decision variables $x$ in the model.
3: $\mathbf{nres}$
${m}_{r}$, the number of residuals in the problem.
6Exceptions and Warnings
Errors or warnings detected by the function:
Note: in some cases handle_solve_dfls_rcomm may return useful information.
All errors and warnings have an associated numeric error code field, errorid, stored either as a member of the thrown exception object (see errorid), or as a member of
opt.ifail, depending on how errors
and warnings are being handled (see Error Handling for more details).
comm::handle does not belong to the NAG optimization modelling suite, has not been initialized properly or is corrupted.
$\mathbf{errorid}=1$
comm::handle has not been initialized properly or is corrupted.
$\mathbf{errorid}=2$
This solver does not support the model defined in the handle.
$\mathbf{errorid}=2$
The problem is already being solved.
$\mathbf{errorid}=4$
On entry, ${\mathbf{maxeval}}=\u27e8\mathit{value}\u27e9$. Constraint: ${\mathbf{maxeval}}>0$.
$\mathbf{errorid}=4$
On entry, ${\mathbf{nvar}}=\u27e8\mathit{value}\u27e9$, expected $\mathrm{value}=\u27e8\mathit{value}\u27e9$. Constraint: ${\mathbf{nvar}}$ must match the current number of variables of the model in the comm::handle.
$\mathbf{errorid}=4$
The information supplied does not match with that previously stored. On entry, ${\mathbf{nres}}=\u27e8\mathit{value}\u27e9$ must match that given during the definition of the objective in the comm::handle, i.e., $\u27e8\mathit{\text{value}}\u27e9$.
$\mathbf{errorid}=4$
The information supplied does not match with that previously stored. On entry, ${\mathbf{maxeval}}=\u27e8\mathit{value}\u27e9$ must match that given during the first call of the function, i.e., $\u27e8\mathit{\text{value}}\u27e9$.
$\mathbf{errorid}=5$
Inconsistent options ‘DFO Trust Region Tolerance’ ${\rho}_{\mathrm{end}}$ and ‘DFO Starting Trust Region’ ${\rho}_{\mathrm{beg}}$. Constraint: ${\rho}_{\mathrm{end}}<{\rho}_{\mathrm{beg}}$. Use function to set compatible option values.
$\mathbf{errorid}=5$
Inconsistent options ‘DFO Trust Region Tolerance’ ${\rho}_{\mathrm{end}}$ and ‘DFO Trust Region Slow Tol’ ${\rho}_{\mathrm{tol}}$. Constraint: ${\rho}_{\mathrm{end}}<{\rho}_{\mathrm{tol}}$. Use function to set compatible option values.
$\mathbf{errorid}=5$
Option ‘DFO Starting Trust Region’ ${\rho}_{\mathrm{beg}}=\u27e8\mathit{value}\u27e9$, ${l}_{x}\left(i\right)=\u27e8\mathit{value}\u27e9$, ${u}_{x}\left(i\right)=\u27e8\mathit{value}\u27e9$ and $i=\u27e8\mathit{value}\u27e9$. Constraint: if ${l}_{x}\left(i\right)\ne {u}_{x}\left(i\right)$ in coordinate $i$, then ${u}_{x}\left(i\right)-{l}_{x}\left(i\right)\ge 2\times {\rho}_{\mathrm{beg}}$. Use function to set compatible option values.
$\mathbf{errorid}=6$
There were ${n}_{r}=\u27e8\mathit{value}\u27e9$ unequal bounds and the option ‘DFO Number Interp Points’ $\mathit{npt}=\u27e8\mathit{value}\u27e9$. Constraint: ${n}_{r}+1\le \mathit{npt}\le \frac{({n}_{r}+1)\times ({n}_{r}+2)}{2}$. Use function to set compatible option values.
$\mathbf{errorid}=6$
The number of initial interpolation points is greater than the maximum. Use ‘DFO Number Interp Points’ and ‘DFO Number Initial Points’ to control the number of interpolation points.
$\mathbf{errorid}=6$
Initial number of interpolation points $\mathit{ninit}=\u27e8\mathit{value}\u27e9$, total number of interpolation points $\mathit{npts}=\u27e8\mathit{value}\u27e9$, number of variables $\mathit{nvar}=\u27e8\mathit{value}\u27e9$. Constraint: growing interpolation set is only supported for linear models ($\mathit{npts}=\mathit{nvar}+1$). Use ‘DFO Number Interp Points’ and ‘DFO Number Initial Points’ to control the number of interpolation points.
$\mathbf{errorid}=8$
Maximization is not possible for a nonlinear least squares problem.
$\mathbf{errorid}=10601$
On entry, argument $\u27e8\mathit{\text{value}}\u27e9$ must be a vector of size $\u27e8\mathit{\text{value}}\u27e9$ array. Supplied argument has $\u27e8\mathit{\text{value}}\u27e9$ dimensions.
$\mathbf{errorid}=10601$
On entry, argument $\u27e8\mathit{\text{value}}\u27e9$ must be a vector of size $\u27e8\mathit{\text{value}}\u27e9$ array. Supplied argument was a vector of size $\u27e8\mathit{\text{value}}\u27e9$.
$\mathbf{errorid}=10601$
On entry, argument $\u27e8\mathit{\text{value}}\u27e9$ must be a vector of size $\u27e8\mathit{\text{value}}\u27e9$ array. The size for the supplied array could not be ascertained.
$\mathbf{errorid}=10601$
On entry, argument $\u27e8\mathit{\text{value}}\u27e9$ must be a $\u27e8\mathit{\text{value}}\u27e9$ x $\u27e8\mathit{\text{value}}\u27e9$ array. Supplied argument has $\u27e8\mathit{\text{value}}\u27e9$ dimensions.
$\mathbf{errorid}=10601$
On entry, argument $\u27e8\mathit{\text{value}}\u27e9$ must be a $\u27e8\mathit{\text{value}}\u27e9$ x $\u27e8\mathit{\text{value}}\u27e9$ array. Supplied argument was a $\u27e8\mathit{\text{value}}\u27e9$ x $\u27e8\mathit{\text{value}}\u27e9$ array.
$\mathbf{errorid}=10601$
On entry, argument $\u27e8\mathit{\text{value}}\u27e9$ must be a $\u27e8\mathit{\text{value}}\u27e9$ x $\u27e8\mathit{\text{value}}\u27e9$ array. Not all of the sizes for the supplied array could be ascertained.
$\mathbf{errorid}=10602$
On entry, the raw data component of $\u27e8\mathit{\text{value}}\u27e9$ is null.
$\mathbf{errorid}=10603$
On entry, unable to ascertain a value for $\u27e8\mathit{\text{value}}\u27e9$.
$\mathbf{errorid}=10604$
On entry, the data in $\u27e8\mathit{\text{value}}\u27e9$ is stored in $\u27e8\mathit{\text{value}}\u27e9$ Major Order. The data was expected to be in $\u27e8\mathit{\text{value}}\u27e9$ Major Order.
$\mathbf{errorid}=10605$
On entry, the communication class $\u27e8\mathit{\text{value}}\u27e9$ has not been initialized correctly.
$\mathbf{errorid}=10703$
An exception was thrown during IO (writing).
$\mathbf{errorid}=-99$
An unexpected error has been triggered by this routine.
$\mathbf{errorid}=-399$
Your licence key may have expired or may not have been installed correctly.
Rescue failed: the trust region could not be reduced further after some function evaluation could not be provided. Check the specification of your objective and whether it needs rescaling. Try a different initial x.
$\mathbf{errorid}=17$
Some initial interpolation points were not provided. Rescue cannot be attempted at this stage. Check the specification of your objective and whether it needs rescaling. Try a different initial x.
$\mathbf{errorid}=18$
The predicted reduction in a trust region step was non-positive. Check the specification of your objective and whether it needs rescaling. Try a different initial x.
$\mathbf{errorid}=21$
Maximum number of function evaluations exceeded.
$\mathbf{errorid}=23$
The solver terminated after the maximum time allowed was exceeded.
$\mathbf{errorid}=24$
No progress, the solver was stopped after $\u27e8\mathit{value}\u27e9$ consecutive slow steps. Use the option ‘DFO Maximum Slow Steps’ to modify the maximum number of slow steps accepted.
$\mathbf{errorid}=50$
The problem was solved to an acceptable level after $\u27e8\mathit{value}\u27e9$ consecutive slow iterations. Use the option ‘DFO Maximum Slow Steps’ to modify the maximum number of slow steps accepted.
User requested termination during a monitoring step.
$\mathbf{errorid}=20$
User requested termination during an objective evaluation step.
7Accuracy
In a non-noisy case, the solver can declare convergence on two conditions.
(i)The trust region radius is below the tolerance ${\rho}_{\mathrm{end}}$ set by the optional parameter DFO Trust Region Tolerance. When this condition is met, the corresponding solution will generally be at a distance smaller than $10\times {\rho}_{\mathrm{end}}$ of a local minimum.
(ii)The sum of the square of the residuals is below the tolerance set by the optional parameter DFLS Small Residuals Tol. In a data fitting context, this condition means that the error between the observed data and the model is smaller than the requested tolerance.
If the objective is declared as noisy by the optional parameter DFO Noisy Problem, the solver declares convergence more conservatively. Instead of stopping with the first condition, the solver will trigger soft restarts (see Section 11 for more details) to ensure it did not get stuck in a flat region because of the noise. The solver then declares convergence when it is reasonably sure that it has reached a local minimum.
(i)The total number of restarts is greater than the limit set by optional parameter DFO Max Soft Restarts and the trust region radius is below the tolerance.
(ii)The number of consecutive restarts that did not manage to decrease the objective function is greater than the limit set by the optional parameter DFO Max Unsucc Soft Restarts.
In addition, this solver can stop if the convergence is deemed too slow on two conditions.
(i)The trust region lower bound is lower than the value set by the optional parameter DFO Trust Region Slow Tol and the number of consecutive slow steps is greater than the value set by DFO Maximum Slow Steps.
(ii)The trust region lower bound is greater than the value set by the optional parameter DFO Trust Region Slow Tol and the number of consecutive slow steps is greater than five times the value set by DFO Maximum Slow Steps.
The slow convergence detection can be deactivated by setting DFO Maximum Slow Steps to $0$.
8Parallelism and Performance
Please see the description for the underlying computational routine in this section of the
FL Interface documentation.
9Further Comments
9.1Description of the Printed Output
The solver can print information to give an overview of the problem and the progress of the computation. The output may be sent to two independent
unit numbers
which are set by optional parameters Print File and Monitoring File. Optional parameters Print Level, Print Options, Monitoring Level and Print Solution determine the exposed level of detail. This allows, for example, a detailed log file to be generated while the condensed information is displayed on the screen.
By default (${\mathbf{Print\; File}}=6$, ${\mathbf{Print\; Level}}=2$), four sections are printed to the standard output: a header, a list of options, an iteration log and a summary.
Header
The header contains statistics about the problem. It should look like:
---------------------------------------------------------------------------
E04F(F|G), Derivative-free solver for nonlinear least squares functions
---------------------------------------------------------------------------
Optional parameters list
If ${\mathbf{Print\; Options}}=\mathrm{YES}$, a list of the optional parameters and their values is printed. The list shows all options of the solver, each displayed on one line. The line contains the option name, its current value and an indicator for how it was set. The options left at their defaults are noted by ‘d’ and the ones you set are noted by ‘U’. Note that the output format is compatible with the file format expected by e04zpf (no CPP interface). The output looks as follows:
Dfo Initial Interp Points = Coordinate * d
Dfo Max Objective Calls = 500 * d
Dfo Max Soft Restarts = 5 * d
Dfo Max Unsucc Soft Restarts = 3 * d
Dfo Maximum Slow Steps = 20 * d
Dfo Noise Level = 0.00000E+00 * d
Problem statistics
If ${\mathbf{Print\; Level}}\ge 2$, statistics on the problem are printed, for example:
Problem Statistics
No of variables 4
free (unconstrained) 2
bounded 2
Objective function LeastSquares
No of residuals 11
Iteration log
Iteration log
If ${\mathbf{Print\; Level}}\ge 2$, the solver will print a summary line for each step. An iteration is considered successful when it yields a decrease of the objective sufficiently close to the decrease predicted by the quadratic model. Each line shows the step number (step), the value of the objective function (obj), the lower bound on the radius of the trust region (rho), and the cumulative number of objective function evaluations (nf). The output looks as follows:
Occasionally, the letter ‘s’ is printed at the end of the line indicating that the progress is considered slow by the slow convergence detection heuristic. After a certain number of consecutive slow steps, the solver is stopped. The limit on the number of slow iterations can be controlled by the optional parameter DFO Maximum Slow Steps and the tolerance on the trust region radius before the solver can be stopped is driven by DFO Trust Region Slow Tol.
If ${\mathbf{Print\; Level}}\ge 3$, each line additionally shows the current value of the trust region radius (delta) as well as the step length (||d||) taken. It might look as follows:
Status: Converged, small residuals
Value of the objective 3.95417E-29
Number of objective function evaluations 15
Number of steps 4
Note that only the iterations that decrease the objective function are printed in the iteration log, meaning that objective evaluations are likely to happen between the last printed iteration and the convergence. This leads to a small difference between the last line of the iteration log and the final summary in terms of the number of function evaluations.
Optionally, if ${\mathbf{Stats\; Time}}=\mathrm{YES}$, the timings are printed:
Timings
Total time spent in the solver 0.056
Time spent in the objective evaluation 0.012
Additionally, if ${\mathbf{Print\; Solution}}=\mathrm{YES}$, the solution is printed along with the bounds:
In this example, we minimize the two-dimension Rosenbrock function under some bound constraints. In this problem, the number of variables $n=2$ and the number of residuals ${m}_{r}=2$
This section contains a short description of the algorithm used in handle_solve_dfls_rcomm which is based on the collaborative work between NAG and the University of Oxford (Cartis and Roberts (2017) and Cartis et al. (2018)). It uses a model-based derivative-free trust region framework adapted to exploit least squares problems structure.
11.1Derivative-free Trust Region Algorithm
In this section, we are interested in generic problems of the form
where the derivatives of the objective function $f$ are not easily available. A model-based DFO algorithm maintains a set of points ${Y}_{k}$ centred on an iterate ${x}_{k}$ to build quadratic interpolation models of the objective
Note that if the number of interpolation points $\mathit{npt}$ is smaller than $\frac{({n}_{r}+1)\times ({n}_{r}+2)}{2}$, the model chosen is the one for which the Hessian ${H}_{k}$ is the closest to ${H}_{k-1}$ in the Frobenius norm sense.
This model is iteratively optimized over a trust region, updated and moved around the new computed points. More precisely, it can be described as:
DFO Algorithm
1.Initialization
Choose an initial interpolation set ${Y}_{0}$, trust region radius ${\rho}_{\mathrm{beg}}$ and build the first quadratic model ${\varphi}_{0}$.
2.Iterationk
(i)Minimize the model in the trust region to obtain a step ${s}_{k}$.
(ii)If the step is too small, adjust the geometry of the interpolation set and the trust region size ${\rho}_{k}$ and restart the iteration.
(iii)Evaluate the objective at the new point ${x}_{k}+{s}_{k}$.
(iv)Replace a far away point from ${Y}_{k}$ by ${x}_{k}+{s}_{k}$ to obtain ${Y}_{k+1}$.
(v)If the decrease of the objective is sufficient (successful step), choose ${x}_{k+1}={x}_{k}+{s}_{k}$, else choose ${x}_{k+1}={x}_{k}$.
(vi)Choose ${\rho}_{k+1}$ and adjust the geometry of ${Y}_{k+1}$, if necessary.
(vii)Build ${\varphi}_{k+1}$ using the new interpolation set.
(viii)Stop the algorithm if ${\rho}_{k+1}$is below the chosen tolerance ${\rho}_{\mathrm{end}}$.
In the following sections, we call an iteration ‘successful’ when the trial point ${x}_{k}+{s}_{k}$ is accepted as the next iterate.
11.2Bounds on the Variables
The bounds on the variables are handled during the model optimization step (step 2(i) of DFO Algorithm) with an active set method. If a bound is hit, it is fixed and step 2(i) is restarted.
11.3Adaptation to Nonlinear Least Squares Problems
In the specific case where $f$ is a sum of square $f\left(x\right)={\displaystyle \sum _{i=1}^{{m}_{r}}}{{r}_{i}\left(x\right)}^{2}$, a good approximation of the Hessian of the objective can be
where $J$ is the ${m}_{r}\times n$ first derivative matrix of $f$. This approximation is the main idea behind the Gauss–Newton and Levenberg–Marquardt methods. Following the work of Zhang et al. (2010), it is possible to adapt it to the DFO framework. In handle_solve_dfls_rcomm, one linear model is built for each residual ${r}_{i}$
The first expression amounts to making a Gauss–Newton approximation when we are far from a stationary point and the second to a Levenberg–Marquardt approximation when we are close to a stationary point with small residuals.
handle_solve_dfls_rcomm integrates this method of building models into the framework presented in the DFO Algorithm.
11.4Growing the Interpolation Set
In the case where the function is very expensive, it might be desirable for the solver to make some progress before the ${n}_{r}+1$ evaluations necessary to build the first interpolation model are done. To get that behaviour, you can set the optional parameter DFO Number Initial Points, controlling the number of initial interpolation points, to a value that is lower than ${n}_{r}+1$. The solver will then start its iteration earlier while adding random perturbations to the interpolation models to ensure that the full space is explored.
It is to be noted that this mode will typically not lead to a faster convergence to the solution and should only be used if early progress is desirable.
11.5Dealing with Noisy Problems
If the problem solved is known to be noisy, declaring it as such to the solver with the optional parameter DFO Noisy Problem will modify the behaviour of the solver to take into account the uncertainty of the function evaluations. The two main features implemented to handle noisy objective functions are:
(i)slow update of the trust regions;
(ii)soft restarts of the algorithm can be performed instead of declaring convergence to ensure the solver did not get stuck in a flat region due to the noise.
A soft restart consists of a reset of the trust region's values to the starting ones and a few objective evaluations to improve the geometry of the interpolation set in the new trust region. It is possible to control the number of objective evaluations performed during a soft restart with the optional parameter DFO Number Soft Restarts Pts. After a set maximum number of restarts (DFO Max Soft Restarts) or maximum number of unsuccessful restarts (DFO Max Unsucc Soft Restarts), the solver will declare convergence in the usual way.
12Optional Parameters
Several optional parameters in handle_solve_dfls_rcomm define choices in the problem specification or the algorithm logic. In order to reduce the number of formal arguments of handle_solve_dfls_rcomm these optional parameters have associated default values that are appropriate for most problems. Therefore, you need only specify those optional parameters whose values are to be different from their default values.
The remainder of this section can be skipped if you wish to use the default values for all optional parameters.
The optional parameters can be changed by calling handle_opt_set anytime between the initialization of the handle and the call to the solver. Modification of the optional parameters during intermediate monitoring stops is not allowed. Once the solver finishes, the optional parameters can be altered again for the next solve.
Determines how the initial interpolation points are chosen. If ${\mathbf{DFO\; Initial\; Interp\; Points}}=\mathrm{Coordinate}$, the interpolation points are chosen along the coordinate directions around the initial point. If ${\mathbf{DFO\; Initial\; Interp\; Points}}=\mathrm{Random}$, the initial interpolation points are chosen along random orthogonal directions around the initial point. Set DFO Random Seed to a positive value to fix the random seed and get reproducible results.
Constraint: ${\mathbf{DFO\; Initial\; Interp\; Points}}=\mathrm{Coordinate}$ or $\mathrm{Random}$.
DFO Maximum Slow Steps
$i$
Default $=20$
If ${\mathbf{DFO\; Maximum\; Slow\; Steps}}>0$, this parameter defines the maximum number of consecutive slow iterations ${n}_{\mathrm{slow}}$ allowed. Set ${\mathbf{DFO\; Maximum\; Slow\; Steps}}=0$ to deactivate the slow iteration detection. The algorithm can stop in two situations:
(i)${n}_{\mathrm{slow}}>{\mathbf{DFO\; Maximum\; Slow\; Steps}}$ and $\rho <{\mathbf{DFO\; Trust\; Region\; Slow\; Tol}}$ with $\mathbf{errorid}={\mathbf{50}}$,
(ii)${n}_{\mathrm{slow}}>5\times {\mathbf{DFO\; Maximum\; Slow\; Steps}}$ with $\mathbf{errorid}={\mathbf{24}}$.
A limit on the number of objective function evaluations the solver is allowed to compute. If the limit is reached, the solver stops with $\mathbf{errorid}={\mathbf{21}}$.
The maximum total number of soft restarts that can be performed if the objective function is declared as noisy (${\mathbf{DFO\; Noisy\; Problem}}=\mathrm{YES}$).
The maximum number of consecutive unsuccessful soft restarts that can be performed if the objective function is declared as noisy (${\mathbf{DFO\; Noisy\; Problem}}=\mathrm{YES}$).
If ${\mathbf{DFO\; Monitor\; Frequency}}>0$, the solver will stop at the end of every $i$th step for monitoring purposes. handle_solve_dfls_rcomm needs to be called again to continue the optimization.
Indicates if the function evaluations provided to the solver are noisy. If ${\mathbf{DFO\; Noisy\; Problem}}=\mathrm{YES}$, some algorithmic features will be activated:
(i)The trust region update becomes slower to reflect the decreased confidence in the objective values.
(iii)In addition, if ${\mathbf{DFO\; Noise\; Level}}>0.0$, the solver will trigger a soft restart if all the function values are within the noise level.
DFO Number Initial Points
$i$
Default $=0$
The initial number of interpolation points in ${Y}_{0}$(1) used to build the linear models of the residuals. If ${\mathbf{DFO\; Number\; Initial\; Points}}=0$, the number of points is chosen to be equal to the total number of interpolation points set by DFO Number Interp Points.
If this parameter is chosen to be lower than the maximum set by DFO Number Interp Points, the solver will progressively increase the number of interpolation points until it reaches that value. In this release, it is only possible to grow the interpolation set if DFO Number Interp Points is set to the default value.
If ${\mathbf{DFO\; Number\; Initial\; Points}}<{\mathbf{DFO\; Number\; Interp\; Points}}$, DFO Number Interp Points must be set to the default value.
DFO Number Interp Points
$i$
Default $=0$
The maximum number of interpolation points in ${Y}_{k}$(1) used to build the linear models of the residuals. If ${\mathbf{DFO\; Number\; Interp\; Points}}=0$, the number of points is chosen to be ${n}_{r}+1$ where ${n}_{r}$ is the number of non-fixed variables.
The random seed used to generate the random points used to build the initial model or build the underdetermined models when the interpolation set has not fully grown (${\mathbf{DFO\; Number\; Initial\; Points}}<{\mathbf{DFO\; Number\; Interp\; Points}}$). If ${\mathbf{DFO\; Random\; Seed}}<0$, the random seed will be based on values taken from the real-time clock, potentially resulting in the solver taking a different path each time it is run. Set it to a positive value to get fully reproducible runs.
${\rho}_{\mathrm{beg}}$, the initial trust region radius. This parameter should be set to about one tenth of the greatest expected overall change to a variable: the initial quadratic model will be constructed by taking steps from the initial $x$ of length ${\rho}_{\mathrm{beg}}$ along each coordinate direction. The default value assumes that the variables have an order of magnitude $1$.
${\rho}_{\mathrm{end}}$, the requested trust region radius. The algorithm declares convergence when the trust region radius reaches this limit. It should indicate the absolute accuracy that is required in the final values of the variables.
This defines the ‘infinite’ bound $\mathit{bigbnd}$ in the definition of the problem constraints. Any upper bound greater than or equal to $\mathit{bigbnd}$ will be regarded as $+\infty $ (and similarly any lower bound less than or equal to $-\mathit{bigbnd}$ will be regarded as $-\infty $). Note that a modification of this optional parameter does not influence constraints which have already been defined; only the constraints formulated after the change will be affected.
If $i\ge 0$, the
unit number
for the secondary (monitoring) output. If ${\mathbf{Monitoring\; File}}=-1$, no secondary output is provided. The information output to this unit is controlled by Monitoring Level.
Constraint: ${\mathbf{Monitoring\; File}}\ge -1$.
Monitoring Level
$i$
Default $=4$
This parameter sets the amount of information detail that will be printed by the solver to the secondary output. The meaning of the levels is the same as with Print Level.
If $i\ge 0$, the
unit number
for the primary output of the solver. If ${\mathbf{Print\; File}}=-1$, the primary output is completely turned off independently of other settings. The default value is the advisory message unit number as defined by x04abf (no CPP interface) at the time of the optional parameters initialization, e.g., at the initialization of the handle. The information output to this unit is controlled by Print Level.
Constraint: ${\mathbf{Print\; File}}\ge -1$.
Print Level
$i$
Default $=2$
This parameter defines how detailed information should be printed by the solver to the primary and secondary output.
$\mathit{i}$
Output
$0$
No output from the solver.
$1$
The Header and Summary.
$2$, $3$, $4$, $5$
Additionally, the Iteration log.
Constraint: $0\le {\mathbf{Print\; Level}}\le 5$.
Print Options
$a$
Default $=\mathrm{YES}$
If ${\mathbf{Print\; Options}}=\mathrm{YES}$, a listing of optional parameters will be printed to the primary output and is always printed to the secondary output.
Constraint: ${\mathbf{Print\; Options}}=\mathrm{YES}$ or $\mathrm{NO}$.
Print Solution
$a$
Default $=\mathrm{NO}$
If ${\mathbf{Print\; Solution}}=\mathrm{YES}$, the solution will be printed to the primary and secondary output.
Constraint: ${\mathbf{Print\; Solution}}=\mathrm{YES}$ or $\mathrm{NO}$.
Stats Time
$a$
Default $=\mathrm{NO}$
This parameter turns on timings of various parts of the algorithm to give a better overview of where most of the time is spent. This might be helpful for a choice of different solving approaches. It is possible to choose between CPU and wall clock time. Choice $\mathrm{YES}$ is equivalent to $\mathrm{WALL\; CLOCK}$.
Constraint: ${\mathbf{Stats\; Time}}=\mathrm{YES}$, $\mathrm{NO}$, $\mathrm{CPU}$ or $\mathrm{WALL\; CLOCK}$.
Time Limit
$r$
Default $\text{}={10}^{6}$
A limit to the number of seconds that the solver can use to solve one problem. If during the convergence check this limit is exceeded, the solver will terminate with $\mathbf{errorid}={\mathbf{23}}$.