NAG Library Routine Document
E04STF
Note: this routine uses optional parameters to 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.
1 Purpose
E04STF, an interior point method optimization solver, based on the IPOPT software package, is a solver for the NAG optimization modelling suite and is suitable for large scale nonlinear programming (NLP) problems.
2 Specification
SUBROUTINE E04STF ( 
HANDLE, OBJFUN, OBJGRD, CONFUN, CONGRD, HESS, MON, NVAR, X, NNZU, U, RINFO, STATS, IUSER, RUSER, CPUSER, IFAIL) 
INTEGER 
NVAR, NNZU, IUSER(*), IFAIL 
REAL (KIND=nag_wp) 
X(NVAR), U(NNZU), RINFO(32), STATS(32), RUSER(*) 
EXTERNAL 
OBJFUN, OBJGRD, CONFUN, CONGRD, HESS, MON 
TYPE (C_PTR) 
HANDLE, CPUSER 

3 Description
E04STF will typically be used for nonlinear programming problems (NLP)
where
 $n$ is the number of the decision variables,
 ${m}_{g}$ is the number of the nonlinear constraints and $g\left(x\right)$, ${l}_{g}$ and ${u}_{g}$ are ${m}_{g}$dimensional vectors,
 ${m}_{B}$ is the number of the linear constraints and $B$ is a ${m}_{B}$ by $n$ matrix, ${l}_{B}$ and ${u}_{B}$ are ${m}_{B}$dimensional vectors,
 there are $n$ box constraints and ${l}_{x}$ and ${u}_{x}$ are $n$dimensional vectors.
The objective
$f\left(x\right)$ can be specified in a number of ways:
E04REF for a dense linear function,
E04RFF for a sparse linear or quadratic function and
E04RGF for a general nonlinear function. In the last case,
OBJFUN and
OBJGRD will be used to compute values and gradients of the objective function. Variable box bounds
${l}_{x},{u}_{x}$ can be specified with
E04RHF. The special case of linear constraints
${l}_{B},B,{u}_{B}$ is handled by
E04RJF while general nonlinear constraints
${l}_{g},g\left(x\right),{u}_{g}$ are specified by
E04RKF (both can be specified). Again, in the last case,
CONFUN and
CONGRD will be used to compute values and gradients of the nonlinear constraint functions.
Finally, if the user is willing to calculate second derivatives, the sparsity structure of the second partial derivatives of a nonlinear objective and/or of any nonlinear constraints is specified by
E04RLF while the values of these derivatives themselves will be computed by usersupplied
HESS. While there is an option (see
Hessian Mode) that forces internal approximation of second derivatives, no such option exists for first derivatives which must be computed accurately. If
E04RLF has been called and
HESS is used to calculate values for second derivatives, both the objective and all the constraints must be included; it is not possible to provide a subset of these. If
E04RLF is not called, then internal approximation of second derivatives will take place.
3.1 Structure of the Lagrange Multipliers
For a problem consisting of
$n$ variable bounds,
${m}_{B}$ linear constraints and
${m}_{g}$ nonlinear constraints (as specified in
NVAR,
NCLIN and
NCNLN of
E04RHF,
E04RJF and
E04RKF, respectively), the number of Lagrange multipliers, and consequently the correct value for
NNZU, will be
$q=2*n+2*{m}_{B}+2*{m}_{g}$. The order these will be found in the
U array is
${z}_{{1}_{L}},{z}_{{1}_{U}},{z}_{{2}_{L}},{z}_{{2}_{U}}\dots {z}_{{n}_{L}},{z}_{{n}_{U}},{\lambda}_{{1}_{L}},{\lambda}_{{1}_{U}},{\lambda}_{{2}_{L}},{\lambda}_{{2}_{U}}\dots {\lambda}_{{{m}_{B}}_{L}},{\lambda}_{{{m}_{B}}_{U}},{\lambda}_{{\left({m}_{B}+1\right)}_{L}},{\lambda}_{{\left({m}_{B}+1\right)}_{U}},{\lambda}_{{\left({m}_{B}+2\right)}_{L}},{\lambda}_{{\left({m}_{B}+2\right)}_{U}}\dots {\lambda}_{{\left({m}_{B}+{m}_{g}\right)}_{L}},{\lambda}_{{\left({m}_{B}+{m}_{g}\right)}_{U}}$
where the
$L$ and
$U$ subscripts refer to lower and upper bounds, respectively, and the variable bound constraint multipliers come first (if present, i.e., if
E04RHF was called), followed by the linear constraint multipliers (if present, i.e., if
E04RJF was called) and the nonlinear constraint multipliers (if present, i.e., if
E04RKF was called).
Significantly nonzero values for any of these, after the solver has terminated, indicates that the corresponding constraint is active. Significance is judged in the first instance by the relative scale of any value compared to the smallest among them.
4 References
Byrd R H, Gilbert J Ch and Nocedal J (2000) A trust region method based on interior point techniques for nonlinear programming Mathematical Programming 89 149–185
Byrd R H, Liu G and Nocedal J (1997) On the local behavior of an interior point method for nonlinear programming Numerical Analysis (eds D F Griffiths and D J Higham) Addison–Wesley
Conn A R, Gould N I M, Orban D and Toint Ph L (2000) A primaldual trustregion algorithm for nonconvex nonlinear programming Mathematical Programming 87 (2) 215–249
Conn A R, Gould N I M and Toint Ph L (2000) Trust Region Methods SIAM, Philadephia
Fiacco A V and McCormick G P (1990) Nonlinear Programming: Sequential Unconstrained Minimization Techniques SIAM, Philadelphia
Gould N I M, Orban D, Sartenaer A and Toint Ph L (2001) Superlinear convergence of primaldual interior point algorithms for nonlinear programming SIAM Journal on Optimization 11 (4) 974–1002
Hock W and Schittkowski K (1981) Test Examples for Nonlinear Programming Codes. Lecture Notes in Economics and Mathematical Systems 187 Springer–Verlag
Hogg J D and Scott J A (2011) HSL MA97: a bitcompatible multifrontal code for sparse symmetric systems RAL Technical Report. RALTR2011024
Wächter A and Biegler L T (2006) On the implementation of a primaldual interior point filter line search algorithm for largescale nonlinear programming Mathematical Programming 106(1) 25–57
Williams P and Lang B (2013) A framework for the $M{R}^{3}$ algorithm: theory and implementation SIAM J. Sci. Comput. 35 740–766
Yamashita H (1998) A globally convergent primaldual interiorpoint method for constrained optimization Optimization Methods and Software 10 443–469
5 Arguments
 1: $\mathrm{HANDLE}$ – TYPE (C_PTR)Input

On entry: the handle to the problem. It needs to be initialized by
E04RAF and the problem formulated by some of the routines
E04REF,
E04RFF,
E04RGF,
E04RHF,
E04RJF,
E04RKF and
E04RLF. It
must not be changed between calls to the NAG optimization modelling suite.
 2: $\mathrm{OBJFUN}$ – SUBROUTINE, supplied by the NAG Library or the user.External Procedure

