Note:this routine 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.
e04srf is a solver from the NAG optimization modelling suite for large-scale Nonlinear Programming (NLP) problems based on an active-set Sequential Quadratic Programming (SQP) method, using limited-memory quasi-Newton approximations to the Hessian of the Lagrangian.
The routine may be called by the names e04srf or nagf_opt_handle_solve_ssqp.
3Description
e04srf is designed to minimize (maximize) a linear or nonlinear function possibly subject to a set of constraints including bounds on the variables and sparse linear and nonlinear constraints. It is suitable for large-scale general nonlinear programming (NLP) problems, as well as for linearly constrained optimization. It is particularly efficient if only some of the variables enter nonlinearly, or there are relatively few degrees of freedom at a solution (i.e., many constraints are active). However, there is no limit on the number of degrees of freedom.
e04srf solves a nonlinear programming problem in the following form
(1)
where
is the number of the decision variables,
is the number of the nonlinear constraints and , and are -dimensional vectors,
is the number of the quadratic constraints,
is the number of the linear constraints and is an matrix, and are -dimensional vectors,
there are box constraints and and are -dimensional vectors.
e04srf serves as a solver for 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 routines in the NAG optimization modelling suite. First, the problem handle is initialized, typically by calling e04raf. Then some of the components of the model need to be defined by calling one or more of the following routines based on the component type:
Once the problem is fully described, the handle may be passed to the solver e04srf. When the handle is no longer needed, e04rzf should be called to destroy it and deallocate the memory held within. There are other ways that the problem model can be defined and/or updated, see Section 3.1 in the E04 Chapter Introduction for more details about the NAG optimization modelling suite.
The algorithm behaviour can be modified by various optional parameters (see Section 12) which can be set by e04zmfande04zpf anytime between the initialization of the handle and a call to the solver. Once the solver has finished, options or the model may be modified for the next solve. The solver may be called repeatedly with various starting points and/or optional parameters. Option getter e04znf can be called to retrieve the current value of any option.
The optional parameter Task may be used to switch the problem to maximization.
In certain situations the solver can be sped up by warm starting, see Section 9.4 and optional parameter SSQP Start Type for details.
Several options may have a significant impact on the performance of the solver. Even if the defaults were chosen to suit the majority of problems, it is recommended that you experiment in order to find the most suitable set of options for a particular problem, see Sections 11 and 12 for further details.
3.1Note regarding nonlinear functions
In the presence of a nonlinear objective function or constraint function, the structure (sparsity pattern) of these functions are defined by e04rgfande04rkf respectively; the function values and the first derivatives (gradients) are computed at requested points by the corresponding supplied functions objfun, objgrd, confun and congrd. Ideally, the first derivatives should be known and coded but e04srf estimates any missing ones by finite differences, see SSQP Estimate Derivatives.
The solver can strongly benefit from the correct identification of linear variables; these are the variables which appear only in linear expressions in the whole optimization model. The solver cannot autodetect if any variable present in nonlinear constraints or the nonlinear objective is linear thus there is a mechanism to declare the variable as linear by e04rcf and it is highly recommended to do so whenever possible. See Section 3.1 in e04rcf for a detailed explanation and examples. The main advantage is that linear variables have constant first partial derivatives and must be zero in second derivatives, thus the internal approximation of the Hessian doesn't need to take them into account which speeds up the solver.
3.2Alternative solvers
e04srf is a generic solver which can solve a great variety of problems, however, a dedicated solver might work better in the following cases. See Section 4 in the E04 Chapter Introduction.
If is linear,
, and is absent, (1) is a linear program (LP) and e04mtf is recommended.
If the problem is a convex quadratic or quadratically constrained problem, try e04ptf.
If the problem is unconstrained or only box-constrained, see e04kff, or e04jdf if the problem is small and derivatives cannot be provided.
A general nonlinear problem lacking the sparse structure (which is typically the case for problems with a relatively small number of variables and constraints) might be better handled by e04ucf/e04ucaore04wdf.
An alternative solver for the same class of problems but based on a different algorithm (interior point method) is e04stf, see Section 2.5.4 in the E04 Chapter Introduction for a discussion of the advantages of each approach.
4References
Dantzig G B (1963) Linear Programming and Extensions Princeton University Press
Eldersveld S K (1991) Large-scale sequential quadratic programming algorithms PhD Thesis Department of Operations Research, Stanford University, Stanford
Fourer R (1982) Solving staircase linear programs by the simplex method Math. Programming23 274–313
Gill P E, Murray W and Saunders M A (2002) SNOPT: An SQP Algorithm for Large-scale Constrained Optimization 12 979–1006 SIAM J. Optim.
Gill P E, Murray W and Saunders M A (2015) Users' guide for SNOPT 7.5: Software for large-scale linear nonlinear programming Report SNOPT Department of Mathematics, University of California, San Diego https://www.ccom.ucsd.edu/~peg/papers/sndoc7.pdf
Gill P E, Murray W and Saunders M A (2016) Users' guide for SQOPT 7.5: Software for large-scale linear and quadratic programming Report SQOPT Department of Mathematics, University of California, San Diego https://www.ccom.ucsd.edu/~peg/papers/sqdoc7.pdf
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 (1987) Maintaining factors of a general sparse matrix Linear Algebra and its Applics.88/89 239–270
Gill P E, Murray W, Saunders M A and Wright M H (1992) Some theoretical properties of an augmented Lagrangian merit function Advances in Optimization and Parallel Computing (ed P M Pardalos) 101–128 North Holland
Hock W and Schittkowski K (1981) Test Examples for Nonlinear Programming Codes. Lecture Notes in Economics and Mathematical Systems187 Springer–Verlag
Murtagh B A and Saunders M A (1978) Large-scale linearly constrained optimization 14 41–72 Math. Programming
Murtagh B A and Saunders M A (1982) A projected Lagrangian algorithm and its implementation for sparse nonlinear constraints Math. Program. Stud.16 84–118
Murtagh B A and Saunders M A (1995) MINOS 5.4 users' guide Report SOL 83-20R Department of Operations Research, Stanford University
5Arguments
1: – Type (c_ptr)Input
On entry: the handle to the problem. It needs to be initialized (e.g., by e04raf) and to hold a problem formulation compatible with e04srf. It must not be changed between calls to the NAG optimization modelling suite.
2: – Subroutine, supplied by the NAG Library or the user.External Procedure
objfun must calculate the value of the nonlinear objective function at a specified point . If there is no nonlinear objective (i.e., e04rgf was not called), objfun will never be called by e04srf and objfun may be the dummy routine e04srv
included in the NAG Library.
On entry: , the current number of decision variables in the model.
2: – Real (Kind=nag_wp) arrayInput
On entry: the vector of variable values at which the objective function is to be evaluated.
3: – Real (Kind=nag_wp)Output
On exit: the value of the objective function at .
4: – IntegerInput/Output
On entry: a non-negative value.
On exit: may be used to indicate that the function cannot be evaluated at the requested point by setting . The algorithm will try to recover if the objective cannot be evaluated; if recovery is not possible it will stop with or .
5: – Integer arrayUser Workspace
6: – Real (Kind=nag_wp) arrayUser Workspace
7: – Type (c_ptr)User Workspace
objfun is called with the arguments iuser, ruser and cpuser as supplied to e04srf. You should use the arrays iuser and ruser, and the data handle cpuser to supply information to objfun.
objfun must either be a module subprogram USEd by, or declared as EXTERNAL in, the (sub)program from which e04srf is called. Arguments denoted as Input must not be changed by this procedure.
3: – Subroutine, supplied by the NAG Library or the user.External Procedure
objgrd must calculate the values of the nonlinear objective function gradient at a specified point . If there is no nonlinear objective (i.e., e04rgf was not called), objgrd will never be called by e04srf and objgrd may be the dummy subroutine e04srw (included in the NAG Library.)
If the optional parameter or , then after returning from objgrd the gradient vector is checked for missing entries which you have not supplied. Missing entries will be estimated using a finite difference method, see optional parameter SSQP Estimate Derivatives description for more details.
Note:objgrd should not return floating-point NaN (Not a Number) or infinity values, if your code inadvertently returns any NaNs or infinities, e04srf is likely to terminate with , or .
On entry: , the current number of decision variables in the model.
2: – Real (Kind=nag_wp) arrayInput
On entry: the vector of variable values at which the objective function gradient is to be evaluated.
3: – IntegerInput
On entry: the number of nonzero elements in the sparse gradient vector of the objective function, as was set in a previous call to e04rgf.
4: – Real (Kind=nag_wp) arrayInput/Output
On entry: the elements should only be assigned and not referenced.
On exit: the values of the nonzero elements in the sparse gradient vector of the objective function, in the order specified by idxfd in a previous call to e04rgf. will store the gradient element
, where .
5: – IntegerInput/Output
On entry: a non-negative value.
If , then this is a special presolve call. This call is used to fill-in the constant elements of the objective gradient, e.g., when there are linear variables in the model. Note that this call may occur with an iterate x that may not be feasible with respect to the linear constraints but it will always be feasible with respect to the variable bounds. Furthermore, this call only requires to return the constant elements of the gradient, , where
is linear in . If you do not provide these elements, subsequent calls to objfun with inform may occur in the vicinity of x with the purpose of estimating the missing derivatives using finite differences.
On exit: may be used to inform that the gradient cannot be evaluated at the requested point by setting . The algorithm will try to recover if the gradient cannot be evaluated; if recovery is not possible it will stop with or .
6: – Integer arrayUser Workspace
7: – Real (Kind=nag_wp) arrayUser Workspace
8: – Type (c_ptr)User Workspace
objgrd is called with the arguments iuser, ruser and cpuser as supplied to e04srf. You should use the arrays iuser and ruser, and the data handle cpuser to supply information to objgrd.
objgrd must either be a module subprogram USEd by, or declared as EXTERNAL in, the (sub)program from which e04srf is called. Arguments denoted as Input must not be changed by this procedure.
4: – Subroutine, supplied by the NAG Library or the user.External Procedure
confun must calculate the values of the nonlinear constraints at a specified point . If there are no nonlinear constraints then confun will never be called by e04srf and it may be the dummy subroutine e04srx included in the NAG Library.
Note:confun should not return floating-point NaN (Not a Number) or infinity values, if your code inadvertently returns any NaNs or infinities, e04srf is likely to terminate with , or .
On entry: , the current number of decision variables in the model.
2: – Real (Kind=nag_wp) arrayInput
On entry: the vector of variable values at which the constraint functions are to be evaluated.
3: – IntegerInput
On entry: , the number of nonlinear constraints, as specified in an earlier call to e04rkf.
4: – Real (Kind=nag_wp) arrayOutput
On exit: the values of the nonlinear constraint functions at .
5: – IntegerInput/Output
On entry: a non-negative value.
If , then this is a special presolve call. This call is used to quickly identify if the problem is infeasible, e.g., due to fixed variables. Note that this call can occur with an iterate x that may not be feasible with respect to the linear constraints but it will always be feasible with respect to the variable bounds.
On exit: may be used to inform that the constraint values cannot be evaluated at the requested point by setting . The algorithm will try to recover if the gradient cannot be evaluated; if recovery is not possible it will stop with or .
6: – Integer arrayUser Workspace
7: – Real (Kind=nag_wp) arrayUser Workspace
8: – Type (c_ptr)User Workspace
confun is called with the arguments iuser, ruser and cpuser as supplied to e04srf. You should use the arrays iuser and ruser, and the data handle cpuser to supply information to confun.
confun must either be a module subprogram USEd by, or declared as EXTERNAL in, the (sub)program from which e04srf is called. Arguments denoted as Input must not be changed by this procedure.
5: – Subroutine, supplied by the NAG Library or the user.External Procedure
congrd must calculate the Jacobian of the nonlinear constraints at a specified point . If there are no nonlinear constraints,
congrd will never be called by e04srf and congrd may be the dummy subroutine e04sry included in the NAG Library.
If the optional parameter or , then after returning from congrd the Jacobian is checked for missing entries which you have not supplied. Missing entries will be estimated using a finite difference method, see optional parameter SSQP Estimate Derivatives description for more details.
Note:congrd should not return floating-point NaN (Not a Number) or infinity values, if your code inadvertently returns any NaNs or infinities, e04srf is likely to terminate with , or .
On entry: , the current number of decision variables in the model.
2: – Real (Kind=nag_wp) arrayInput
On entry: the vector of variable values at which the Jacobian of the constraint functions is to be evaluated.
3: – IntegerInput
On entry: is the number of nonzero elements in the sparse Jacobian of the constraint functions, as was set in a previous call to e04rkf.
4: – Real (Kind=nag_wp) arrayInput/Output
On entry: the elements should only be assigned and not referenced.
On exit: the nonzero values of the Jacobian of the nonlinear constraints, in the order specified by irowgd and icolgd in an earlier call to e04rkf. will be the gradient
, where and .
5: – IntegerInput/Output
On entry: a non-negative value.
If , then this is a special presolve call. This call is used to fill-in the constant elements of the Jacobian, e.g., when there are linear variables in the model. Note that this call may occur with an iterate x that may not be feasible with respect to the linear constraints but it will always be feasible with respect to the variable bounds. Furthermore, this call only requires to return the constant elements of the Jacobian, , where is linear in . If the user does not provide these elements, subsequent calls to confun with inform may occur in the vicinity of x with the purpose of estimating the missing derivatives using finite differences.
On exit: may be used to inform that the Jacobian of the constraints cannot be evaluated at the requested point by setting . The algorithm will try to recover if the gradient cannot be evaluated; if recovery is not possible it will stop with or .
6: – Integer arrayUser Workspace
7: – Real (Kind=nag_wp) arrayUser Workspace
8: – Type (c_ptr)User Workspace
congrd is called with the arguments iuser, ruser and cpuser as supplied to e04srf. You should use the arrays iuser and ruser, and the data handle cpuser to supply information to congrd.
congrd must either be a module subprogram USEd by, or declared as EXTERNAL in, the (sub)program from which e04srf is called. Arguments denoted as Input must not be changed by this procedure.
6: – Subroutine, supplied by the NAG Library or the user.External Procedure
hess is reserved for future releases of the NAG Library which will allow calculation of the second derivatives. It will never be called in the current implementation and hess may be the dummy subroutine e04srz included in the NAG Library.
On entry: , the current number of decision variables in the model.
2: – Real (Kind=nag_wp) arrayInput
On entry: the vector of variable values at which the Hessian functions are to be evaluated.
3: – IntegerInput
On entry: , the number of nonlinear constraints, as specified in an earlier call to e04rkf.
4: – IntegerInput
On entry: specifies the quantities to be computed in hx.
The values of the Hessian of the Lagrangian will be computed in hx. This will be the case if e04rlf has been called with idf of the same value.
The values of the Hessian of the objective function will be computed in hx. This will be the case if e04rlf has been called with idf of the same value.
The values of the Hessian of the constraint function with index idf will be computed in hx. This will be the case if e04rlf has been called with idf of the same value.
5: – Real (Kind=nag_wp)Input
On entry: if , the value of the quantity in the definition of the Hessian of the Lagrangian. Otherwise, sigma should not be referenced.
6: – Real (Kind=nag_wp) arrayInput
On entry: if , the values of the quantities in the definition of the Hessian of the Lagrangian. Otherwise, lambda should not be referenced.
7: – IntegerInput
On entry: the number of nonzero elements in the Hessian to be computed.
8: – Real (Kind=nag_wp) arrayInput/Output
On entry: the elements should only be assigned and not referenced.
On exit: the nonzero values of the requested Hessian evaluated at . For each value of idf, the ordering of nonzeros must follow the sparsity structure registered in the handle by earlier calls to e04rlf through the arguments irowh and icolh.
9: – IntegerInput/Output
On entry: a non-negative value.
On exit: must be set to a value describing the action to be taken by the solver on return from hess. Specifically, if the value is negative the solution of the current problem will terminate immediately with or ; otherwise, computations will continue.
10: – Integer arrayUser Workspace
11: – Real (Kind=nag_wp) arrayUser Workspace
12: – Type (c_ptr)User Workspace
hess is called with the arguments iuser, ruser and cpuser as supplied to e04srf. You should use the arrays iuser and ruser, and the data handle cpuser to supply information to hess.
hess must either be a module subprogram USEd by, or declared as EXTERNAL in, the (sub)program from which e04srf is called. Arguments denoted as Input must not be changed by this procedure.
7: – Subroutine, supplied by the NAG Library or the user.External Procedure
monit is provided to enable you to monitor the progress of the optimization and optionally to terminate the solver early if necessary. It is invoked at the end of every th major iteration where is given by the SSQP Monitor Frequency (the default is , monit is not called).
monit may be the dummy subroutine e04sru included in the NAG Library.
On entry: if , u holds the values of Lagrange multipliers (dual variables, see Section 11.3) for the constraints at the current iteration. See Section 3.1 in e04stf for layout information.
5: – IntegerInput/Output
On entry: a non-negative value.
On exit: may be used to request the solver to stop immediately. Specifically, if the solver will terminate immediately with ; otherwise, the solver will proceed normally.
6: – Real (Kind=nag_wp) arrayInput
On entry: error measures and various indicators at the end of the current iteration as described in rinfo.
7: – Real (Kind=nag_wp) arrayInput
On entry: solver statistics at the end of the current iteration as described in stats.
8: – Integer arrayUser Workspace
9: – Real (Kind=nag_wp) arrayUser Workspace
10: – Type (c_ptr)User Workspace
monit is called with the arguments iuser, ruser and cpuser as supplied to e04srf. You should use the arrays iuser and ruser, and the data handle cpuser to supply information to monit.
monit must either be a module subprogram USEd by, or declared as EXTERNAL in, the (sub)program from which e04srf is called. Arguments denoted as Input must not be changed by this procedure.
8: – IntegerInput
On entry: , the current number of decision variables in the model.
9: – Real (Kind=nag_wp) arrayInput/Output
On entry: , the initial estimates of the variables, .
On exit: the final values of the variables, .
10: – IntegerInput
On entry: the number of Lagrange multipliers in array u.
If , u will not be referenced; otherwise, it needs to match the dimension as explained in Section 3.1 in e04stf.
Constraints:
;
if , .
11: – Real (Kind=nag_wp) arrayInput/Output
Note: if , u holds Lagrange multipliers (dual variables) for the constraints. See Section 3.1 in e04stf for layout information. If , u will not be referenced.
On entry: optionally provides the initial estimates of Lagrange multipliers, . These values are only referenced if a warm start is requested (Section 9.4). If there are no initial estimates available, then set to zero.
On exit: the final value of Lagrange multipliers , see Section 11.3.
12: – Real (Kind=nag_wp) arrayOutput
On exit: error measures and various indicators at the end of the final iteration as given in the table below:
Objective function value .
Constraint violation (primal infeasibility),
see Section 7.
Dual infeasibility.
–
Reserved for future use.
Step size for the primal variables, see Iteration log in
Section 9.1.
Estimate of the condition number of , itself an estimate of , the reduced Hessian of the Lagrangian. See Section 9.1.
Largest nonlinear constraint violation.
Largest nonlinear constraint violation, normalized using , with
the latest iterate. See (12).
Sum of the infeasibilities of constraints that lie outside one of their bounds by more than the optional parameter SSQP Minor Feasibility Tolbefore the solution is unscaled.
Flag indicating whether the current iterate satisfies the first-order Kuhn–Tucker
conditions for optimality:
Flag indicating whether the current iterate is feasible with respect to the linear constraints, if any. A nonzero value indicates feasibility.
–
Reserved for future use.
13: – Real (Kind=nag_wp) arrayOutput
On exit: solver statistics at the end of the final iteration as given in the table below:
Number of major iterations.
Total number of minor iterations.
Number of minor iterations performed on the last major iteration.
Number of Hessian evaluations.
Number of gradient evaluations.
Number of infeasibilities of constraints that lie outside one of their bounds by more than the optional parameter SSQP Minor Feasibility Tolbefore the solution is unscaled.
If any linear constraints are infeasible, it contains the number of variables and linear constraints lying outside their upper or lower bounds. The nonlinear constraints are not evaluated.
Otherwise, it contains the number of components of lying outside their bounds by more than the optional parameter SSQP Minor Feasibility Tol. Again this is before the solution is unscaled.
Total time spent in presolver (including user-supplied function calls).
Total time spent in solver (including user-supplied function calls).
iuser, ruser and cpuser are not used by e04srf, but are passed directly to objfun, objgrd, confun, congrd, hess and monit and may be used to pass information to these routines. If you do not need to reference cpuser, it should be initialized to c_null_ptr.
17: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended since useful values can be provided in some output arguments even when on exit. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
Note: in some cases e04srf may return useful information.
The supplied handle does not define a valid handle to the data structure for the NAG optimization modelling suite. It has not been properly initialized or it has been corrupted.
The problem is already being solved.
This solver does not support the model defined in the handle.
On entry, , expected .
Constraint: nvar must match the current number of variables of the model in the handle.
On entry, . Constraint: or .
On entry, . Constraint: no constraints present, so must be .
The dummy confun routine was called but the problem requires these values. Please provide a proper confun routine.
The dummy congrd routine was called but the problem requires these derivatives. Please provide a proper congrd routine.
The dummy hess routine was called but the problem requires these derivatives. Please provide a proper hess routine.
The dummy objfun routine was called but the problem requires these values. Please provide a proper objfun routine.
The dummy objgrd routine was called but the problem requires these derivatives. Please provide a proper objgrd routine.
User requested termination during a monitoring step. inform was set to a negative value in monit.
The current starting point is unusable.
Either inform was set to a negative value within the user-supplied functions objfun, objgrd, confun, congrd or hess, or an Infinity or NaN was detected in values returned from them. Note that the user-provided starting point is made
bound-constrain feasible (if applicable) before calling any of the user-supplied functions.
See also .
Maximum number of iterations reached.
Either the SSQP Iteration Limit, SSQP Major Iteration Limit or SSQP Minor Iteration Limit limit was exceeded before
a solution with the requested accuracy could be found. Check the iteration log to be sure that progress was being made. If so, rerun the problem after increasing these optional parameters.
The solver terminated after the maximum time allowed was exhausted.
Maximum number of seconds exceeded. Use optional parameter Time Limit to change the limit.
The solver was terminated because no further progress could be achieved.
This can indicate that numerical difficulties have been encountered and little or no progress was made. It could also happen if the problem has been solved to the best numerical accuracy possible given the current scaling.
Additionally, several other circumstances could lead to this error:
1.objfun or confun could be returning accurate function values but
objgrd or congrd inaccurate gradients (or vice versa). This is the most likely cause. Study the comments given for as well as those given for
Verify Derivatives and SSQP Estimate Derivatives. Ensure that the coding is correct.
2.The function and gradient values could be consistent, but their precision could be too low. For example, accidental use of a low precision data type when a higher precision was intended would lead to a relative function precision of about instead of something like . The default SSQP Major Optimality Tol of would need to be raised to about for optimality to be declared (at a rather suboptimal point). Of course, it is better to revise the function coding to obtain as much precision as economically possible.
3.If function values are obtained from an expensive iterative process, they may be accurate to rather few significant figures, and gradients will probably not be available. One should specify
but even then, if is as large as or (only or significant figures), the same exit condition may occur. At present, the only remedy is to increase the accuracy of the function calculation.
4.An factorization of the basis has just been obtained and used to recompute the basic variables , given the present values of the superbasic and nonbasic variables. A step of ‘iterative refinement’ has also been applied to increase the accuracy of . However, a row check has revealed that the resulting solution does not satisfy the current constraints sufficiently well.
This probably means that the current basis is very ill-conditioned. If there are some linear constraints and variables, try if scaling has not yet been used.
5.The first factorization attempt will have found the basis to be structurally or numerically singular (some diagonals of the triangular matrix were respectively zero or smaller than a certain tolerance.) The associated variables are replaced by slacks and the modified basis is refactorized, but singularity persists. This should mean that the problem is badly scaled.
Invalid value detected in user function and recovery failed.
Either inform was set to a negative value within the user-supplied functions objfun, objgrd, confun, congrd or hess, or an Infinity or NaN was detected in values returned from them. This will occur in the case when one or more of the problem functions are
–undefined in a region around the current iterate and no recovery is possible;
–undefined at the first feasible point; or
–undefined when checking derivatives.
In these cases, it may be convenient to add a linear constraint block to
exclude the undefined region.
See also .
Additionally, other circumstances could lead to this error:
–The solver is detecting irregular or badly scaled
problem functions. See optional parameter SSQP Function Precision.
–The solver iterates are in a region where the QP Hessian is numerically indefinite and the optimization process was stopped.
User-provided derivatives are likely to be incorrect.
This error indicates that the user-supplied gradient vector fdx or Jacobian matrix gdx have at least one value that disagrees remarkably with its associated forward difference estimate (the relative difference between the computed and estimated values is 1.0 or more). This exit is a safeguard since e04srf will usually fail to make progress when the computed gradients are seriously inaccurate. In the process it may expend considerable effort before terminating with .
Check the function and Jacobian computation very carefully in objgrd and congrd.
A simple omission could explain everything. If a component is very large, then give serious thought to
scaling the function or the nonlinear variables.
If you feel certain that the computed Jacobian is correct
(and that the forward-difference estimate is, therefore, wrong), you can specify
to prevent individual elements from being checked. However, the optimization procedure may have difficulties or even fail.
This error may mean that the problem appears to be more nonlinear than anticipated. The current set of basic and superbasic variables have been optimized as much as possible and a pricing operation (where a nonbasic variable is selected to become superbasic) is necessary to continue, but it cannot continue as the number of superbasic variables has already reached the limit specified by the optional parameter SSQP Superbasics Limit. In general, raise the limit by a reasonable amount, bearing in mind the storage needed for the reduced Hessian.
Problem was solved to an acceptable level, full accuracy was not achieved.
This indicates that the algorithm found a feasible solution,
but the requested accuracy in the dual
infeasibilities could not be achieved. The solution found is within of satisfying the SSQP Major Feasibility Tol.
This may happen if the SSQP Major Feasibility Tol tolerance is too small for the current problem, or if the problem is badly scaled.
The problem was found to be infeasible during preprocessing.
One or more of the constraints (or its part after preprocessing) violates the constraints.
The problem seems to be infeasible, the algorithm was stopped.
When the constraints are linear, this message is based on a relatively reliable indicator of infeasibility. Feasibility is measured with respect to the upper and lower bounds on the variables and slacks.
Among all the points satisfying the general constraints (see (5) and (6) in Section 11.2), there is apparently no point that satisfies the bounds on and . Violations as small as the SSQP Minor Feasibility Tol are ignored, but at least one component of or violates a bound by more than the tolerance.
When nonlinear constraints are present, infeasibility is much harder to recognize correctly. Even if a feasible solution exists, the current linearization of the constraints may not contain a feasible point. In an attempt to deal with this situation, when solving each QP subproblem, e04srf is prepared to relax the bounds on the slacks associated with nonlinear rows.
If a QP subproblem proves to be infeasible or unbounded (or if the Lagrange multiplier estimates for the nonlinear constraints become large), e04srf enters a so-called ‘nonlinear elastic’ mode.
The subproblem includes the original QP objective and the sum of the infeasibilities — suitably weighted.
In elastic mode, some of the bounds on the nonlinear rows are ‘elastic’, i.e., they are allowed to violate their specific bounds. Variables subject to elastic bounds are known as elastic variables. An elastic variable is free to violate one or both of its original upper or lower bounds. If the original problem has a feasible solution and the elastic weight is sufficiently large, a feasible point will eventually be obtained for the perturbed constraints, and optimization can continue on the subproblem. If the nonlinear problem has no feasible solution, e04srf will tend to determine a ‘good’ infeasible point if the elastic weight is sufficiently large. If the elastic weight were infinite, e04srf would locally minimize the nonlinear constraint violations subject to the linear constraints and bounds.
Unfortunately, even though e04srf locally minimizes the nonlinear constraint violations, there may still exist other regions in which the nonlinear constraints are satisfied. Wherever possible, nonlinear constraints should be defined in such a way that feasible points are known to exist when the constraints are linearized.
The problem seems to be unbounded and the algorithm was stopped.
This indicates that the solver found a direction where the objective value decreases arbitrarily. In the case of maximizing, the direction found increases arbitrarily the objective value. Cases where this happens are when a linear objective is provided with no constraints, or when the constraints defined do not bound the search direction.
For linear problems, unboundedness is detected by the simplex method when a nonbasic variable can be increased or decreased by an arbitrary amount without causing a basic variable to violate a bound. Consider adding an upper or lower bound to the variable. Also, examine the constraints that have nonzeros in the associated column, to see if they have been formulated as intended.
Very rarely, the scaling of the problem could be so poor that numerical error will give an erroneous indication of unboundedness. Consider using the optional parameter SSQP Scale Option.
For nonlinear problems, e04srf monitors both the size of the current objective function and the size of the change in the variables at each step. If either of these is very large, the problem is terminated and declared unbounded. To avoid large function values, it may be necessary to impose bounds on some of the variables in order to keep them away from singularities in the nonlinear functions.
Memory limit is too small.
e04srf has terminated because the LU factorization exhausted the
allocated memory limit. This indicates that the memory allocation heuristic underestimated
the requirements. Please contact NAG.
An unexpected error has been triggered by this routine. Please
contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
7Accuracy
If the value of the optional parameter SSQP Major Optimality Tol is set to and on exit, then the final value of should have approximately correct significant digits.
e04srf returns with if the iterates have converged to a point that satisfies the first-order Kuhn–Tucker (see Section 9.1.6) conditions to the accuracy requested by the optional parameter SSQP Major Optimality Tol, i.e., the projected gradient and active constraint residuals are negligible at .
You should check whether the following four conditions are satisfied:
(i)the final value of rgNorm (see Section 9.1.6) is significantly less than that at the starting point;
(ii)during the final major iterations, the values of Step and Minors (see Section 9.1.5) are both one;
(iii)the last few values of both rgNorm and SumInf (see Section 9.1.6) become small at a fast linear rate; and
If all these conditions hold, is almost certainly a local minimum of (1).
A cautionary note about ‘Optimal solutions’. Some of the variables or slacks may lie outside their bounds more than desired, especially if scaling was requested. Max Primal infeas (printed at the end of the solve when Print Level and Monitoring Level or Print Level and Monitoring Level) refers to the largest bound infeasibility and which variable is involved. If it is too large, consider restarting with a smaller SSQP Minor Feasibility Tol (say times smaller) and perhaps .
Similarly, Max Dual infeas (also printed when Print Level or Monitoring Level) indicates which variable is most likely to be at a nonoptimal value. Broadly speaking, if
where Max pi (printed at the end of a solve when Print Level and Monitoring Level or Print Level and Monitoring Level) indicates the largest dual variable in magnitude, then the objective function would probably change in the th significant digit if optimization could be continued. If seems too large, consider restarting with a smaller SSQP Major Optimality Tol.
Background information to multithreading can be found in the Multithreading documentation.
e04srf is not threaded in any implementation.
9Further Comments
9.1Description of the Printed Output
The solver can print information to give an overview of the problem and of the progress of the computation. The output may be sent to two independent streams (files) which are set by optional parameters Print File and Monitoring File. Optional parameters Print Level, Monitoring Level, Print Solution and Print Options 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 (, ), the following sections are printed to the standard output:
Header
Optional parameters list (if )
Problem statistics
Verification of derivatives (if or )
Major iteration log
Summary
Solution (if )
9.1.1Header
The header is a message indicating the start of the solver. It should look like:
-------------------------------------------------------------------
E04SR, SQP method for large-scale nonlinear optimization problems
-------------------------------------------------------------------
9.1.2Optional parameters list
The list shows all options of the solver, each displayed on one line. The output contains the option name, its current value and an indicator for how it was set. The options unchanged from the default setting are noted by ‘d’, options you set are noted by ‘U’, and options reset by the solver are noted by ‘S’. Note that the output format is compatible with the file format expected by e04zpf. The output might look as follows:
Begin of Options
Print File = 6 * d
Print Level = 2 * U
Print Options = Yes * d
Print Solution = Yes * U
Monitoring File = 9 * U
Monitoring Level = 3 * U
Infinite Bound Size = 1.00000E+20 * d
Task = Minimize * d
Stats Time = No * d
Time Limit = 1.00000E+06 * d
Verify Derivatives = Yes * U
...
Ssqp Estimate Derivatives = No * d
Ssqp Function Precision = 3.00000E-13 * d
Ssqp Finite Diff Ctrl Interval= 6.69433E-05 * d
Ssqp Finite Diff Interval = 5.47723E-07 * d
Ssqp Hessian = Auto * d
Ssqp Hessian Updates = 10 * d
Ssqp Iteration Limit = 10000 * d
Ssqp Major Feasibility Tol = 1.00001E-06 * d
Ssqp Major Iteration Limit = 1000 * d
...
End of Options
9.1.3Problem statistics
Problem statistics
If , statistics on the problem are printed. It should look as follows:
Problem Statistics
No of variables 6
linear 4
nonlinear 2
free (unconstrained) 2
bounded 2
No of lin. constraints 0
nonzeroes 0
No of quad.constraints 9
No of nln. constraints 12
nonzeroes 15
Objective function Quadratic
Note: the list is showing that out of the six variables, four are detected as present in linear expressions (of the objective and constraint functions),
while the remaining two are present nonlinearly.
It is followed by information regarding warm start (see Section 9.4) and statistics on the Jacobian matrix, the output may look similar to:
Warm start information loaded successfully from handle.
Handle [WARM START BASIS] data origin: solver
Handle [SLACK] data origin : solver
Matrix statistics
Total Normal Free Fixed Bounded
Rows 4 1 1 2 0
Columns 4 2 2 0 0
The user has defined 5 out of 5 constraint gradients.
The user has defined 4 out of 4 objective gradients.
9.1.4Verification of derivatives
If , then only a ‘cheap’ test will be performed on the user-supplied nonlinear objective gradient and constraint Jacobian. The output may be similar to:
Cheap test of user-supplied problem derivatives...
The constraint gradients seem to be OK.
--> The largest discrepancy was 2.52E-07 in constraint 3 (NLC: 2)
The objective gradients seem to be OK.
Gradient projected in one direction 6.70906812736E-01
Difference approximation 6.70906898365E-01
If , then the user-supplied nonlinear objective gradient and constraint Jacobian are individually verified. The output might look as follows:
Verification of user-supplied problem derivatives.
The constraint gradients seem to be OK.
--> The largest discrepancy was 2.52E-07 in constraint 3 (NLC: 2)
The objective gradients seem to be OK.
Gradient projected in one direction 6.70906812736E-01
Difference approximation 6.70906898365E-01
Column x(j) dx(j) Element no. Row Derivative Difference approxn
1 -7.06220960E-02 5.86E-07 1 2 -1.41244192E-01 -1.41243605E-01 ok
1 -7.06220960E-02 5.86E-07 Objective 2.68365409E+00 2.68365467E+00 ok
2 1.41244914E+00 1.32E-06 2 2 2.82489828E+00 2.82489960E+00 ok
3 3 1.12714152E+01 1.12714310E+01 ok
2 1.41244914E+00 1.32E-06 Objective 2.68365409E+00 2.68365441E+00 ok
...
--> The largest relative error was 1.29E-06 in row 3 (NLC: 2), column 2
4 objective gradients out of 1 through 4 seem to be OK.
--> The largest relative error was 3.59E-07 in column 2
9.1.5Major Iteration Log
This section describes the output to unit Print File or Monitoring File if
. One line of information is output every major iteration. A heading is printed before the first such line containing the items described below.
Label
Description
Itns
is the cumulative number of minor iterations.
Major
is the current major iteration number.
Minors
is the number of iterations required by both the feasibility and optimality phases of the QP subproblem. Generally, Minors will be in the later iterations, since theoretical analysis predicts that the correct active set will be identified near the solution, see Section 11.
Step
is the step length taken along the current search direction . The variables have just been changed to . On reasonably well-behaved problems, the unit step will be taken as the solution is approached.
nCon
the number of times objfun or confun have been called to evaluate the nonlinear problem functions. Evaluations needed for the estimation of the derivatives by finite differences are not included. nCon is printed as a guide to the amount of work required for the linesearch.
Feasible
is the value of from (12), the maximum component of the scaled nonlinear constraint residual (see optional parameter SSQP Major Feasibility Tol). The solution is regarded as acceptably feasible if Feasible is less than the SSQP Major Feasibility Tol. In this case, the entry is contained in parentheses.
If the constraints are linear, all iterates are feasible and this entry is not printed.
Optimal
is the value of from (13), the maximum complementary gap (see optional parameter SSQP Major Optimality Tol). It is an estimate of the degree of nonoptimality of the reduced costs. Both Feasible and Optimal are small in the neighbourhood of a solution.
MeritFunction
is the value of the augmented Lagrangian merit function from (7). This function will decrease at each iteration unless it was necessary to increase the penalty parameters, see Section 11.4. As the solution is approached, MeritFunction will converge to the value of the objective at the solution.
In elastic mode, the merit function is a composite function involving the constraint violations weighted by the elastic weight.
If the constraints are linear, this item is labelled Objective, the value of the objective function. It will decrease monotonically to its optimal value.
L+U
is the number of nonzeros representing the basis factors and on completion of the QP subproblem.
If nonlinear constraints are present, the basis factorization is computed at the start of the first minor iteration. At this stage, , where lenL is the number of subdiagonal elements in the columns of a lower triangular matrix and lenU is the number of diagonal and superdiagonal elements in the rows of an upper-triangular matrix, see Section 9.1.9.
As columns of are replaced during the minor iterations, L+U may fluctuate up or down but, in general, will tend to increase. As the solution is approached and the minor iterations decrease towards zero, L+U will reflect the number of nonzeros in the factors at the start of the QP subproblem.
BSwap
is the number of columns of the basis matrix that were swapped with columns of to improve the condition of . The swaps are determined by an factorization of the rectangular matrix with stability being favoured more than sparsity.
nS
is the current number of superbasic variables.
condHz
is an estimate of the condition number of , itself an estimate of , the reduced Hessian of the Lagrangian. The condition number is the square of the ratio of the largest and smallest diagonals of the upper triangular matrix , this being a lower bound on the condition number of . condHz gives a rough indication of whether or not the optimization procedure is having difficulty. If is the relative machine precision being used, the SQP algorithm will make slow progress if condHz becomes as large as , and will probably fail to find a better solution if condHz reaches .
To guard against high values of condHz, attention should be given to the scaling of the variables and the constraints. In some cases it may be necessary to add upper or lower bounds to certain variables to keep them a reasonable distance from singularities in the nonlinear functions or their derivatives.
Penalty
is the Euclidean norm of the vector of penalty parameters used in the augmented Lagrangian merit function (not printed if there are no nonlinear constraints).
The summary line may include additional code characters that indicate what happened during the course of the major iteration. These will be under the ...Flags column.
Flag
Description
+
indicates that the log is from a major iteration.
c
central differences have been used to compute the unknown components of the objective and constraint gradients. A switch to central differences is made if either the linesearch gives a small step, or is close to being optimal. In some cases, it may be necessary to re-solve the QP subproblem with the central difference gradient and Jacobian.
d
during the linesearch it was necessary to decrease the step in order to obtain a maximum constraint violation.
D
on return from objfun, indicating that the linesearch needed to be done with a smaller value of the step length of equation (9).
l
the norm wise change in the variables was limited by a safeguard upper bound.
i
if e04srf is not in elastic mode, an i signifies that the QP subproblem is infeasible. This event triggers the start of nonlinear elastic mode, which remains in effect for all subsequent iterations. Once in elastic mode, the QP subproblems are associated with the elastic problem (11) described in Section 11.5.
If e04srf is already in elastic mode, an i indicates that the minimizer of the elastic subproblem does not satisfy the linearized constraints. (In this case, a feasible point for the usual QP subproblem may or may not exist.)
M
an extra evaluation of the problem functions was needed to define an acceptable positive definite quasi-Newton update to the Lagrangian Hessian. This modification is only done when there are nonlinear constraints.
m
this is the same as M except that it was also necessary to modify the update to include an augmented Lagrangian term.
n
no positive definite BFGS update could be found. The approximate Hessian is unchanged from the previous iteration.
R
the approximate Hessian has been reset by discarding all but the diagonal elements. This reset will be forced periodically by the SSQP Hessian Updates keyword. However, it may also be necessary to reset an ill-conditioned Hessian from time to time.
r
the approximate Hessian was reset after ten consecutive major iterations in which no BFGS update could be made. The diagonals of the approximate Hessian are retained if at least one update has been done since the last reset. Otherwise, the approximate Hessian is reset to the identity matrix.
s
a self-scaled BFGS update was performed. This update is used when the Hessian approximation is diagonal, and hence always follows a Hessian reset.
Is only printed if , one line of information is output every th minor iteration, where is the specified SSQP Print Frequency, by default . A heading is printed before the first such line following a basis factorization. The heading contains the items described below. In this description, a pricing operation is the process by which a nonbasic variable is selected to become superbasic (in addition to those already in the superbasic set). The selected variable is denoted by jq. Variable jq often becomes basic immediately. Otherwise, it remains superbasic unless it reaches its opposite bound and returns to the nonbasic set.
Label
Description
Itn
the current iteration number.
LPmult or QPmult
is the reduced cost (or reduced gradient) of the variable jq selected by the pricing procedure at the start of the present iteration. Algebraically, the reduced gradient is for , where is the gradient of the current objective function, is the vector of dual variables for the QP subproblem, and is the th column of .
Note that the reduced cost is the -norm of the reduced-gradient vector at the start of the iteration, just after the pricing procedure.
LPstep or QPstep
is the step length taken along the current search direction . The variables have just been changed to . Write Step to stand for LPStep or QPStep, depending on the problem. If a variable is made superbasic during the current iteration (), Step will be the step to the nearest bound. During Phase 2, the step can be greater than only if the reduced Hessian is not positive definite.
nInf
is the number of infeasibilities after the present iteration. This number will not increase unless the iterations are in elastic mode.
SumInf
is the sum of infeasibilities after the present iteration, if . The value usually decreases at each nonzero Step, but if it decreases by or more, SumInf may occasionally increase.
rgNorm
is the norm of the reduced-gradient vector at the start of the iteration. (It is the norm of the vector with elements for variables in the superbasic set.) During Phase 2 this norm will be approximately zero after a unit step. (The heading is not printed if the problem is linear.)
LPobjective or QPobjective
the QP objective function after the present iteration. In elastic mode, the heading is changed to Elastic QPobj. In either case, the value printed decreases monotonically.
+SBS
is the variable jq selected by the pricing operation to be added to the superbasic set.
-SBS
is the superbasic variable chosen to become nonbasic.
-BS
is the basis variable removed (if any) to become nonbasic.
Pivot
if column replaces the th column of the basis , Pivot is the th element of a vector satisfying . Wherever possible, Step is chosen to avoid extremely small values of Pivot (since they cause the basis to be nearly singular).
L+U
is the number of nonzeros representing the basis factors and . Immediately after a basis factorization , L+U is lenL+lenU, the number of subdiagonal elements in the columns of a lower triangular matrix and the number of diagonal and superdiagonal elements in the rows of an upper-triangular matrix. Further nonzeros are added to L when various columns of are later replaced. As columns of are replaced, the matrix is maintained explicitly (in sparse form). The value of L will steadily increase, whereas the value of U may fluctuate up or down. Thus the value of L+U may fluctuate up or down (in general, it will tend to increase).
ncp
is the number of compressions required to recover storage in the data structure for . This includes the number of compressions needed during the previous basis factorization.
nS
is the current number of superbasic variables. (The heading is not printed if the problem is linear.)
condHz
see Section 9.1.5. (The heading is not printed if the problem is linear.)
9.1.7Summary
Once the solver finishes, a detailed summary is produced:
Problem Minimize
Max x 2 1.4E+00 Max pi 2 1.9E+01
Nonlinear constraint violn 5.2E-08
-------------------------------------------------------------------------------
Status: converged, an optimal solution was found
-------------------------------------------------------------------------------
Value of the objective 1.90012E+00
Primal infeasibility 5.24140E-08
Dual infeasibility 5.19087E-06
Penalty parameter 9.04109E+00
Major iterations 11
Minor iterations 11
Objective function calls 18
Objective gradient calls 10
Constraint function calls 16
Constraint Jacobian calls 10
Hessian evaluations 0
-------------------------------------------------------------------------------
It starts with a status line of the overall result, followed by the final objective value as well as the primal and dual measures of infeasibility and the final value of the penalty parameter. If , it will additionally report major and minor iteration count, objective or constraint function calls. Optionally, if or , some statistics on timings is displayed. It might look as follows:
Timing Seconds Average
Total 18.32 100.0%
Total time spent in pre-solve 1.09 5.9%
Total time spent in solver 17.23 94.1%
Time in objective function 0.31 0.02 1.7%
Time in objective gradient 1.24 0.12 6.8%
Time in constraint function 0.45 0.03 2.5%
Time in constraint Jacobian 2.68 0.27 14.6%
Time in Hessian callback 0.00 0.00 0.0%
9.1.8Solution
If , the values of the primal variables x are printed, furthermore if the problem is constrained, also the dual variables
(Lagrangian multipliers) u and the constraint bounds are reported. It might look as follows:
If , the first seven items listed below are printed whenever the basis or the rectangular matrix is factorized before finding the solution of the next QP subproblem. Note that may be factorized at the start of just some of the major iterations. It is immediately followed by a factorization of itself.
Gaussian elimination is used to compute a sparse factorization of or , where and are lower and upper triangular matrices, for some permutation matrices and .
If , the same items are printed during the QP solution whenever the current is factorized.
A heading is printed containing the items described below.
Label
Description
Factor
the number of factorizations since the start of the run.
Demand
a code giving the reason for the present factorization, as follows:
Code
Meaning
0
First factorization.
1
The number of updates reached the allowed limit.
2
The nonzeros in the updated factors have increased significantly.
7
Not enough storage to update factors.
10
Row residuals are too large.
11
Ill-conditioning has caused inconsistent results.
Itn
is the current minor iteration number.
Nonlin
is the number of nonlinear variables in the current basis .
Linear
is the number of linear variables in .
Slacks
is the number of slack variables in .
B, BR, BS or BT factorize
is the type of factorization.
B
periodic factorization of the basis .
BR
more careful rank-revealing factorization of using threshold rook pivoting. This occurs mainly at the start, if the first basis factors seem singular or ill-conditioned. Followed by a normal B factorize.
BS
is factorized to choose a well-conditioned from the current . Followed by a normal B factorize.
BT
same as BS except the current is tried first and accepted if it appears to be not much more ill-conditioned than after the previous BS factorize.
m
is the number of rows in or .
n
is the number of columns in or . Preceded by ‘=’ or ‘>’ respectively.
Elems
is the number of nonzero elements in or .
Amax
is the largest nonzero in or .
Density
is the percentage nonzero density of or .
Merit/MerRP/MerCP
Merit is the average Markowitz merit count for the elements chosen to be the diagonals of . Each merit count is defined to be where and are the number of nonzeros in the column and row containing the element at the time it is selected to be the next diagonal. Merit is the average of n such quantities. It gives an indication of how much work was required to preserve sparsity during the factorization. Depending on the pivoting strategy, this heading may change to MerCP or MerRP.
lenL
is the number of nonzeros in .
L+U
is the number of nonzeros representing the basis factors and . Immediately after a basis factorization , this is lenL+lenU, the number of subdiagonal elements in the columns of a lower triangular matrix and the number of diagonal and superdiagonal elements in the rows of an upper-triangular matrix. Further nonzeros are added to L when various columns of are later replaced. As columns of are replaced, the matrix is maintained explicitly (in sparse form). The value of L will steadily increase, whereas the value of U may fluctuate up or down. Thus the value of L+U may fluctuate up or down (in general, it will tend to increase).
Cmpressns
is the number of times the data structure holding the partially factored matrix needed to be compressed to recover unused storage. Ideally this number should be zero. If it is more than or , the amount of workspace available to e04srf should be increased for efficiency.
Incres
is the percentage increase in the number of nonzeros in and relative to the number of nonzeros in or .
Utri
is the number of triangular rows of or at the top of .
lenU
the number of nonzeros in , including its diagonals.
Ltol
is the largest subdiagonal element allowed in .
Umax
the maximum nonzero element in .
Ugrwth
is the ratio , which ideally should not be substantially larger than or .
As long as Lmax is not large (say or less), gives an estimate of the condition number . If this is extremely large, the basis is nearly singular. Slacks are used to replace suspect columns of and the modified basis is refactored.
Ltri
is the number of triangular columns of or at the left of .
dense1
is the number of columns remaining when the density of the basis matrix being factorized reached .
Lmax
is the actual maximum subdiagonal element in (bounded by Ltol).
Akmax
is the largest nonzero generated at any stage of the factorization. (Values much larger than Amax indicate instability.)
Agrwth
is the ratio . Values much larger than (say) indicate instability.
bump
is the size of the block to be factorized nontrivially after the triangular rows and columns of or have been removed.
dense2
is the number of columns remaining when the density of the basis matrix being factorized reached . (The Markowitz pivot strategy searches fewer columns at that stage.)
DUmax
is the largest diagonal element of .
DUmin
is the smallest diagonal element of .
condU
the ratio , which estimates the condition number of (and of if Ltol is less than , say).
9.2Accessing Slack Variables
e04srf reformulates any inequality constraint in the model into an equality constraint. This is done implicitly by adding artificial slack variables to the problem, see Section 11.1.
e04srf stores in the handle under the label ‘SLACK’ the final value of the slack variables. It also retrieves this information from the handle when a warm start is requested using the optional parameter , see Section 9.4.
Slack variables can be stored or retrieved from the handle with e04rxf using and , where stats is the correct number of slack variables and can be retrieved from a previous call to e04srf.
Note: any entry of the slack variables array with an index greater than the amount of defined variables and constraints will refer to the artificial slack variable associated with the objective function, this may be the case when linear variables are identified in the objective function.
9.3Retrieving and Storing a Basis
A basis refers to a partitioning of the primal and slack variables. This partitioning plays a fundamental role in the underlying LP and QP algorithms of e04srf,
Section 11.3 provides a brief description.
e04srf stores in the handle under the label ‘BASIS’ (or ‘WARM START BASIS’) the final state of the primal and slack variables. It also retrieves this information from the handle when a warm start is requested using optional parameter , see Section 9.4.
The stored integer array is of length and the values describe the state of the primal variables x and the slacks as follows:
BASIS()
State of variable
Usual value
Note
-1
Ignored
—
None of the enabled variables can have this value. It indicates that the basis element is ignored by the solver. Ignored elements occur when a primal variable or constraint is marked by you as disabled (see e04tcf) or presolve dropped a fixed constraint or primal variable.
0
Nonbasic
lower bound
1
Nonbasic
upper bound
2
Superbasic
between lower and upper bounds
3
Basic
between lower and upper bounds
4
Nonbasic
lower bound
Variable is ignored during the crash procedure and its associated slack variable needs to be set to the lower bound.
5
Nonbasic
upper bound
Variable is ignored during the crash procedure and its associated slack variable needs to be set to the upper bound.
The basis can be stored or retrieved from the handle with e04rwf using or and , where is the correct number of slack variables and can be retrieved from a previous call to e04srf.
Note: basic and superbasic variables may be outside their bounds by as much as the SSQP Minor Feasibility Tol tolerance. If scaling is specified (using optional parameter SSQP Scale Option), the feasibility tolerance applies to the variables of the scaled problem. In this case, the variables of the original problem may be as much as outside their bounds, but this is unlikely unless the problem is very badly scaled. Check the ‘Primal infeasibility’ line printed at the end of the solve, see Section 9.1.7.
9.4Warm Starting
Warm starting a problem refers to providing a starting point x and additional information used by the solver to start the optimization process, for example, by providing information on which variables are suberbasic or active and thus hinting on the possible final active-set or providing a good initial guess for the final values of the Lagrange multipliers.
In order to warm start e04srf, it is necessary to
(i)provide on the call to e04srf the initial guess ;
(ii)provide on the call to e04srf the initial guess for the Lagrange multipliers u. If nnzu then the solver will access array u and so it must be provided. If nothing is known about the multipliers then u should be set to zero in the call to e04srf;
(iii)store in the handle (under the label ‘SLACK’) the slack variables array. See Section 9.2;
(iv)store in the handle (under the label ‘BASIS’ or ‘WARM START BASIS’) a valid basis vector of length nvarstats. See Section 9.3;
(v)request the solver to attempt a warm start by setting optional parameter .
If optional parameter but e04srf does not find the required information or it is inconsistent, then it will revert to a cold start.
Note:e04srf at exit (if the information is available) stores the slack variables and basis arrays into the handle under the labels ‘SLACK’ and ‘BASIS’. A next call to e04srf with the same handle along with , and the latest x and u, should trigger a warm start successfully. It will also notify the source of the warm starting information with a message similar to:
Warm start information loaded successfully from handle.
Handle [WARM START BASIS] data origin: solver
Handle [SLACK] data origin : user
Which indicates that the warm start information was successfully loaded. It also informs that you provided the slack variables array
(using e04rxf with cmdstr‘SLACK’) and that the basis information was provided by the solver itself, say, from a previous call to e04srf.
9.5Internal Changes
Internal changes have been made to this routine as follows:
At Mark 28.4:
Updates that in general provide overall performance enhancements.
For details of all known issues which have been reported for the NAG Library please refer to the Known Issues.
10Example
This example involves the minimization of the nonlinear function
subject to the bounds
to the nonlinear constraints
and the linear constraint
The initial point is
and . The optimal solution (to five significant figures) is
Note: the variable appears only linearly in the example. The linear property of the variable can be hinted to the solver using the routine e04rcf, see
Section 3.1 and
Section 3.1 in e04rcf for further details.
Here we summarise the main features of the SQP algorithm used in e04srf and introduce some terminology used in the description of the subroutine and its arguments. The SQP algorithm is fully described in Gill et al. (2002).
11.1Constraints and Slack Variables
Let be the
-dimensional vector made up of the quadratic constraints. Furthermore, let
be the total number of components of the nonlinear constraints, , the quadratic constraints,
, and the linear constraints,
combined, that is,
.
The upper and lower bounds on those terms define the general constraints of the problem. e04srf converts the general constraints to equalities by introducing a set of slack variables . For example, the linear constraint is replaced by together with the bounded slack . The minimization problem (1) can, therefore, be written in the equivalent form
(2)
The general constraints become the equalities and , where and are the linear and nonlinear slacks.
Note: see Section 9.2 on how to access the slack variables stored in the handle.
11.2Major Iterations
The basic structure of the SQP algorithm involves major and minor iterations. The major iterations generate a sequence of iterates that satisfy the linear constraints and converge to a point that satisfies the nonlinear constraints and the first-order conditions for optimality. At each iterate a QP subproblem is used to generate a search direction towards the next iterate .
Without loss of generality and for ease of exposition, suppose that the model to optimize consists of linear and nonlinear constraints only, that is, , then the constraints of the subproblem are formed from the linear constraints and the linearized constraint
(3)
where denotes the Jacobian matrix, whose elements are the first derivatives of evaluated at . The QP constraints, therefore, comprise the linear constraints
(4)
where and are bounded above and below by and as before. If the matrix and -vector are defined as
(5)
then the QP subproblem can be written as
(6)
where is a quadratic approximation to a modified Lagrangian function (see Gill et al. (2002)), is the gradient of the Lagrangian, and the matrix is a quasi-Newton approximation to the Hessian of the Lagrangian. A BFGS update is applied after each major iteration. If some of the variables enter the Lagrangian linearly the Hessian will have some zero rows and columns. If the nonlinear variables appear first, then only the rows and columns of the Hessian need to be approximated, where is the number of nonlinear variables, see Section 3.1 and
Section 3.1 in e04rcf.
11.3Minor Iterations
Solving the QP subproblem is itself an iterative procedure. Here, the iterations of the QP solver e04nqf form the minor iterations of the SQP method. e04nqf uses a reduced-Hessian active-set method implemented as a reduced-gradient method. At each minor iteration, the constraints are partitioned into the form
(7)
where the basis matrix is square and nonsingular, and the matrices and are the remaining columns of . The vectors , and are the associated basic, superbasic and nonbasic variables respectively; they are a permutation of the elements of and . At a QP subproblem, the basic and superbasic variables will lie somewhere between their bounds, while the nonbasic variables will normally be equal to one of their bounds. At each iteration, is regarded as a set of independent variables that are free to move in any desired direction, namely one that will improve the value of the QP objective (or the sum of infeasibilities). The basic variables are then adjusted in order to ensure that continues to satisfy . The number of superbasic variables (, say), therefore, indicates the number of degrees of freedom remaining after the constraints have been satisfied. In broad terms, is a measure of how nonlinear the problem is. In particular, will always be zero for LP problems.
If it appears that no improvement can be made with the current definition of , and , a nonbasic variable is selected to be added to , and the process is repeated with the value of increased by one. At all stages, if a basic or superbasic variable encounters one of its bounds, the variable is made nonbasic and the value of is decreased by one.
Associated with each of the equality constraints are the dual variables .
Similarly, each variable in has an associated reduced gradient . The reduced gradients for the variables are the quantities , where
is the gradient of the QP objective (6), and the reduced gradients for the slacks are the dual variables . The QP subproblem is optimal if for all nonbasic variables at their lower bounds, for all nonbasic variables at their upper bounds, and for other variables, including superbasics. In practice, an approximate QP solution is found by relaxing these conditions.
11.4The Merit Function
After a QP subproblem has been solved, new estimates of the solution are computed using a linesearch on the augmented Lagrangian merit function
(8)
where is a diagonal matrix of penalty parameters , and now refers to dual variables for the nonlinear constraints in (1). If denotes the current solution estimate and denotes the QP solution, the linesearch determines a step such that the new point
(9)
gives a sufficient decrease in the merit function . When necessary, the penalties in are increased by the minimum-norm perturbation that ensures descent for (see Gill et al. (1992)). The value of is adjusted to minimize the merit function as a function of before the solution of the QP subproblem (see Gill et al. (1986) and Eldersveld (1991)).
11.5Treatment of Constraint Infeasibilities
e04srf makes explicit allowance for infeasible constraints. First, infeasible linear constraints are detected by solving the linear program
(10)
where is a vector of ones, and the nonlinear constraint bounds are temporarily excluded from and . This is equivalent to minimizing the sum of the general linear constraint violations subject to the bounds on . (The sum is the -norm of the linear constraint violations. In the linear programming literature, the approach is called elastic programming.)
The linear constraints are infeasible if the optimal solution of (10) has or . e04srf then terminates without computing the nonlinear functions.
Otherwise, all subsequent iterates satisfy the linear constraints. (Such a strategy allows linear constraints to be used to define a region in which the nonlinear functions can be safely evaluated.) e04srf proceeds to solve the nonlinear problem as given, using search directions obtained from the sequence of QP subproblems, see (6).
If a QP subproblem proves to be infeasible or unbounded (or if the dual variables for the nonlinear constraints become large), e04srf enters ‘elastic’ mode and thereafter solves the problem
(11)
where is a non-negative argument (the elastic weight), and is called a composite objective (the penalty function for the nonlinear constraints).
The value of may increase automatically by multiples of if the optimal and continue to be nonzero. If is sufficiently large, this is equivalent to minimizing the sum of the nonlinear constraint violations subject to the linear constraints and bounds.
12Optional Parameters
Several optional parameters in e04srf define choices in the problem specification or the algorithm logic. In order to reduce the number of formal arguments of e04srf 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 e04zmf anytime between the initialization of the handle by e04raf and the call to the solver. Modification of the arguments during intermediate monitoring steps is not allowed. Once the solver finishes, the optional parameters can be altered again for the next solve.
For each option, we give a summary line, a description of the optional parameter and details of constraints.
The summary line contains:
the keywords;
a parameter value,
where the letters , and denote options that take character, integer and real values respectively.
the default value, where the symbol is a generic notation for machine precision (see x02ajf).
All options accept the value to return single options to their default states.
Keywords and character values are case and white space insensitive.
Defaults
This special keyword may be used to reset all optional parameters to their default values. Any value given with this keyword will be ignored.
Infinite Bound Size
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 ). 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.
Constraint: .
Monitoring File
Default
If , the
unit number
for the secondary (monitoring) output. If set to , no secondary output is provided. The following information is output to the unit:
–a listing of the optional parameters;
–problem statistics, the iteration log and the final status as set by Monitoring Level;
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.
Constraint: .
Print File
Default
If , the
unit number
for the primary output of the solver. If , the primary output is completely turned off independently of other settings. The default value is the advisory message unit number as defined by x04abf at the time of the optional parameters initialization, e.g., at the initialization of the handle. The following information is output to the unit:
–a listing of optional parameters if set by Print Options;
–problem statistics, the iteration log and the final status from the solver as set by Print Level;
This parameter defines how detailed information should be printed by the solver to the primary output.
Output
No output from the solver
Only the final status and the objective value
Problem statistics, one line per iteration showing the progress of the solution with respect to the convergence measures, final status and statistics
As level and additionally inner QP iteration log is reported every SSQP Print Frequency
As level but further details of each minor and major iteration are presented
Constraint: .
Print Options
Default
If , a listing of optional parameters will be printed to the primary output.
Constraint: or .
Print Solution
Default
If , the final values of the solution vector are printed on the primary and secondary outputs.
Constraint: or .
SSQP Crash Option
Default
Except on restarts , a crash procedure is used to select an initial basis (see (7) in Section 11.3) from certain rows and columns of the constraint matrix . The SSQP Crash Option determines which rows and columns of (see (5) in Section 11.2) are eligible initially, and how many times crash is called. Columns of are used to pad the basis where necessary.
Meaning
The initial basis contains only slack variables: (see (7) in Section 11.3).
crash is called once, looking for a triangular basis in all rows and columns of .
crash is called twice (if there are nonlinear constraints). The first call looks for a triangular basis in linear rows, and the iteration proceeds with simplex iterations until the linear constraints are satisfied. The Jacobian is then evaluated for the first major iteration and crash is called again to find a triangular basis in the nonlinear rows (retaining the current basis for linear rows).
crash is called up to three times (if there are nonlinear constraints). The first two calls treat linear equalities and linear inequalities separately. As before, the last call treats nonlinear rows before the first major iteration.
If , certain slacks on inequality rows are selected for the basis first, furthermore if or , numerical values are used to exclude slacks that are close to a bound. crash then makes several passes through the columns of , searching for a basis matrix that is essentially triangular. A column is assigned to pivot on a particular row if the column contains a suitably large element in a row that has not yet been assigned (the pivot elements ultimately form the diagonals of the triangular basis. For remaining unassigned rows, slack variables are inserted to complete the basis.
Note: each crash pass is counted as a minor iteration..
Constraint: , , or .
SSQP Crash Tolerance
Default
The SSQP Crash Tolerance allows the starting procedure crash to ignore certain small nonzeros in each column of (see (5) in Section 11.2). If is the largest element in column , other nonzeros in the column are ignored if . To be meaningful, needs to be in the range .)
When , the basis obtained by crash may not be strictly triangular, but it is likely to be nonsingular and almost triangular. The intention is to obtain a starting basis containing more columns of and fewer (arbitrary) slacks (columns of ). A feasible solution may be reached sooner on some problems.
When (or ) the solver will automatically choose an appropriate tolerance.
This option specifies which nonlinear function gradients (objective and nonlinear constraints) are known analytically and will be supplied to the solver by you subroutines
objgrd and congrd. This option has the following alternatives:
Meaning
(default)
Indicates to the solver that you are providing full derivative information, that is,
all objective and constraint gradients are known.
Indicates that some or all components of the objective gradient will be missing but all constraint gradients are known.
Conversely to , this indicated that some or all of the constraint gradients will be missing but the objective gradient is known.
Indicates that the user is not providing derivatives.
The value should be used whenever possible. It is the most reliable and will usually be the most efficient.
If or , e04srf will estimate the missing components of the objective gradient, using finite differences. This may simplify the coding of subroutine objgrd. However, it could increase the total run-time substantially (since a special call to objfun is required for each missing element), and there is less assurance that an acceptable solution will be located. If the nonlinear variables are not well scaled, it may be necessary to specify a nonstandard difference interval changing SSQP Finite Diff Ctrl Interval or SSQP Finite Diff Interval.
Conversely, if or , e04srf will estimate missing elements of the Jacobian. For each column of the Jacobian, one call to confun is needed to estimate all missing elements in that column, if any.
At times, central differences are used rather than forward differences. Twice as many calls to objfun and confun are then needed. (This is not under your control.)
Note: if , or and the user does not provide one or more of the required gradient (or Jacobian) elements then these will be assumed to be constant, this might not be the desired behaviour. Under this circumstance, e04srf will inform the user with a message.
Constraint: , , or .
SSQP Finite Diff Ctrl Interval
Default
When , or , the central-difference interval is used near an optimal solution to obtain more accurate (but more expensive) estimates of gradients. Twice as many function evaluations are required compared to forward differencing. The interval used for the th variable is . The resulting derivative estimates should be accurate to , unless the functions are badly scaled.
Constraint: .
SSQP Finite Diff Interval
Default
This alters the interval used to estimate gradients by forward differences. It does so in the following circumstances:
–in the ‘cheap’ phase of verifying the problem derivatives, when ;
–for verifying the problem derivatives ();
–for estimating missing derivatives.
In all cases, a derivative with respect to is estimated by perturbing that component of to the value , and then evaluating the objective or constraint functions at the perturbed point. The resulting gradient estimates should be accurate to unless the functions are badly scaled. Judicious alteration of may sometimes lead to greater accuracy.
Constraint: .
SSQP Function Precision
Default
The relative function precision is intended to be a measure of the relative accuracy with which the nonlinear functions can be computed. For example, if is computed as for some relevant and if the first significant digits are known to be correct, the appropriate value for would be .
Ideally, the functions and should have a magnitude of order . If all functions are substantially less than in magnitude, should be the absolute precision. For example, if at some point and if the first significant digits are known to be correct, the appropriate value for would be .)
The default value of is appropriate for simple analytic functions.
In some cases the function values will be the result of extensive computation, possibly involving a costly iterative procedure that can provide few digits of precision. Specifying an appropriate SSQP Function Precision may lead to savings, by allowing the linesearch procedure to terminate when the difference between function values along the search direction becomes as small as the absolute error in the values.
Constraint: .
SSQP Hessian
Default
This option selects the method for storing and updating the approximate Hessian. (e04srf uses a quasi-Newton approximation to the Hessian of the Lagrangian. A BFGS update is applied after each major iteration.)
If is specified, the approximate Hessian is treated as a dense matrix and the BFGS updates are applied explicitly. This option is most efficient when the number of variables is not too large (say, less than ). In this case, the storage requirement is fixed and one can expect -step Q-superlinear convergence to the solution.
should be used on problems where is very large. In this case, a limited-memory procedure is used to update a diagonal Hessian approximation a limited number of times. Updates are accumulated as a list of vector pairs. They are discarded at regular intervals after has been reset to their diagonal, see optional parameter SSQP Hessian Updates.
If is specified, then the
quasi-Newton method used is chosen based on a heuristic involving the number of nonlinear variables
(see Section 3.1) in the problem.
Constraint: , or .
SSQP Hessian Updates
Default
If optional parameter is in effect and BFGS updates have already been carried out, all but the diagonal elements of the accumulated updates are discarded and the updating process starts again.
Broadly speaking, the more updates stored, the better the quality of the approximate Hessian. However, the more vectors stored, the greater the cost of each QP iteration. The default value is likely to give a robust algorithm without significant expense, but faster convergence can sometimes be obtained with significantly fewer updates (e.g., ).
Constraint: .
SSQP Iteration Limit
Default
The value of specifies the maximum number of minor iterations allowed (i.e., iterations of the simplex method or the QP algorithm), summed over all major iterations. (See also the description of the optional parameter SSQP Minor Iteration Limit.)
For the default value, is the
number of linear, quadratic and nonlinear constraints defined in the model.
Constraint: .
SSQP Major Feasibility Tol
Default
This tolerance, , specifies how accurately the nonlinear constraints should be satisfied. The default value is appropriate when the linear and nonlinear constraints contain data to about that accuracy.
Let be the maximum nonlinear constraint violation, normalized by the size of the solution, which is required to satisfy
(12)
where is the violation of the th nonlinear constraint, for .
In the major iteration log (see Section 9.1), appears as the quantity labelled ‘Feasible’. If some of the problem functions are known to be of low accuracy, a larger SSQP Major Feasibility Tol may be appropriate.
Constraint: .
SSQP Major Iteration Limit
Default
This is the maximum number of major iterations allowed. It is intended to guard against an excessive number of linearizations of the constraints.
For the default value, is the
number of linear, quadratic and nonlinear constraints defined in the model.
Constraint: .
SSQP Major Optimality Tol
Default
This tolerance, , specifies the final accuracy of the dual variables. On successful termination, e04srf will have computed a solution such that
(13)
where is an estimate of the complementarity slackness for variable , for . Here represents the number of constraints. The values are computed from the final QP solution using the reduced gradients (where is the th component of the objective gradient, is the associated column of the constraint matrix , and is the set of QP dual variables):
(14)
In the major iteration log, appears as the quantity labelled ‘Optimal’, See section Section 9.1.5.
Constraint: .
SSQP Minor Feasibility Tol
Default
e04srf tries to ensure that all variables eventually satisfy their upper and lower bounds to within this tolerance, . This includes slack variables. Hence, general linear constraints should also be satisfied to within .
If the bounds and linear constraints cannot be satisfied to within , the problem is declared infeasible. If
rinfo
is quite small, it may be appropriate to raise by a factor of or . Otherwise, some error in the data should be suspected.
Nonlinear functions will be evaluated only at points that satisfy the bounds and linear constraints,
except perhaps in presolve where the solver may require to evaluate
confun, objgrd or congrd at a bound-feasible point.
If there are regions where a function is undefined, every attempt should be made to eliminate these regions from the problem.
For example, if , it is essential to place lower bounds on both variables. If , the bounds and might be appropriate. (The log singularity is more serious. In general, keep as far away from singularities as possible.)
If or , feasibility is defined in terms of the scaled problem (since it is then more likely to be meaningful).
In reality, e04srf uses as a feasibility tolerance for satisfying the bounds on and in each QP subproblem. If the sum of infeasibilities cannot be reduced to zero, the QP subproblem is declared infeasible. e04srf then activates elastic mode for the rest of the solving process (with only the linearized nonlinear constraints defined to be elastic). For further details see
Section 11.5.
Constraint: .
SSQP Minor Iteration Limit
Default
If the number of minor iterations for the optimality phase of the QP subproblem exceeds , then all nonbasic QP variables that have not yet moved are frozen at their current values and the reduced QP is solved to optimality.
Note that more than minor iterations may be necessary to solve the reduced QP to optimality. These extra iterations are necessary to ensure that the terminated point gives a suitable direction for the linesearch.
In the major iteration log (see Section 9.1) the flag t at the end of a line indicates that the corresponding QP was artificially terminated using the limit .
Compare with the optional parameter SSQP Iteration Limit, which defines an independent absolute limit on the total number of minor iterations (summed over all QP subproblems).
Constraint: .
SSQP Monitor Frequency
Default
This parameter specifies the frequency on which to call the monitor routine monit. If zero, the monitor routine will not be called.
Constraint: .
SSQP Penalty Parameter
Default
Defines the initial value of the penalty parameter and sets
in
(8).
No scaling. This is recommended if it is known that and the constraint matrix never have very large elements (say, larger than ).
The constraints and variables are scaled by an iterative procedure that attempts to make the matrix coefficients as close as possible to (see Fourer (1982)). This will sometimes improve the performance of the solution procedures.
The constraints and variables are scaled by the iterative procedure. Also, a certain additional scaling is performed that may be helpful if the right-hand side or the solution is large. This takes into account columns of that are fixed or have positive lower bounds or negative upper bounds.
Constraint: , or .
SSQP Scale Print
Default
Defines whether to print the row scales and column scales . The scaled matrix coefficients are and the scaled bounds on the variables and slacks are , if .
Constraint: or .
SSQP Scale Tolerance
Default
This parameter affects how many passes might be needed through the constraint matrix. On each pass, the scaling procedure computes the ratio of the largest and smallest nonzero coefficients in each column:
If is less than times its previous value, another scaling pass is performed to adjust the row and column scales. Raising from to (say) usually increases the number of scaling passes through . At most passes are made. The value of should lie in the range .
Constraint: .
SSQP Start Type
Default
Defines whether to perform a cold or warm start. If warm start data is not provided or is considered to have an unexpected size or content, then the solver will revert to perform a cold start on the problem. See Section 9.4 on how to correctly warm start a problem.
Constraint: or .
SSQP Superbasics Limit
Default
This option places a limit on the storage allocated for superbasic variables. Ideally, should be set slightly larger than the ‘number of degrees of freedom’ expected at an optimal solution.
For nonlinear problems, the number of degrees of freedom is often called the ‘number of independent variables’. Normally, need not be greater than .
If (the default), then e04srf automatically sets the limit to the number of nonlinear variables. For many problems, may be considerably smaller than . This will save storage if is very large.
If the limit set is too low then the solver will terminate with error message.
Constraint: .
Stats Time
Default
This parameter allows you to turn on the 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 is equivalent to .
Constraint: , , or .
Task
Default
This parameter specifies the required direction of the optimization. If , the objective function (if set) is ignored and the algorithm stops as soon as a feasible point is found. If no objective function is set, Task reverts to automatically.
Constraint: , or .
Time Limit
Default
This parameter specifies a limit in seconds that the solver can use to solve one problem. If during the convergence check this limit is exceeded, the solver will terminate with error message.
Constraint: .
Verify Derivatives
Default
This parameter specifies whether the routine should perform numerical checks on the consistency of the user-supplied gradient functions objgrd and congrd. If any discrepancies are found, is returned. It is recommended that such checks are enabled when first developing the formulation of the problem, however, the verification process results in a significant increase in the number of the function evaluations and thus it shouldn't be used in production code.
a
Meaning
Only a ‘cheap’ test will be performed.
Individual columns of the problem Jacobian, as well as individual gradient elements, will be checked (with a more reliable test). A key of the form OK or Bad? indicates whether or not each component appears to be correct.
Derivative checking is disabled.
should be specified whenever a new objgrd or congrd is being developed.