naginterfaces.library.glopt.nlp_multistart_sqp¶
- naginterfaces.library.glopt.nlp_multistart_sqp(n, ncnln, bl, bu, objfun, npts, repeat, nb, comm, a=None, confun=None, start=None, data=None, io_manager=None, spiked_sorder='C')[source]¶
nlp_multistart_sqp
is designed to find the global minimum of an arbitrary smooth function subject to constraints (which may include simple bounds on the variables, linear constraints and smooth nonlinear constraints) by generating a number of different starting points and performing a local search from each using sequential quadratic programming.Note: this function uses optional algorithmic parameters, see also:
optset()
.For full information please refer to the NAG Library document for e05uc
https://www.nag.com/numeric/nl/nagdoc_29/flhtml/e05/e05ucf.html
- Parameters
- nint
, the number of variables.
- ncnlnint
, the number of nonlinear constraints.
- blfloat, array-like, shape
must contain the lower bounds for all the constraints.
- bufloat, array-like, shape
must contain the upper bounds for all the constraints.
- objfuncallable (objf, objgrd) = objfun(mode, x, objgrd, nstate, data=None)
must calculate the objective function and (optionally) its gradient for a specified -vector .
- Parameters
- modeint
Indicates which values must be assigned during each call of . Only the following values need be assigned:
.
All available elements of .
and all available elements of .
- xfloat, ndarray, shape
, the vector of variables at which the objective function and/or all available elements of its gradient are to be evaluated.
- objgrdfloat, ndarray, shape
The elements of are set to special values which enable
nlp_multistart_sqp
to detect whether they are changed by .- nstateint
If then
nlp_multistart_sqp
is calling for the first time on the current local optimization problem. This argument setting allows you to save computation time if certain data must be calculated only once.- dataarbitrary, optional, modifiable in place
User-communication data for callback functions.
- Returns
- objffloat
If or , must be set to the value of the objective function at .
- objgrdfloat, array-like, shape
If or , must return the available elements of the gradient evaluated at .
- nptsint
The number of different starting points to be generated and used. The more points used, the more likely that the best returned solution will be a global minimum.
- repeatbool
Is passed as an argument to and may be used to initialize a random number generator to a repeatable, or non-repeatable, sequence.
- nbint
The number of solutions to be returned. The function saves up to local minima ordered by increasing value of the final objective function. If the defining criterion for ‘best solution’ is only that the value of the objective function is as small as possible then should be set to . However, if you want to look at other solutions that may have desirable properties then setting will produce local minima, ordered by increasing value of their objective functions at the minima.
- commdict, communication object, modified in place
Communication structure.
This argument must have been initialized by a prior call to
optset()
.- aNone or float, array-like, shape , optional
Note: the required extent for this argument in dimension 2 is determined as follows: if : ; otherwise: .
The matrix of general linear constraints in (1). That is, the th row contains the coefficients of the th general linear constraint, for .
- confunNone or callable (c, cjsl) = confun(mode, needc, x, cjsl, nstate, data=None), optional
Note: if this argument is None then a NAG-supplied facility will be used.
must calculate the vector of nonlinear constraint functions and (optionally) its Jacobian () for a specified -element vector . If there are no nonlinear constraints (i.e., ), will never be called by
nlp_multistart_sqp
and may be None. If there are nonlinear constraints, the first call to will occur before the first call to .- Parameters
- modeint
Indicates which values must be assigned during each call of . Only the following values need be assigned, for each value of such that :
.
All available elements in the th row of .
and all available elements in the th row of .
- needcint, ndarray, shape
The indices of the elements of and/or that must be evaluated by . If , and/or the available elements of the th row of (see argument ) must be evaluated at .
- xfloat, ndarray, shape
, the vector of variables at which the constraint functions and/or the available elements of the constraint Jacobian are to be evaluated.
- cjslfloat, ndarray, shape
may be regarded as a two-dimensional ‘slice’ of the three-dimensional array of
nlp_multistart_sqp
.Unless or (the default setting is ), the elements of are set to special values which enable
nlp_multistart_sqp
to detect whether they are changed by .- nstateint
If then
nlp_multistart_sqp
is calling for the first time on the current local optimization problem. This argument setting allows you to save computation time if certain data must be calculated only once.- dataarbitrary, optional, modifiable in place
User-communication data for callback functions.
- Returns
- cfloat, array-like, shape
If and or , must contain the value of . The remaining elements of , corresponding to the non-positive elements of , need not be set.
- cjslfloat, array-like, shape
If and or , the th row of must contain the available elements of the vector given by
where is the partial derivative of the th constraint with respect to the th variable, evaluated at the point . See also the argument . The remaining rows of , corresponding to non-positive elements of , need not be set.
If all elements of the constraint Jacobian are known (i.e., or ), any constant elements may be assigned to one time only at the start of each local optimization.
An element of that is not subsequently assigned in will retain its initial value throughout the local optimization.
Constant elements may be loaded into during the first call to for the local optimization (signalled by the value ).
The ability to preload constants is useful when many Jacobian elements are identically zero, in which case may be initialized to zero and nonzero elements may be reset by .
Note that constant nonzero elements do affect the values of the constraints.
Thus, if is set to a constant value, it need not be reset in subsequent calls to , but the value must nonetheless be added to .
For example, if and then the term must be included in the definition of .
It must be emphasized that, if or , unassigned elements of are not treated as constant; they are estimated by finite differences, at nontrivial expense.
If you do not supply a value for the option ‘Difference Interval’, an interval for each element of is computed automatically at the start of each local optimization.
The automatic procedure can usually identify constant elements of , which are then computed once only by finite differences.
- startNone or callable quas = start(quas, repeat, bl, bu, data=None), optional
Note: if this argument is None then a NAG-supplied facility will be used.
must calculate the starting points to be used by the local optimizer.
If you do not wish to write a function specific to your problem then None may be used. In this case, a default function uses the NAG quasi-random number generators to distribute starting points uniformly across the domain.
It is affected by the value of .
- Parameters
- quasfloat, ndarray, shape
All elements of will have been set to zero, so only nonzero values need be set subsequently.
- repeatbool
Specifies whether a repeatable or non-repeatable sequence of points are to be generated.
- blfloat, ndarray, shape
The lower bounds on the variables. These may be used to ensure that the starting points generated in some sense ‘cover’ the region, but there is no requirement that a starting point be feasible.
- bufloat, ndarray, shape
The upper bounds on the variables. (See .)
- dataarbitrary, optional, modifiable in place
User-communication data for callback functions.
- Returns
- quasfloat, array-like, shape
Must contain the starting points for the local minimizations, i.e., must contain the th component of the th starting point.
- dataarbitrary, optional
User-communication data for callback functions.
- io_managerFileObjManager, optional
Manager for I/O in this routine.
- spiked_sorderstr, optional
If is spiked (i.e., has unit extent in all but one dimension, or has size ), selects the storage order to associate with it in the NAG Engine:
- spiked_sorder =
row-major storage will be used;
- spiked_sorder =
column-major storage will be used.
Two-dimensional arrays returned from callback functions in this routine must then use the same storage order.
- Returns
- xfloat, ndarray, shape
contains the final estimate of the th solution, for .
- objffloat, ndarray, shape
contains the value of the objective function at the final iterate for the th solution.
- objgrdfloat, ndarray, shape
contains the gradient of the objective function for the th solution at the final iterate (or its finite difference approximation), for .
- iteraint, ndarray, shape
contains the number of major iterations performed to obtain the th solution. If less than solutions are returned then contains the number of starting points that have resulted in a converged solution. If this is close to then this might be indicative that fewer than local minima exist.
- cNone or float, ndarray, shape
If , contains the value of the th nonlinear constraint function at the final iterate, for the th solution, for .
If , is returned as None.
- cjacNone or float, ndarray, shape
If , contains the Jacobian matrices of the nonlinear constraint functions at the final iterate for each of the returned solutions, i.e., contains the partial derivative of the th constraint function with respect to the th variable, for , for , for the th solution. (See the discussion of argument under .)
If , is returned as None.
- rfloat, ndarray, shape
For each of the solutions will contain a form of the Hessian; for the th returned solution contains the Hessian that would be returned from the local minimizer. If , the default, each contains the upper triangular Cholesky factor of , an estimate of the transformed and reordered Hessian of the Lagrangian at . If , contains the upper triangular Cholesky factor of , the approximate (untransformed) Hessian of the Lagrangian, with the variables in the natural order.
- clamdafloat, ndarray, shape
The values of the QP multipliers from the last QP subproblem solved for the th solution. should be non-negative if and non-positive if .
- istateint, ndarray, shape
contains the status of the constraints in the QP working set for the th solution. The significance of each possible value of is as follows:
Meaning
The constraint is satisfied to within the feasibility tolerance, but is not in the QP working set.
This inequality constraint is included in the QP working set at its lower bound.
This inequality constraint is included in the QP working set at its upper bound.
This constraint is included in the QP working set as an equality. This value of can occur only when .
- infoint, ndarray, shape
contains one of , or . Please see the description of each corresponding value of on exit from
opt.nlp1_solve
for detailed explanations of these exit values. As usual denotes success.If = 8 on exit, then not all solutions have been found, and contains the number of solutions actually found.
- Other Parameters
- ‘Punch Unit’int
Default
This option allows you to send information arising from an appropriate setting of ‘Out_Level’ to be sent to the Fortran unit number defined by ‘Punch Unit’. If you wish this file to be different to the standard output unit where other output is displayed then this file should be attached by calling the
FileObjManager
methodunit_from_fileobj()
prior to callingnlp_multistart_sqp
.- ‘Out_Level’int
Default
This option defines the amount of extra information to be sent to the Fortran unit number defined by ‘Punch Unit’. The possible choices for are the following:
Meaning
0
No extra output.
1
Updated solutions only. This is useful during long runs to observe progress.
2
Successful start points only. This is useful to save the starting points that gave rise to the final solution.
3
Both updated solutions and successful start points.
- ‘Central Difference Interval’float
Default values are computed
If the algorithm switches to central differences because the forward-difference approximation is not sufficiently accurate, the value of is used as the difference interval for every element of . The switch to central differences is indicated by
C
at the end of each line of intermediate printout produced by the major iterations (see Further Comments). The use of finite differences is discussed further under the option ‘Difference Interval’.If you supply a value for this option, a small value between and is appropriate.
- ‘Crash Tolerance’float
Default
This value is used when
nlp_multistart_sqp
selects an initial working set. If , the initial working set will include (if possible) bounds or general inequality constraints that lie within of their bounds. In particular, a constraint of the form will be included in the initial working set if . If or , the default value is used.- ‘Defaults’valueless
This special keyword is used to reset all options to their default values, and any random state stored in the array will be destroyed.
Any option value given with this keyword will be ignored. This option cannot be queried or got.
- ‘Derivative Level’int
Default
This argument indicates which derivatives are provided in functions and . The possible choices for are the following.
Meaning
3
All elements of the objective gradient and the constraint Jacobian are provided.
2
All elements of the constraint Jacobian are provided, but some elements of the objective gradient are not specified.
1
All elements of the objective gradient are provided, but some elements of the constraint Jacobian are not specified.
0
Some elements of both the objective gradient and the constraint Jacobian are not specified.
The value should be used whenever possible, since
nlp_multistart_sqp
is more reliable (and will usually be more efficient) when all derivatives are exact.If or ,
nlp_multistart_sqp
will estimate the unspecified elements of the objective gradient, using finite differences. The computation of finite difference approximations usually increases the total run-time, since a call to is required for each unspecified element. Furthermore, less accuracy can be attained in the solution (see Module 8 of Gill et al. (1981), for a discussion of limiting accuracy).If or ,
nlp_multistart_sqp
will approximate unspecified elements of the constraint Jacobian. One call to is needed for each variable for which partial derivatives are not available. For example, if the Jacobian has the formwhere ‘’ indicates an element provided by you and ‘?’ indicates an unspecified element,
nlp_multistart_sqp
will call twice: once to estimate the missing element in column 2, and again to estimate the two missing elements in column . (Since columns and are known, they require no calls to .)At times, central differences are used rather than forward differences, in which case twice as many calls to and are needed. (The switch to central differences is not under your control.)
If or , the default value is used.
- ‘Difference Interval’float
Default values are computed
This option defines an interval used to estimate derivatives by finite differences in the following circumstances:
For verifying the objective and/or constraint gradients (see the description of the option ‘Verify’).
For estimating unspecified elements of the objective gradient or the constraint Jacobian.
In general, a derivative with respect to the th variable is approximated using the interval , where , with the first point feasible with respect to the bounds and linear constraints. If the functions are well scaled, the resulting derivative approximation should be accurate to . See Gill et al. (1981) for a discussion of the accuracy in finite difference approximations.
If a difference interval is not specified, a finite difference interval will be computed automatically for each variable by a procedure that requires up to six calls of and for each element. This option is recommended if the function is badly scaled or you wish to have
nlp_multistart_sqp
determine constant elements in the objective and constraint gradients (see the descriptions of and in Parameters).If you supply a value for this option, a small value between and is appropriate.
- ‘Feasibility Tolerance’float
Default
The scalar defines the maximum acceptable absolute violations in linear and nonlinear constraints at a ‘feasible’ point; i.e., a constraint is considered satisfied if its violation does not exceed . If or , the default value is used. Using this keyword sets both options ‘Linear Feasibility Tolerance’ and ‘Nonlinear Feasibility Tolerance’ to , if . (Additional details are given under the descriptions of these options.)
- ‘Function Precision’float
Default
This argument defines , which is intended to be a measure of the accuracy with which the problem functions and can be computed. If or , the default value is used.
The value of should reflect the relative precision of ; i.e., acts as a relative precision when is large, and as an absolute precision when is small. For example, if is typically of order and the first six significant digits are known to be correct, an appropriate value for would be . In contrast, if is typically of order and the first six significant digits are known to be correct, an appropriate value for would be . The choice of can be quite complicated for badly scaled problems; see Module 8 of Gill et al. (1981) for a discussion of scaling techniques. The default value is appropriate for most simple functions that are computed with full accuracy. However, when the accuracy of the computed function values is known to be significantly worse than full precision, the value of should be large enough so that
nlp_multistart_sqp
will not attempt to distinguish between function values that differ by less than the error inherent in the calculation.- ‘Hessian’str
Default
This option controls the contents of the upper triangular matrix (see Parameters).
nlp_multistart_sqp
works exclusively with the transformed and reordered Hessian (6), and hence extra computation is required to form the Hessian itself. If , contains the Cholesky factor of the transformed and reordered Hessian. If , the Cholesky factor of the approximate Hessian itself is formed and stored in .- ‘Infinite Bound Size’float
Default
This defines the ‘infinite’ bound in the definition of the problem constraints. Any upper bound greater than or equal to will be regarded as (and similarly any lower bound less than or equal to will be regarded as ).
- ‘Infinite Step Size’float
Default
If , specifies the magnitude of the change in variables that is treated as a step to an unbounded solution. If the change in during an iteration would exceed the value of , the objective function is considered to be unbounded below in the feasible region. If , the default value is used.
- ‘Line Search Tolerance’float
Default
The value () controls the accuracy with which the step taken during each iteration approximates a minimum of the merit function along the search direction (the smaller the value of , the more accurate the linesearch). The default value requests an inaccurate search, and is appropriate for most problems, particularly those with any nonlinear constraints.
If there are no nonlinear constraints, a more accurate search may be appropriate when it is desirable to reduce the number of major iterations – for example, if the objective function is cheap to evaluate, or if a substantial number of derivatives are unspecified. If or , the default value is used.
- ‘Linear Feasibility Tolerance’float
Default
The default value of is if or , and otherwise.
The scalars and define the maximum acceptable absolute violations in linear and nonlinear constraints at a ‘feasible’ point; i.e., a linear constraint is considered satisfied if its violation does not exceed , and similarly for a nonlinear constraint and . If or , the default value is used, for .
On entry to
nlp_multistart_sqp
, an iterative procedure is executed in order to find a point that satisfies the linear constraints and bounds on the variables to within the tolerance . All subsequent iterates will satisfy the linear constraints to within the same tolerance (unless is comparable to the finite difference interval).For nonlinear constraints, the feasibility tolerance defines the largest constraint violation that is acceptable at an optimal point. Since nonlinear constraints are generally not satisfied until the final iterate, the value of option ‘Nonlinear Feasibility Tolerance’ acts as a partial termination criterion for the iterative sequence generated by
nlp_multistart_sqp
(see the discussion of option ‘Optimality Tolerance’).These tolerances should reflect the precision of the corresponding constraints. For example, if the variables and the coefficients in the linear constraints are of order unity, and the latter are correct to about decimal digits, it would be appropriate to specify as .
- ‘Nonlinear Feasibility Tolerance’float
Default or
The default value of is if or , and otherwise.
The scalars and define the maximum acceptable absolute violations in linear and nonlinear constraints at a ‘feasible’ point; i.e., a linear constraint is considered satisfied if its violation does not exceed , and similarly for a nonlinear constraint and . If or , the default value is used, for .
On entry to
nlp_multistart_sqp
, an iterative procedure is executed in order to find a point that satisfies the linear constraints and bounds on the variables to within the tolerance . All subsequent iterates will satisfy the linear constraints to within the same tolerance (unless is comparable to the finite difference interval).For nonlinear constraints, the feasibility tolerance defines the largest constraint violation that is acceptable at an optimal point. Since nonlinear constraints are generally not satisfied until the final iterate, the value of option ‘Nonlinear Feasibility Tolerance’ acts as a partial termination criterion for the iterative sequence generated by
nlp_multistart_sqp
(see the discussion of option ‘Optimality Tolerance’).These tolerances should reflect the precision of the corresponding constraints. For example, if the variables and the coefficients in the linear constraints are of order unity, and the latter are correct to about decimal digits, it would be appropriate to specify as .
- ‘List’valueless
Option ‘List’ enables printing of each option specification as it is supplied. ‘Nolist’ suppresses this printing.
- ‘Nolist’valueless
Default
Option ‘List’ enables printing of each option specification as it is supplied. ‘Nolist’ suppresses this printing.
- ‘Major Iteration Limit’int
Default
The value of specifies the maximum number of major iterations allowed before termination of the subproblem. Setting and means that the workspace needed will be computed and printed, but no iterations will be performed. If , the default value is used.
- ‘Iteration Limit’int
Default
The value of specifies the maximum number of major iterations allowed before termination of the subproblem. Setting and means that the workspace needed will be computed and printed, but no iterations will be performed. If , the default value is used.
- ‘Iters’int
Default
The value of specifies the maximum number of major iterations allowed before termination of the subproblem. Setting and means that the workspace needed will be computed and printed, but no iterations will be performed. If , the default value is used.
- ‘Itns’int
Default
The value of specifies the maximum number of major iterations allowed before termination of the subproblem. Setting and means that the workspace needed will be computed and printed, but no iterations will be performed. If , the default value is used.
- ‘Major Print Level’int
Default
The value of controls the amount of printout produced by the major iterations of
nlp_multistart_sqp
, as indicated below. A detailed description of the printed output is given in Further Comments (summary output at each major iteration and the final solution) and Monitoring Information (monitoring information at each major iteration). (See also the description of the option ‘Minor Print Level’.)The following printout is sent to the file object associated with the advisory I/O unit (see
FileObjManager
):Output
No output.
For the other values described below, the arguments used by
opt.nlp1_solve
are displayed in addition to intermediate and final output.Output
The final solution only.
One line of summary output ( characters; see Further Comments) for each major iteration (no printout of the final solution).
The final solution and one line of summary output for each major iteration.
The following printout is sent to the logical unit number defined by the option ‘Monitoring File’:
Output
No output.
One long line of output ( characters; see Monitoring Information) for each major iteration (no printout of the final solution).
At each major iteration, the objective function, the Euclidean norm of the nonlinear constraint violations, the values of the nonlinear constraints (the vector ), the values of the linear constraints (the vector ), and the current values of the variables (the vector ).
At each major iteration, the diagonal elements of the matrix associated with the factorization (5) (see Overview) of the QP working set, and the diagonal elements of , the triangular factor of the transformed and reordered Hessian (6) (see Overview).
If and the unit number defined by the option ‘Monitoring File’ is the advisory unit number, then the summary output for each major iteration is suppressed.
- ‘Print Level’int
Default
The value of controls the amount of printout produced by the major iterations of
nlp_multistart_sqp
, as indicated below. A detailed description of the printed output is given in Further Comments (summary output at each major iteration and the final solution) and Monitoring Information (monitoring information at each major iteration). (See also the description of the option ‘Minor Print Level’.)The following printout is sent to the file object associated with the advisory I/O unit (see
FileObjManager
):Output
No output.
For the other values described below, the arguments used by
opt.nlp1_solve
are displayed in addition to intermediate and final output.Output
The final solution only.
One line of summary output ( characters; see Further Comments) for each major iteration (no printout of the final solution).
The final solution and one line of summary output for each major iteration.
The following printout is sent to the logical unit number defined by the option ‘Monitoring File’:
Output
No output.
One long line of output ( characters; see Monitoring Information) for each major iteration (no printout of the final solution).
At each major iteration, the objective function, the Euclidean norm of the nonlinear constraint violations, the values of the nonlinear constraints (the vector ), the values of the linear constraints (the vector ), and the current values of the variables (the vector ).
At each major iteration, the diagonal elements of the matrix associated with the factorization (5) (see Overview) of the QP working set, and the diagonal elements of , the triangular factor of the transformed and reordered Hessian (6) (see Overview).
If and the unit number defined by the option ‘Monitoring File’ is the advisory unit number, then the summary output for each major iteration is suppressed.
- ‘Minor Iteration Limit’int
Default
The value of specifies the maximum number of iterations for finding a feasible point with respect to the bounds and linear constraints (if any). The value of also specifies the maximum number of minor iterations for the optimality phase of each QP subproblem. If , the default value is used.
- ‘Minor Print Level’int
Default
The value of controls the amount of printout produced by the minor iterations of
nlp_multistart_sqp
(i.e., the iterations of the quadratic programming algorithm), as indicated below. A detailed description of the printed output is given in Further Comments (summary output at each minor iteration and the final QP solution) and Monitoring Information (monitoring information at each minor iteration). (See also the description of the option ‘Major Print Level’.) The following printout is sent to the file object associated with the advisory I/O unit (seeFileObjManager
):Output
No output.
The final QP solution only.
One line of summary output ( characters; see Further Comments) for each minor iteration (no printout of the final QP solution).
The final QP solution and one line of summary output for each minor iteration.
The following printout is sent to the logical unit number defined by the option ‘Monitoring File’:
Output
No output.
One long line of output ( characters; see Further Comments) for each minor iteration (no printout of the final QP solution).
At each minor iteration, the current estimates of the QP multipliers, the current estimate of the QP search direction, the QP constraint values, and the status of each QP constraint.
At each minor iteration, the diagonal elements of the matrix associated with the factorization (5) (see Overview) of the QP working set, and the diagonal elements of the Cholesky factor of the transformed Hessian (6) (see Overview).
If and the unit number defined by the option ‘Monitoring File’ is the advisory unit number, the summary output for each minor iteration is suppressed.
- ‘Monitoring File’int
Default
If and or and , monitoring information produced by
nlp_multistart_sqp
at every iteration is sent to a file with logical unit number . If and/or and , no monitoring information is produced.- ‘Optimality Tolerance’float
Default
The argument () specifies the accuracy to which you wish the final iterate to approximate a solution of the problem. Broadly speaking, indicates the number of correct figures desired in the objective function at the solution. For example, if is and
nlp_multistart_sqp
terminates successfully, the final value of should have approximately six correct figures. If or , the default value is used.nlp_multistart_sqp
will terminate successfully if the iterative sequence of values is judged to have converged and the final point satisfies the first-order Kuhn–Tucker conditions (see Overview). The sequence of iterates is considered to have converged at ifwhere is the search direction and the step length from (3). An iterate is considered to satisfy the first-order conditions for a minimum if
and
where is the projected gradient (see Overview), is the gradient of with respect to the free variables, is the violation of the th active nonlinear constraint, and is the ‘Nonlinear Feasibility Tolerance’.
- ‘Start Objective Check At Variable’int
Default
These keywords take effect only if . They may be used to control the verification of gradient elements computed by and/or Jacobian elements computed by . For example, if the first elements of the objective gradient appeared to be correct in an earlier run, so that only element remains questionable, it is reasonable to specify . If the first variables appear linearly in the objective, so that the corresponding gradient elements are constant, the above choice would also be appropriate.
If or , the default value is used, for . If or , the default value is used, for .
- ‘Stop Objective Check At Variable’int
Default
These keywords take effect only if . They may be used to control the verification of gradient elements computed by and/or Jacobian elements computed by . For example, if the first elements of the objective gradient appeared to be correct in an earlier run, so that only element remains questionable, it is reasonable to specify . If the first variables appear linearly in the objective, so that the corresponding gradient elements are constant, the above choice would also be appropriate.
If or , the default value is used, for . If or , the default value is used, for .
- ‘Start Constraint Check At Variable’int
Default
These keywords take effect only if . They may be used to control the verification of gradient elements computed by and/or Jacobian elements computed by . For example, if the first elements of the objective gradient appeared to be correct in an earlier run, so that only element remains questionable, it is reasonable to specify . If the first variables appear linearly in the objective, so that the corresponding gradient elements are constant, the above choice would also be appropriate.
If or , the default value is used, for . If or , the default value is used, for .
- ‘Stop Constraint Check At Variable’int
Default
These keywords take effect only if . They may be used to control the verification of gradient elements computed by and/or Jacobian elements computed by . For example, if the first elements of the objective gradient appeared to be correct in an earlier run, so that only element remains questionable, it is reasonable to specify . If the first variables appear linearly in the objective, so that the corresponding gradient elements are constant, the above choice would also be appropriate.
If or , the default value is used, for . If or , the default value is used, for .
- ‘Step Limit’float
Default
If specifies the maximum change in variables at the first step of the linesearch. In some cases, such as or , even a moderate change in the elements of can lead to floating-point overflow. The argument is, therefore, used to encourage evaluation of the problem functions at meaningful points. Given any major iterate , the first point at which and are evaluated during the linesearch is restricted so that
The linesearch may go on and evaluate and at points further from if this will result in a lower value of the merit function (indicated by L at the end of each line of output produced by the major iterations; see Further Comments). If L is printed for most of the iterations, should be set to a larger value.
Wherever possible, upper and lower bounds on should be used to prevent evaluation of nonlinear functions at wild values. The default value should not affect progress on well-behaved functions, but values such as or may be helpful when rapidly varying functions are present. If a small value of ‘Step Limit’ is selected, a good starting point may be required. An important application is to the class of nonlinear least squares problems. If , the default value is used.
- ‘Verify Level’int
Default
These keywords refer to finite difference checks on the gradient elements computed by and . The possible choices for are as follows:
Meaning
No checks are performed.
Only a ‘cheap’ test will be performed.
Individual gradient elements will also be checked using a reliable (but more expensive) test.
It is possible to specify to in several ways. For example, the nonlinear objective gradient (if any) will be verified if either ‘Verify Objective Gradients’ or is specified. The constraint gradients will be verified if or or ‘Verify’ is specified. Similarly, the objective and the constraint gradients will be verified if or or ‘Verify’ is specified.
If , gradients will be verified at the first point that satisfies the linear constraints and bounds.
If , only a ‘cheap’ test will be performed, requiring one call to and (if appropriate) one call to .
If , a more reliable (but more expensive) check will be made on individual gradient elements, within the ranges specified by the ‘Start Constraint Check At Variable’ and ‘Stop Constraint Check At Variable’ keywords. A result of the form OK or BAD? is printed by
nlp_multistart_sqp
to indicate whether or not each element appears to be correct. If a gradient element is determined to be extremely poor (i.e., if it appears to have no significant digits of accuracy at all) thennlp_multistart_sqp
will also exit with an error indicator in argument .If , the action is the same as for , except that it will take place at the user-specified initial value of .
If or or , the default value is used.
We suggest that be used whenever a new function function is being developed.
- ‘Verify’valueless
These keywords refer to finite difference checks on the gradient elements computed by and . The possible choices for are as follows:
Meaning
No checks are performed.
Only a ‘cheap’ test will be performed.
Individual gradient elements will also be checked using a reliable (but more expensive) test.
It is possible to specify to in several ways. For example, the nonlinear objective gradient (if any) will be verified if either ‘Verify Objective Gradients’ or is specified. The constraint gradients will be verified if or or ‘Verify’ is specified. Similarly, the objective and the constraint gradients will be verified if or or ‘Verify’ is specified.
If , gradients will be verified at the first point that satisfies the linear constraints and bounds.
If , only a ‘cheap’ test will be performed, requiring one call to and (if appropriate) one call to .
If , a more reliable (but more expensive) check will be made on individual gradient elements, within the ranges specified by the ‘Start Constraint Check At Variable’ and ‘Stop Constraint Check At Variable’ keywords. A result of the form OK or BAD? is printed by
nlp_multistart_sqp
to indicate whether or not each element appears to be correct. If a gradient element is determined to be extremely poor (i.e., if it appears to have no significant digits of accuracy at all) thennlp_multistart_sqp
will also exit with an error indicator in argument .If , the action is the same as for , except that it will take place at the user-specified initial value of .
If or or , the default value is used.
We suggest that be used whenever a new function function is being developed.
- ‘Verify Constraint Gradients’valueless
These keywords refer to finite difference checks on the gradient elements computed by and . The possible choices for are as follows:
Meaning
No checks are performed.
Only a ‘cheap’ test will be performed.
Individual gradient elements will also be checked using a reliable (but more expensive) test.
It is possible to specify to in several ways. For example, the nonlinear objective gradient (if any) will be verified if either ‘Verify Objective Gradients’ or is specified. The constraint gradients will be verified if or or ‘Verify’ is specified. Similarly, the objective and the constraint gradients will be verified if or or ‘Verify’ is specified.
If , gradients will be verified at the first point that satisfies the linear constraints and bounds.
If , only a ‘cheap’ test will be performed, requiring one call to and (if appropriate) one call to .
If , a more reliable (but more expensive) check will be made on individual gradient elements, within the ranges specified by the ‘Start Constraint Check At Variable’ and ‘Stop Constraint Check At Variable’ keywords. A result of the form OK or BAD? is printed by
nlp_multistart_sqp
to indicate whether or not each element appears to be correct. If a gradient element is determined to be extremely poor (i.e., if it appears to have no significant digits of accuracy at all) thennlp_multistart_sqp
will also exit with an error indicator in argument .If , the action is the same as for , except that it will take place at the user-specified initial value of .
If or or , the default value is used.
We suggest that be used whenever a new function function is being developed.
- ‘Verify Gradients’valueless
These keywords refer to finite difference checks on the gradient elements computed by and . The possible choices for are as follows:
Meaning
No checks are performed.
Only a ‘cheap’ test will be performed.
Individual gradient elements will also be checked using a reliable (but more expensive) test.
It is possible to specify to in several ways. For example, the nonlinear objective gradient (if any) will be verified if either ‘Verify Objective Gradients’ or is specified. The constraint gradients will be verified if or or ‘Verify’ is specified. Similarly, the objective and the constraint gradients will be verified if or or ‘Verify’ is specified.
If , gradients will be verified at the first point that satisfies the linear constraints and bounds.
If , only a ‘cheap’ test will be performed, requiring one call to and (if appropriate) one call to .
If , a more reliable (but more expensive) check will be made on individual gradient elements, within the ranges specified by the ‘Start Constraint Check At Variable’ and ‘Stop Constraint Check At Variable’ keywords. A result of the form OK or BAD? is printed by
nlp_multistart_sqp
to indicate whether or not each element appears to be correct. If a gradient element is determined to be extremely poor (i.e., if it appears to have no significant digits of accuracy at all) thennlp_multistart_sqp
will also exit with an error indicator in argument .If , the action is the same as for , except that it will take place at the user-specified initial value of .
If or or , the default value is used.
We suggest that be used whenever a new function function is being developed.
- ‘Verify Objective Gradients’valueless
These keywords refer to finite difference checks on the gradient elements computed by and . The possible choices for are as follows:
Meaning
No checks are performed.
Only a ‘cheap’ test will be performed.
Individual gradient elements will also be checked using a reliable (but more expensive) test.
It is possible to specify to in several ways. For example, the nonlinear objective gradient (if any) will be verified if either ‘Verify Objective Gradients’ or is specified. The constraint gradients will be verified if or or ‘Verify’ is specified. Similarly, the objective and the constraint gradients will be verified if or or ‘Verify’ is specified.
If , gradients will be verified at the first point that satisfies the linear constraints and bounds.
If , only a ‘cheap’ test will be performed, requiring one call to and (if appropriate) one call to .
If , a more reliable (but more expensive) check will be made on individual gradient elements, within the ranges specified by the ‘Start Constraint Check At Variable’ and ‘Stop Constraint Check At Variable’ keywords. A result of the form OK or BAD? is printed by
nlp_multistart_sqp
to indicate whether or not each element appears to be correct. If a gradient element is determined to be extremely poor (i.e., if it appears to have no significant digits of accuracy at all) thennlp_multistart_sqp
will also exit with an error indicator in argument .If , the action is the same as for , except that it will take place at the user-specified initial value of .
If or or , the default value is used.
We suggest that be used whenever a new function function is being developed.
- Raises
- NagValueError
- (errno )
On entry, and .
Constraint: .
- (errno )
On entry, : .
Constraint: , for all .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, , , and .
Constraint: .
- (errno )
On entry, , and .
Constraint: if , .
- (errno )
On entry, , , and .
Constraint: .
- (errno )
No solution obtained. Linear constraints may be infeasible.
- (errno )
No solution obtained. Nonlinear constraints may be infeasible.
- (errno )
No solution obtained. Many potential solutions reach iteration limit.
- (errno )
User-supplied derivatives probably wrong.
- (errno )
Failed to initialize option arrays.
- Warns
- NagAlgorithmicWarning
- (errno )
Only solutions obtained.
- NagCallbackTerminateWarning
- (errno )
User terminated computation from procedure: .
- Notes
The problem is assumed to be stated in the following form:
where (the objective function) is a nonlinear function, is an linear constraint matrix, and is an element vector of nonlinear constraint functions. (The matrix and the vector may be empty.) The objective function and the constraint functions are assumed to be smooth, i.e., at least twice-continuously differentiable. (This function will usually solve (1) if there are only isolated discontinuities away from the solution.)
nlp_multistart_sqp
solves a user-specified number of local optimization problems with different starting points. You may specify the starting points via the function . If a random number generator is used to generate the starting points then the argument allows you to specify whether a repeatable set of points are generated or whether different starting points are generated on different calls. The resulting local minima are ordered and the best results returned in order of ascending values of the resulting objective function values at the minima. Thus the value returned in position will be the best result obtained. If a sufficient number of different points are chosen then this is likely to be be the global minimum. Please note that the default version of uses a random number generator to generate the starting points.
- References
Dennis, J E Jr and Moré, J J, 1977, Quasi-Newton methods, motivation and theory, SIAM Rev. (19), 46–89
Dennis, J E Jr and Schnabel, R B, 1981, A new derivation of symmetric positive-definite secant updates, nonlinear programming, (eds O L Mangasarian, R R Meyer and S M Robinson) (4), 167–199, Academic Press
Dennis, J E Jr and Schnabel, R B, 1983, Numerical Methods for Unconstrained Optimization and Nonlinear Equations, Prentice–Hall
Fletcher, R, 1987, Practical Methods of Optimization, (2nd Edition), Wiley
Gill, P E, Hammarling, S, Murray, W, Saunders, M A and Wright, M H, 1986, Users’ guide for LSSOL (Version 1.0), Report SOL 86-1, Department of Operations Research, Stanford University
Gill, P E, Murray, W, Saunders, M A and Wright, M H, 1984, Users’ guide for SOL/QPSOL version 3.2, Report SOL, 84–5, Department of Operations Research, Stanford University
Gill, P E, Murray, W, Saunders, M A and Wright, M H, 1986, Users’ guide for NPSOL (Version 4.0): a Fortran package for nonlinear programming, Report SOL 86-2, Department of Operations Research, Stanford University
Gill, P E, Murray, W, Saunders, M A and Wright, M H, 1986, Some theoretical properties of an augmented Lagrangian merit function, Report SOL, 86–6R, Department of Operations Research, Stanford University
Gill, P E, Murray, W and Wright, M H, 1981, Practical Optimization, Academic Press
Powell, M J D, 1974, Introduction to constrained optimization, Numerical Methods for Constrained Optimization, (eds P E Gill and W Murray), 1–28, Academic Press
Powell, M J D, 1983, Variable metric methods in constrained optimization, Mathematical Programming: the State of the Art, (eds A Bachem, M Grötschel and B Korte), 288–311, Springer–Verlag