OBJFUN must calculate the value of the nonlinear objective function
$f\left(x\right)$ at a specified value of the
$n$element vector of
$x$ variables. If there is no nonlinear objective (e.g.,
E04REF or
E04RFF was called to define a linear or quadratic objective function),
OBJFUN will never be called by E04STF
and
OBJFUN may be the dummy routine E04STV. (E04STV is included in the NAG Library.)
The specification of
OBJFUN is:
INTEGER 
NVAR, INFORM, IUSER(*) 
REAL (KIND=nag_wp) 
X(NVAR), FX, RUSER(*) 
TYPE (C_PTR) 
CPUSER 

 1: $\mathrm{NVAR}$ – INTEGERInput

On entry:
$n$, the number of variables in the problem. It must be unchanged from the value set during the initialization of the handle by
E04RAF.
 2: $\mathrm{X}\left({\mathbf{NVAR}}\right)$ – REAL (KIND=nag_wp) arrayInput

On entry: the vector $x$ of variable values at which the objective function is to be evaluated.
 3: $\mathrm{FX}$ – REAL (KIND=nag_wp)Output

On exit: the value of the objective function at $x$.
 4: $\mathrm{INFORM}$ – INTEGERInput/Output

On entry: a nonnegative value.
On exit: must be set to a value describing the action to be taken by the solver on return from
OBJFUN. Specifically, if the value is negative then the value of
FX will be discarded and the solver will either attempt to find a different trial point or terminate immediately with
${\mathbf{IFAIL}}={\mathbf{25}}$ (the same will happen if
FX is Infinity or NaN); otherwise, the solver will proceed normally.
 5: $\mathrm{IUSER}\left(*\right)$ – INTEGER arrayUser Workspace
 6: $\mathrm{RUSER}\left(*\right)$ – REAL (KIND=nag_wp) arrayUser Workspace
 7: $\mathrm{CPUSER}$ – TYPE (C_PTR)User Workspace

OBJFUN is called with the arguments
IUSER,
RUSER and
CPUSER as supplied to E04STF. You should use the arrays
IUSER,
RUSER and
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 E04STF is called. Arguments denoted as
Input must
not be changed by this procedure.
 3: $\mathrm{OBJGRD}$ – SUBROUTINE, supplied by the NAG Library or the user.External Procedure

OBJGRD must calculate the values of the nonlinear objective function gradients
$\frac{\partial f}{\partial x}$ at a specified value of the
$n$element vector of
$x$ variables. If there is no nonlinear objective (e.g.,
E04REF or
E04RFF was called to define a linear or quadratic objective function),
OBJGRD will never be called by E04STF
and
OBJGRD may be the dummy subroutine E04STW. (E04STW is included in the NAG Library.)
The specification of
OBJGRD is:
INTEGER 
NVAR, NNZFD, INFORM, IUSER(*) 
REAL (KIND=nag_wp) 
X(NVAR), FDX(NNZFD), RUSER(*) 
TYPE (C_PTR) 
CPUSER 

 1: $\mathrm{NVAR}$ – INTEGERInput

On entry:
$n$, the number of variables in the problem. It must be unchanged from the value set during the initialization of the handle by
E04RAF.
 2: $\mathrm{X}\left({\mathbf{NVAR}}\right)$ – REAL (KIND=nag_wp) arrayInput

On entry: the vector $x$ of variable values at which the objective function gradient is to be evaluated.
 3: $\mathrm{NNZFD}$ – 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: $\mathrm{FDX}\left({\mathbf{NNZFD}}\right)$ – REAL (KIND=nag_wp) arrayOutput

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.
${\mathbf{FDX}}\left(\mathit{i}\right)$ will be the gradient
$\frac{\partial f}{\partial {x}_{{\mathbf{IDXFD}}\left(\mathit{i}\right)}}$.
 5: $\mathrm{INFORM}$ – INTEGERInput/Output

On entry: a nonnegative value.
On exit: must be set to a value describing the action to be taken by the solver on return from
OBJGRD. Specifically, if the value is negative the solution of the current problem will terminate immediately with
${\mathbf{IFAIL}}={\mathbf{25}}$ (the same will happen if
FDX contains Infinity or NaN); otherwise, computations will continue.
 6: $\mathrm{IUSER}\left(*\right)$ – INTEGER arrayUser Workspace
 7: $\mathrm{RUSER}\left(*\right)$ – REAL (KIND=nag_wp) arrayUser Workspace
 8: $\mathrm{CPUSER}$ – TYPE (C_PTR)User Workspace

OBJGRD is called with the arguments
IUSER,
RUSER and
CPUSER as supplied to E04STF. You should use the arrays
IUSER,
RUSER and
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 E04STF is called. Arguments denoted as
Input must
not be changed by this procedure.
 4: $\mathrm{CONFUN}$ – SUBROUTINE, supplied by the NAG Library or the user.External Procedure

CONFUN must calculate the values of the
${m}_{g}$element vector
${g}_{i}\left(x\right)$ of nonlinear constraint functions at a specified value of the
$n$element vector of
$x$ variables. If no nonlinear constraints were registered in this
HANDLE,
CONFUN will never be called by E04STF
and
CONFUN may be the dummy subroutine E04STX. (E04STX is included in the NAG Library.)
The specification of
CONFUN is:
INTEGER 
NVAR, NCNLN, INFORM, IUSER(*) 
REAL (KIND=nag_wp) 
X(NVAR), GX(NCNLN), RUSER(*) 
TYPE (C_PTR) 
CPUSER 

 1: $\mathrm{NVAR}$ – INTEGERInput

On entry:
$n$, the number of variables in the problem. It must be unchanged from the value set during the initialization of the handle by
E04RAF.
 2: $\mathrm{X}\left({\mathbf{NVAR}}\right)$ – REAL (KIND=nag_wp) arrayInput

On entry: the vector $x$ of variable values at which the constraint functions are to be evaluated.
 3: $\mathrm{NCNLN}$ – INTEGERInput

On entry:
${m}_{g}$, the number of nonlinear constraints, as specified in an earlier call to
E04RKF.
 4: $\mathrm{GX}\left({\mathbf{NCNLN}}\right)$ – REAL (KIND=nag_wp) arrayOutput

On exit: the ${m}_{g}$ values of the nonlinear constraint functions at $x$.
 5: $\mathrm{INFORM}$ – INTEGERInput/Output

On entry: a nonnegative value.
On exit: must be set to a value describing the action to be taken by the solver on return from
CONFUN. Specifically, if the value is negative then the value of
GX will be discarded and the solver will either attempt to find a different trial point or terminate immediately with
${\mathbf{IFAIL}}={\mathbf{25}}$ (the same will happen if
GX contains Infinity or NaN); otherwise, the solver will proceed normally.
 6: $\mathrm{IUSER}\left(*\right)$ – INTEGER arrayUser Workspace
 7: $\mathrm{RUSER}\left(*\right)$ – REAL (KIND=nag_wp) arrayUser Workspace
 8: $\mathrm{CPUSER}$ – TYPE (C_PTR)User Workspace

CONFUN is called with the arguments
IUSER,
RUSER and
CPUSER as supplied to E04STF. You should use the arrays
IUSER,
RUSER and
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 E04STF is called. Arguments denoted as
Input must
not be changed by this procedure.
 5: $\mathrm{CONGRD}$ – SUBROUTINE, supplied by the NAG Library or the user.External Procedure

CONGRD must calculate the nonzero values of the sparse Jacobian of the nonlinear constraint functions
$\frac{\partial {g}_{i}}{\partial x}$ at a specified value of the
$n$element vector of
$x$ variables. If there are no nonlinear constraints (e.g.,
E04RKF was never called with the same
HANDLE or it was called with
NCNLN $=0$),
CONGRD will never be called by E04STF
and
CONGRD may be the dummy subroutine E04STY. (E04STY is included in the NAG Library.)
The specification of
CONGRD is:
INTEGER 
NVAR, NNZGD, INFORM, IUSER(*) 
REAL (KIND=nag_wp) 
X(NVAR), GDX(NNZGD), RUSER(*) 
TYPE (C_PTR) 
CPUSER 

 1: $\mathrm{NVAR}$ – INTEGERInput

On entry:
$n$, the number of variables in the problem. It must be unchanged from the value set during the initialization of the handle by
E04RAF.
 2: $\mathrm{X}\left({\mathbf{NVAR}}\right)$ – REAL (KIND=nag_wp) arrayInput

On entry: the vector $x$ of variable values at which the Jacobian of the constraint functions is to be evaluated.
 3: $\mathrm{NNZGD}$ – 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: $\mathrm{GDX}\left({\mathbf{NNZGD}}\right)$ – REAL (KIND=nag_wp) arrayOutput

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.
${\mathbf{GDX}}\left(\mathit{i}\right)$ will be the gradient
$\frac{\partial {g}_{{\mathbf{IROWGD}}\left(\mathit{i}\right)}}{\partial {x}_{{\mathbf{ICOLGD}}\left(\mathit{i}\right)}}$.
 5: $\mathrm{INFORM}$ – INTEGERInput/Output

On entry: a nonnegative value.
On exit: must be set to a value describing the action to be taken by the solver on return from
CONGRD. Specifically, if the value is negative the solution of the current problem will terminate immediately with
${\mathbf{IFAIL}}={\mathbf{25}}$ (the same will happen if
GDX contains Infinity or NaN); otherwise, computations will continue.
 6: $\mathrm{IUSER}\left(*\right)$ – INTEGER arrayUser Workspace
 7: $\mathrm{RUSER}\left(*\right)$ – REAL (KIND=nag_wp) arrayUser Workspace
 8: $\mathrm{CPUSER}$ – TYPE (C_PTR)User Workspace

CONGRD is called with the arguments
IUSER,
RUSER and
CPUSER as supplied to E04STF. You should use the arrays
IUSER,
RUSER and
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 E04STF is called. Arguments denoted as
Input must
not be changed by this procedure.
 6: $\mathrm{HESS}$ – SUBROUTINE, supplied by the NAG Library or the user.External Procedure

HESS must calculate the nonzero values of one of a set of second derivative quantities:
 the Hessian of the Lagrangian function $\sigma {\nabla}^{2}f+{\displaystyle \sum _{i=1}^{{m}_{g}}}{\lambda}_{i}{\nabla}^{2}{g}_{i}$
 the Hessian of the objective function ${\nabla}^{2}f$
 the Hessian of the constraint functions ${\nabla}^{2}{g}_{i}$
The value of argument
IDF determines which one of these is to be computed and this, in turn, is determined by earlier calls to
E04RLF, when the nonzero sparsity structure of these Hessians was registered. Please note that it is not possible to only supply a subset of the Hessians (see
${\mathbf{IFAIL}}={\mathbf{6}}$). If there were no calls to
E04RLF,
HESS will never be called by E04STF
and
HESS may be the dummy subroutine E04STZ (E04STZ is included in the NAG Library).
In this case, the Hessian of the Lagrangian will be approximated by a limitedmemory quasiNewton method (LBFGS).
The specification of
HESS is:
SUBROUTINE HESS ( 
NVAR, X, NCNLN, IDF, SIGMA, LAMBDA, NNZH, HX, INFORM, IUSER, RUSER, CPUSER) 
INTEGER 
NVAR, NCNLN, IDF, NNZH, INFORM, IUSER(*) 
REAL (KIND=nag_wp) 
X(NVAR), SIGMA, LAMBDA(NCNLN), HX(NNZH), RUSER(*) 
TYPE (C_PTR) 
CPUSER 

 1: $\mathrm{NVAR}$ – INTEGERInput

On entry:
$n$, the number of variables in the problem. It must be unchanged from the value set during the initialization of the handle by
E04RAF.
 2: $\mathrm{X}\left({\mathbf{NVAR}}\right)$ – REAL (KIND=nag_wp) arrayInput

On entry: the vector $x$ of variable values at which the Hessian functions are to be evaluated.
 3: $\mathrm{NCNLN}$ – INTEGERInput

On entry:
${m}_{g}$, the number of nonlinear constraints, as specified in an earlier call to
E04RKF.
 4: $\mathrm{IDF}$ – INTEGERInput

On entry: specifies the quantities to be computed in
HX.
 ${\mathbf{IDF}}=1$
 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.
 ${\mathbf{IDF}}=0$
 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.
 ${\mathbf{IDF}}>0$
 The values of the Hessian of the IDFth constraint function will be computed in HX. This will be the case if E04RLF has been called with IDF of the same value.
 5: $\mathrm{SIGMA}$ – REAL (KIND=nag_wp)Input

On entry: if
${\mathbf{IDF}}=1$, the value of the
$\sigma $ quantity in the definition of the Hessian of the Lagrangian. Otherwise,
SIGMA should not be referenced.
 6: $\mathrm{LAMBDA}\left({\mathbf{NCNLN}}\right)$ – REAL (KIND=nag_wp) arrayInput

On entry: if
${\mathbf{IDF}}=1$, the values of the
${\lambda}_{i}$ quantities in the definition of the Hessian of the Lagrangian. Otherwise,
LAMBDA should not be referenced.
 7: $\mathrm{NNZH}$ – INTEGERInput

On entry: the number of nonzero elements in the Hessian to be computed.
 8: $\mathrm{HX}\left({\mathbf{NNZH}}\right)$ – REAL (KIND=nag_wp) arrayOutput

On exit: the nonzero values of the requested Hessian evaluated at
$x$. 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: $\mathrm{INFORM}$ – INTEGERInput/Output

On entry: a nonnegative 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
${\mathbf{IFAIL}}={\mathbf{25}}$ (the same will happen if
HX contains Infinity or NaN); otherwise, computations will continue.
 10: $\mathrm{IUSER}\left(*\right)$ – INTEGER arrayUser Workspace
 11: $\mathrm{RUSER}\left(*\right)$ – REAL (KIND=nag_wp) arrayUser Workspace
 12: $\mathrm{CPUSER}$ – TYPE (C_PTR)User Workspace

HESS is called with the arguments
IUSER,
RUSER and
CPUSER as supplied to E04STF. You should use the arrays
IUSER,
RUSER and
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 E04STF is called. Arguments denoted as
Input must
not be changed by this procedure.
 7: $\mathrm{MON}$ – SUBROUTINE, supplied by the NAG Library or the user.External Procedure

MON is provided to enable you to monitor the progress of the optimization. A facility is provided to halt the optimization process if necessary, using parameter
INFORM.
MON
may be the dummy subroutine E04STU (E04STU is included in the NAG Library).
The specification of
MON is:
INTEGER 
NVAR, NNZU, INFORM, IUSER(*) 
REAL (KIND=nag_wp) 
X(NVAR), U(NNZU), RINFO(32), STATS(32), RUSER(*) 
TYPE (C_PTR) 
CPUSER 

 1: $\mathrm{NVAR}$ – INTEGERInput

On entry: $n$, the number of variables in the problem.
 2: $\mathrm{X}\left({\mathbf{NVAR}}\right)$ – REAL (KIND=nag_wp) arrayInput

On entry: ${x}^{i}$, the values of the decision variables $x$ at the current iteration.
 3: $\mathrm{NNZU}$ – INTEGERInput

On entry: the dimension of array
U.
 4: $\mathrm{U}\left({\mathbf{NNZU}}\right)$ – REAL (KIND=nag_wp) arrayInput

On entry: if
${\mathbf{NNZU}}>0$,
U holds the values at the current iteration of Lagrange multipliers (dual variables) for the constraints. See
Section 3.1 for layout information.
 5: $\mathrm{INFORM}$ – INTEGERInput/Output

On entry: a nonnegative value.
On exit: must be set to a value describing the action to be taken by the solver on return from
MON. Specifically, if the value is negative the solution of the current problem will terminate immediately with
${\mathbf{IFAIL}}={\mathbf{20}}$; otherwise, computations will continue.
 6: $\mathrm{RINFO}\left(32\right)$ – REAL (KIND=nag_wp) arrayInput

On entry: error measures and various indicators at the end of the current iteration as described in
Section 9.1.
 7: $\mathrm{STATS}\left(32\right)$ – REAL (KIND=nag_wp) arrayInput

On entry: solver statistics at the end of the current iteration as described in
Section 9.1.
 8: $\mathrm{IUSER}\left(*\right)$ – INTEGER arrayUser Workspace
 9: $\mathrm{RUSER}\left(*\right)$ – REAL (KIND=nag_wp) arrayUser Workspace
 10: $\mathrm{CPUSER}$ – TYPE (C_PTR)User Workspace

MON is called with the arguments
IUSER,
RUSER and
CPUSER as supplied to E04STF. You should use the arrays
IUSER,
RUSER and
CPUSER to supply information to
MON.
MON must either be a module subprogram USEd by, or declared as EXTERNAL in, the (sub)program from which E04STF is called. Arguments denoted as
Input must
not be changed by this procedure.
 8: $\mathrm{NVAR}$ – INTEGERInput

On entry:
$n$, the number of variables in the problem. It must be unchanged from the value set during the initialization of the handle by
E04RAF.
 9: $\mathrm{X}\left({\mathbf{NVAR}}\right)$ – REAL (KIND=nag_wp) arrayInput/Output

On entry: ${x}^{0}$, the initial estimates of the variables $x$.
On exit: the final values of the variables $x$.
 10: $\mathrm{NNZU}$ – INTEGERInput

On entry: the number of Lagrange multipliers that are to be returned in array
U.
If
${\mathbf{NNZU}}=0$,
U will not be referenced; otherwise it needs to match the dimension
$q$ as explained in
Section 3.1.
Constraints:
 ${\mathbf{NNZU}}\ge 0$;
 if ${\mathbf{NNZU}}>0$, ${\mathbf{NNZU}}=q$.
 11: $\mathrm{U}\left({\mathbf{NNZU}}\right)$ – REAL (KIND=nag_wp) arrayOutput

Note: if
${\mathbf{NNZU}}>0$,
U holds Lagrange multipliers (dual variables) for the constraints. See
Section 3.1 for layout information. If
${\mathbf{NNZU}}=0$,
U will not be referenced.
On exit: the final value of Lagrange multipliers $z,\lambda $.
 12: $\mathrm{RINFO}\left(32\right)$ – 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:
$1$ 
objective function value $f\left(x\right)$ 
$2$ 
constraint violation (primal infeasibility) (8) 
$3$ 
dual infeasibility (7) 
$4$ 
complementarity 
$5$ 
Karush–Kuhn–Tucker error 
 13: $\mathrm{STATS}\left(32\right)$ – REAL (KIND=nag_wp) arrayOutput

On exit: solver statistics at the end of the final iteration as given in the table below:
$1$ 
number of the iterations 
$3$ 
number of backtracking trial steps 
$4$ 
number of Hessian evaluations 
$5$ 
number of objective gradient evaluations 
$8$ 
total wall clock time elapsed 
$19$ 
number of objective function evaluations 
$20$ 
number of constraint function evaluations 
$21$ 
number of constraint Jacobian evaluations 
 14: $\mathrm{IUSER}\left(*\right)$ – INTEGER arrayUser Workspace
 15: $\mathrm{RUSER}\left(*\right)$ – REAL (KIND=nag_wp) arrayUser Workspace
 16: $\mathrm{CPUSER}$ – TYPE (C_PTR)User Workspace

IUSER,
RUSER and
CPUSER are not used by E04STF, but are passed directly to
OBJFUN,
OBJGRD,
CONFUN,
CONGRD,
HESS and
MON and should be used to pass information to these routines.
 17: $\mathrm{IFAIL}$ – INTEGERInput/Output

On entry:
IFAIL must be set to
$0$,
$1\text{ or}1$. If you are unfamiliar with this argument you should refer to
Section 3.4 in How to Use the NAG Library and its Documentation for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
$1\text{ or}1$ is recommended. If the output of error messages is undesirable, then the value
$1$ is recommended. Otherwise, because for this routine the values of the output arguments may be useful even if
${\mathbf{IFAIL}}\ne {\mathbf{0}}$ on exit, the recommended value is
$1$.
When the value $\mathbf{1}\text{ or}1$ is used it is essential to test the value of IFAIL on exit.
On exit:
${\mathbf{IFAIL}}={\mathbf{0}}$ unless the routine detects an error or a warning has been flagged (see
Section 6).
6 Error Indicators and Warnings
If on entry
${\mathbf{IFAIL}}=0$ or
$1$, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
Note: E04STF may return useful information for one or more of the following detected errors or warnings.
Errors or warnings detected by the routine:
 ${\mathbf{IFAIL}}=1$

The supplied
HANDLE does not define a valid handle to the data structure for the NAG optimization modelling suite. It has not been initialized by
E04RAF or it has been corrupted.
 ${\mathbf{IFAIL}}=2$

The problem is already being solved.
This solver does not support matrix inequality constraints.
 ${\mathbf{IFAIL}}=3$

A different solver from the suite has already been used. Initialize a new
HANDLE using
E04RAF.
 ${\mathbf{IFAIL}}=4$

The information supplied does not match with that previously stored.
On entry,
${\mathbf{NVAR}}=\u2329\mathit{\text{value}}\u232a$ must match that given during initialization of the
HANDLE, i.e.,
$\u2329\mathit{\text{value}}\u232a$.
 ${\mathbf{IFAIL}}=5$

On entry, ${\mathbf{NNZU}}=\u2329\mathit{\text{value}}\u232a$.
Constraint: ${\mathbf{NNZU}}=\u2329\mathit{\text{value}}\u232a$ or $0$.
On entry, ${\mathbf{NNZU}}=\u2329\mathit{\text{value}}\u232a$.
Constraint: no constraints present, so ${\mathbf{NNZU}}$ must be $0$.
 ${\mathbf{IFAIL}}=6$

Either all of the constraint and objective Hessian structures must be defined or none (in which case, the Hessians will be approximated by a limitedmemory quasiNewton LBFGS method).
On entry, a nonlinear objective function has been defined but no objective Hessian sparsity structure has been defined through
E04RLF.
On entry, a nonlinear constraint function has been defined but no constraint Hessian sparsity structure has been defined through
E04RLF, for constraint number
$\u2329\mathit{\text{value}}\u232a$.
 ${\mathbf{IFAIL}}=7$

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.
Either change the option
Hessian Mode or 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.
 ${\mathbf{IFAIL}}=20$

User requested termination during a monitoring step.
INFORM was set to a negative value in
MON.
 ${\mathbf{IFAIL}}=22$

Maximum number of iterations exceeded.
 ${\mathbf{IFAIL}}=23$

The solver terminated after an error in the step computation.
This message is printed if the solver is unable to compute a search direction, despite several attempts to modify the iteration matrix. Usually, the value of the regularization parameter then becomes too large. One situation where this can happen is when values in the Hessian are invalid (NaN or Infinity). You can check whether this is true by using the Verify Derivatives option.
The solver terminated after failure in the restoration phase.
This indicates that the restoration phase failed to find a feasible point that was acceptable to the filter line search for the original problem. This could happen if the problem is highly degenerate, does not satisfy the constraint qualification, or if your NLP code provides incorrect derivative information.
The solver terminated after the maximum time allowed was exceeded.
Maximum number of seconds exceeded. Use option Time Limit to reset the limit.
The solver terminated due to an invalid option.
Please contact
NAG with details of the call to E04STF.
The solver terminated due to an invalid problem definition.
Please contact
NAG with details of the call to E04STF.
The solver terminated with not enough degrees of freedom.
This indicates that your problem, as specified, has too few degrees of freedom. This can happen if you have too many equality constraints, or if you fix too many variables.
 ${\mathbf{IFAIL}}=24$

The solver terminated after the search direction became too small.
This indicates that the solver is calculating very small step sizes and is making very little progress. This could happen if the problem has been solved to the best numerical accuracy possible given the current NLP scaling.
 ${\mathbf{IFAIL}}=25$

Invalid number detected in user function.
Either INFORM was set to a negative value within the usersupplied functions OBJFUN, OBJGRD, CONFUN, CONGRD or HESS, or an Infinity or NaN was detected in values returned from them.
 ${\mathbf{IFAIL}}=50$

The solver reports NLP solved to acceptable level.
This indicates that the algorithm did not converge to the desired tolerances, but that it was able to obtain a point satisfying the acceptable tolerance level. This may happen if the desired tolerances are too small for the current problem.
 ${\mathbf{IFAIL}}=51$

The solver detected an infeasible problem.
The restoration phase converged to a point that is a minimizer for the constraint violation (in the ${\ell}_{1}$norm), but is not feasible for the original problem. This indicates that the problem may be infeasible (or at least that the algorithm is stuck at a locally infeasible point). The returned point (the minimizer of the constraint violation) might help you to find which constraint is causing the problem. If you believe that the NLP is feasible, it might help to start the optimization from a different point.
 ${\mathbf{IFAIL}}=54$

The solver terminated due to diverging iterates.
The maxnorm of the iterates has become larger than a preset value. This can happen if the problem is unbounded below and the iterates are diverging.
 ${\mathbf{IFAIL}}=199$

This routine is not available in this implementation.
 ${\mathbf{IFAIL}}=99$
An unexpected error has been triggered by this routine. Please
contact
NAG.
See
Section 3.9 in How to Use the NAG Library and its Documentation for further information.
 ${\mathbf{IFAIL}}=399$
Your licence key may have expired or may not have been installed correctly.
See
Section 3.8 in How to Use the NAG Library and its Documentation for further information.
 ${\mathbf{IFAIL}}=999$
Dynamic memory allocation failed.
See
Section 3.7 in How to Use the NAG Library and its Documentation for further information.
7 Accuracy
The accuracy of the solution is driven by optional parameter
Stop Tolerance 1.
If
${\mathbf{IFAIL}}={\mathbf{0}}$ on the final exit, the returned point satisfies Karush–Kuhn–Tucker (KKT) conditions to the requested accuracy (under the default settings close to
$\sqrt{\epsilon}$ where
$\epsilon $ is the
machine precision) and thus it is a good estimate of a local solution. If
${\mathbf{IFAIL}}={\mathbf{50}}$, some of the convergence conditions were not fully satisfied but the point still seems to be a reasonable estimate and should be usable. Please refer to
Section 11.1 and the description of the particular options.
8 Parallelism and Performance
E04STF is not threaded in any implementation.
9.1 Description 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 and
Monitoring Level determine the exposed level of detail. This allows, for example, the generation of a detailed log in a file while the condensed information is displayed on the screen. This section also describes what kind of information is made available to the monitoring routine
MON via
RINFO and
STATS.
There are four sections printed to the primary output with the default settings (level 2): a derivative check, a header, an iteration log and a summary. At higher levels more information will be printed, including any internal IPOPT options that have been changed from their default values.
Derivative Check
If
Verify Derivatives is set, then information will appear about any errors detected in the usersupplied derivative routines
OBJGRD,
CONGRD or
HESS. It may look like this:
Starting derivative checker for first derivatives.
* grad_f[ 1] = 2.000000E+00 ~ 2.455000E+01 [ 1.081E+00]
* jac_g [ 1, 4] = 4.700969E+01 v ~ 5.200968E+01 [ 9.614E02]
Starting derivative checker for second derivatives.
* obj_hess[ 1, 1] = 1.881000E+03 v ~ 1.882000E+03 [ 5.314E04]
* 1th constr_hess[ 1, 3] = 2.988964E+00 v ~ 1.103543E02 [ 3.000E+00]
Derivative checker detected 3 error(s).
The first line indicates that the value for the partial derivative of the objective with respect to the first variable as returned by
OBJGRD (the first one printed) differs sufficiently from a finite difference estimation derived from
OBJFUN (the second one printed). The number in square brackets is the relative difference between these two numbers.
The second line reports on a discrepancy for the partial derivative of the first constraint with respect to the fourth variable. If the indicator v is absent, the discrepancy refers to a component that had not been included in the sparsity structure, in which case the nonzero structure of the derivatives should be corrected. Mistakes in the first derivatives should be corrected before attempting to correct mistakes in the second derivatives.
The third line reports on a discrepancy in a second derivative of the objective function, differentiated with respect to the first variable, twice.
The fourth line reports on a discrepancy in a second derivative of the first constraint, differentiated with respect to the first and third variables.
Header
If
${\mathbf{Print\; Level}}\ge 1$, the header will contain statistics about the size of the problem how the solver sees it, i.e., it reflects any changes imposed by preprocessing and problem transformations. The header may look like:
Number of nonzeros in equality constraint Jacobian...: 4
Number of nonzeros in inequality constraint Jacobian.: 8
Number of nonzeros in Lagrangian Hessian.............: 10
Total number of variables............................: 4
variables with only lower bounds: 4
variables with lower and upper bounds: 0
variables with only upper bounds: 0
Total number of equality constraints.................: 1
Total number of inequality constraints...............: 2
inequality constraints with only lower bounds: 2
inequality constraints with lower and upper bounds: 0
inequality constraints with only upper bounds: 0
It summarises what is known about the variables and the constraints. Simple bounds are set by
E04RHF and standard equalities and inequalities by
E04RJF.
Iteration log
If
${\mathbf{Print\; Level}}=2$, the status of each iteration is condensed to one line. The line shows:
iter 
The current iteration count. This includes regular iterations and iterations during the restoration phase. If the algorithm is in the restoration phase, the letter r will be appended to the iteration number. The iteration number $0$ represents the starting point. This quantity is also available as ${\mathbf{STATS}}\left(1\right)$ of MON. 
objective 
The unscaled objective value at the current point (given the current NLP scaling). During the restoration phase, this value remains the unscaled objective value for the original problem. This quantity is also available as ${\mathbf{RINFO}}\left(1\right)$ of MON. 
inf_pr 
The unscaled constraint violation at the current point (given the current NLP scaling). This quantity is the infinitynorm (max) of the (unscaled) constraints ${g}_{i}$. During the restoration phase, this value remains the constraint violation of the original problem at the current point. This quantity is also available as ${\mathbf{RINFO}}\left(2\right)$ of MON. 
inf_du 
The scaled dual infeasibility at the current point (given the current NLP scaling). This quantity measure the infinitynorm (max) of the internal dual infeasibility, ${\lambda}_{i}$ of Eq. (4a) in the implementation paper Wächter and Biegler (2006), including inequality constraints reformulated using slack variables and NLP scaling. During the restoration phase, this is the value of the dual infeasibility for the restoration phase problem. This quantity is also available as ${\mathbf{RINFO}}\left(3\right)$ of MON. 
lg(mu) 
$log10$ of the value of the barrier parameter $\mu $. $\mu $ itself is also available as ${\mathbf{RINFO}}\left(4\right)$ of MON. 
d 
The infinity norm (max) of the primal step (for the original variables x and the internal slack variables s). During the restoration phase, this value includes the values of additional variables, $\stackrel{}{p}$ and $\stackrel{}{n}$ (see Eq. (30) in Wächter and Biegler (2006)). This quantity is also available as ${\mathbf{RINFO}}\left(5\right)$ of MON. 
lg(rg) 
$log10$ of the value of the regularization term for the Hessian of the Lagrangian in the augmented system (${\delta}_{w}$ of Eq. (26) and Section 3.1 in Wächter and Biegler (2006)). A dash (–) indicates that no regularization was done. The regularization term itself is also available as ${\mathbf{RINFO}}\left(6\right)$ of MON. 
alpha_du 
The stepsize for the dual variables (${\alpha}_{k}^{z}$ of Eq. (14c) in Wächter and Biegler (2006)). This quantity is also available as ${\mathbf{RINFO}}\left(7\right)$ of MON. 
alpha_pr 
The stepsize for the primal variables (${\alpha}_{k}$ of Eq. (14a) in Wächter and Biegler (2006)). This quantity is also available as ${\mathbf{RINFO}}\left(8\right)$ of MON. The number is usually followed by a character for additional diagnostic information regarding the step acceptance criterion.
f  ftype iteration in the filter method without second order correction  F  ftype iteration in the filter method with second order correction  h  htype iteration in the filter method without second order correction  H  htype iteration in the filter method with second order correction  k  penalty value unchanged in merit function method without second order correction  K  penalty value unchanged in merit function method with second order correction  n  penalty value updated in merit function method without second order correction  N  penalty value updated in merit function method with second order correction  R  Restoration phase just started  w  in watchdog procedure  s  step accepted in soft restoration phase  t/T  tiny step accepted without line search  r  some previous iterate restored 

ls 
The number of backtracking line search steps (does not include second order correction steps). This quantity is also available as ${\mathbf{STATS}}\left(2\right)$ of MON. 
Note that the step acceptance mechanisms in IPOPT consider the barrier objective function
(5) which is usually different from the value reported in the
objective column. Similarly, for the purposes of the step acceptance, the constraint violation is measured for the internal problem formulation, which includes slack variables for inequality constraints and potentially NLP scaling of the constraint functions. This value, too, is usually different from the value reported in
inf_pr. As a consequence, a new iterate might have worse values both for the objective function and the constraint violation as reported in the iteration output, seemingly contradicting globalization procedure.
Note that all these values are also available in
${\mathbf{RINFO}}\left(1\right),\dots ,{\mathbf{RINFO}}\left(8\right)$ and
${\mathbf{STATS}}\left(1\right),\dots ,{\mathbf{STATS}}\left(2\right)$of the monitoring routine
MON.
The output might look as follows:
iter objective inf_pr inf_du lg(mu) d lg(rg) alpha_du alpha_pr ls
0 2.6603500E+05 1.55E+02 3.21E+01 1.0 0.00E+00  0.00E+00 0.00E+00 0
1 1.5053889E+05 7.95E+01 1.43E+01 1.0 1.16E+00  4.55E01 1.00E+00f 1
2 8.9745785E+04 3.91E+01 6.45E+00 1.0 3.07E+01  5.78E03 1.00E+00f 1
3 3.9878595E+04 1.63E+01 3.47E+00 1.0 5.19E+00 0.0 2.43E01 1.00E+00f 1
4 2.7780042E+04 1.08E+01 1.64E+00 1.0 3.66E+01  7.24E01 8.39E01f 1
5 2.6194274E+04 1.01E+01 1.49E+00 1.0 1.07E+01  1.00E+00 1.05E01f 1
6 1.5422960E+04 4.75E+00 6.82E01 1.0 1.74E+01  1.00E+00 1.00E+00f 1
7 1.1975453E+04 3.14E+00 7.26E01 1.0 2.83E+01  1.00E+00 5.06E01f 1
8 8.3508421E+03 1.34E+00 2.04E01 1.0 3.96E+01  9.27E01 1.00E+00f 1
9 7.0657495E+03 4.85E01 9.22E02 1.0 5.32E+01  1.00E+00 1.00E+00f 1
iter objective inf_pr inf_du lg(mu) d lg(rg) alpha_du alpha_pr ls
10 6.8359393E+03 1.17E01 1.28E01 1.7 4.69E+01  8.21E01 1.00E+00h 1
11 6.6508917E+03 1.52E02 1.52E02 2.5 1.87E+01  1.00E+00 1.00E+00h 1
12 6.4123213E+03 8.77E03 1.49E01 3.8 1.85E+01  7.49E01 1.00E+00f 1
13 6.3157361E+03 4.33E03 1.90E03 3.8 2.07E+01  1.00E+00 1.00E+00f 1
14 6.2989280E+03 1.12E03 4.06E04 3.8 1.54E+01  1.00E+00 1.00E+00h 1
15 6.2996264E+03 9.90E05 2.05E04 5.7 5.35E+00  9.63E01 1.00E+00h 1
16 6.2998436E+03 0.00E+00 1.86E07 5.7 4.55E01  1.00E+00 1.00E+00h 1
17 6.2998424E+03 0.00E+00 6.18E12 8.2 2.62E03  1.00E+00 1.00E+00h 1
If ${\mathbf{Print\; Level}}>2$, each iteration produces significantly more detailed output comprising detailed error measures and output from internal operations. The output is reasonably selfexplanatory so it is not featured here in detail.
Summary
Once the solver finishes, a detailed summary is produced if
${\mathbf{Print\; Level}}\ge 1$. An example is shown below:
Number of Iterations....: 6
(scaled) (unscaled)
Objective...............: 7.8692659500479623E01 6.2324586324379867E+00
Dual infeasibility......: 7.9744615766675617E10 6.3157735687207093E09
Constraint violation....: 8.3555384833289281E12 8.3555384833289281E12
Complementarity.........: 0.0000000000000000E+00 0.0000000000000000E+00
Overall NLP error.......: 7.9744615766675617E10 6.3157735687207093E09
Number of objective function evaluations = 7
Number of objective gradient evaluations = 7
Number of equality constraint evaluations = 7
Number of inequality constraint evaluations = 0
Number of equality constraint Jacobian evaluations = 7
Number of inequality constraint Jacobian evaluations = 0
Number of Lagrangian Hessian evaluations = 6
Total CPU secs in IPOPT (w/o function evaluations) = 0.724
Total CPU secs in NLP function evaluations = 0.343
EXIT: Optimal Solution Found.
It starts with the total number of iterations the algorithm went through. Then, five quantities are printed, all evaluated at the termination point: the value of the objective function, the dual infeasibility, the constraint violation, the complementarity and the NLP error.
This is followed by some statistics on the number of calls to usersupplied functions and CPU time taken in usersupplied functions and the main algorithm. Lastly, status at exit is indicated by a short message. Detailed timings of the algorithm are displayed only if
Stats Time is set.
9.2 Additional Licensor
Parts of the code for E04STF are distributed according to terms imposed by another licensor. Please refer to
Library Licensors for further details.
10 Example
This example is based on Problem 73 in
Hock and Schittkowski (1981) and involves the minimization of the linear function
subject to the bounds
to the nonlinear constraint
and the linear constraints
The initial point, which is infeasible, is
and
$f\left({x}_{0}\right)=130.8$.
The optimal solution (to five significant figures) is
10.1 Program Text
Program Text (e04stfe.f90)
10.2 Program Results
Program Results (e04stfe.r)
11 Algorithmic Details
E04STF is an implementation of IPOPT (see
Wächter and Biegler (2006)) that is fully supported and maintained by NAG. It uses Harwell packages MA97 for the underlying sparse linear algebra factorization and MC68 approximate minimum degree algorithm for the ordering. Any issues relating to E04STF should be directed to NAG who assume all responsibility for the E04STF routine and its implementation.
In the remainder of this section, we repeat part of Section 2.1 of
Wächter and Biegler (2006).
To simplify notation, we describe the method for the problem formulation
Range constraints of the form $l\le c\left(x\right)\le u$ can be expressed in this formulation by introducing slack variables ${x}_{s}\ge 0$, ${x}_{t}\ge 0$ (increasing $n$ by $2$) and defining new equality constraints $g\left(x,{x}_{s}\right)\equiv c\left(x\right)l{x}_{s}=0$ and $g\left(x,{x}_{t}\right)\equiv uc\left(x\right){x}_{t}=0$.
E04STF, like the methods discussed in
Williams and Lang (2013),
Byrd et al. (2000),
Conn et al. (2000) and
Fiacco and McCormick (1990), computes (approximate) solutions for a sequence of barrier problems
for a decreasing sequence of barrier parameters
$\mu $ converging to zero.
The algorithm may be interpreted as a homotopy method to the primaldual equations,
with the homotopy parameter
$\mu $, which is driven to zero (see e.g.,
Byrd et al. (1997) and
Gould et al. (2001)). Here,
$X\u2254\mathrm{diag}\left(x\right)$ for a vector
$x$ (similarly
$z\u2254\mathrm{diag}\left(z\right)$, etc.), and
$e$ stands for the vector of all ones for appropriate dimension, while
$\lambda \in {\mathbb{R}}^{m}$ and
$z\in {\mathbb{R}}^{n}$ correspond to the Lagrange multipliers for the equality constraints
(3) and the bound constraints
(4), respectively.
Note, that the equations
(7),
(8) and
(9) for
$\mu =0$ together with ‘
$x$,
$z\ge 0$’ are the Karush–Kuhn–Tucker (KKT) conditions for the original problem
(2),
(3) and
(4). Those are the first order optimality conditions for
(2),
(3) and
(4) if constraint qualifications are satisfied (
Conn et al. (2000)).
Starting from an initial point supplied in
X, E04STF computes an approximate solution to the barrier problem
(5) and
(6) for a fixed value of
$\mu $ (by default,
$0.1$), then decreases the barrier parameter, and continues the solution of the next barrier problem from the approximate solution of the previous one.
A sophisticated overall termination criterion for the algorithm is used to overcome potential difficulties when the Lagrange multipliers become large. This can happen, for example, when the gradients of the active constraints are nearly linear dependent. The termination criterion is described in detail by
Wächter and Biegler (2006) (also see below
Section 11.1).
11.1 Stopping Criteria
Using the individual parts of the primaldual equations
(7),
(8) and
(9), we define the optimality error for the barrier problem as
with scaling parameters
${s}_{d}$,
${s}_{c}\ge 1$ defined below (not to be confused with NLP scaling factors described in
Section 11.2). By
${E}_{0}\left(x,\lambda ,z\right)$ we denote
(10) with
$\mu =0$; this measures the optimality error for the original problem
(2),
(3) and
(4). The overall algorithm terminates if an approximate solution
$\left({\stackrel{~}{x}}_{*},{\stackrel{~}{\lambda}}_{*},{\stackrel{~}{z}}_{*}\right)$ (including multiplier estimates) satisfying
is found, where
${\epsilon}_{\mathit{tol}}>0$ is the user provided error tolerance in optional parameter
Stop Tolerance 1.
Even if the original problem is well scaled, the multipliers
$\lambda $ and
$z$ might become very large, for example, when the gradients of the active constraints are (nearly) linearly dependent at a solution of
(2),
(3) and
(4). In this case, the algorithm might encounter numerical difficulties satisfying the unscaled primaldual equations
(7),
(8) and
(9) to a tight tolerance. In order to adapt the termination criteria to handle such circumstances, we choose the scaling factors
in
(10). In this way, a component of the optimality error is scaled, whenever the average value of the multipliers becomes larger than a fixed number
${s}_{\mathrm{max}}\ge 1$ (
${s}_{\mathrm{max}}=100$ in our implementation). Also note, in the case that the multipliers diverge,
${E}_{0}\left(x,\lambda ,z\right)$ can only become small, if a Fritz John point for
(2),
(3) and
(4) is approached, or if the primal variables diverge as well.
11.2 Scaling the NLP
Ideally, the formulated problem should be scaled so that, near the solution, all function gradients (objective and constraints), when nonzero, are of a similar order of a magnitude. E04STF will compute automatic NLP scaling factors for the objective and constraint functions (but not the decision variables) and apply them if large imbalances of scale are detected. This rescaling is only computed at the starting point. References to scaled or unscaled objective or constraints in
Section 9.1 and
Section 11 should be understood in this context.
12 Optional Parameters
Several optional parameters in E04STF define choices in the problem specification or the algorithm logic. In order to reduce the number of formal arguments of E04STF 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 stops is not allowed. Once the solver finishes, the optional parameters can be altered again for the next solve.
If any options are set by the solver (typically those with the choice of
$\mathrm{AUTO}$), their value can be retrieved by
E04ZNF. If the solver is called again, any such arguments are reset to their default values and the decision is made again.
The following is a list of the optional parameters available. A full description of each optional parameter is provided in
Section 12.1.
12.1 Description of the Optional Parameters
For each option, we give a summary line, a description of the optional parameter and details of constraints.
The summary line contains:
 the keywords, where the minimum abbreviation of each keyword is underlined;
 a parameter value,
where the letters $a$, $i$ and $r$ denote options that take character, integer and real values respectively.
 the default value, where the symbol $\epsilon $ is a generic notation for machine precision (see X02AJF).
All options accept the value $\mathrm{DEFAULT}$ to return single options to their default states.
Keywords and character values are case and white space insensitive.
This special keyword may be used to reset all optional parameters to their default values. Any argument value given with this keyword will be ignored.
Hessian Mode  $a$  Default $=\mathrm{AUTO}$ 
This argument specifies whether the Hessian will be supplied by the user (in
HX) or approximated by E04STF using a limitedmemory quasiNewton LBFGS method. In the
$\mathrm{AUTO}$ setting, if no Hessian structure has been registered in the problem with a call to
E04RLF, and there are explicitly nonlinear usersupplied functions, then the Hessian will be approximated. Otherwise
HESS will be called if and only if any of
E04RGF or
E04RKF have been used to define the problem. Approximating the Hessian is likely to require more iterations to achieve convergence but will reduce the time spent in usersupplied functions.
Constraint: ${\mathbf{Hessian\; Mode}}=\mathrm{AUTO}$, $\mathrm{EXACT}$ or $\mathrm{APPROXIMATE}$.
Infinite Bound Size  $r$  Default $\text{}={10}^{20}$ 
This defines the ‘infinite’ bound $\mathit{bigbnd}$ in the definition of the problem constraints. Any upper bound greater than or equal to $\mathit{bigbnd}$ will
be regarded as $+\infty $ (and similarly any lower bound less than or equal to $\mathit{bigbnd}$ will be regarded as $\infty $). Note that a modification of this optional parameter does not influence constraints which have already been defined; only the constraints formulated after the change will be affected.
It also serves as a limit for the objective function to be considered unbounded (${\mathbf{IFAIL}}={\mathbf{54}}$).
Constraint: ${\mathbf{Infinite\; Bound\; Size}}\ge 1000$.
Monitoring File  $i$  Default $=1$ 
If
$i\ge 0$, the
unit number
for the secondary (monitoring) output. If set to
$1$, no secondary output is provided. The information output to this unit is controlled by
Monitoring Level.
Constraint: ${\mathbf{Monitoring\; File}}\ge 1$.
Monitoring Level  $i$  Default $=4$ 
This argument 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: $0\le {\mathbf{Monitoring\; Level}}\le 5$.
Outer Iteration Limit  $i$  Default $\text{}=100$ 
The maximum number of iterations to be performed by E04STF. Setting the option too low might lead to ${\mathbf{IFAIL}}={\mathbf{22}}$.
Constraint: ${\mathbf{Outer\; Iteration\; Limit}}\ge 0$.
Print File  $i$  Default $=6$ 
If
$i\ge 0$, the
unit number
for the primary output of the solver. If
${\mathbf{Print\; File}}=1$, the primary output is completely turned off independently of other settings. The information output to this unit is controlled by
Print Level.
Constraint: ${\mathbf{Print\; File}}\ge 1$.
Print Level  $i$  Default $=2$ 
This argument defines how detailed information should be printed by the solver to the primary output.
$i$ 
Output 
$0$ 
No output from the solver (except a onetime banner) 
$1$ 
Additionally, derivative check information, the Header and Summary. 
$2$ 
Additionally, the Iteration log. 
$3$, $4$ 
Additionally, details of each iteration with scalar quantities printed. 
$5$ 
Additionally, individual components of arrays are printed resulting in large output. 
Constraint: $0\le {\mathbf{Print\; Level}}\le 5$.
Stats Time  $a$  Default $=\mathrm{NO}$ 
This argument allows you to turn on timings of various parts of the algorithm to give a better overview of where most of the time is spent. This might be helpful for a choice of different solving approaches.
Constraint: ${\mathbf{Stats\; Time}}=\mathrm{YES}$ or $\mathrm{NO}$.
Stop Tolerance 1  $r$  Default $=\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left({10}^{6},\sqrt{\epsilon}\right)$ 
This option sets the value
${\epsilon}_{\mathrm{tol}}$ which is used for optimality and complementarity tests from KKT conditions See
Section 11.1.
Constraint: ${\mathbf{Stop\; Tolerance\; 1}}>\epsilon $.
Time Limit  $r$  Default $\text{}={10}^{6}$ 
A limit on seconds that the solver can use to solve one problem. If during the convergence check this limit is exceeded, the solver will terminate with a corresponding error message.
Constraint: ${\mathbf{Time\; Limit}}>0$.
Verify Derivatives  $a$  Default $=\mathrm{AUTO}$ 
This argument specifies whether the routine should perform numerical checks on the consistency of the usersupplied functions. It is recommended that such checks are enabled when first developing the formulation of the problem. Option $\mathrm{AUTO}$ will perform the checks unless it is determined that there are no explicitly nonlinear usersupplied functions.
Constraint: ${\mathbf{Verify\; Derivatives}}=\mathrm{AUTO}$, $\mathrm{YES}$ or $\mathrm{NO}$.