<?xml-stylesheet type="text/xsl" href="../styles/pmathml.xsl"?>
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:dsi="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xml:space="preserve"><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"/><title>E04UFF/E04UFA : NAG Library, Mark 22</title><link rel="stylesheet" href="../styles/libdoc.css" type="text/css"/><script type="text/javascript">
   function showLevel(_levelId){
    var thisLevel = document.getElementById(_levelId);
    var thisplus = document.getElementById( _levelId.concat('plus'));
    var thisminus = document.getElementById( _levelId.concat('minus'));
    if(thisLevel.style.display != "block"){
     thisLevel.style.display = "block";
     thisplus.style.display = "none";
     thisminus.style.display = "inline";
     }
    else{
     thisLevel.style.display = "none";
     thisminus.style.display = "none";
     thisplus.style.display = "inline";
     }
    }
  </script></head><body><hr/><div><a class="rout" href="../../pdf/E04/e04uff.pdf">E04UFF/E04UFA (PDF version)</a></div><div><a class="chap" href="e04conts.xml">E04 Chapter Contents</a></div><div><a class="chapint" href="e04intro.xml">E04 Chapter Introduction</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div><hr/><h1 class="libdoc">NAG Library Routine Document<br/><br/>E04UFF/E04UFA</h1><div class="paramtext"><div class="header"><b>Note:</b>&#160; before using this routine, please read the Users' Note for your implementation to check the interpretation of <span class="bitalic">bold italicised</span> terms and other implementation-dependent details.</div></div> <div class="paramtext"><b>Note:</b> <span class="italic">this routine uses</span> <b>optional parameters</b> <span class="italic">to define choices in the problem specification and in the details of the algorithm. If you wish to use</span> default <span class="italic">settings for all of the optional parameters, you need only read <a class="sec" href="#purpose">Sections 1</a> to <a class="sec" href="#example">9</a> of this document. 
If, however, you wish to reset some or all of the settings please refer to 
<a class="sec" href="#algdetails">Section 10</a> for a detailed description of the algorithm, to 
<a class="sec" href="#optparams">Section 11</a> for a detailed description of the specification of the optional parameters and to 
<a class="sec" href="#monitoring">Section 12</a> for a detailed description of the monitoring information produced by the routine</span>.</div>
<div class="htmltoc">
<h2 class="htmltoc"><span class="htmltochead" onclick="showLevel('htmltoc');"><span class="htmltocplus" id="htmltocplus">+</span><span class="htmltocminus" id="htmltocminus">&#8722;</span></span>&#160;Contents</h2>
<div class="htmltocitem" id="htmltoc">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#purpose">1&#160;&#160;<b>Purpose</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocspecification');"><span class="htmltocplus" id="tocspecificationplus">+</span><span class="htmltocminus" id="tocspecificationminus">&#8722;</span></span>
<a class="htmltoc" href="#specification">2&#160;&#160;<b>Specification</b></a>
<div class="htmltocitem" id="tocspecification">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#routFspec">2.1&#160;&#160;<b>Specification for E04UFF</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#routAspec">2.2&#160;&#160;<b>Specification for E04UFA</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#description">3&#160;&#160;<b>Description</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#references">4&#160;&#160;<b>References</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#parameters">5&#160;&#160;<b>Parameters</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#errors">6&#160;&#160;<b>Error Indicators and Warnings</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#accuracy">7&#160;&#160;<b>Accuracy</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocfcomments');"><span class="htmltocplus" id="tocfcommentsplus">+</span><span class="htmltocminus" id="tocfcommentsminus">&#8722;</span></span>
<a class="htmltoc" href="#fcomments">8&#160;&#160;<b>Further Comments</b></a>
<div class="htmltocitem" id="tocfcomments">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fc-printedoutput">8.1&#160;&#160;<b>Description of the Printed Output</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocexample');"><span class="htmltocplus" id="tocexampleplus">+</span><span class="htmltocminus" id="tocexampleminus">&#8722;</span></span>
<a class="htmltoc" href="#example">9&#160;&#160;<b>Example</b></a>
<div class="htmltocitem" id="tocexample">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examtext">9.1&#160;&#160;<b>Program Text</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examdata">9.2&#160;&#160;<b>Program Data</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examresults">9.3&#160;&#160;<b>Program Results</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocalgdetails');"><span class="htmltocplus" id="tocalgdetailsplus">+</span><span class="htmltocminus" id="tocalgdetailsminus">&#8722;</span></span>
<a class="htmltoc" href="#algdetails">10&#160;&#160;<b>Algorithmic Details</b></a>
<div class="htmltocitem" id="tocalgdetails">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#ad-overview">10.1&#160;&#160;<b>Overview</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#ad-QPS">10.2&#160;&#160;<b>Solution of the Quadratic Programming Subproblem</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#ad-meritfunction">10.3&#160;&#160;<b>The Merit Function</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#ad-quasinewton">10.4&#160;&#160;<b>The Quasi-Newton Update</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocoptparams');"><span class="htmltocplus" id="tocoptparamsplus">+</span><span class="htmltocminus" id="tocoptparamsminus">&#8722;</span></span>
<a class="htmltoc" href="#optparams">11&#160;&#160;<b>Optional Parameters</b></a>
<div class="htmltocitem" id="tocoptparams">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#op-checklist">11.1&#160;&#160;<b>Optional Parameter Checklist and Default Values</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#op-description">11.2&#160;&#160;<b>Description of the Optional Parameters</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#monitoring">12&#160;&#160;<b>Description of Monitoring Information</b></a>
</div>
</div>
</div><h2 class="standard"><a class="sec" name="purpose" id="purpose"/>1&#160;&#160;Purpose</h2>
<div class="paramtext">E04UFF/E04UFA is designed to minimize an arbitrary smooth function subject to constraints (which may include simple bounds on the variables, linear constraints and smooth nonlinear constraints) using a sequential quadratic programming (SQP) method.  As many first derivatives as possible should be supplied by you; any unspecified derivatives are approximated by finite differences.  It is not intended for large sparse problems.</div><div class="paramtext">E04UFF/E04UFA may also be used for unconstrained, bound-constrained and linearly constrained optimization.</div><div class="paramtext">E04UFF/E04UFA uses <b>reverse communication</b> for evaluating the objective function, the nonlinear constraint functions and any of their derivatives.</div>
<div class="paramtext">E04UFA is a version of E04UFF that has additional parameters in order to make it safe for use in multithreaded applications (see <a class="sec" href="#parameters">Section 5</a>).  The initialization routine <a class="rout" href="../E04/e04wbf.xml">E04WBF</a> <b>must</b> have been called before calling E04UFA.</div><h2 class="standard"><a class="sec" name="specification" id="specification"/>2&#160;&#160;Specification</h2><h3 class="standard"><a class="sec" name="routFspec" id="routFspec"/>2.1&#160;&#160;Specification for E04UFF</h3>
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;E04UFF&#160;(</td><td class="tdfspec2"><a class="arg" href="#IREVCM">IREVCM</a>, <a class="arg" href="#N">N</a>, <a class="arg" href="#NCLIN">NCLIN</a>, <a class="arg" href="#NCNLN">NCNLN</a>, <a class="arg" href="#LDA">LDA</a>, <a class="arg" href="#LDCJ">LDCJ</a>, <a class="arg" href="#LDR">LDR</a>, <a class="arg" href="#A">A</a>, <a class="arg" href="#BL">BL</a>, <a class="arg" href="#BU">BU</a>, <a class="arg" href="#ITER">ITER</a>, <a class="arg" href="#ISTATE">ISTATE</a>, <a class="arg" href="#C">C</a>, <a class="arg" href="#CJAC">CJAC</a>, <a class="arg" href="#CLAMDA">CLAMDA</a>, <a class="arg" href="#OBJF">OBJF</a>, <a class="arg" href="#OBJGRD">OBJGRD</a>, <a class="arg" href="#R">R</a>, <a class="arg" href="#X">X</a>, <a class="arg" href="#NEEDC">NEEDC</a>, <a class="arg" href="#IWORK">IWORK</a>, <a class="arg" href="#LIWORK">LIWORK</a>, <a class="arg" href="#WORK">WORK</a>, <a class="arg" href="#LWORK">LWORK</a>, <a class="arg" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">IREVCM, N, NCLIN, NCNLN, LDA, LDCJ, LDR, ITER, ISTATE(N+NCLIN+NCNLN), NEEDC(max(1,NCNLN)), IWORK(LIWORK), LIWORK, LWORK, IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">A(LDA,*), BL(N+NCLIN+NCNLN), BU(N+NCLIN+NCNLN), C(*), CJAC(LDCJ,*), CLAMDA(N+NCLIN+NCNLN), OBJF, OBJGRD(N), R(LDR,N), X(N), WORK(LWORK)</td></tr></table><h3 class="standard"><a class="sec" name="routAspec" id="routAspec"/>2.2&#160;&#160;Specification for E04UFA</h3>
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;E04UFA&#160;(</td><td class="tdfspec2"><a class="arg" href="#IREVCM">IREVCM</a>, <a class="arg" href="#N">N</a>, <a class="arg" href="#NCLIN">NCLIN</a>, <a class="arg" href="#NCNLN">NCNLN</a>, <a class="arg" href="#LDA">LDA</a>, <a class="arg" href="#LDCJ">LDCJ</a>, <a class="arg" href="#LDR">LDR</a>, <a class="arg" href="#A">A</a>, <a class="arg" href="#BL">BL</a>, <a class="arg" href="#BU">BU</a>, <a class="arg" href="#ITER">ITER</a>, <a class="arg" href="#ISTATE">ISTATE</a>, <a class="arg" href="#C">C</a>, <a class="arg" href="#CJAC">CJAC</a>, <a class="arg" href="#CLAMDA">CLAMDA</a>, <a class="arg" href="#OBJF">OBJF</a>, <a class="arg" href="#OBJGRD">OBJGRD</a>, <a class="arg" href="#R">R</a>, <a class="arg" href="#X">X</a>, <a class="arg" href="#NEEDC">NEEDC</a>, <a class="arg" href="#IWORK">IWORK</a>, <a class="arg" href="#LIWORK">LIWORK</a>, <a class="arg" href="#WORK">WORK</a>, <a class="arg" href="#LWORK">LWORK</a>, <a class="arg" href="#CWSAV">CWSAV</a>, <a class="arg" href="#LWSAV">LWSAV</a>, <a class="arg" href="#IWSAV">IWSAV</a>, <a class="arg" href="#RWSAV">RWSAV</a>, <a class="arg" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">IREVCM, N, NCLIN, NCNLN, LDA, LDCJ, LDR, ITER, ISTATE(N+NCLIN+NCNLN), NEEDC(max(1,NCNLN)), IWORK(LIWORK), LIWORK, LWORK, IWSAV(610), IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">A(LDA,*), BL(N+NCLIN+NCNLN), BU(N+NCLIN+NCNLN), C(*), CJAC(LDCJ,*), CLAMDA(N+NCLIN+NCNLN), OBJF, OBJGRD(N), R(LDR,N), X(N), WORK(LWORK), RWSAV(475)</td></tr><tr><td class="tdfspec1">LOGICAL</td><td class="tdfspec2">LWSAV(120)</td></tr><tr><td class="tdfspec1">CHARACTER*80</td><td class="tdfspec2">CWSAV(5)</td></tr></table><div class="paramtext">Before calling E04UFA, or either of the option setting routines <a class="rout" href="../E04/e04udf.xml">E04UDA</a> or <a class="rout" href="../E04/e04uef.xml">E04UEA</a>, <a class="rout" href="../E04/e04wbf.xml">E04WBF</a>
<b>must</b> be called.  The specification for <a class="rout" href="../E04/e04wbf.xml">E04WBF</a> is:</div><table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;E04WBF&#160;(</td><td class="tdfspec2"><a class="arg" href="../E04/e04wbf.xml#RNAME">RNAME</a>, <a class="arg" href="../E04/e04wbf.xml#CWSAV">CWSAV</a>, <a class="arg" href="../E04/e04wbf.xml#LCWSAV">LCWSAV</a>, <a class="arg" href="../E04/e04wbf.xml#LWSAV">LWSAV</a>, <a class="arg" href="../E04/e04wbf.xml#LLWSAV">LLWSAV</a>, <a class="arg" href="../E04/e04wbf.xml#IWSAV">IWSAV</a>, <a class="arg" href="../E04/e04wbf.xml#LIWSAV">LIWSAV</a>, <a class="arg" href="../E04/e04wbf.xml#RWSAV">RWSAV</a>, <a class="arg" href="../E04/e04wbf.xml#LRWSAV">LRWSAV</a>, <a class="arg" href="../E04/e04wbf.xml#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">LCWSAV, LLWSAV, IWSAV(LIWSAV), LIWSAV, LRWSAV, IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">RWSAV(LRWSAV)</td></tr><tr><td class="tdfspec1">LOGICAL</td><td class="tdfspec2">LWSAV(LLWSAV)</td></tr><tr><td class="tdfspec1">CHARACTER*6</td><td class="tdfspec2">RNAME</td></tr><tr><td class="tdfspec1">CHARACTER*80</td><td class="tdfspec2">CWSAV(LCWSAV)</td></tr></table><div class="paramtext"><a class="rout" href="../E04/e04wbf.xml">E04WBF</a> should be called with 
<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="../E04/e04wbf.xml#RNAME"><m:mi mathcolor="#EE0000" mathvariant="bold">RNAME</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'E04UFA'</m:mtext></m:math>.  
<a class="arg" href="../E04/e04wbf.xml#LCWSAV">LCWSAV</a>, 
<a class="arg" href="../E04/e04wbf.xml#LLWSAV">LLWSAV</a>, 
<a class="arg" href="../E04/e04wbf.xml#LIWSAV">LIWSAV</a> and 
<a class="arg" href="../E04/e04wbf.xml#LRWSAV">LRWSAV</a>, the declared lengths of 
<a class="arg" href="../E04/e04wbf.xml#CWSAV">CWSAV</a>, 
<a class="arg" href="../E04/e04wbf.xml#LWSAV">LWSAV</a>, 
<a class="arg" href="../E04/e04wbf.xml#IWSAV">IWSAV</a> and 
<a class="arg" href="../E04/e04wbf.xml#RWSAV">RWSAV</a> respectively, must satisfy:
<ul class="listind"><li class="listind"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="../E04/e04wbf.xml#LCWSAV"><m:mi mathcolor="#EE0000" mathvariant="bold">LCWSAV</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>5</m:mn></m:math></li><li class="listind"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="../E04/e04wbf.xml#LLWSAV"><m:mi mathcolor="#EE0000" mathvariant="bold">LLWSAV</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>120</m:mn></m:math></li><li class="listind"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="../E04/e04wbf.xml#LIWSAV"><m:mi mathcolor="#EE0000" mathvariant="bold">LIWSAV</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>610</m:mn></m:math></li><li class="listind"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="../E04/e04wbf.xml#LRWSAV"><m:mi mathcolor="#EE0000" mathvariant="bold">LRWSAV</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>475</m:mn></m:math></li></ul>
</div><div class="paramtext">The contents of the arrays 
<a class="arg" href="../E04/e04wbf.xml#CWSAV">CWSAV</a>, 
<a class="arg" href="../E04/e04wbf.xml#LWSAV">LWSAV</a>, 
<a class="arg" href="../E04/e04wbf.xml#IWSAV">IWSAV</a> and 
<a class="arg" href="../E04/e04wbf.xml#RWSAV">RWSAV</a>
<b>must not</b> be altered between calling routines 
<a class="rout" href="../E04/e04udf.xml">E04UDA</a>, <a class="rout" href="../E04/e04uef.xml">E04UEA</a>, <a class="rout" href="../E04/e04uff.xml">E04UFA</a> and <a class="rout" href="../E04/e04wbf.xml">E04WBF</a>.</div><h2 class="standard"><a class="sec" name="description" id="description"/>3&#160;&#160;Description</h2>
<div class="paramtext">E04UFF/E04UFA is designed to solve the nonlinear programming problem &#8211; the minimization of a smooth nonlinear function subject to a set of constraints on the variables.  The problem is assumed to be stated in the following form:

<div class="formula-eqn"><a name="eqn1" id="eqn1"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
 <m:munder>
  <m:mi mathvariant="normal">Minimize</m:mi>
  <m:mrow><m:mi>x</m:mi><m:mo>&#8712;</m:mo><m:msup><m:mi>R</m:mi><m:mi>n</m:mi></m:msup></m:mrow>
 </m:munder><m:mspace width="0.25em"/>
 <m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
 <m:mtext>&#8195; subject to &#8195;</m:mtext>
 <m:mi>l</m:mi>
 <m:mo>&#8804;</m:mo>
 <m:mfenced><m:mtable>
  <m:mtr>
   <m:mtd><m:mi>x</m:mi></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:msub><m:mi>A</m:mi><m:mi>L</m:mi></m:msub><m:mi>x</m:mi></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mi>c</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
<m:mo>&#8804;</m:mo><m:mi>u</m:mi><m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (1)
     </td></tr></table></div>

where <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;(the <span class="italic">objective function</span>) is a nonlinear function, <m:math><m:msub><m:mi>A</m:mi><m:mi>L</m:mi></m:msub></m:math>&#160;is an <m:math><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;constant matrix, and <m:math><m:mi>c</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is an <m:math><m:msub><m:mi>n</m:mi><m:mi>N</m:mi></m:msub></m:math>&#160;element vector of nonlinear constraint functions.  (The matrix <m:math><m:msub><m:mi>A</m:mi><m:mi>L</m:mi></m:msub></m:math>&#160;and the vector <m:math><m:mi>c</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;may be empty.)  The objective function and the constraint functions are assumed to be smooth, i.e., at least twice-continuously differentiable.  (The method of E04UFF/E04UFA will usually solve <a class="eqn" href="#eqn1">(1)</a> if there are only isolated discontinuities away from the solution.)</div><div class="paramtext">Note that although the bounds on the variables could be included in the definition of the linear constraints, we prefer to distinguish between them for reasons of computational efficiency.  For the same reason, the linear constraints should <b>not</b> be included in the definition of the nonlinear constraints.  Upper and lower bounds are specified for all the variables and for all the constraints.  An <span class="italic">equality</span> constraint can be specified by setting <m:math><m:msub><m:mi>l</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>u</m:mi><m:mi>i</m:mi></m:msub></m:math>.  If certain bounds are not present, the associated elements of <m:math><m:mi>l</m:mi></m:math>&#160;or <m:math><m:mi>u</m:mi></m:math>&#160;can be set to special values that will be treated as <m:math><m:mrow><m:mo>-</m:mo><m:mi>&#8734;</m:mi></m:mrow></m:math>&#160;or <m:math><m:mrow><m:mo>+</m:mo><m:mi>&#8734;</m:mi></m:mrow></m:math>.  (See the description of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_infiniteboundsize"><m:mi mathcolor="#800080;" mathvariant="bold">Infinite Bound Size</m:mi></m:maction></m:math>.)</div><div class="paramtext">If there are no nonlinear constraints in <a class="eqn" href="#eqn1">(1)</a> and <m:math><m:mi>F</m:mi></m:math>&#160;is linear or quadratic then it will generally be more efficient to use one of <a class="rout" href="../E04/e04mff.xml">E04MFF/E04MFA</a>, <a class="rout" href="../E04/e04ncf.xml">E04NCF/E04NCA</a> or <a class="rout" href="../E04/e04nff.xml">E04NFF/E04NFA</a>, or <a class="rout" href="../E04/e04nqf.xml">E04NQF</a> if the problem is large and sparse.  If the problem is large and sparse and does have nonlinear constraints, <a class="rout" href="../E04/e04ugf.xml">E04UGF/E04UGA</a> should be used, since E04UFF/E04UFA treats all matrices as dense.</div><div class="paramtext">E04UFF/E04UFA uses reverse communication for evaluating <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>, <m:math><m:mi>c</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;and as many of their first partial derivatives as possible; any remaining derivatives are approximated by finite differences.  See the description of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_derivativelevel"><m:mi mathcolor="#800080;" mathvariant="bold">Derivative Level</m:mi></m:maction></m:math>.</div><div class="paramtext">On initial entry, you must supply an initial estimate of the solution to <a class="eqn" href="#eqn1">(1)</a>.</div><div class="paramtext">On intermediate exits, the calling program must compute appropriate values for the objective function, the nonlinear constraints or their derivatives, as specified by the parameter <a class="arg" href="#IREVCM">IREVCM</a>, and then re-enter the routine.  </div><div class="paramtext">For maximum reliability, it is preferable for you to provide all partial derivatives (see Chapter 8 of <a class="ref" href="#ref079">Gill <span class="italic">et al.</span> (1981)</a>, for a detailed discussion).  If they cannot all be provided, it is advisable to provide as many as possible.  While developing code to evaluate the objective function and the constraints, the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verify"><m:mi mathcolor="#800080;" mathvariant="bold">Verify</m:mi></m:maction></m:math>&#160;should be used to check the calculation of any known derivatives.</div><div class="paramtext">The method used by E04UFF/E04UFA is described in detail in <a class="sec" href="#algdetails">Section 10</a>.</div><div class="paramtext"><a class="rout" href="../E04/e04wdf.xml">E04WDF</a> is an alternative routine which uses a similar method, but with <b>forward communication</b>: that is, the objective and constraint functions are evaluated by subroutines, supplied as parameters to the routine.</div><h2 class="standard"><a class="sec" name="references" id="references"/>4&#160;&#160;References</h2><div class="paramtext"><a name="ref084" id="ref084"/>Dennis J E Jr and Mor&#233; J J (1977)  Quasi-Newton methods, motivation and theory <i>SIAM Rev.</i> <b>19</b> 46&#8211;89 </div>
<div class="paramtext"><a name="ref085" id="ref085"/>Dennis J E Jr and Schnabel R B (1981)  A new derivation of symmetric positive-definite secant updates <i>nonlinear programming</i> (eds O L Mangasarian, R R Meyer and S M Robinson) <b>4</b> 167&#8211;199 Academic Press </div>
<div class="paramtext"><a name="ref086" id="ref086"/>Dennis J E Jr and Schnabel R B (1983)  <i>Numerical Methods for Unconstrained Optimization and Nonlinear Equations</i> Prentice&#8211;Hall </div>
<div class="paramtext"><a name="ref224" id="ref224"/>Fletcher R (1987)  <i>Practical Methods of Optimization</i> (2nd Edition) Wiley </div>
<div class="paramtext"><a name="ref091" id="ref091"/>Gill P E, Hammarling S, Murray W, Saunders M A and Wright M H (1986)  Users' guide for LSSOL (Version 1.0) <i>Report SOL 86-1</i> Department of Operations Research, Stanford University </div>
<div class="paramtext"><a name="ref090" id="ref090"/>Gill P E, Murray W, Saunders M A and Wright M H (1984a)  Procedures for optimization problems with a mixture of bounds and general linear constraints <i>ACM Trans. Math. Software</i> <b>10</b> 282&#8211;298 </div>
<div class="paramtext"><a name="ref494" id="ref494"/>Gill P E, Murray W, Saunders M A and Wright M H (1984b)  Users' guide for SOL/QPSOL version 3.2 <i>Report SOL</i> 84&#8211;5 Department of Operations Research, Stanford University </div>
<div class="paramtext"><a name="ref092" id="ref092"/>Gill P E, Murray W, Saunders M A and Wright M H (1986a)  Some theoretical properties of an augmented Lagrangian merit function <i>Report SOL</i> 86&#8211;6R Department of Operations Research, Stanford University </div>
<div class="paramtext"><a name="ref540" id="ref540"/>Gill P E, Murray W, Saunders M A and Wright M H (1986b)  Users' guide for NPSOL (Version 4.0): a Fortran package for nonlinear programming <i>Report SOL 86-2</i> Department of Operations Research, Stanford University </div>
<div class="paramtext"><a name="ref079" id="ref079"/>Gill P E, Murray W and Wright M H (1981)  <i>Practical Optimization</i> Academic Press </div>
<div class="paramtext"><a name="ref093" id="ref093"/>Hock W and Schittkowski K (1981)  <i>Test Examples for Nonlinear Programming Codes. Lecture Notes in Economics and Mathematical Systems</i> <b>187</b> Springer&#8211;Verlag </div>
<div class="paramtext"><a name="ref095" id="ref095"/>Murtagh B A and Saunders M A (1983)  MINOS 5.0 user's guide <i>Report SOL 83-20</i> Department of Operations Research, Stanford University </div>
<div class="paramtext"><a name="ref096" id="ref096"/>Powell M J D (1974)  Introduction to constrained optimization <i>Numerical Methods for Constrained Optimization</i> (eds P E Gill and W Murray) 1&#8211;28 Academic Press </div>
<div class="paramtext"><a name="ref097" id="ref097"/>Powell M J D (1983)  Variable metric methods in constrained optimization <i>Mathematical Programming: The State of the Art</i> (eds A Bachem, M Gr&#246;tschel and B Korte) 288&#8211;311 Springer&#8211;Verlag </div><h2 class="standard"><a class="sec" name="parameters" id="parameters"/>5&#160;&#160;Parameters</h2>
<div class="paramtext"><b>Note:</b> this routine uses <b>reverse communication</b>.  Its use involves an initial entry, intermediate exits and re-entries, and a final exit, as indicated by the <b>parameter <a class="arg" href="#IREVCM">IREVCM</a></b>.  Between intermediate exits and re-entries, <b>all parameters must remain unchanged except those specified by the value of <a class="arg" href="#IREVCM">IREVCM</a></b>.</div><dl><dt class="paramhead"><a name="IREVCM" id="IREVCM"/>1: &#160;&#160;&#8194; IREVCM &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On initial entry</i>: must be set to <m:math><m:mn>0</m:mn></m:math>.</div>
<div class="paramtext"><i>On intermediate exit</i>:
specifies what values the calling program must assign to parameters of E04UFF/E04UFA before re-entering the routine. 

<dl>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd>Set <a class="arg" href="#OBJF">OBJF</a> to the value of the objective function <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd>Set <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#OBJGRD"><m:mi mathcolor="#EE0000" mathvariant="bold">OBJGRD</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mrow><m:mo>&lt;</m:mo><m:mi>j</m:mi></m:mrow></m:mfenced></m:mrow></m:math>&#160;to the value <m:math>
 <m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:mi>F</m:mi></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mi>j</m:mi></m:msub></m:mrow>
 </m:mfrac>
</m:math>&#160;if available, for <m:math><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>n</m:mi></m:math>.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math></dt>
<dd>Set <a class="arg" href="#OBJF">OBJF</a> and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#OBJGRD"><m:mi mathcolor="#EE0000" mathvariant="bold">OBJGRD</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;as for <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math>.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>4</m:mn></m:math></dt>
<dd>Set <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;to the value of the constraint function <m:math><m:msub><m:mi>c</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>, for each <m:math><m:mi>i</m:mi></m:math>&#160;such that <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#NEEDC"><m:mi mathcolor="#EE0000" mathvariant="bold">NEEDC</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>5</m:mn></m:math></dt>
<dd>Set <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CJAC"><m:mi mathcolor="#EE0000" mathvariant="bold">CJAC</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;to the value <m:math>
 <m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>c</m:mi><m:mi>i</m:mi></m:msub></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mi>j</m:mi></m:msub></m:mrow>
 </m:mfrac>
</m:math>&#160;if available, for each <m:math><m:mi>i</m:mi></m:math>&#160;such that <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#NEEDC"><m:mi mathcolor="#EE0000" mathvariant="bold">NEEDC</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>&#160;and <m:math><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>n</m:mi></m:math>.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>6</m:mn></m:math></dt>
<dd>Set <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CJAC"><m:mi mathcolor="#EE0000" mathvariant="bold">CJAC</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;as for <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>4</m:mn></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>5</m:mn></m:math>.</dd></dl>
</div>
<div class="paramtext"><i>On intermediate re-entry</i>: <b>must remain unchanged</b>, unless you wish to terminate the solution to the current problem.  In this case <a class="arg" href="#IREVCM">IREVCM</a> may be set to a negative value and then E04UFF/E04UFA will take a final exit with <a class="arg" href="#IFAIL">IFAIL</a> set to this value of <a class="arg" href="#IREVCM">IREVCM</a>.</div>
<div class="paramtext"><i>On final exit</i>:  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mn>6</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="N" id="N"/>2: &#160;&#160;&#8194; N &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On initial entry</i>: 

<m:math><m:mi>n</m:mi></m:math>, the number of variables.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="NCLIN" id="NCLIN"/>3: &#160;&#160;&#8194; NCLIN &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On initial entry</i>: <m:math><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub></m:math>, the number of general linear constraints.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="NCNLN" id="NCNLN"/>4: &#160;&#160;&#8194; NCNLN &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On initial entry</i>: <m:math><m:msub><m:mi>n</m:mi><m:mi>N</m:mi></m:msub></m:math>, the number of nonlinear constraints.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="LDA" id="LDA"/>5: &#160;&#160;&#8194; LDA &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On initial entry</i>: the first dimension of the array <a class="arg" href="#A">A</a> as declared in the (sub)program from which E04UFF/E04UFA is called.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDA"><m:mi mathcolor="#EE0000" mathvariant="bold">LDA</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction></m:mfenced></m:mrow></m:math>.
</div></dd><dt class="paramhead"><a name="LDCJ" id="LDCJ"/>6: &#160;&#160;&#8194; LDCJ &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On initial entry</i>: the first dimension of the array <a class="arg" href="#CJAC">CJAC</a> as declared in the (sub)program from which E04UFF/E04UFA is called.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDCJ"><m:mi mathcolor="#EE0000" mathvariant="bold">LDCJ</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction></m:mfenced></m:mrow></m:math>.
</div></dd><dt class="paramhead"><a name="LDR" id="LDR"/>7: &#160;&#160;&#8194; LDR &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On initial entry</i>: the first dimension of the array <a class="arg" href="#R">R</a> as declared in the (sub)program from which E04UFF/E04UFA is called.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDR"><m:mi mathcolor="#EE0000" mathvariant="bold">LDR</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>.
</div></dd><dt class="paramhead"><a name="A" id="A"/>8: &#160;&#160;&#8194; A(<a class="arg" href="#LDA">LDA</a>,<m:math><m:mo>*</m:mo></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd><div class="paramtext"><b>Note:</b> the second dimension of the array <a class="arg" href="#A">A</a>
must be at least
<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>&#160;if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>, and at least <m:math><m:mn>1</m:mn></m:math>&#160;otherwise.</div>
<div class="paramtext"><i>On initial entry</i>: the <m:math><m:mi>i</m:mi></m:math>th row of the array <a class="arg" href="#A">A</a> must contain the <m:math><m:mi>i</m:mi></m:math>th row of the matrix <m:math><m:msub><m:mi>A</m:mi><m:mi>L</m:mi></m:msub></m:math>&#160;of general linear constraints in <a class="eqn" href="#eqn1">(1)</a>.  That is, the <m:math><m:mi>i</m:mi></m:math>th row contains the coefficients of the <m:math><m:mi>i</m:mi></m:math>th general linear constraint, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction></m:math>.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, the array <a class="arg" href="#A">A</a> is not referenced.</div>
</div></dd><dt class="paramhead"><a name="BL" id="BL"/>9: &#160;&#160;&#8194; BL(<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dt class="multi-paramhead"><a name="BU" id="BU"/>10: &#8194; BU(<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On initial entry</i>: <a class="arg" href="#BL">BL</a> must contain the lower bounds and <a class="arg" href="#BU">BU</a> the upper bounds, for all the constraints in the following order.  The first <m:math><m:mi>n</m:mi></m:math>&#160;elements of each array must contain the bounds on the variables, the next <m:math><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub></m:math>&#160;elements the bounds for the general linear constraints (if any) and the next <m:math><m:msub><m:mi>n</m:mi><m:mi>N</m:mi></m:msub></m:math>&#160;elements the bounds for the general nonlinear constraints (if any).  To specify a nonexistent lower bound (i.e., <m:math><m:msub><m:mi>l</m:mi><m:mi>j</m:mi></m:msub><m:mo>=</m:mo><m:mrow><m:mo>-</m:mo><m:mi>&#8734;</m:mi></m:mrow></m:math>), set <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:mo>-</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>, and to specify a nonexistent upper bound (i.e., <m:math><m:msub><m:mi>u</m:mi><m:mi>j</m:mi></m:msub><m:mo>=</m:mo><m:mrow><m:mo>+</m:mo><m:mi>&#8734;</m:mi></m:mrow></m:math>), set <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>&#8805;</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>; the default value of <m:math><m:mi mathvariant="italic">bigbnd</m:mi></m:math>&#160;is <m:math><m:msup><m:mn>10</m:mn><m:mn>20</m:mn></m:msup></m:math>, but this may be changed by the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_infiniteboundsize"><m:mi mathcolor="#800080;" mathvariant="bold">Infinite Bound Size</m:mi></m:maction></m:math>.  To specify the <m:math><m:mi>j</m:mi></m:math>th constraint as an <span class="italic">equality</span>, set <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi>&#946;</m:mi></m:math>, say, where <m:math><m:mfenced open="|" close="|" separators=""><m:mi>&#946;</m:mi></m:mfenced><m:mo>&lt;</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>.</div><div class="paramtext"><i>Constraints</i>:
   <div class="paramtext"/><ul class="listcons">
<li class="listcons"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi mathvariant="italic">j</m:mi></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi mathvariant="italic">j</m:mi></m:mfenced></m:mrow></m:math>,  for <m:math><m:mi mathvariant="italic">j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction></m:mrow></m:math>;</li>
<li class="listcons">if <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi>&#946;</m:mi></m:math>, <m:math><m:mfenced open="|" close="|" separators=""><m:mi>&#946;</m:mi></m:mfenced><m:mo>&lt;</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>.</li>
</ul></div></dd><dt class="paramhead"><a name="ITER" id="ITER"/>11: &#8194; ITER &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On intermediate re-entry</i>: must remain unchanged from a previous call to E04UFF/E04UFA.</div>
<div class="paramtext"><i>On final exit</i>: the number of major iterations performed.</div></dd><dt class="paramhead"><a name="ISTATE" id="ISTATE"/>12: &#8194; ISTATE(<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction></m:math>) &#8211; INTEGER array<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On initial entry</i>: need not be set if the (default) optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_coldstart"><m:mi mathcolor="#800080;" mathvariant="bold">Cold Start</m:mi></m:maction></m:math>&#160;is used.
<div class="paramtext">If the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_warmstart"><m:mi mathcolor="#800080;" mathvariant="bold">Warm Start</m:mi></m:maction></m:math>&#160;has been chosen, the elements of <a class="arg" href="#ISTATE">ISTATE</a> corresponding to the bounds and linear constraints define the initial working set for the procedure that finds a feasible point for the linear constraints and bounds.  The active set at the conclusion of this procedure and the elements of <a class="arg" href="#ISTATE">ISTATE</a> corresponding to nonlinear constraints then define the initial working set for the first QP subproblem.  More precisely, the first <m:math><m:mi>n</m:mi></m:math>&#160;elements of <a class="arg" href="#ISTATE">ISTATE</a> refer to the upper and lower bounds on the variables, the next <m:math><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub></m:math>&#160;elements refer to the upper and lower bounds on <m:math><m:msub><m:mi>A</m:mi><m:mi>L</m:mi></m:msub><m:mi>x</m:mi></m:math>, and the next <m:math><m:msub><m:mi>n</m:mi><m:mi>N</m:mi></m:msub></m:math>&#160;elements refer to the upper and lower bounds on <m:math><m:mi>c</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>.  Possible values for <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISTATE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISTATE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;are as follows: 
<div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" align="center"><b><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISTATE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISTATE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math></b></td> 
<td class="libdoc" valign="top" align="center"><b>Meaning</b></td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center">0</td> 
<td class="libdoc" valign="top" align="left">The corresponding constraint is <span class="italic">not</span> in the initial QP working set.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center">1</td>
<td class="libdoc" valign="top" align="left">This inequality constraint should be in the working set at its lower bound.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center">2</td> 
<td class="libdoc" valign="top" align="left">This inequality constraint should be in the working set at its upper bound.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center">3</td> 
<td class="libdoc" valign="top" align="left">This equality constraint should be in the initial working set.  This value must not be specified unless <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>.</td> 
</tr> 
</tbody> 
</table></div> 
</div>
<div class="paramtext">The values <m:math><m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow></m:math>, <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>&#160;and <m:math><m:mn>4</m:mn></m:math>&#160;are also acceptable but will be modified by the routine.  If E04UFF/E04UFA has been called previously with the same values of <a class="arg" href="#N">N</a>, <a class="arg" href="#NCLIN">NCLIN</a> and <a class="arg" href="#NCNLN">NCNLN</a>, <a class="arg" href="#ISTATE">ISTATE</a> already contains satisfactory information.  (See also the description of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_warmstart"><m:mi mathcolor="#800080;" mathvariant="bold">Warm Start</m:mi></m:maction></m:math>.) The routine also adjusts (if necessary) the values supplied in <a class="arg" href="#X">X</a> to be consistent with <a class="arg" href="#ISTATE">ISTATE</a>.</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow><m:mo>&#8804;</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISTATE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISTATE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi mathvariant="italic">j</m:mi></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:mn>4</m:mn></m:math>,  for <m:math><m:mi mathvariant="italic">j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction></m:mrow></m:math>.</div>
<div class="paramtext"><i>On final exit</i>: the status of the constraints in the QP working set at the point returned in <a class="arg" href="#X">X</a>.  The significance of each possible value of <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISTATE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISTATE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;is as follows: 
<div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" align="center"><b><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISTATE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISTATE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math></b></td> 
<td class="libdoc" valign="top" align="center"><b>Meaning</b></td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow></m:math></td> 
<td class="libdoc" valign="top" align="left">This constraint violates its lower bound by more than the appropriate feasibility tolerance (see the optional parameters <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_lf-tolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Linear Feasibility Tolerance</m:mi></m:maction></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_nonlf-tolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Nonlinear Feasibility Tolerance</m:mi></m:maction></m:math>).  This value can occur only when no feasible point can be found for a QP subproblem.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math></td> 
<td class="libdoc" valign="top" align="left">This constraint violates its upper bound by more than the appropriate feasibility tolerance (see the optional parameters <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_lf-tolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Linear Feasibility Tolerance</m:mi></m:maction></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_nonlf-tolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Nonlinear Feasibility Tolerance</m:mi></m:maction></m:math>).  This value can occur only when no feasible point can be found for a QP subproblem.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mphantom><m:mo>-</m:mo></m:mphantom><m:mn>0</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">The constraint is satisfied to within the feasibility tolerance, but is not in the QP working set.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mphantom><m:mo>-</m:mo></m:mphantom><m:mn>1</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">This inequality constraint is included in the QP working set at its lower bound.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mphantom><m:mo>-</m:mo></m:mphantom><m:mn>2</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">This inequality constraint is included in the QP working set at its upper bound.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mphantom><m:mo>-</m:mo></m:mphantom><m:mn>3</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">This constraint is included in the QP working set as an equality.  This value of <a class="arg" href="#ISTATE">ISTATE</a> can occur only when <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>.</td> 
</tr> 
</tbody> 
</table></div>
</div></dd><dt class="paramhead"><a name="C" id="C"/>13: &#8194; C(<m:math><m:mo>*</m:mo></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><b>Note:</b> the dimension of the array <a class="arg" href="#C">C</a>
must be at least
<m:math><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction></m:mfenced></m:mrow></m:math>.</div>
<div class="paramtext"><i>On initial entry</i>: need not be set.</div>
<div class="paramtext"><i>On intermediate re-entry</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>4</m:mn></m:math>&#160;or <m:math><m:mn>6</m:mn></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#NEEDC"><m:mi mathcolor="#EE0000" mathvariant="bold">NEEDC</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;must contain the value of the <m:math><m:mi>i</m:mi></m:math>th constraint at <m:math><m:mi>x</m:mi></m:math>.  The remaining elements of <a class="arg" href="#C">C</a>, corresponding to the nonpositive elements of <a class="arg" href="#NEEDC">NEEDC</a>, are ignored.</div>
<div class="paramtext"><i>On final exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;contains the value of the <m:math><m:mi>i</m:mi></m:math>th nonlinear constraint function <m:math><m:msub><m:mi>c</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;at the final iterate, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction></m:math>.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, the array <a class="arg" href="#C">C</a> is not referenced.</div>
</div></dd><dt class="paramhead"><a name="CJAC" id="CJAC"/>14: &#8194; CJAC(<a class="arg" href="#LDCJ">LDCJ</a>,<m:math><m:mo>*</m:mo></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><b>Note:</b> the second dimension of the array <a class="arg" href="#CJAC">CJAC</a>
must be at least
<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>&#160;if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>, and at least <m:math><m:mn>1</m:mn></m:math>&#160;otherwise.</div>
<div class="paramtext"><i>On initial entry</i>: in general, <a class="arg" href="#CJAC">CJAC</a> need not be initialized before the call to E04UFF/E04UFA.  However, if the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_derivativelevel"><m:mi mathcolor="#800080;" mathvariant="bold">Derivative Level</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>3</m:mn></m:math>, you may optionally set the constant elements of <a class="arg" href="#CJAC">CJAC</a>.  Such constant elements need not be re-assigned on subsequent intermediate exits.
<div class="paramtext">If all elements of the constraint Jacobian are known (i.e., <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_derivativelevel"><m:mi mathcolor="#800080;" mathvariant="bold">Derivative Level</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>3</m:mn></m:math>), any constant elements may be assigned to <a class="arg" href="#CJAC">CJAC</a> one time only at the start of the optimization.  An element of <a class="arg" href="#CJAC">CJAC</a> that is not subsequently assigned during an intermediate exit will retain its initial value throughout.  Constant elements may be loaded into <a class="arg" href="#CJAC">CJAC</a> either before the call to E04UFF/E04UFA or during the first intermediate exit.  The ability to preload constants is useful when many Jacobian elements are identically zero, in which case <a class="arg" href="#CJAC">CJAC</a> may be initialized to zero and nonzero elements may be reset during intermediate exits.</div>
</div>
<div class="paramtext"><i>On intermediate re-entry</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>5</m:mn></m:math>&#160;or <m:math><m:mn>6</m:mn></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#NEEDC"><m:mi mathcolor="#EE0000" mathvariant="bold">NEEDC</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>, the <m:math><m:mi>i</m:mi></m:math>th row of <a class="arg" href="#CJAC">CJAC</a> must contain the available elements of the vector <m:math><m:mo>&#8711;</m:mo><m:msub><m:mi>c</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;given by 
<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block"> <m:mo>&#8711;</m:mo><m:msub><m:mi>c</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:msup><m:mfenced separators=""><m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>c</m:mi><m:mi>i</m:mi></m:msub></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub></m:mrow>
 </m:mfrac><m:mo>,</m:mo><m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>c</m:mi><m:mi>i</m:mi></m:msub></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub></m:mrow>
 </m:mfrac><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>c</m:mi><m:mi>i</m:mi></m:msub></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mi>n</m:mi></m:msub></m:mrow>
 </m:mfrac></m:mfenced><m:mi mathvariant="normal">T</m:mi></m:msup><m:mtext>,</m:mtext> </m:math></td><td class="formula2"/></tr></table></div>
 where <m:math>
 <m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>c</m:mi><m:mi>i</m:mi></m:msub></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mi>j</m:mi></m:msub></m:mrow>
 </m:mfrac>
</m:math>&#160;is the partial derivative of the <m:math><m:mi>i</m:mi></m:math>th constraint with respect to the <m:math><m:mi>j</m:mi></m:math>th variable, evaluated at the point <m:math><m:mi>x</m:mi></m:math>.  The remaining rows of <a class="arg" href="#CJAC">CJAC</a>, corresponding to nonpositive elements of <a class="arg" href="#NEEDC">NEEDC</a>, are ignored.
<div class="paramtext">Note that constant nonzero elements do affect the values of the constraints.  Thus, if <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CJAC"><m:mi mathcolor="#EE0000" mathvariant="bold">CJAC</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;is set to a constant value, it need not be reset during subsequent intermediate exits, but the value <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CJAC"><m:mi mathcolor="#EE0000" mathvariant="bold">CJAC</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>&#215;</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;must nonetheless be added to <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>.  For example, if <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CJAC"><m:mi mathcolor="#EE0000" mathvariant="bold">CJAC</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn><m:mn>1</m:mn></m:mfenced></m:mrow><m:mo>=</m:mo><m:mn>2</m:mn></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CJAC"><m:mi mathcolor="#EE0000" mathvariant="bold">CJAC</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn><m:mn>2</m:mn></m:mfenced></m:mrow><m:mo>=</m:mo><m:mrow><m:mo>-</m:mo><m:mn>5</m:mn></m:mrow></m:math>, then the term <m:math><m:mn>2</m:mn><m:mo>&#215;</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow><m:mo>-</m:mo><m:mn>5</m:mn><m:mo>&#215;</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>2</m:mn></m:mfenced></m:mrow></m:math>&#160;must be included in the definition of <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow></m:math>.</div>
<div class="paramtext">It must be emphasised that, if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_derivativelevel"><m:mi mathcolor="#800080;" mathvariant="bold">Derivative Level</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>, unassigned elements of <a class="arg" href="#CJAC">CJAC</a> are not treated as constant; they are estimated by finite differences, at nontrivial expense.  If you do not supply a value for the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_differenceinterval"><m:mi mathcolor="#800080;" mathvariant="bold">Difference Interval</m:mi></m:maction></m:math>, an interval for each element of <m:math><m:mi>x</m:mi></m:math>&#160;is computed automatically at the start of the optimization.  The automatic procedure can usually identify constant elements of <a class="arg" href="#CJAC">CJAC</a>, which are then computed once only by finite differences.</div>
<div class="paramtext">See also the description of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verify"><m:mi mathcolor="#800080;" mathvariant="bold">Verify</m:mi></m:maction></m:math>.</div>
</div>
<div class="paramtext"><i>On final exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>, <a class="arg" href="#CJAC">CJAC</a> contains the Jacobian matrix of the nonlinear constraint functions at the final iterate, i.e., <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CJAC"><m:mi mathcolor="#EE0000" mathvariant="bold">CJAC</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;contains the partial derivative of the <m:math><m:mi>i</m:mi></m:math>th constraint function with respect to the <m:math><m:mi>j</m:mi></m:math>th variable, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction></m:math>&#160;and <m:math><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, the array <a class="arg" href="#CJAC">CJAC</a> is not referenced.</div>
</div></dd><dt class="paramhead"><a name="CLAMDA" id="CLAMDA"/>15: &#8194; CLAMDA(<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On initial entry</i>: need not be set if the (default) optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_coldstart"><m:mi mathcolor="#800080;" mathvariant="bold">Cold Start</m:mi></m:maction></m:math>&#160;is used.
<div class="paramtext">If the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_warmstart"><m:mi mathcolor="#800080;" mathvariant="bold">Warm Start</m:mi></m:maction></m:math>&#160;has been chosen, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CLAMDA"><m:mi mathcolor="#EE0000" mathvariant="bold">CLAMDA</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;must contain a multiplier estimate for each nonlinear constraint with a sign that matches the status of the constraint specified by the <a class="arg" href="#ISTATE">ISTATE</a> array, for <m:math><m:mi>j</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:mn>1</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:mn>2</m:mn></m:math>, <m:math><m:mo>&#8230;</m:mo></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction></m:math>.  The remaining elements need not be set.  Note that if the <m:math><m:mi>j</m:mi></m:math>th constraint is defined as &#8216;inactive&#8217; by the initial value of the <a class="arg" href="#ISTATE">ISTATE</a> array (i.e.  <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISTATE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISTATE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mn>0</m:mn></m:math>), <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CLAMDA"><m:mi mathcolor="#EE0000" mathvariant="bold">CLAMDA</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;should be zero; if the <m:math><m:mi>j</m:mi></m:math>th constraint is an inequality active at its lower bound (i.e.  <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISTATE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISTATE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mn>1</m:mn></m:math>), <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CLAMDA"><m:mi mathcolor="#EE0000" mathvariant="bold">CLAMDA</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;should be non-negative; if the <m:math><m:mi>j</m:mi></m:math>th constraint is an inequality active at its upper bound (i.e.  <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISTATE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISTATE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mn>2</m:mn></m:math>), <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CLAMDA"><m:mi mathcolor="#EE0000" mathvariant="bold">CLAMDA</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;should be nonpositive.  If necessary, the routine will modify <a class="arg" href="#CLAMDA">CLAMDA</a> to match these rules.</div>
</div>
<div class="paramtext"><i>On final exit</i>: the values of the QP multipliers from the last QP subproblem.  <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CLAMDA"><m:mi mathcolor="#EE0000" mathvariant="bold">CLAMDA</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;should be non-negative if <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISTATE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISTATE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;and nonpositive if <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISTATE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISTATE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mn>2</m:mn></m:math>.</div></dd><dt class="paramhead"><a name="OBJF" id="OBJF"/>16: &#8194; OBJF &#8211; <span class="bitalic">double precision</span><span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On initial entry</i>: need not be set.</div>
<div class="paramtext"><i>On intermediate re-entry</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;or <m:math><m:mn>3</m:mn></m:math>, <a class="arg" href="#OBJF">OBJF</a> must be set to the value of the objective function at <m:math><m:mi>x</m:mi></m:math>.</div>
<div class="paramtext"><i>On final exit</i>: the value of the objective function at the final iterate.</div></dd><dt class="paramhead"><a name="OBJGRD" id="OBJGRD"/>17: &#8194; OBJGRD(<a class="arg" href="#N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On initial entry</i>: need not be set.</div>
<div class="paramtext"><i>On intermediate re-entry</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math>&#160;or <m:math><m:mn>3</m:mn></m:math>, <a class="arg" href="#OBJGRD">OBJGRD</a> must contain the available elements of the gradient evaluated at <m:math><m:mi>x</m:mi></m:math>.
<div class="paramtext">See also the description of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verify"><m:mi mathcolor="#800080;" mathvariant="bold">Verify</m:mi></m:maction></m:math>.</div>
</div>
<div class="paramtext"><i>On final exit</i>: the gradient of the objective function at the final iterate (or its finite difference approximation).</div></dd><dt class="paramhead"><a name="R" id="R"/>18: &#8194; R(<a class="arg" href="#LDR">LDR</a>,<a class="arg" href="#N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On initial entry</i>: need not be initialized if the (default) optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_coldstart"><m:mi mathcolor="#800080;" mathvariant="bold">Cold Start</m:mi></m:maction></m:math>&#160;is used.
<div class="paramtext">If the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_warmstart"><m:mi mathcolor="#800080;" mathvariant="bold">Warm Start</m:mi></m:maction></m:math>&#160;has been chosen, <a class="arg" href="#R">R</a> must contain the upper triangular Cholesky factor <m:math><m:mi>R</m:mi></m:math>&#160;of the initial approximation of the Hessian of the Lagrangian function, with the variables in the natural order.  Elements not in the upper triangular part of <a class="arg" href="#R">R</a> are assumed to be zero and need not be assigned.</div>
</div>
<div class="paramtext"><i>On final exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_hessian"><m:mi mathcolor="#800080;" mathvariant="bold">Hessian</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">No</m:mi></m:math>, <a class="arg" href="#R">R</a> contains the upper triangular Cholesky factor <m:math><m:mi>R</m:mi></m:math>&#160;of <m:math><m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mover><m:mi>H</m:mi><m:mo>~</m:mo></m:mover><m:mi>Q</m:mi></m:math>, an estimate of the transformed and reordered Hessian of the Lagrangian at <m:math><m:mi>x</m:mi></m:math>&#160;(see <a class="eqn" href="#eqn6">(6)</a> in <a class="sec" href="#ad-overview">Section 10.1</a>).  
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_hessian"><m:mi mathcolor="#800080;" mathvariant="bold">Hessian</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">Yes</m:mi></m:math>, <a class="arg" href="#R">R</a> contains the upper triangular Cholesky factor <m:math><m:mi>R</m:mi></m:math>&#160;of <m:math><m:mi>H</m:mi></m:math>, the approximate (untransformed) Hessian of the Lagrangian, with the variables in the natural order.</div>
</div></dd><dt class="paramhead"><a name="X" id="X"/>19: &#8194; X(<a class="arg" href="#N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On initial entry</i>: an initial estimate of the solution.</div>
<div class="paramtext"><i>On intermediate exit</i>:
the point <m:math><m:mi>x</m:mi></m:math>&#160;at which the objective function, constraint functions or their derivatives are to be evaluated.</div>
<div class="paramtext"><i>On final exit</i>: the final estimate of the solution.</div></dd><dt class="paramhead"><a name="NEEDC" id="NEEDC"/>20: &#8194; NEEDC(<m:math><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction></m:mfenced></m:mrow></m:math>) &#8211; INTEGER array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On intermediate exit</i>:
if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>4</m:mn></m:math>, <a class="arg" href="#NEEDC">NEEDC</a> specifies the indices of the elements of <a class="arg" href="#C">C</a> and/or <a class="arg" href="#CJAC">CJAC</a> that must be assigned.  If <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#NEEDC"><m:mi mathcolor="#EE0000" mathvariant="bold">NEEDC</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>, then the <m:math><m:mi>i</m:mi></m:math>th element of <a class="arg" href="#C">C</a> and/or the available elements of the <m:math><m:mi>i</m:mi></m:math>th row of <a class="arg" href="#CJAC">CJAC</a> must be evaluated at <m:math><m:mi>x</m:mi></m:math>.</div></dd><dt class="paramhead"><a name="IWORK" id="IWORK"/>21: &#8194; IWORK(<a class="arg" href="#LIWORK">LIWORK</a>) &#8211; INTEGER array<span class="pclass">Communication Array</span></dt><dt class="multi-paramhead"><a name="LIWORK" id="LIWORK"/>22: &#8194; LIWORK &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On initial entry</i>: the dimension of the array <a class="arg" href="#IWORK">IWORK</a> as declared in the (sub)program from which E04UFF/E04UFA is called.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LIWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LIWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>3</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:mn>2</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction></m:math>.
</div></dd><dt class="paramhead"><a name="WORK" id="WORK"/>23: &#8194; WORK(<a class="arg" href="#LWORK">LWORK</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Communication Array</span></dt><dt class="multi-paramhead"><a name="LWORK" id="LWORK"/>24: &#8194; LWORK &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On initial entry</i>: the dimension of the array <a class="arg" href="#WORK">WORK</a> as declared in the (sub)program from which E04UFF/E04UFA is called.</div><div class="paramtext"><i>Constraints</i>:
   <div class="paramtext"/><ul class="listcons">
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>21</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:mn>2</m:mn></m:math>;</li>
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>2</m:mn><m:mo>&#215;</m:mo><m:msup><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mn>2</m:mn></m:msup><m:mo>+</m:mo><m:mn>21</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:mn>11</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:mn>2</m:mn></m:math>;</li>
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>2</m:mn><m:mo>&#215;</m:mo><m:msup><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mn>2</m:mn></m:msup><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:mn>2</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>&#215;</m:mo><m:mspace linebreak="newline"/> <m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction><m:mo>+</m:mo><m:mn>21</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:mn>11</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:mn>22</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction><m:mo>+</m:mo><m:mn>1</m:mn></m:math>.</li>
</ul></div>
<div class="paramtext">The amounts of workspace provided and required may be (by default for E04UFF) output on the current advisory message unit (as defined by <a class="rout" href="../X04/x04abf.xml">X04ABF</a>).  As an alternative to computing <a class="arg" href="#LIWORK">LIWORK</a> and <a class="arg" href="#LWORK">LWORK</a> from the formulae given above, you may prefer to obtain appropriate values from the output of a preliminary run with <a class="arg" href="#LIWORK">LIWORK</a> and <a class="arg" href="#LWORK">LWORK</a> set to <m:math><m:mn>1</m:mn></m:math>.  (E04UFF/E04UFA will then terminate with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq9"><m:mn mathcolor="#003399" mathvariant="bold">9</m:mn></m:maction></m:math>.)</div></dd><dt class="paramhead"><a name="IFAIL" id="IFAIL"/>25: &#8194; IFAIL &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><b>Note:</b> <span class="italic">for E04UFA, <a class="arg" href="#IFAIL">IFAIL</a> does not occur in this position in the parameter list.  See the additional parameters described below</span>.</div><div class="paramtext"><i>On entry</i>: <a class="arg" href="#IFAIL">IFAIL</a> must be set to <m:math><m:mn>0</m:mn></m:math>, <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>. If you are unfamiliar with this parameter you should refer to <a class="sec" href="../GENINT/essint.xml#library3">Section 3.3</a> in  the Essential Introduction for details.</div>
<div class="paramtext"><i>On exit</i>: <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;unless the routine detects an error (see <a class="sec" href="#errors">Section 6</a>).
<div class="paramtext">For environments where it might be inappropriate to halt program execution when an error is detected, the value <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>&#160;is recommended.  If the output of error messages is undesirable, then the value <m:math><m:mn>1</m:mn></m:math>&#160;is recommended.  Otherwise, because for this routine the values of the output parameters may be useful even if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>&#8800;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;on exit, the recommended value is <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>.  <b>When the value <m:math><m:mrow><m:mo>-</m:mo><m:mn mathvariant="bold">1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>&#160;is used it is essential to test the value of <a class="arg" href="#IFAIL">IFAIL</a> on exit.</b></div>
</div><div class="paramtext">E04UFF/E04UFA returns with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;if the iterates have converged to a point <m:math><m:mi>x</m:mi></m:math>&#160;that satisfies the first-order Kuhn&#8211;Tucker conditions (see <a class="sec" href="#ad-overview">Section 10.1</a>) to the accuracy requested by the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_optimalitytolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Optimality Tolerance</m:mi></m:maction></m:math>. This has <m:math><m:mtext>default value</m:mtext><m:mo>=</m:mo><m:msubsup><m:mi>&#949;</m:mi><m:mi>r</m:mi><m:mn>0.8</m:mn></m:msubsup></m:math>, where <m:math><m:msub><m:mi>&#949;</m:mi><m:mi>r</m:mi></m:msub></m:math>&#160;is the value of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_functionprecision"><m:mi mathcolor="#800080;" mathvariant="bold">Function Precision</m:mi></m:maction></m:math>&#160;(<m:math><m:mtext>default value</m:mtext><m:mo>=</m:mo><m:msup><m:mi>&#949;</m:mi><m:mn>0.9</m:mn></m:msup></m:math>, where <m:math><m:mi>&#949;</m:mi></m:math>&#160;is the <span class="bitalic">machine precision</span>).  That is <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;when the projected gradient and active constraint residuals are negligible at <m:math><m:mi>x</m:mi></m:math>.</div>
<div class="paramtext">You should check whether the following four conditions are satisfied:
<table class="standard-90"><tr>
<td style="width:2.1em;" valign="baseline">(i)</td>
<td valign="top">the final value of <span class="mono">Norm Gz</span> (see <a class="sec" href="#fc-printedoutput">Section 8.1</a>) is significantly less than that at the starting point;</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(ii)</td>
<td valign="top">during the final major iterations, the values of <span class="mono">Step</span> and <span class="mono">Mnr</span> (see <a class="sec" href="#fc-printedoutput">Section 8.1</a>) are both one;</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(iii)</td>
<td valign="top">the last few values of both <span class="mono">Norm Gz</span> and <span class="mono">Violtn</span> (see <a class="sec" href="#fc-printedoutput">Section 8.1</a>) become small at a fast linear rate; and</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(iv)</td>
<td valign="top"><span class="mono">Cond Hz</span> (see <a class="sec" href="#fc-printedoutput">Section 8.1</a>) is small.</td>
</tr></table>
</div>
<div class="paramtext">If all these conditions hold, <m:math><m:mi>x</m:mi></m:math>&#160;is almost certainly a local minimum of <a class="eqn" href="#eqn1">(1)</a>.</div>
</dd><dd class="note"><b>Note:</b> <span class="italic"> the following are additional parameters for specific use with E04UFA.  Users of E04UFF therefore need not read the remainder of this description</span>.</dd><dt class="paramhead"><a name="CWSAV" id="CWSAV"/>25: &#8194; CWSAV(<m:math><m:mn>5</m:mn></m:math>) &#8211; CHARACTER*80 array<span class="pclass">Communication Array</span></dt><dt class="multi-paramhead"><a name="LWSAV" id="LWSAV"/>26: &#8194; LWSAV(<m:math><m:mn>120</m:mn></m:math>) &#8211; LOGICAL array<span class="pclass">Communication Array</span></dt><dt class="multi-paramhead"><a name="IWSAV" id="IWSAV"/>27: &#8194; IWSAV(<m:math><m:mn>610</m:mn></m:math>) &#8211; INTEGER array<span class="pclass">Communication Array</span></dt><dt class="multi-paramhead"><a name="RWSAV" id="RWSAV"/>28: &#8194; RWSAV(<m:math><m:mn>475</m:mn></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Communication Array</span></dt><dd><div class="paramtext">The arrays <a class="arg" href="#LWSAV">LWSAV</a>, <a class="arg" href="#IWSAV">IWSAV</a>, <a class="arg" href="#RWSAV">RWSAV</a> and <a class="arg" href="#CWSAV">CWSAV</a> <b>must not</b> be altered between calls to any of the routines <a class="rout" href="../E04/e04wbf.xml">E04WBF</a>, E04UFA, <a class="rout" href="../E04/e04udf.xml">E04UDA</a> or <a class="rout" href="../E04/e04uef.xml">E04UEA</a>.</div></dd><dt class="paramhead"><a name="IFAIL2" id="IFAIL2"/>29: &#8194; IFAIL &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><b>Note:</b> see the parameter description for <a class="arg" href="#IFAIL">IFAIL</a> above.</div></dd></dl><h2 class="standard"><a class="sec" name="errors" id="errors"/>6&#160;&#160;Error Indicators and Warnings</h2>
<div class="paramtext">If on entry <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">-1</m:mn></m:maction></m:math>, explanatory error messages are output on the current error message unit (as defined by <a class="rout" href="../X04/x04aaf.xml">X04AAF</a>).</div><div class="paramtext"><b>Note:</b> E04UFF/E04UFA may return useful information for one or more of the following detected errors or warnings.</div><div class="paramtext">Errors or warnings detected by the routine:</div>
<dl class="ifail">
<dt class="errorhead"><a name="IFlt0" id="IFlt0"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math></dt>
<dd>
<div class="paramtext">A negative value of <a class="arg" href="#IFAIL">IFAIL</a> indicates an exit from E04UFF/E04UFA because you set <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>&#160;during an intermediate exit.  The value of <a class="arg" href="#IFAIL">IFAIL</a> will be the same as your setting of <a class="arg" href="#IREVCM">IREVCM</a>.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq1" id="IFeq1"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd>
<div class="paramtext">The final iterate <m:math><m:mi>x</m:mi></m:math>&#160;satisfies the first-order Kuhn&#8211;Tucker conditions (see <a class="sec" href="#ad-overview">Section 10.1</a>) to the accuracy requested, but the sequence of iterates has not yet converged.  E04UFF/E04UFA was terminated because no further improvement could be made in the merit function (see <a class="sec" href="#fc-printedoutput">Section 8.1</a>).</div>
<div class="paramtext">This value of <a class="arg" href="#IFAIL">IFAIL</a> may occur in several circumstances.  The most common situation is that you ask for a solution with accuracy that is not attainable with the given precision of the problem (as specified by the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_functionprecision"><m:mi mathcolor="#800080;" mathvariant="bold">Function Precision</m:mi></m:maction></m:math>).  This condition will also occur if, by chance, an iterate is an &#8216;exact&#8217; Kuhn&#8211;Tucker point, but the change in the variables was significant at the previous iteration.  (This situation often happens when minimizing very simple functions, such as quadratics.)</div>
<div class="paramtext">If the four conditions listed in <a class="sec" href="#parameters">Section 5</a> for <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;are satisfied, <m:math><m:mi>x</m:mi></m:math>&#160;is likely to be a solution of <a class="eqn" href="#eqn1">(1)</a> even if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq1"><m:mn mathcolor="#003399" mathvariant="bold">1</m:mn></m:maction></m:math>.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq2" id="IFeq2"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd>
<div class="paramtext">E04UFF/E04UFA has terminated without finding a feasible point for the linear constraints and bounds, which means that either no feasible point exists for the given value of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_lf-tolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Linear Feasibility Tolerance</m:mi></m:maction></m:math>, or no feasible point could be found in the number of iterations specified by the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_minoriterationlimit"><m:mi mathcolor="#800080;" mathvariant="bold">Minor Iteration Limit</m:mi></m:maction></m:math>.  You should check that there are no constraint redundancies.  If the data for the constraints are accurate only to an absolute precision <m:math><m:mi>&#963;</m:mi></m:math>, you should ensure that the value of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_lf-tolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Linear Feasibility Tolerance</m:mi></m:maction></m:math>&#160;is greater than <m:math><m:mi>&#963;</m:mi></m:math>.  For example, if all elements of <m:math><m:msub><m:mi>A</m:mi><m:mi>L</m:mi></m:msub></m:math>&#160;are of order unity and are accurate to only three decimal places, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_lf-tolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Linear Feasibility Tolerance</m:mi></m:maction></m:math>&#160;should be at least <m:math><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>3</m:mn></m:mrow></m:msup></m:math>.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq3" id="IFeq3"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math></dt>
<dd>
<div class="paramtext">No feasible point could be found for the nonlinear constraints.  The problem may have no feasible solution.  This means that there has been a sequence of QP subproblems for which no feasible point could be found (indicated by <span class="mono">I</span> at the end of each line of intermediate printout produced by the major iterations; see <a class="sec" href="#fc-printedoutput">Section 8.1</a>).  This behaviour will occur if there is no feasible point for the nonlinear constraints.  (However, there is no general test that can determine whether a feasible point exists for a set of nonlinear constraints.)  If the infeasible subproblems occur from the very first major iteration, it is highly likely that no feasible point exists.  If infeasibilities occur when earlier subproblems have been feasible, small constraint inconsistencies may be present.  You should check the validity of constraints with negative values of <a class="arg" href="#ISTATE">ISTATE</a>.  If you are convinced that a feasible point does exist, E04UFF/E04UFA should be restarted at a different starting point.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq4" id="IFeq4"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>4</m:mn></m:math></dt>
<dd>
<div class="paramtext">The limiting number of iterations (as determined by the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_majoriterationlimit"><m:mi mathcolor="#800080;" mathvariant="bold">Major Iteration Limit</m:mi></m:maction></m:math>) has been reached.</div>
<div class="paramtext">If the algorithm appears to be making satisfactory progress, then optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_majoriterationlimit"><m:mi mathcolor="#800080;" mathvariant="bold">Major Iteration Limit</m:mi></m:maction></m:math>&#160;may be too small.  If so, either increase its value and rerun E04UFF/E04UFA or, alternatively, rerun E04UFF/E04UFA using the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_warmstart"><m:mi mathcolor="#800080;" mathvariant="bold">Warm Start</m:mi></m:maction></m:math>.  If the algorithm seems to be making little or no progress however, then you should check for incorrect gradients or ill-conditioning as described under <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq6"><m:mn mathcolor="#003399" mathvariant="bold">6</m:mn></m:maction></m:math>.</div>
<div class="paramtext">Note that ill-conditioning in the working set is sometimes resolved automatically by the algorithm, in which case performing additional iterations may be helpful.  However, ill-conditioning in the Hessian approximation tends to persist once it has begun, so that allowing additional iterations without altering <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#R"><m:mi mathcolor="#EE0000" mathvariant="bold">R</m:mi></m:maction></m:math>&#160;is usually inadvisable.  If the quasi-Newton update of the Hessian approximation was reset during the latter major iterations (i.e., an <span class="mono"><a class="arg" href="#R">R</a></span> occurs at the end of each line of intermediate printout; see <a class="sec" href="#fc-printedoutput">Section 8.1</a>), it may be worthwhile to try a <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_warmstart"><m:mi mathcolor="#800080;" mathvariant="bold">Warm Start</m:mi></m:maction></m:math>&#160;at the final point as suggested above.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq5" id="IFeq5"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>5</m:mn></m:math></dt>
<dd><div class="paramtext">
Not used by this routine.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq6" id="IFeq6"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>6</m:mn></m:math></dt>
<dd>
<div class="paramtext"><m:math><m:mi>x</m:mi></m:math>&#160;does not satisfy the first-order Kuhn&#8211;Tucker conditions (see <a class="sec" href="#ad-overview">Section 10.1</a>), and no improved point for the merit function (see <a class="sec" href="#fc-printedoutput">Section 8.1</a>) could be found during the final linesearch.</div>
<div class="paramtext">This sometimes occurs because an overly stringent accuracy has been requested, i.e., the value of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_optimalitytolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Optimality Tolerance</m:mi></m:maction></m:math>&#160;(<m:math><m:mtext>default value</m:mtext><m:mo>=</m:mo><m:msubsup><m:mi>&#949;</m:mi><m:mi>r</m:mi><m:mn>0.8</m:mn></m:msubsup></m:math>, where <m:math><m:msub><m:mi>&#949;</m:mi><m:mi>r</m:mi></m:msub></m:math>&#160;is the value of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_functionprecision"><m:mi mathcolor="#800080;" mathvariant="bold">Function Precision</m:mi></m:maction></m:math>) is too small.  In this case you should apply the four tests described under <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;to determine whether or not the final solution is acceptable (see <a class="ref" href="#ref079">Gill <span class="italic">et al.</span> (1981)</a>, for a discussion of the attainable accuracy).</div>
<div class="paramtext">If many iterations have occurred in which essentially no progress has been made and E04UFF/E04UFA has failed completely to move from the initial point, then values set by the calling program for the objective or constraint functions or their derivatives during intermediate exits may be incorrect.  You should refer to comments under <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq7"><m:mn mathcolor="#003399" mathvariant="bold">7</m:mn></m:maction></m:math>&#160;and check the gradients using the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verify"><m:mi mathcolor="#800080;" mathvariant="bold">Verify</m:mi></m:maction></m:math>.  Unfortunately, there may be small errors in the objective and constraint gradients that cannot be detected by the verification process.  Finite difference approximations to first derivatives are catastrophically affected by even small inaccuracies.  An indication of this situation is a dramatic alteration in the iterates if the finite difference interval is altered.  One might also suspect this type of error if a switch is made to central differences even when <span class="mono">Norm Gz</span> and <span class="mono">Violtn</span> (see <a class="sec" href="#fc-printedoutput">Section 8.1</a>) are large.</div>
<div class="paramtext">Another possibility is that the search direction has become inaccurate because of ill-conditioning in the Hessian approximation or the matrix of constraints in the working set; either form of ill-conditioning tends to be reflected in large values of <span class="mono">Mnr</span> (the number of iterations required to solve each QP subproblem; see <a class="sec" href="#fc-printedoutput">Section 8.1</a>).</div>
<div class="paramtext">If the condition estimate of the projected Hessian (<span class="mono">Cond Hz</span>; see <a class="sec" href="#fc-printedoutput">Section 8.1</a>) is extremely large, it may be worthwhile rerunning E04UFF/E04UFA from the final point with the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_warmstart"><m:mi mathcolor="#800080;" mathvariant="bold">Warm Start</m:mi></m:maction></m:math>.  In this situation, <a class="arg" href="#ISTATE">ISTATE</a> and <a class="arg" href="#CLAMDA">CLAMDA</a> should be left unaltered and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#R"><m:mi mathcolor="#EE0000" mathvariant="bold">R</m:mi></m:maction></m:math>&#160;should be reset to the identity matrix.</div>
<div class="paramtext">If the matrix of constraints in the working set is ill-conditioned (i.e., <span class="mono">Cond T</span> is extremely large; see <a class="sec" href="#monitoring">Section 12</a>), it may be helpful to run E04UFF/E04UFA with a relaxed value of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_feasibilitytolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Feasibility Tolerance</m:mi></m:maction></m:math>.  (Constraint dependencies are often indicated by wide variations in size in the diagonal elements of the matrix <m:math><m:mi>T</m:mi></m:math>, whose diagonals will be printed if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_majorprintlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Major Print Level</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>30</m:mn></m:math>.)</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq7" id="IFeq7"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>7</m:mn></m:math></dt>
<dd>
<div class="paramtext">The user-supplied derivatives of the objective function and/or nonlinear constraints appear to be incorrect.</div>
<div class="paramtext">Large errors were found in the derivatives of the objective function and/or nonlinear constraints.  This value of <a class="arg" href="#IFAIL">IFAIL</a> will occur if the verification process indicated that at least one gradient or Jacobian element had no correct figures.  You should refer to the printed output to determine which elements are suspected to be in error.</div>
<div class="paramtext">As a first-step, you should check that the code for the objective and constraint values is correct &#8211; for example, by computing the function at a point where the correct value is known.  However, care should be taken that the chosen point fully tests the evaluation of the function.  It is remarkable how often the values <m:math><m:mi>x</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math><m:mi>x</m:mi><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;are used in such a test, and how often the special properties of these numbers make the test meaningless.</div>
<div class="paramtext">Special care should be used in the test if computation of the objective function involves subsidiary data communicated in COMMON storage.  Although the first evaluation of the function may be correct, subsequent calculations may be in error because some of the subsidiary data has accidentally been overwritten.</div>
<div class="paramtext">Gradient checking will be ineffective if the objective function uses information computed by the constraints, since they are not necessarily computed before each function evaluation.</div>
<div class="paramtext">Errors in programming the function may be quite subtle in that the function value is &#8216;almost&#8217; correct.  For example, the function may not be accurate to full precision because of the inaccurate calculation of a subsidiary quantity, or the limited accuracy of data upon which the function depends.  A common error on machines where numerical calculations are usually performed in double precision is to include even one single precision constant in the calculation of the function; since some compilers do not convert such constants to double precision, half the correct figures may be lost by such a seemingly trivial error.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq8" id="IFeq8"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>8</m:mn></m:math></dt>
<dd><div class="paramtext">
Not used by this routine.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq9" id="IFeq9"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>9</m:mn></m:math></dt>
<dd><div class="paramtext">
An input parameter is invalid.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="Overflow" id="Overflow"/><m:math><m:mtext mathvariant="bold">Overflow</m:mtext></m:math></dt>
<dd><div class="paramtext">
If the printed output before the overflow error contains a warning about serious ill-conditioning in the working set when adding the <m:math><m:mi>j</m:mi></m:math>th constraint, it may be possible to avoid the difficulty by increasing the magnitude of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_lf-tolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Linear Feasibility Tolerance</m:mi></m:maction></m:math>&#160;and/or the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_nonlf-tolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Nonlinear Feasibility Tolerance</m:mi></m:maction></m:math>&#160;and rerunning the program.  If the message recurs even after this change then the offending linearly dependent constraint (with index &#8216;<m:math><m:mi>j</m:mi></m:math>&#8217;) must be removed from the problem.  If overflow occurs in one of the user-supplied subroutines (e.g., if the nonlinear functions involve exponentials or singularities), it may help to specify tighter bounds for some of the variables (i.e., reduce the gap between the appropriate <m:math><m:msub><m:mi>l</m:mi><m:mi>j</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>u</m:mi><m:mi>j</m:mi></m:msub></m:math>).</div>
</dd>
</dl><h2 class="standard"><a class="sec" name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2>
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;on final exit then the vector returned in the array <a class="arg" href="#X">X</a> is an estimate of the solution to an accuracy of approximately <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_optimalitytolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Optimality Tolerance</m:mi></m:maction></m:math>&#160;(<m:math><m:mtext>default value</m:mtext><m:mo>=</m:mo><m:msup><m:mi>&#949;</m:mi><m:mn>0.8</m:mn></m:msup></m:math>, where <m:math><m:mi>&#949;</m:mi></m:math>&#160;is the <span class="bitalic">machine precision</span>).</div><h2 class="standard"><a class="sec" name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2><h3 class="standard"><a class="sec" name="fc-printedoutput" id="fc-printedoutput"/>8.1&#160;&#160;Description of the Printed Output</h3>
<div class="paramtext">This section describes the intermediate printout and final printout produced by E04UFF/E04UFA.  The intermediate printout is a subset of the monitoring information produced by E04UFF/E04UFA at every iteration (see <a class="sec" href="#monitoring">Section 12</a>).  You can control the level of printed output (see the description of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_majorprintlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Major Print Level</m:mi></m:maction></m:math>).  Note that the intermediate printout and final printout are produced only if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_majorprintlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Major Print Level</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>10</m:mn></m:math>&#160;(the default for E04UFF, by default no output is produced by E04UFA).</div><div class="paramtext">The following line of summary output (<m:math><m:mtext/><m:mo>&lt;</m:mo><m:mn>80</m:mn></m:math>&#160;characters) is produced at every major iteration.  In all cases, the values of the quantities printed are those in effect <span class="italic">on completion</span> of the given iteration.
<table class="standard-100"><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Maj</span></td>
<td valign="top">
is the major iteration count.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Mnr</span></td>
<td valign="top">

is the number of minor iterations required by the feasibility and optimality phases of the QP subproblem.  Generally, <span class="mono">Mnr</span> will be <m:math><m:mn>1</m:mn></m:math>&#160;in the later iterations, since theoretical analysis predicts that the correct active set will be identified near the solution
 (see <a class="sec" href="#algdetails">Section 10</a>).  <div class="paramtext">
Note that <span class="mono">Mnr</span> may be greater than the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_minoriterationlimit"><m:mi mathcolor="#800080;" mathvariant="bold">Minor Iteration Limit</m:mi></m:maction></m:math>&#160;if some iterations are required for the feasibility phase.</div>
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Step</span></td>
<td valign="top">
is the step <m:math><m:msub><m:mi>&#945;</m:mi><m:mi>k</m:mi></m:msub></m:math>&#160;taken along the computed search direction.  On reasonably well-behaved problems, the unit step (i.e., <m:math><m:msub><m:mi>&#945;</m:mi><m:mi>k</m:mi></m:msub><m:mo>=</m:mo><m:mn>1</m:mn></m:math>) will be taken as the solution is approached.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Merit Function</span></td>
<td valign="top">

is the value of the augmented Lagrangian merit function <a class="eqn" href="#eqnlmf">(12)</a> at the current iterate.  This function will decrease at each iteration unless it was necessary to increase the penalty parameters
 (see <a class="sec" href="#ad-meritfunction">Section 10.3</a>).  
As the solution is approached, <span class="mono">Merit Function</span> will converge to the value of the objective function at the solution.
 <div class="paramtext">

If the QP subproblem does not have a feasible point (signified by <span class="mono">I</span> at the end of the current output line) then the merit function is a large multiple of the constraint violations, weighted by the penalty parameters.  During a sequence of major iterations with infeasible subproblems, the sequence of <span class="mono">Merit Function</span> values will decrease monotonically until either a feasible subproblem is obtained or E04UFF/E04UFA terminates with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq3"><m:mn mathcolor="#003399" mathvariant="bold">3</m:mn></m:maction></m:math>&#160;(no feasible point could be found for the nonlinear constraints).</div>
<div class="paramtext">If there are no nonlinear constraints present (i.e., <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>) then this entry contains <span class="mono">Objective</span>, the value of the objective function <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>.  The objective function will decrease monotonically to its optimal value when there are no nonlinear constraints.</div>
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Norm Gz</span></td>
<td valign="top">

is <m:math><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:msub><m:mi>g</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:mfenced></m:math>, the Euclidean norm of the projected gradient
 (see <a class="sec" href="#ad-QPS">Section 10.2</a>).  
<span class="mono">Norm Gz</span> will be approximately zero in the neighbourhood of a solution.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Violtn</span></td>
<td valign="top">
is the Euclidean norm of the residuals of constraints that are violated or in the predicted active set (not printed if <a class="arg" href="#NCNLN">NCNLN</a> is zero).  <span class="mono">Violtn</span> will be approximately zero in the neighbourhood of a solution.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Cond Hz</span></td>
<td valign="top">
is a lower bound on the condition number of the projected Hessian approximation <m:math>
 <m:msub><m:mi>H</m:mi><m:mi>Z</m:mi></m:msub>
</m:math>&#160;(<m:math>
 <m:msub><m:mi>H</m:mi><m:mi>Z</m:mi></m:msub>
 <m:mo>=</m:mo>
 <m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:msub><m:mi>H</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub>
 <m:mi>Z</m:mi>
 <m:mo>=</m:mo>
 <m:msubsup><m:mi>R</m:mi><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub>
</m:math>; see <a class="eqn" href="#eqn6">(6)</a>).  The larger this number, the more difficult the problem.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">M</span></td>
<td valign="top">

is printed if the quasi-Newton update has been modified to ensure that the Hessian approximation is positive-definite
 (see <a class="sec" href="#ad-quasinewton">Section 10.4</a>).
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">I</span></td>
<td valign="top">
is printed if the QP subproblem has no feasible point.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">C</span></td>
<td valign="top">


is printed if central differences have been used to compute the unspecified objective and constraint gradients.  If the value of <span class="mono">Step</span> is zero then the switch to central differences was made because no lower point could be found in the linesearch.  (In this case, the QP subproblem is resolved with the central difference gradient and Jacobian.) If the value of <span class="mono">Step</span> is nonzero then central differences were computed because <span class="mono">Norm Gz</span> and <span class="mono">Violtn</span> imply that <m:math><m:mi>x</m:mi></m:math>&#160;is close to a Kuhn&#8211;Tucker point
 (see <a class="sec" href="#ad-overview">Section 10.1</a>).

</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">L</span></td>
<td valign="top">
is printed if the linesearch has produced a relative change in <m:math><m:mi>x</m:mi></m:math>&#160;greater than the value defined by the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_steplimit"><m:mi mathcolor="#800080;" mathvariant="bold">Step Limit</m:mi></m:maction></m:math>.  If this output occurs frequently during later iterations of the run, optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_steplimit"><m:mi mathcolor="#800080;" mathvariant="bold">Step Limit</m:mi></m:maction></m:math>&#160;should be set to a larger value.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">R</span></td>
<td valign="top">
is printed if the approximate Hessian has been refactorized.  If the diagonal condition estimator of <m:math><m:mi>R</m:mi></m:math>&#160;indicates that the approximate Hessian is badly conditioned then the approximate Hessian is refactorized using column interchanges.  If necessary, <m:math><m:mi>R</m:mi></m:math>&#160;is modified so that its diagonal condition estimator is bounded.
</td>
</tr></table>
</div><div class="paramtext">The final printout includes a listing of the status of every variable and constraint.</div><div class="paramtext">The following describes the printout for each variable.  A full stop (.)  is printed for any numerical value that is zero.
<table class="standard-100"><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Varbl</span></td>
<td valign="top">
gives the name (<span class="mono">V</span>) and index <m:math><m:mi>j</m:mi></m:math>, for <m:math><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>n</m:mi></m:math>, of the variable.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">State</span></td>
<td valign="top">
gives the state of the variable (<span class="mono">FR</span> if neither bound is in the working set, <span class="mono">EQ</span> if a fixed variable, <span class="mono">LL</span> if on its lower bound, <span class="mono">UL</span> if on its upper bound, <span class="mono">TF</span> if temporarily fixed at its current value).  If <span class="mono">Value</span> lies outside the upper or lower bounds by more than the <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_feasibilitytolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Feasibility Tolerance</m:mi></m:maction></m:math>, <span class="mono">State</span> will be <span class="mono">++</span> or <span class="mono">--</span> respectively.

 <div class="paramtext">
A key is sometimes printed before <span class="mono">State</span>.

 <table class="standard-100"><tr>
<td style="width:3.0em;" valign="baseline"><span class="mono">A</span></td>
<td valign="top">
<span class="italic">Alternative optimum possible</span>.  The variable is active at one of its bounds, but its Lagrange multiplier is essentially zero.  This means that if the variable were allowed to start moving away from its bound then there would be no change to the objective function.  The values of the other free variables <span class="italic">might</span> change, giving a genuine alternative solution.  However, if there are any degenerate variables (labelled <span class="mono">D</span>), the actual change might prove to be zero, since one of them could encounter a bound immediately.  In either case the values of the Lagrange multipliers might also change.
</td>
</tr><tr>
<td style="width:3.0em;" valign="baseline"><span class="mono">D</span></td>
<td valign="top">
<span class="italic">Degenerate</span>.  The variable is free, but it is equal to (or very close to) one of its bounds.
</td>
</tr><tr>
<td style="width:3.0em;" valign="baseline"><span class="mono">I</span></td>
<td valign="top">
<span class="italic">Infeasible</span>.  The variable is currently violating one of its bounds by more than the <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_feasibilitytolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Feasibility Tolerance</m:mi></m:maction></m:math>.
</td>
</tr></table>
 </div></td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Value</span></td>
<td valign="top">
is the value of the variable at the final iteration.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Lower Bound</span></td>
<td valign="top">
is the lower bound specified for the variable.  <span class="mono">None</span> indicates that <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:mo>-</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Upper Bound</span></td>
<td valign="top">
is the upper bound specified for the variable.  <span class="mono">None</span> indicates that <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>&#8805;</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Lagr Mult</span></td>
<td valign="top">
is the Lagrange multiplier for the associated bound.  This will be zero if <span class="mono">State</span> is <span class="mono">FR</span> unless <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:mo>-</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>&#8805;</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>, in which case the entry will be blank.  If <m:math><m:mi>x</m:mi></m:math>&#160;is optimal, the multiplier should be non-negative if <span class="mono">State</span> is <span class="mono">LL</span> and nonpositive if <span class="mono">State</span> is <span class="mono">UL</span>.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Slack</span></td>
<td valign="top">
is the difference between the variable <span class="mono">Value</span> and the nearer of its (finite) bounds <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>.  A blank entry indicates that the associated variable is not bounded (i.e., <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:mo>-</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>&#8805;</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>).
</td>
</tr></table>
</div><div class="paramtext">The meaning of the printout for linear and nonlinear constraints is the same as that given above for variables, with &#8216;variable&#8217; replaced by &#8216;constraint&#8217;, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;replaced by <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mrow><m:mi>n</m:mi><m:mo>+</m:mo><m:mi>j</m:mi></m:mrow></m:mfenced></m:mrow></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mrow><m:mi>n</m:mi><m:mo>+</m:mo><m:mi>j</m:mi></m:mrow></m:mfenced></m:mrow></m:math>&#160;respectively and with the following changes in the heading:
<table class="standard-100"><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">L Con</span></td>
<td valign="top">
gives the name (<span class="mono">L</span>) and index <m:math><m:mi>j</m:mi></m:math>, for <m:math><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub></m:math>, of the linear constraint.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">N Con</span></td>
<td valign="top">
gives the name (<span class="mono">N</span>) and index (<m:math><m:mi>j</m:mi><m:mo>-</m:mo><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub></m:math>), for <m:math><m:mi>j</m:mi><m:mo>=</m:mo><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub><m:mo>+</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub><m:mo>+</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub><m:mo>+</m:mo><m:msub><m:mi>n</m:mi><m:mi>N</m:mi></m:msub></m:math>, of the nonlinear constraint.
</td>
</tr></table>
</div><div class="paramtext">Note that movement off a constraint (as opposed to a variable moving away from its bound) can be interpreted as allowing the entry in the <span class="mono">Slack</span> column to become positive.</div><div class="paramtext">Numerical values are output with a fixed number of digits; they are not guaranteed to be accurate to this precision.</div><h2 class="standard"><a class="sec" name="example" id="example"/>9&#160;&#160;Example</h2>
<div class="paramtext">This is based on Problem 71 in <a class="ref" href="#ref095">Murtagh and Saunders (1983)</a> and involves the minimization of the nonlinear function

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:msub><m:mi>x</m:mi><m:mn>4</m:mn></m:msub><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>+</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>+</m:mo><m:msub><m:mi>x</m:mi><m:mn>3</m:mn></m:msub></m:mfenced><m:mo>+</m:mo><m:msub><m:mi>x</m:mi><m:mn>3</m:mn></m:msub>
</m:math></td><td class="formula2"/></tr></table></div>

subject to the bounds

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mtable>
 <m:mtr>
  <m:mtd><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>&#8804;</m:mo> <m:mn>5</m:mn></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>&#8804;</m:mo> <m:mn>5</m:mn></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:msub><m:mi>x</m:mi><m:mn>3</m:mn></m:msub><m:mo>&#8804;</m:mo> <m:mn>5</m:mn></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:msub><m:mi>x</m:mi><m:mn>4</m:mn></m:msub><m:mo>&#8804;</m:mo> <m:mn>5</m:mn></m:mtd>
 </m:mtr>
</m:mtable>
</m:math></td><td class="formula2"/></tr></table></div>

to the general linear constraint

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>+</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>+</m:mo><m:msub><m:mi>x</m:mi><m:mn>3</m:mn></m:msub><m:mo>+</m:mo><m:msub><m:mi>x</m:mi><m:mn>4</m:mn></m:msub><m:mo>&#8804;</m:mo><m:mn>20</m:mn><m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

and to the nonlinear constraints

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mtable>
 <m:mtr>
  <m:mtd><m:msubsup><m:mi>x</m:mi><m:mn>1</m:mn><m:mn>2</m:mn></m:msubsup><m:mo>+</m:mo><m:msubsup><m:mi>x</m:mi><m:mn>2</m:mn><m:mn>2</m:mn></m:msubsup><m:mo>+</m:mo><m:msubsup><m:mi>x</m:mi><m:mn>3</m:mn><m:mn>2</m:mn></m:msubsup><m:mo>+</m:mo><m:msubsup><m:mi>x</m:mi><m:mn>4</m:mn><m:mn>2</m:mn></m:msubsup><m:mo>&#8804;</m:mo> <m:mn>40</m:mn><m:mtext>,</m:mtext></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:msub><m:mi>x</m:mi><m:mn>3</m:mn></m:msub><m:msub><m:mi>x</m:mi><m:mn>4</m:mn></m:msub><m:mo>&#8805;</m:mo> <m:mn>25</m:mn><m:mtext>.</m:mtext></m:mtd>
 </m:mtr>
</m:mtable>
</m:math></td><td class="formula2"/></tr></table></div>

The initial point, which is infeasible, is

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msub><m:mi>x</m:mi><m:mn>0</m:mn></m:msub><m:mo>=</m:mo><m:msup><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>5</m:mn><m:mo>,</m:mo><m:mn>5</m:mn><m:mo>,</m:mo><m:mn>1</m:mn></m:mfenced><m:mi mathvariant="normal">T</m:mi></m:msup><m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

and <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mn>0</m:mn></m:msub></m:mfenced><m:mo>=</m:mo><m:mn>16</m:mn></m:math>.</div><div class="paramtext">The optimal solution (to five figures) is

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msup><m:mi>x</m:mi><m:mo>*</m:mo></m:msup><m:mo>=</m:mo><m:msup><m:mfenced separators=""><m:mn>1.0</m:mn><m:mo>,</m:mo><m:mn>4.7430</m:mn><m:mo>,</m:mo><m:mn>3.8211</m:mn><m:mo>,</m:mo><m:mn>1.3794</m:mn></m:mfenced><m:mi mathvariant="normal">T</m:mi></m:msup><m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

and <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:msup><m:mi>x</m:mi><m:mo>*</m:mo></m:msup></m:mfenced><m:mo>=</m:mo><m:mn>17.014</m:mn></m:math>.  One bound constraint and both nonlinear constraints are active at the solution.</div><h3 class="standard"><a class="sec" name="examtext" id="examtext"/>9.1&#160;&#160;Program Text</h3>
<div class="paramtext"><b>Note:</b> <span class="italic">the following programs illustrate the use of E04UFF and E04UFA</span>.</div><p><a class="verbatimref" href="../../examples/source/e04uffe.f">Program Text (e04uffe.f)</a></p><p><a class="verbatimref" href="../../examples/source/e04ufae.f">Program Text (e04ufae.f)</a></p><h3 class="standard"><a class="sec" name="examdata" id="examdata"/>9.2&#160;&#160;Program Data</h3>
<p><a class="verbatimref" href="../../examples/data/e04uffe.d">Program&#160;Data (e04uffe.d)</a></p><p><a class="verbatimref" href="../../examples/data/e04ufae.d">Program&#160;Data (e04ufae.d)</a></p><h3 class="standard"><a class="sec" name="examresults" id="examresults"/>9.3&#160;&#160;Program Results</h3>
<p><a class="verbatimref" href="../../examples/baseresults/e04uffe.r">Program Results (e04uffe.r)</a></p><p><a class="verbatimref" href="../../examples/baseresults/e04ufae.r">Program Results (e04ufae.r)</a></p>
<div class="paramtext"><b>Note:</b> <span class="italic">the remainder of this document is intended for more advanced users.  <a class="sec" href="#algdetails">Section 10</a> contains a detailed description of the algorithm which may be needed in order to understand <a class="sec" href="#optparams">Sections 11</a> and <a class="sec" href="#monitoring">12</a>.  <a class="sec" href="#optparams">Section 11</a> describes the optional parameters which may be set by calls to <a class="rout" href="../E04/e04udf.xml">E04UDF/E04UDA</a> and/or <a class="rout" href="../E04/e04uef.xml">E04UEF/E04UEA</a>.  <a class="sec" href="#monitoring">Section 12</a> describes the quantities which can be requested to monitor the course of the computation</span>.</div><h2 class="standard"><a class="sec" name="algdetails" id="algdetails"/>10&#160;&#160;Algorithmic Details</h2>
<div class="paramtext">This section contains a detailed description of the method used by E04UFF/E04UFA.</div><h3 class="standard"><a class="sec" name="ad-overview" id="ad-overview"/>10.1&#160;&#160;Overview</h3>
<div class="paramtext">E04UFF/E04UFA is essentially identical to the subroutine NPSOL described in <a class="ref" href="#ref540">Gill <span class="italic">et al.</span> (1986b)</a>.</div><div class="paramtext">At a solution of <a class="eqn" href="#eqn1">(1)</a>, some of the constraints will be <span class="italic">active</span>, i.e., satisfied exactly.  An active simple bound constraint implies that the corresponding variable is <span class="italic">fixed</span> at its bound, and hence the variables are partitioned into <span class="italic">fixed</span> and <span class="italic">free</span> variables.  Let <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction></m:math>&#160;denote the <m:math><m:mi>m</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;matrix of gradients of the active general linear and nonlinear constraints.  The number of fixed variables will be denoted by <m:math>
 <m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FX</m:mi></m:msub>
</m:math>, with <m:math>
 <m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub>
</m:math>&#160;(<m:math>
 <m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub>
 <m:mo>=</m:mo>
 <m:mi>n</m:mi><m:mo>-</m:mo><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FX</m:mi></m:msub>
</m:math>) the number of free variables.  The subscripts &#8216;FX&#8217; and &#8216;FR&#8217; on a vector or matrix will denote the vector or matrix composed of the elements corresponding to fixed or free variables.</div><div class="paramtext">A point <m:math><m:mi>x</m:mi></m:math>&#160;is a <span class="italic">first-order Kuhn&#8211;Tucker point</span> for <a class="eqn" href="#eqn1">(1)</a> (see <a class="ref" href="#ref096">Powell (1974)</a>) if the following conditions hold:
<table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline">(i)</td>
<td valign="top"><m:math><m:mi>x</m:mi></m:math>&#160;is feasible;</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(ii)</td>
<td valign="top">there exist vectors <m:math><m:mi>&#958;</m:mi></m:math>&#160;and <m:math><m:mi>&#955;</m:mi></m:math>&#160;(<span class="italic">the Lagrange multiplier vectors for the bound and general constraints</span>) such that

<div class="formula-eqn"><a name="eqn2" id="eqn2"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:mi>g</m:mi><m:mo>=</m:mo><m:msup><m:mi>C</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>&#955;</m:mi><m:mo>+</m:mo><m:mi>&#958;</m:mi>
</m:math></td><td class="formula-eqn2">
      (2)
     </td></tr></table></div>

where <m:math><m:mi>g</m:mi></m:math>&#160;is the gradient of <m:math><m:mi>F</m:mi></m:math>&#160;evaluated at <m:math><m:mi>x</m:mi></m:math>&#160;and <m:math><m:msub><m:mi>&#958;</m:mi><m:mi>j</m:mi></m:msub><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;if the <m:math><m:mi>j</m:mi></m:math>th variable is free.</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(iii)</td>
<td valign="top">the Lagrange multiplier corresponding to an inequality constraint active at its lower bound must be non-negative. It is nonpositive for an inequality constraint active at its upper bound.</td>
</tr></table>
</div><div class="paramtext">Let <m:math><m:mi>Z</m:mi></m:math>&#160;denote a matrix whose columns form a basis for the set of vectors orthogonal to the rows of <m:math><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>; i.e., <m:math><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><m:mi>Z</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math>.  An equivalent statement of the condition <a class="eqn" href="#eqn2">(2)</a> in terms of <m:math><m:mi>Z</m:mi></m:math>&#160;is

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:msub><m:mi>g</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><m:mo>=</m:mo><m:mn>0</m:mn><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

The vector <m:math><m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:msub><m:mi>g</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;is termed the <span class="italic">projected gradient</span> of <m:math><m:mi>F</m:mi></m:math>&#160;at <m:math><m:mi>x</m:mi></m:math>.  Certain additional conditions must be satisfied in order for a first-order Kuhn&#8211;Tucker point to be a solution of <a class="eqn" href="#eqn1">(1)</a> (see <a class="ref" href="#ref096">Powell (1974)</a>).</div><div class="paramtext">E04UFF/E04UFA implements a sequential quadratic programming (SQP) method.  For an overview of SQP methods, see <a class="ref" href="#ref224">Fletcher (1987)</a>, <a class="ref" href="#ref079">Gill <span class="italic">et al.</span> (1981)</a> and <a class="ref" href="#ref097">Powell (1983)</a>.</div><div class="paramtext">The basic structure of E04UFF/E04UFA involves <span class="italic">major</span> and <span class="italic">minor</span> iterations.  The major iterations generate a sequence of iterates <m:math><m:mfenced open="{" close="}" separators=""><m:msub><m:mi>x</m:mi><m:mi>k</m:mi></m:msub></m:mfenced></m:math>&#160;that converge to <m:math><m:msup><m:mi>x</m:mi><m:mo>*</m:mo></m:msup></m:math>, a first-order Kuhn&#8211;Tucker point of <a class="eqn" href="#eqn1">(1)</a>.  At a typical major iteration, the new iterate <m:math><m:mover><m:mi>x</m:mi><m:mo>-</m:mo></m:mover></m:math>&#160;is defined by

<div class="formula-eqn"><a name="eqn3" id="eqn3"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:mover><m:mi>x</m:mi><m:mo>-</m:mo></m:mover><m:mo>=</m:mo><m:mi>x</m:mi><m:mo>+</m:mo><m:mi>&#945;</m:mi><m:mi>p</m:mi>
</m:math></td><td class="formula-eqn2">
      (3)
     </td></tr></table></div>

where <m:math><m:mi>x</m:mi></m:math>&#160;is the current iterate, the non-negative scalar <m:math><m:mi>&#945;</m:mi></m:math>&#160;is the <span class="italic">step length,</span> and <m:math><m:mi>p</m:mi></m:math>&#160;is the <span class="italic">search direction.</span> (For simplicity, we shall always consider a typical iteration and avoid reference to the index of the iteration.)  Also associated with each major iteration are estimates of the Lagrange multipliers and a prediction of the active set.</div><div class="paramtext">The search direction <m:math><m:mi>p</m:mi></m:math>&#160;in <a class="eqn" href="#eqn3">(3)</a> is the solution of a quadratic programming subproblem of the form

<div class="formula-eqn"><a name="eqn4" id="eqn4"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
 <m:munder><m:mi mathvariant="normal">Minimize</m:mi><m:mi>p</m:mi></m:munder><m:mspace width="0.25em"/>
 <m:msup><m:mi>g</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:mi>p</m:mi><m:mo>+</m:mo>
 <m:mfrac other="small"><m:mn>1</m:mn><m:mn>2</m:mn></m:mfrac>
 <m:msup><m:mi>p</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:mi>H</m:mi>
 <m:mi>p</m:mi>
 <m:mtext>&#8195; subject to &#8195;</m:mtext>
 <m:mover><m:mi>l</m:mi><m:mo>-</m:mo></m:mover>
 <m:mo>&#8804;</m:mo>
 <m:mfenced open="{" close="}" separators="">
  <m:mtable>
   <m:mtr>
    <m:mtd><m:mi>p</m:mi></m:mtd>
   </m:mtr><m:mtr>
    <m:mtd><m:msub><m:mi>A</m:mi><m:mi>L</m:mi></m:msub><m:mi>p</m:mi></m:mtd>
   </m:mtr><m:mtr>
    <m:mtd><m:msub><m:mi>A</m:mi><m:mi>N</m:mi></m:msub><m:mi>p</m:mi></m:mtd>
   </m:mtr>
  </m:mtable>
 </m:mfenced>
 <m:mo>&#8804;</m:mo>
 <m:mover><m:mi>u</m:mi><m:mo>-</m:mo></m:mover>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (4)
     </td></tr></table></div>

where <m:math><m:mi>g</m:mi></m:math>&#160;is the gradient of <m:math><m:mi>F</m:mi></m:math>&#160;at <m:math><m:mi>x</m:mi></m:math>, the matrix <m:math><m:mi>H</m:mi></m:math>&#160;is a positive-definite quasi-Newton approximation to the Hessian of the Lagrangian function (see <a class="sec" href="#ad-quasinewton">Section 10.4</a>), and <m:math><m:msub><m:mi>A</m:mi><m:mi>N</m:mi></m:msub></m:math>&#160;is the Jacobian matrix of <m:math><m:mi>c</m:mi></m:math>&#160;evaluated at <m:math><m:mi>x</m:mi></m:math>.  (Finite difference estimates may be used for <m:math><m:mi>g</m:mi></m:math>&#160;and <m:math><m:msub><m:mi>A</m:mi><m:mi>N</m:mi></m:msub></m:math>; see the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_derivativelevel"><m:mi mathcolor="#800080;" mathvariant="bold">Derivative Level</m:mi></m:maction></m:math>.)  Let <m:math><m:mi>l</m:mi></m:math>&#160;in <a class="eqn" href="#eqn1">(1)</a> be partitioned into three sections: <m:math><m:msub><m:mi>l</m:mi><m:mi>B</m:mi></m:msub></m:math>, <m:math><m:msub><m:mi>l</m:mi><m:mi>L</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>l</m:mi><m:mi>N</m:mi></m:msub></m:math>, corresponding to the bound, linear and nonlinear constraints.  The vector <m:math><m:mover><m:mi>l</m:mi><m:mo>-</m:mo></m:mover></m:math>&#160;in <a class="eqn" href="#eqn4">(4)</a> is similarly partitioned and is defined as

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msub><m:mover><m:mi>l</m:mi><m:mo>-</m:mo></m:mover><m:mi>B</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>l</m:mi><m:mi>B</m:mi></m:msub><m:mo>-</m:mo><m:mi>x</m:mi><m:mtext>, &#8195;</m:mtext><m:msub><m:mover><m:mi>l</m:mi><m:mo>-</m:mo></m:mover><m:mi>L</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>l</m:mi><m:mi>L</m:mi></m:msub><m:mo>-</m:mo><m:msub><m:mi>A</m:mi><m:mi>L</m:mi></m:msub><m:mi>x</m:mi><m:mtext>, &#8195; and &#8195;</m:mtext><m:msub><m:mover><m:mi>l</m:mi><m:mo>-</m:mo></m:mover><m:mi>N</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>l</m:mi><m:mi>N</m:mi></m:msub><m:mo>-</m:mo><m:mi>c</m:mi><m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:mi>c</m:mi></m:math>&#160;is the vector of nonlinear constraints evaluated at <m:math><m:mi>x</m:mi></m:math>.  The vector <m:math><m:mover><m:mi>u</m:mi><m:mo>-</m:mo></m:mover></m:math>&#160;is defined in an analogous fashion.</div><div class="paramtext">The estimated Lagrange multipliers at each major iteration are the Lagrange multipliers from the subproblem <a class="eqn" href="#eqn4">(4)</a> (and similarly for the predicted active set).  (The numbers of bounds, general linear and nonlinear constraints in the QP active set are the quantities <span class="mono">Bnd</span>, <span class="mono">Lin</span> and <span class="mono">Nln</span> in the monitoring file output of E04UFF/E04UFA; see <a class="sec" href="#monitoring">Section 12</a>.)  In E04UFF/E04UFA, <a class="eqn" href="#eqn4">(4)</a> is solved using <a class="rout" href="../E04/e04ncf.xml">E04NCF/E04NCA</a>.  Since solving a quadratic program is itself an iterative procedure, the <span class="italic">minor</span> iterations of E04UFF/E04UFA are the iterations of <a class="rout" href="../E04/e04ncf.xml">E04NCF/E04NCA</a>.  (More details about solving the subproblem are given in <a class="sec" href="#ad-QPS">Section 10.2</a>.)</div><div class="paramtext">Certain matrices associated with the QP subproblem are relevant in the major iterations.  Let the subscripts &#8216;FX&#8217; and &#8216;FR&#8217; refer to the <span class="italic">predicted</span> fixed and free variables, and let <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction></m:math>&#160;denote the <m:math><m:mi>m</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;matrix of gradients of the general linear and nonlinear constraints in the predicted active set.  Firstly, we have available the <m:math><m:mi>T</m:mi><m:mi>Q</m:mi></m:math>&#160;factorization of <m:math><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>:

<div class="formula-eqn"><a name="eqn5" id="eqn5"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><m:msub><m:mi>Q</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><m:mo>=</m:mo><m:mfenced separators=""><m:mn>0</m:mn><m:mtext>&#8195;</m:mtext><m:mi>T</m:mi></m:mfenced><m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (5)
     </td></tr></table></div>

where <m:math><m:mi>T</m:mi></m:math>&#160;is a nonsingular <m:math><m:mi>m</m:mi></m:math>&#160;by <m:math><m:mi>m</m:mi></m:math>&#160;reverse-triangular matrix (i.e., <m:math><m:msub><m:mi>t</m:mi><m:mrow><m:mi>i</m:mi><m:mi>j</m:mi></m:mrow></m:msub><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;if <m:math><m:mi>i</m:mi><m:mo>+</m:mo><m:mi>j</m:mi><m:mo>&lt;</m:mo><m:mi>m</m:mi></m:math>), and the nonsingular <m:math><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;by <m:math><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;matrix <m:math><m:msub><m:mi>Q</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;is the product of orthogonal transformations (see <a class="ref" href="#ref494">Gill <span class="italic">et al.</span> (1984b)</a>).  Secondly, we have the upper triangular Cholesky factor <m:math><m:mi>R</m:mi></m:math>&#160;of the <span class="italic">transformed and reordered</span> Hessian matrix

<div class="formula-eqn"><a name="eqn6" id="eqn6"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:msup><m:mi>R</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>R</m:mi><m:mo>=</m:mo><m:msub><m:mi>H</m:mi><m:mi>Q</m:mi></m:msub><m:mo>&#8801;</m:mo><m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mover><m:mi>H</m:mi><m:mo>~</m:mo></m:mover><m:mi>Q</m:mi><m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (6)
     </td></tr></table></div>

where <m:math><m:mover><m:mi>H</m:mi><m:mo>~</m:mo></m:mover></m:math>&#160;is the Hessian <m:math><m:mi>H</m:mi></m:math>&#160;with rows and columns permuted so that the free variables are first and <m:math><m:mi>Q</m:mi></m:math>&#160;is the <m:math><m:mi>n</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;matrix

<div class="formula-eqn"><a name="eqn7" id="eqn7"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:mi>Q</m:mi><m:mo>=</m:mo>
 <m:mfenced><m:mtable>
  <m:mtr>
   <m:mtd><m:msub><m:mi>Q</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:mtd>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd/>
   <m:mtd><m:msub><m:mi>I</m:mi><m:mi mathvariant="normal">FX</m:mi></m:msub></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
</m:math></td><td class="formula-eqn2">
      (7)
     </td></tr></table></div>

with <m:math><m:msub><m:mi>I</m:mi><m:mi mathvariant="normal">FX</m:mi></m:msub></m:math>&#160;the identity matrix of order <m:math><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FX</m:mi></m:msub></m:math>.  If the columns of <m:math><m:msub><m:mi>Q</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;are partitioned so that

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msub><m:mi>Q</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><m:mo>=</m:mo>
 <m:mfenced><m:mtable>
  <m:mtr>
   <m:mtd><m:mi>Z</m:mi></m:mtd>
   <m:mtd><m:mi>Y</m:mi></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
<m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

then the <m:math><m:msub><m:mi>n</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;(<m:math><m:msub><m:mi>n</m:mi><m:mi>Z</m:mi></m:msub><m:mo>&#8801;</m:mo><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><m:mo>-</m:mo><m:mi>m</m:mi></m:math>) columns of <m:math><m:mi>Z</m:mi></m:math>&#160;form a basis for the null space of <m:math><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>.  The matrix <m:math><m:mi>Z</m:mi></m:math>&#160;is used to compute the projected gradient <m:math><m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:msub><m:mi>g</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;at the current iterate.  (The values <span class="mono">Nz</span> and <span class="mono">Norm Gz</span> printed by E04UFF/E04UFA give <m:math><m:msub><m:mi>n</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;and <m:math><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:msub><m:mi>g</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:mfenced></m:math>, see <a class="sec" href="#monitoring">Section 12</a>.)</div><div class="paramtext">A theoretical characteristic of SQP methods is that the predicted active set from the QP subproblem <a class="eqn" href="#eqn4">(4)</a> is identical to the correct active set in a neighbourhood of <m:math><m:msup><m:mi>x</m:mi><m:mo>*</m:mo></m:msup></m:math>.  In E04UFF/E04UFA, this feature is exploited by using the QP active set from the previous iteration as a prediction of the active set for the next QP subproblem, which leads in practice to optimality of the subproblems in only one iteration as the solution is approached.  Separate treatment of bound and linear constraints in E04UFF/E04UFA also saves computation in factorizing <m:math><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>H</m:mi><m:mi>Q</m:mi></m:msub></m:math>.</div><div class="paramtext">Once <m:math><m:mi>p</m:mi></m:math>&#160;has been computed, the major iteration proceeds by determining a step length <m:math><m:mi>&#945;</m:mi></m:math>&#160;that produces a &#8216;sufficient decrease&#8217; in an augmented Lagrangian <span class="italic">merit function</span> (see <a class="sec" href="#ad-meritfunction">Section 10.3</a>).  Finally, the approximation to the transformed Hessian matrix <m:math><m:msub><m:mi>H</m:mi><m:mi>Q</m:mi></m:msub></m:math>&#160;is updated using a modified BFGS quasi-Newton update (see <a class="sec" href="#ad-quasinewton">Section 10.4</a>) to incorporate new curvature information obtained in the move from <m:math><m:mi>x</m:mi></m:math>&#160;to <m:math><m:mover><m:mi>x</m:mi><m:mo>-</m:mo></m:mover></m:math>.</div><div class="paramtext">On entry to E04UFF/E04UFA, an iterative procedure from <a class="rout" href="../E04/e04ncf.xml">E04NCF/E04NCA</a> is executed, starting with the user-supplied initial point, to find a point that is feasible with respect to the bounds and linear constraints (using the tolerance specified by the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_lf-tolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Linear Feasibility Tolerance</m:mi></m:maction></m:math>).  If no feasible point exists for the bound and linear constraints, <a class="eqn" href="#eqn1">(1)</a> has no solution and E04UFF/E04UFA terminates.  Otherwise, the problem functions will thereafter be evaluated only at points that are feasible with respect to the bounds and linear constraints.  The only exception involves variables whose bounds differ by an amount comparable to the finite difference interval (see the discussion of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_differenceinterval"><m:mi mathcolor="#800080;" mathvariant="bold">Difference Interval</m:mi></m:maction></m:math>).  In contrast to the bounds and linear constraints, it must be emphasised that <span class="italic">the nonlinear constraints will not generally be satisfied until an optimal point</span> is reached.</div><div class="paramtext">Facilities are provided to check whether the user-supplied gradients appear to be correct (see the description of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verify"><m:mi mathcolor="#800080;" mathvariant="bold">Verify</m:mi></m:maction></m:math>).  In general, the check is provided at the first point that is feasible with respect to the linear constraints and bounds.  However, you may request that the check be performed at the initial point.</div><div class="paramtext">In summary, the method of E04UFF/E04UFA first determines a point that satisfies the bound and linear constraints.  Thereafter, each iteration includes:
<table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline">(a)</td>
<td valign="top">the solution of a quadratic programming subproblem;</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(b)</td>
<td valign="top">a linesearch with an augmented Lagrangian merit function; and</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(c)</td>
<td valign="top">a quasi-Newton update of the approximate Hessian of the Lagrangian function.</td>
</tr></table>
</div><div class="paramtext">These three procedures are described in more detail in <a class="sec" href="#ad-QPS">Sections 10.2</a> to <a class="sec" href="#ad-quasinewton">10.4</a>.</div><h3 class="standard"><a class="sec" name="ad-QPS" id="ad-QPS"/>10.2&#160;&#160;Solution of the Quadratic Programming Subproblem</h3>
<div class="paramtext">The search direction <m:math><m:mi>p</m:mi></m:math>&#160;is obtained by solving <a class="eqn" href="#eqn4">(4)</a> using <a class="rout" href="../E04/e04ncf.xml">E04NCF/E04NCA</a> (see <a class="ref" href="#ref091">Gill <span class="italic">et al.</span> (1986)</a>), which was specifically designed to be used within an SQP algorithm for nonlinear programming.</div><div class="paramtext"><a class="rout" href="../E04/e04ncf.xml">E04NCF/E04NCA</a> is based on a two-phase (primal) quadratic programming method.  The two phases of the method are: finding an initial feasible point by minimizing the sum of infeasibilities (the <span class="italic">feasibility phase</span>) and minimizing the quadratic objective function within the feasible region (the <span class="italic">optimality phase</span>).  The computations in both phases are performed by the same subroutines.  The two-phase nature of the algorithm is reflected by changing the function being minimized from the sum of infeasibilities to the quadratic objective function.</div><div class="paramtext">In general, a quadratic program must be solved by iteration.  Let <m:math><m:mi>p</m:mi></m:math>&#160;denote the current estimate of the solution of <a class="eqn" href="#eqn4">(4)</a>; the new iterate <m:math><m:mover><m:mi>p</m:mi><m:mo>-</m:mo></m:mover></m:math>&#160;is defined by

<div class="formula-eqn"><a name="eqn8" id="eqn8"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:mover><m:mi>p</m:mi><m:mo>-</m:mo></m:mover><m:mo>=</m:mo><m:mi>p</m:mi><m:mo>+</m:mo><m:mi>&#963;</m:mi><m:mi>d</m:mi>
</m:math></td><td class="formula-eqn2">
      (8)
     </td></tr></table></div>

where, as in <a class="eqn" href="#eqn3">(3)</a>, <m:math><m:mi>&#963;</m:mi></m:math>&#160;is a non-negative step length and <m:math><m:mi>d</m:mi></m:math>&#160;is a search direction.</div><div class="paramtext">At the beginning of each iteration of <a class="rout" href="../E04/e04ncf.xml">E04NCF/E04NCA</a>, a <span class="italic">working</span> set is defined of constraints (general and bound) that are satisfied exactly.  The vector <m:math><m:mi>d</m:mi></m:math>&#160;is then constructed so that the values of constraints in the working set remain <span class="italic">unaltered</span> for any move along <m:math><m:mi>d</m:mi></m:math>.  For a bound constraint in the working set, this property is achieved by setting the corresponding element of <m:math><m:mi>d</m:mi></m:math>&#160;to zero, i.e., by fixing the variable at its bound.  As before, the subscripts &#8216;FX&#8217; and &#8216;FR&#8217; denote selection of the elements associated with the fixed and free variables.</div><div class="paramtext">Let <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction></m:math>&#160;denote the sub-matrix of rows of

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:mfenced><m:mtable>
  <m:mtr>
   <m:mtd><m:msub><m:mi>A</m:mi><m:mi>L</m:mi></m:msub></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:msub><m:mi>A</m:mi><m:mi>N</m:mi></m:msub></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div>

corresponding to general constraints in the working set.  The general constraints in the working set will remain unaltered if

<div class="formula-eqn"><a name="eqn9" id="eqn9"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><m:msub><m:mi>d</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><m:mo>=</m:mo><m:mn>0</m:mn><m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (9)
     </td></tr></table></div>

which is equivalent to defining <m:math><m:msub><m:mi>d</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;as

<div class="formula-eqn"><a name="eqn10" id="eqn10"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:msub><m:mi>d</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><m:mo>=</m:mo><m:mi>Z</m:mi><m:msub><m:mi>d</m:mi><m:mi>Z</m:mi></m:msub>
</m:math></td><td class="formula-eqn2">
      (10)
     </td></tr></table></div>

for some vector <m:math><m:msub><m:mi>d</m:mi><m:mi>Z</m:mi></m:msub></m:math>, where <m:math><m:mi>Z</m:mi></m:math>&#160;is the matrix associated with the <m:math><m:mi>T</m:mi><m:mi>Q</m:mi></m:math>&#160;factorization <a class="eqn" href="#eqn5">(5)</a> of <m:math><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>.</div><div class="paramtext">The definition of <m:math><m:msub><m:mi>d</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;in <a class="eqn" href="#eqn10">(10)</a> depends on whether the current <m:math><m:mi>p</m:mi></m:math>&#160;is feasible.  If not, <m:math><m:msub><m:mi>d</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;is zero except for an element <m:math><m:mi>&#947;</m:mi></m:math>&#160;in the <m:math><m:mi>j</m:mi></m:math>th position, where <m:math><m:mi>j</m:mi></m:math>&#160;and <m:math><m:mi>&#947;</m:mi></m:math>&#160;are chosen so that the sum of infeasibilities is decreasing along <m:math><m:mi>d</m:mi></m:math>.  (For further details, see <a class="ref" href="#ref091">Gill <span class="italic">et al.</span> (1986)</a>.)  In the feasible case, <m:math><m:msub><m:mi>d</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;satisfies the equations

<div class="formula-eqn"><a name="eqn11" id="eqn11"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
 <m:msubsup><m:mi>R</m:mi><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub>
 <m:msub><m:mi>d</m:mi><m:mi>Z</m:mi></m:msub>
 <m:mo>=</m:mo>
 <m:mo>-</m:mo>
 <m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:msub><m:mi>q</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (11)
     </td></tr></table></div>

where <m:math><m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;is the Cholesky factor of <m:math><m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:msub><m:mi>H</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><m:mi>Z</m:mi></m:math>&#160;and <m:math><m:mi>q</m:mi></m:math>&#160;is the gradient of the quadratic objective function <m:math><m:mfenced separators=""><m:mi>q</m:mi><m:mo>=</m:mo><m:mi>g</m:mi><m:mo>+</m:mo><m:mi>H</m:mi><m:mi>p</m:mi></m:mfenced></m:math>.  (The vector <m:math><m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:msub><m:mi>q</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;is the projected gradient of the QP.)  With <a class="eqn" href="#eqn11">(11)</a>, <m:math><m:mi>p</m:mi><m:mo>+</m:mo><m:mi>d</m:mi></m:math>&#160;is the minimizer of the quadratic objective function subject to treating the constraints in the working set as equalities.</div><div class="paramtext">If the QP projected gradient is zero, the current point is a constrained stationary point in the subspace defined by the working set.  During the feasibility phase, the projected gradient will usually be zero only at a vertex (although it may vanish at non-vertices in the presence of constraint dependencies).  During the optimality phase, a zero projected gradient implies that <m:math><m:mi>p</m:mi></m:math>&#160;minimizes the quadratic objective function when the constraints in the working set are treated as equalities.  In either case, Lagrange multipliers are computed.  Given a positive constant <m:math><m:mi>&#948;</m:mi></m:math>&#160;of the order of the <span class="bitalic">machine precision</span>, the Lagrange multiplier <m:math><m:msub><m:mi>&#956;</m:mi><m:mi>j</m:mi></m:msub></m:math>&#160;corresponding to an inequality constraint in the working set is said to be <span class="italic">optimal</span> if <m:math><m:msub><m:mi>&#956;</m:mi><m:mi>j</m:mi></m:msub><m:mo>&#8804;</m:mo><m:mi>&#948;</m:mi></m:math>&#160;when the <m:math><m:mi>j</m:mi></m:math>th constraint is at its <span class="italic">upper bound</span>, or if <m:math><m:msub><m:mi>&#956;</m:mi><m:mi>j</m:mi></m:msub><m:mo>&#8805;</m:mo><m:mo>-</m:mo><m:mi>&#948;</m:mi></m:math>&#160;when the associated constraint is at its <span class="italic">lower bound</span>.  If any multiplier is nonoptimal, the current objective function (either the true objective or the sum of infeasibilities) can be reduced by deleting the corresponding constraint from the working set.</div><div class="paramtext">If optimal multipliers occur during the feasibility phase and the sum of infeasibilities is nonzero, no feasible point exists.  The QP algorithm will then continue iterating to determine the minimum sum of infeasibilities.  At this point, the Lagrange multiplier <m:math><m:msub><m:mi>&#956;</m:mi><m:mi>j</m:mi></m:msub></m:math>&#160;will satisfy <m:math><m:mrow><m:mo>-</m:mo><m:mfenced separators=""><m:mn>1</m:mn><m:mo>+</m:mo><m:mi>&#948;</m:mi></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:msub><m:mi>&#956;</m:mi><m:mi>j</m:mi></m:msub><m:mo>&#8804;</m:mo><m:mi>&#948;</m:mi></m:math>&#160;for an inequality constraint at its upper bound, and <m:math><m:mrow><m:mo>-</m:mo><m:mi>&#948;</m:mi></m:mrow><m:mo>&#8804;</m:mo><m:msub><m:mi>&#956;</m:mi><m:mi>j</m:mi></m:msub><m:mo>&#8804;</m:mo><m:mfenced separators=""><m:mn>1</m:mn><m:mo>+</m:mo><m:mi>&#948;</m:mi></m:mfenced></m:math>&#160;for an inequality at its lower bound.  The Lagrange multiplier for an equality constraint will satisfy <m:math><m:mfenced open="|" close="|" separators=""><m:msub><m:mi>&#956;</m:mi><m:mi>j</m:mi></m:msub></m:mfenced><m:mo>&#8804;</m:mo><m:mn>1</m:mn><m:mo>+</m:mo><m:mi>&#948;</m:mi></m:math>.</div><div class="paramtext">The choice of step length <m:math><m:mi>&#963;</m:mi></m:math>&#160;in the QP iteration <a class="eqn" href="#eqn8">(8)</a> is based on remaining feasible with respect to the satisfied constraints.  During the optimality phase, if <m:math><m:mi>p</m:mi><m:mo>+</m:mo><m:mi>d</m:mi></m:math>&#160;is feasible, <m:math><m:mi>&#963;</m:mi></m:math>&#160;will be taken as unity.  (In this case, the projected gradient at <m:math><m:mover><m:mi>p</m:mi><m:mo>-</m:mo></m:mover></m:math>&#160;will be zero.)  Otherwise, <m:math><m:mi>&#963;</m:mi></m:math>&#160;is set to <m:math><m:msub><m:mi>&#963;</m:mi><m:mi mathvariant="normal">M</m:mi></m:msub></m:math>, the step to the &#8216;nearest&#8217; constraint, which is added to the working set at the next iteration.</div><div class="paramtext">Each change in the working set leads to a simple change to <m:math><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>: if the status of a general constraint changes, a <span class="italic">row</span> of <m:math><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;is altered; if a bound constraint enters or leaves the working set, a <span class="italic">column</span> of <m:math><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;changes.  Explicit representations are recurred of the matrices <m:math><m:mi>T</m:mi></m:math>, <m:math><m:msub><m:mi>Q</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;and <m:math><m:mi>R</m:mi></m:math>, and of the vectors <m:math><m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>q</m:mi></m:math>&#160;and <m:math><m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>g</m:mi></m:math>.</div><h3 class="standard"><a class="sec" name="ad-meritfunction" id="ad-meritfunction"/>10.3&#160;&#160;The Merit Function</h3>
<div class="paramtext">After computing the search direction as described in <a class="sec" href="#ad-QPS">Section 10.2</a>, each major iteration proceeds by determining a step length <m:math><m:mi>&#945;</m:mi></m:math>&#160;in <a class="eqn" href="#eqn3">(3)</a> that produces a &#8216;sufficient decrease&#8217; in the augmented Lagrangian merit function

<div class="formula-eqn"><a name="eqnlmf" id="eqnlmf"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
 <m:mi>L</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>&#955;</m:mi><m:mo>,</m:mo><m:mi>s</m:mi></m:mfenced>
 <m:mo>=</m:mo>
 <m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
 <m:mo>-</m:mo>
 <m:munder><m:mo>&#8721;</m:mo><m:mi>i</m:mi></m:munder><m:mspace width="0.25em"/>
 <m:msub><m:mi>&#955;</m:mi><m:mi>i</m:mi></m:msub>
 <m:mfenced separators="">
  <m:msub><m:mi>c</m:mi><m:mi>i</m:mi></m:msub>
  <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
  <m:mo>-</m:mo>
  <m:msub><m:mi>s</m:mi><m:mi>i</m:mi></m:msub>
 </m:mfenced>
 <m:mo>+</m:mo>
 <m:mfrac other="small"><m:mn>1</m:mn><m:mn>2</m:mn></m:mfrac>
 <m:munder><m:mo>&#8721;</m:mo><m:mi>i</m:mi></m:munder><m:mspace width="0.25em"/>
 <m:msub><m:mi>&#961;</m:mi><m:mi>i</m:mi></m:msub>
 <m:msup>
  <m:mfenced separators="">
    <m:msub><m:mi>c</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
    <m:mo>-</m:mo>
    <m:msub><m:mi>s</m:mi><m:mi>i</m:mi></m:msub>
   </m:mfenced>
  <m:mn>2</m:mn>
 </m:msup>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (12)
     </td></tr></table></div>

where <m:math><m:mi>x</m:mi></m:math>, <m:math><m:mi>&#955;</m:mi></m:math>&#160;and <m:math><m:mi>s</m:mi></m:math>&#160;vary during the linesearch.  The summation terms in <a class="eqn" href="#eqnlmf">(12)</a> involve only the <span class="italic">nonlinear</span> constraints.  The vector <m:math><m:mi>&#955;</m:mi></m:math>&#160;is an estimate of the Lagrange multipliers for the nonlinear constraints of <a class="eqn" href="#eqn1">(1)</a>.  The non-negative <span class="italic">slack variables</span>
<m:math><m:mfenced open="{" close="}" separators=""><m:msub><m:mi>s</m:mi><m:mi>i</m:mi></m:msub></m:mfenced></m:math>&#160;allow nonlinear inequality constraints to be treated without introducing discontinuities.  The solution of the QP subproblem <a class="eqn" href="#eqn4">(4)</a> provides a vector triple that serves as a direction of search for the three sets of variables.  The non-negative vector <m:math><m:mi>&#961;</m:mi></m:math>&#160;of <span class="italic">penalty parameters</span> is initialized to zero at the beginning of the first major iteration.  Thereafter, selected elements are increased whenever necessary to ensure descent for the merit function.  Thus, the sequence of norms of <m:math><m:mi>&#961;</m:mi></m:math>&#160;(the printed quantity <span class="mono">Penalty</span>; see <a class="sec" href="#monitoring">Section 12</a>) is generally nondecreasing, although each <m:math><m:msub><m:mi>&#961;</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;may be reduced a limited number of times.</div><div class="paramtext">The merit function <a class="eqn" href="#eqnlmf">(12)</a> and its global convergence properties are described in <a class="ref" href="#ref092">Gill <span class="italic">et al.</span> (1986a)</a>.</div><h3 class="standard"><a class="sec" name="ad-quasinewton" id="ad-quasinewton"/>10.4&#160;&#160;The Quasi-Newton Update</h3>
<div class="paramtext">The matrix <m:math><m:mi>H</m:mi></m:math>&#160;in <a class="eqn" href="#eqn4">(4)</a> is a <span class="italic">positive-definite quasi-Newton</span> approximation to the Hessian of the Lagrangian function.  (For a review of quasi-Newton methods, see <a class="ref" href="#ref086">Dennis and Schnabel (1983)</a>.)  At the end of each major iteration, a new Hessian approximation <m:math><m:mover><m:mi>H</m:mi><m:mo>-</m:mo></m:mover></m:math>&#160;is defined as a rank-two modification of <m:math><m:mi>H</m:mi></m:math>.  In E04UFF/E04UFA, the BFGS (Broyden&#8211;Fletcher&#8211;Goldfarb&#8211;Shanno) quasi-Newton update is used:

<div class="formula-eqn"><a name="eqn13" id="eqn13"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:mover><m:mi>H</m:mi><m:mo>-</m:mo></m:mover><m:mo>=</m:mo><m:mi>H</m:mi><m:mo>-</m:mo><m:mfrac><m:mn>1</m:mn><m:mrow><m:msup><m:mi>s</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>H</m:mi><m:mi>s</m:mi></m:mrow>
 </m:mfrac><m:mi>H</m:mi><m:mi>s</m:mi><m:msup><m:mi>s</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>H</m:mi><m:mo>+</m:mo><m:mfrac><m:mn>1</m:mn><m:mrow><m:msup><m:mi>y</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>s</m:mi></m:mrow>
 </m:mfrac><m:mi>y</m:mi><m:msup><m:mi>y</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (13)
     </td></tr></table></div>

where <m:math><m:mi>s</m:mi><m:mo>=</m:mo><m:mover><m:mi>x</m:mi><m:mo>-</m:mo></m:mover><m:mo>-</m:mo><m:mi>x</m:mi></m:math>&#160;(the change in <m:math><m:mi>x</m:mi></m:math>).</div><div class="paramtext">In E04UFF/E04UFA, <m:math><m:mi>H</m:mi></m:math>&#160;is required to be positive-definite.  If <m:math><m:mi>H</m:mi></m:math>&#160;is positive-definite, <m:math><m:mover><m:mi>H</m:mi><m:mo>-</m:mo></m:mover></m:math>&#160;defined by <a class="eqn" href="#eqn13">(13)</a> will be positive-definite if and only if <m:math><m:msup><m:mi>y</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>s</m:mi></m:math>&#160;is positive (see <a class="ref" href="#ref084">Dennis and Mor&#233; (1977)</a>).  Ideally, <m:math><m:mi>y</m:mi></m:math>&#160;in <a class="eqn" href="#eqn13">(13)</a> would be taken as <m:math><m:msub><m:mi>y</m:mi><m:mi>L</m:mi></m:msub></m:math>, the change in gradient of the Lagrangian function

<div class="formula-eqn"><a name="eqn14" id="eqn14"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
 <m:msub><m:mi>y</m:mi><m:mi>L</m:mi></m:msub>
 <m:mo>=</m:mo>
 <m:mover><m:mi>g</m:mi><m:mo>-</m:mo></m:mover>
 <m:mo>-</m:mo>
 <m:msubsup><m:mover><m:mi>A</m:mi><m:mo>-</m:mo></m:mover><m:mi>N</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:msub><m:mi>&#956;</m:mi><m:mi>N</m:mi></m:msub>
 <m:mo>-</m:mo>
 <m:mi>g</m:mi>
 <m:mo>+</m:mo> 
 <m:msubsup><m:mi>A</m:mi><m:mi>N</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:msub><m:mi>&#956;</m:mi><m:mi>N</m:mi></m:msub>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (14)
     </td></tr></table></div>

where <m:math><m:msub><m:mi>&#956;</m:mi><m:mi>N</m:mi></m:msub></m:math>&#160;denotes the QP multipliers associated with the nonlinear constraints of the original problem.  If <m:math>
 <m:msubsup><m:mi>y</m:mi><m:mi>L</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:mi>s</m:mi>
</m:math>&#160;is not sufficiently positive, an attempt is made to perform the update with a vector <m:math><m:mi>y</m:mi></m:math>&#160;of the form

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>y</m:mi><m:mo>=</m:mo><m:msub><m:mi>y</m:mi><m:mi>L</m:mi></m:msub><m:mo>+</m:mo><m:munderover><m:mo>&#8721;</m:mo><m:mrow><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn></m:mrow><m:msub><m:mi>m</m:mi><m:mi>N</m:mi></m:msub></m:munderover><m:msub><m:mi>&#969;</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:msub><m:mi>a</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover></m:mfenced><m:msub><m:mi>c</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover></m:mfenced><m:mo>-</m:mo><m:msub><m:mi>a</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:msub><m:mi>c</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:mfenced><m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:msub><m:mi>&#969;</m:mi><m:mi>i</m:mi></m:msub><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:math>.  If no such vector can be found, the update is performed with a scaled <m:math><m:msub><m:mi>y</m:mi><m:mi>L</m:mi></m:msub></m:math>.  In this case, <span class="mono">M</span> is printed to indicate that the update was modified.</div><div class="paramtext">Rather than modifying <m:math><m:mi>H</m:mi></m:math>&#160;itself, the Cholesky factor of the <span class="italic">transformed Hessian</span>
<m:math><m:msub><m:mi>H</m:mi><m:mi>Q</m:mi></m:msub></m:math>&#160;<a class="eqn" href="#eqn6">(6)</a> is updated, where <m:math><m:mi>Q</m:mi></m:math>&#160;is the matrix from <a class="eqn" href="#eqn5">(5)</a> associated with the active set of the QP subproblem.  The update <a class="eqn" href="#eqn13">(13)</a> is equivalent to the following update to <m:math><m:msub><m:mi>H</m:mi><m:mi>Q</m:mi></m:msub></m:math>:

<div class="formula-eqn"><a name="eqn15" id="eqn15"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
 <m:msub><m:mover><m:mi>H</m:mi><m:mo>-</m:mo></m:mover><m:mi>Q</m:mi></m:msub>
 <m:mo>=</m:mo>
 <m:msub><m:mi>H</m:mi><m:mi>Q</m:mi></m:msub>
 <m:mo>-</m:mo>
 <m:mfrac>
  <m:mn>1</m:mn>
  <m:mrow>
   <m:msubsup><m:mi>s</m:mi><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
   <m:msub><m:mi>H</m:mi><m:mi>Q</m:mi></m:msub>
   <m:msub><m:mi>s</m:mi><m:mi>Q</m:mi></m:msub>
  </m:mrow>
 </m:mfrac>
 <m:msub><m:mi>H</m:mi><m:mi>Q</m:mi></m:msub>
 <m:msub><m:mi>s</m:mi><m:mi>Q</m:mi></m:msub>
 <m:msubsup><m:mi>s</m:mi><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:msub><m:mi>H</m:mi><m:mi>Q</m:mi></m:msub>
 <m:mo>+</m:mo>
 <m:mfrac>
  <m:mn>1</m:mn>
  <m:mrow>
   <m:msubsup><m:mi>y</m:mi><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
   <m:msub><m:mi>s</m:mi><m:mi>Q</m:mi></m:msub>
  </m:mrow>
 </m:mfrac>
 <m:msub><m:mi>y</m:mi><m:mi>Q</m:mi></m:msub>
 <m:msubsup><m:mi>y</m:mi><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (15)
     </td></tr></table></div>

where <m:math><m:msub><m:mi>y</m:mi><m:mi>Q</m:mi></m:msub><m:mo>=</m:mo><m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>y</m:mi></m:math>, and <m:math><m:msub><m:mi>s</m:mi><m:mi>Q</m:mi></m:msub><m:mo>=</m:mo><m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>s</m:mi></m:math>.  This update may be expressed as a <span class="italic">rank-one</span> update to <m:math><m:mi>R</m:mi></m:math>&#160;(see <a class="ref" href="#ref085">Dennis and Schnabel (1981)</a>).</div><h2 class="standard"><a class="sec" name="optparams" id="optparams"/>11&#160;&#160;Optional Parameters</h2>
<div class="paramtext">Several optional parameters in E04UFF/E04UFA define choices in the problem specification or the algorithm logic.  In order to reduce the number of formal parameters of E04UFF/E04UFA these optional parameters have associated <span class="italic">default values</span> that are appropriate for most problems.  Therefore you need only specify those optional parameters whose values are to be different from their default values.</div><div class="paramtext">The remainder of this section can be skipped if you wish to use the default values for all optional parameters.  A complete list of optional parameters and their default values is given in <a class="sec" href="#op-checklist">Section 11.1</a>.</div><div class="paramtext">Optional parameters may be specified by calling one, or both, of <a class="rout" href="../E04/e04udf.xml">E04UDF/E04UDA</a> and <a class="rout" href="../E04/e04uef.xml">E04UEF/E04UEA</a> before a call to E04UFF/E04UFA.</div><div class="paramtext"><a class="rout" href="../E04/e04udf.xml">E04UDF/E04UDA</a> reads options from an external options file, with <span class="mono">Begin</span> and <span class="mono">End</span> as the first and last lines respectively and each intermediate line defining a single optional parameter.  For example,
<pre class="verbatim">
Begin * Example options file 
   Print level = 5 
End
</pre>
The call
<pre class="verbatim">
 CALL E04UDF (IOPTNS, INFORM)
</pre>
can then be used to read the file on unit <a class="arg" href="../E04/e04udf.xml#IOPTNS">IOPTNS</a>. <a class="arg" href="../E04/e04udf.xml#INFORM">INFORM</a> will be zero on successful exit.  <a class="rout" href="../E04/e04udf.xml">E04UDF/E04UDA</a> should be consulted for a full description of this method of supplying optional parameters.</div><div class="paramtext"><a class="rout" href="../E04/e04uef.xml">E04UEF/E04UEA</a> can be called to supply options directly, one call being necessary for each optional parameter.  For example,
<pre class="verbatim">
 CALL E04UEF ('Print Level = 1')
</pre><a class="rout" href="../E04/e04uef.xml">E04UEF/E04UEA</a> should be consulted for a full description of this method of supplying optional parameters.</div><div class="paramtext">All optional parameters not specified by you are set to their default values.  Optional parameters specified by you are unaltered by E04UFF/E04UFA (unless they define invalid values) and so remain in effect for subsequent calls to E04UFF/E04UFA, unless altered by you.</div><h3 class="standard"><a class="sec" name="op-checklist" id="op-checklist"/>11.1&#160;&#160;Optional Parameter Checklist and Default Values</h3>
<div class="paramtext">
The following list gives the valid options.  For each option, we give the keyword, any essential optional qualifiers, the default value and the definition.  A definition for each option can be found in <a class="sec" href="#op-description">Section 11.2</a>, where the minimum abbreviation of each keyword is underlined (if no characters of an optional qualifier are underlined, the qualifier may be omitted), the letter <m:math><m:mi>a</m:mi></m:math>&#160;denotes a phrase (character string) that qualifies an option, the letters <m:math><m:mi>i</m:mi></m:math>&#160;and <m:math><m:mi>r</m:mi></m:math>&#160;denote INTEGER and <span class="bitalic">double precision</span> values required with certain options, the number <m:math><m:mi>&#949;</m:mi></m:math>&#160;is a generic notation for <span class="bitalic">machine precision</span> (see <a class="rout" href="../X02/x02ajf.xml">X02AJF</a>) and <m:math><m:msub><m:mi>&#949;</m:mi><m:mi>r</m:mi></m:msub></m:math>&#160;denotes the relative precision of the objective function (the <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_functionprecision"><m:mi mathcolor="#800080;" mathvariant="bold">Function Precision</m:mi></m:maction></m:math>).</div><div class="left-tablediv"><table class="optparam"><tbody>
<tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><b>Optional Parameter</b></td><td class="libdoc" valign="top" align="left"><b>Default&#160;Value</b></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_centraldiff-interval">Central Difference Interval</a></td>
<td class="libdoc" valign="top" align="left">Default values are computed</td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_coldstart">Cold Start</a></td>
<td class="libdoc" valign="top" align="left">Default</td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_crashtolerance">Crash Tolerance</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>0.01</m:mn></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_defaults">Defaults</a></td>
<td class="libdoc" valign="top" align="left">&#160;</td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_derivativelevel">Derivative Level</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>3</m:mn></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_differenceinterval">Difference Interval</a></td>
<td class="libdoc" valign="top" align="left">Default values are computed</td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_feasibilitytolerance">Feasibility Tolerance</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_functionprecision">Function Precision</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:msup><m:mi>&#949;</m:mi><m:mn>0.9</m:mn></m:msup></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_hessian">Hessian</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mo>=</m:mo><m:mi mathvariant="normal">No</m:mi></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_infiniteboundsize">Infinite Bound Size</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:msup><m:mn>10</m:mn><m:mn>20</m:mn></m:msup></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_infinitestepsize">Infinite Step Size</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mi mathvariant="italic">bigbnd</m:mi><m:mo>,</m:mo><m:msup><m:mn>10</m:mn><m:mn>20</m:mn></m:msup></m:mfenced></m:mrow></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_iterationlimit">Iteration Limit</a></td>
<td class="libdoc" valign="top" align="left"/>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_iters">Iters</a></td>
<td class="libdoc" valign="top" align="left"/>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_itns">Itns</a></td>
<td class="libdoc" valign="top" align="left"/>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_lf-tolerance">Linear Feasibility Tolerance</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_linesearchtolerance">Line Search Tolerance</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>0.9</m:mn></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_list">List</a></td>
<td class="libdoc" valign="top" align="left">Default for E04UFF</td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_majoriterationlimit">Major Iteration Limit</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>50</m:mn><m:mo>,</m:mo><m:mrow><m:mn>3</m:mn><m:mfenced separators=""><m:mi>n</m:mi><m:mo>+</m:mo><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub></m:mfenced><m:mo>+</m:mo><m:mn>10</m:mn><m:msub><m:mi>n</m:mi><m:mi>N</m:mi></m:msub></m:mrow></m:mfenced></m:mrow></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_majorprintlevel">Major Print Level</a></td>
<td class="libdoc" valign="top" align="left">Default for E04UFF
<m:math><m:mtext/><m:mo>=</m:mo><m:mn>10</m:mn></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_minoriterationlimit">Minor Iteration Limit</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>50</m:mn><m:mo>,</m:mo><m:mrow><m:mn>3</m:mn><m:mfenced separators=""><m:mi>n</m:mi><m:mo>+</m:mo><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub><m:mo>+</m:mo><m:msub><m:mi>n</m:mi><m:mi>N</m:mi></m:msub></m:mfenced></m:mrow></m:mfenced></m:mrow></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_minorprintlevel">Minor Print Level</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>0</m:mn></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_monitoringfile">Monitoring File</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_nolist">Nolist</a></td>
<td class="libdoc" valign="top" align="left">Default for E04UFA</td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_nonlf-tolerance">Nonlinear Feasibility Tolerance</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:msup><m:mi>&#949;</m:mi><m:mn>0.33</m:mn></m:msup></m:math>&#160;or <m:math><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_optimalitytolerance">Optimality Tolerance</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:msubsup><m:mi>&#949;</m:mi><m:mi>r</m:mi><m:mn>0.8</m:mn></m:msubsup></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_printlevel">Print Level</a></td>
<td class="libdoc" valign="top" align="left">Default for E04UFA
<m:math><m:mtext/><m:mo>=</m:mo><m:mn>0</m:mn></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_startcon-check-var">Start Constraint Check At Variable</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>1</m:mn></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_start-obj-check-var">Start Objective Check At Variable</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>1</m:mn></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_steplimit">Step Limit</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>2.0</m:mn></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_stopcon-check-var">Stop Constraint Check At Variable</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mi>n</m:mi></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_stop-obj-check-var">Stop Objective Check At Variable</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mi>n</m:mi></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_verify">Verify</a></td>
<td class="libdoc" valign="top" align="left"/>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_verifyconstraintgradients">Verify Constraint Gradients</a></td>
<td class="libdoc" valign="top" align="left"/>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_verifygradients">Verify Gradients</a></td>
<td class="libdoc" valign="top" align="left"/>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_verifylevel">Verify Level</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>0</m:mn></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_verifyobjectivegradients">Verify Objective Gradients</a></td>
<td class="libdoc" valign="top" align="left"/>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04uff.xml#optparam_warmstart">Warm Start</a></td>
<td class="libdoc" valign="top" align="left"/>
</tr>
</tbody>
</table></div><h3 class="standard"><a class="sec" name="op-description" id="op-description"/>11.2&#160;&#160;Description of the Optional Parameters</h3><table class="optparam"><tr><td class="optparam-left"><a name="optparam_centraldiff-interval" id="centraldiff-interval"/><b><span class="u">Ce</span>ntral Difference Interval</b></td><td class="optparam-center"><i>r</i></td><td class="optparam-right">Default values are computed</td></tr></table><div class="paramtext">If the algorithm switches to central differences because the forward-difference approximation is not sufficiently accurate then the value of <m:math><m:mi>r</m:mi></m:math>&#160;is used as the difference interval for every element of <m:math><m:mi>x</m:mi></m:math>.  The switch to central differences is indicated by <span class="mono"><a class="arg" href="#C">C</a></span> at the end of each line of intermediate printout produced by the major iterations (see <a class="sec" href="#fc-printedoutput">Section 8.1</a>).  The use of finite differences is discussed further under the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_differenceinterval"><m:mi mathcolor="#800080;" mathvariant="bold">Difference Interval</m:mi></m:maction></m:math>.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_coldstart" id="coldstart"/><b><span class="u">Col</span>d Start</b></td><td class="optparam-center"/><td class="optparam-right">Default</td></tr></table>
<table class="multi-optparam"><tr><td class="optparam-left"><a name="optparam_warmstart" id="warmstart"/><b><span class="u">W</span>arm Start</b></td><td class="optparam-center"/><td class="optparam-right"/></tr></table><div class="paramtext">This option controls the specification of the initial working set in both the procedure for finding a feasible point for the linear constraints and bounds and in the first QP subproblem thereafter.  With a <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_coldstart"><m:mi mathcolor="#800080;" mathvariant="bold">Cold Start</m:mi></m:maction></m:math>, the first working set is chosen by E04UFF/E04UFA based on the values of the variables and constraints at the initial point.  Broadly speaking, the initial working set will include equality constraints and bounds or inequality constraints that violate or &#8216;nearly&#8217; satisfy their bounds (to within <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_crashtolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Crash Tolerance</m:mi></m:maction></m:math>).</div>
<div class="paramtext">With a <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_warmstart"><m:mi mathcolor="#800080;" mathvariant="bold">Warm Start</m:mi></m:maction></m:math>, you must set the <a class="arg" href="#ISTATE">ISTATE</a> array and define <a class="arg" href="#CLAMDA">CLAMDA</a> and <a class="arg" href="#R">R</a> as discussed in <a class="sec" href="#parameters">Section 5</a>.  <a class="arg" href="#ISTATE">ISTATE</a> values associated with bounds and linear constraints determine the initial working set of the procedure to find a feasible point with respect to the bounds and linear constraints.  <a class="arg" href="#ISTATE">ISTATE</a> values associated with nonlinear constraints determine the initial working set of the first QP subproblem after such a feasible point has been found.  E04UFF/E04UFA will override your specification of <a class="arg" href="#ISTATE">ISTATE</a> if necessary, so that a poor choice of the working set will not cause a fatal error.  For instance, any elements of <a class="arg" href="#ISTATE">ISTATE</a> which are set to <m:math><m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow></m:math>, <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>4</m:mn></m:math>&#160;will be reset to zero, as will any elements which are set to <m:math><m:mn>3</m:mn></m:math>&#160;when the corresponding elements of <a class="arg" href="#BL">BL</a> and <a class="arg" href="#BU">BU</a> are not equal.  A warm start will be advantageous if a good estimate of the initial working set is available &#8211; for example, when E04UFF/E04UFA is called repeatedly to solve related problems.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_crashtolerance" id="crashtolerance"/><b><span class="u">Cr</span>ash Tolerance</b></td><td class="optparam-center"><i>r</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>0.01</m:mn></m:math></td></tr></table><div class="paramtext">This value is used in conjunction with the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_coldstart"><m:mi mathcolor="#800080;" mathvariant="bold">Cold Start</m:mi></m:maction></m:math>&#160;(the default value) when E04UFF/E04UFA selects an initial working set.  If <m:math><m:mn>0</m:mn><m:mo>&#8804;</m:mo><m:mi>r</m:mi><m:mo>&#8804;</m:mo><m:mn>1</m:mn></m:math>, the initial working set will include (if possible) bounds or general inequality constraints that lie within <m:math><m:mi>r</m:mi></m:math>&#160;of their bounds.  In particular, a constraint of the form <m:math>
 <m:msubsup><m:mi>a</m:mi><m:mi>j</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:mi>x</m:mi><m:mo>&#8805;</m:mo><m:mi>l</m:mi>
</m:math>&#160;will be included in the initial working set if <m:math>
 <m:mfenced open="|" close="|" separators="">
  <m:msubsup><m:mi>a</m:mi><m:mi>j</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
  <m:mi>x</m:mi><m:mo>-</m:mo><m:mi>l</m:mi>
 </m:mfenced>
 <m:mo>&#8804;</m:mo>
 <m:mi>r</m:mi>
 <m:mfenced separators=""><m:mn>1</m:mn><m:mo>+</m:mo><m:mfenced open="|" close="|" separators=""><m:mi>l</m:mi></m:mfenced></m:mfenced>
</m:math>.  If <m:math><m:mi>r</m:mi><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math><m:mi>r</m:mi><m:mo>&gt;</m:mo><m:mn>1</m:mn></m:math>, the default value is used.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_defaults" id="defaults"/><b><span class="u">Defaults</span></b></td><td class="optparam-center"/><td class="optparam-right"/></tr></table><div class="paramtext">This special keyword may be used to reset all optional parameters to their default values.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_derivativelevel" id="derivativelevel"/><b><span class="u">Der</span>ivative Level</b></td><td class="optparam-center"><i>i</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>3</m:mn></m:math></td></tr></table><div class="paramtext">This parameter indicates which derivatives are provided by you during intermediate exits.  The possible choices for <m:math><m:mi>i</m:mi></m:math>&#160;are the following.  
<div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" align="center"><b><m:math><m:mi>i</m:mi></m:math></b></td> 
<td class="libdoc" valign="top" align="center"><b>Meaning</b></td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center">3</td> 
<td class="libdoc" valign="top" align="left">All elements of the objective gradient and the constraint Jacobian are provided.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center">2</td> 
<td class="libdoc" valign="top" align="left">All elements of the constraint Jacobian are provided, but some elements of the objective gradient are not specified.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center">1</td> 
<td class="libdoc" valign="top" align="left">All elements of the objective gradient are provided, but some elements of the constraint Jacobian are not specified.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center">0</td> 
<td class="libdoc" valign="top" align="left">Some elements of both the objective gradient and the constraint Jacobian are not specified.</td> 
</tr> 
</tbody> 
</table></div> 
</div>
<div class="paramtext">The value <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>3</m:mn></m:math>&#160;should be used whenever possible, since E04UFF/E04UFA is more reliable (and will usually be more efficient) when all derivatives are exact.</div>
<div class="paramtext">If <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>0</m:mn><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>2</m:mn></m:math>, E04UFF/E04UFA will estimate the unspecified elements of the objective gradient, using finite differences.  The computation of finite difference approximations usually increases the total run-time, since an intermediate exit to the calling program is required for each unspecified element.  Furthermore, less accuracy can be attained in the solution (see Chapter 8 of <a class="ref" href="#ref079">Gill <span class="italic">et al.</span> (1981)</a>, for a discussion of limiting accuracy).</div>
<div class="paramtext">If <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>0</m:mn><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>, E04UFF/E04UFA will approximate unspecified elements of the constraint Jacobian.  One intermediate exit is needed for each variable for which partial derivatives are not available.  For example, if the Jacobian has the form 
<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block"><m:mfenced><m:mtable> <m:mtr> <m:mtd><m:mtext>*</m:mtext></m:mtd> <m:mtd><m:mtext>*</m:mtext></m:mtd> <m:mtd><m:mtext>*</m:mtext></m:mtd> <m:mtd><m:mtext>*</m:mtext></m:mtd> </m:mtr><m:mtr> <m:mtd><m:mtext>*</m:mtext></m:mtd> <m:mtd><m:mtext>?</m:mtext></m:mtd> <m:mtd><m:mtext>?</m:mtext></m:mtd> <m:mtd><m:mtext>*</m:mtext></m:mtd> </m:mtr><m:mtr> <m:mtd><m:mtext>*</m:mtext></m:mtd> <m:mtd><m:mtext>*</m:mtext></m:mtd> <m:mtd><m:mtext>?</m:mtext></m:mtd> <m:mtd><m:mtext>*</m:mtext></m:mtd> </m:mtr><m:mtr> <m:mtd><m:mtext>*</m:mtext></m:mtd> <m:mtd><m:mtext>*</m:mtext></m:mtd> <m:mtd><m:mtext>*</m:mtext></m:mtd> <m:mtd><m:mtext>*</m:mtext></m:mtd> </m:mtr> </m:mtable></m:mfenced></m:math></td><td class="formula2"/></tr></table></div>
 where &#8216;<m:math><m:mo>*</m:mo></m:math>&#8217; indicates an element provided by you and &#8216;?&#8217; indicates an unspecified element, E04UFF/E04UFA will make an intermediate exit to the calling program twice: once to estimate the missing element in column <m:math><m:mn>2</m:mn></m:math>, and again to estimate the two missing elements in column <m:math><m:mn>3</m:mn></m:math>.  (Since columns <m:math><m:mn>1</m:mn></m:math>&#160;and <m:math><m:mn>4</m:mn></m:math>&#160;are known, they require no intermediate exits for information.)</div>
<div class="paramtext">At times, central differences are used rather than forward differences, in which case twice as many intermediate exits are needed.  (The switch to central differences is not under your control.)</div>
<div class="paramtext">If <m:math><m:mi>i</m:mi><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math><m:mi>i</m:mi><m:mo>&gt;</m:mo><m:mn>3</m:mn></m:math>, the default value is used.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_differenceinterval" id="differenceinterval"/><b><span class="u">Diff</span>erence Interval</b></td><td class="optparam-center"><i>r</i></td><td class="optparam-right">Default values are computed</td></tr></table><div class="paramtext">This option defines an interval used to estimate derivatives by finite differences in the following circumstances: 
<table class="standard-90"><tr>
<td style="width:2.1em;" valign="baseline">(a)</td>
<td valign="top">For verifying the objective and/or constraint gradients (see the description of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verify"><m:mi mathcolor="#800080;" mathvariant="bold">Verify</m:mi></m:maction></m:math>).</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(b)</td>
<td valign="top">For estimating unspecified elements of the objective gradient or the constraint Jacobian.</td>
</tr></table> 
</div>
<div class="paramtext">In general, a derivative with respect to the <m:math><m:mi>j</m:mi></m:math>th variable is approximated using the interval <m:math><m:msub><m:mi>&#948;</m:mi><m:mi>j</m:mi></m:msub></m:math>, where <m:math><m:msub><m:mi>&#948;</m:mi><m:mi>j</m:mi></m:msub><m:mo>=</m:mo><m:mi>r</m:mi><m:mfenced separators=""><m:mn>1</m:mn><m:mo>+</m:mo><m:mfenced open="|" close="|" separators=""><m:msub><m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover><m:mi>j</m:mi></m:msub></m:mfenced></m:mfenced></m:math>, with <m:math><m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover></m:math>&#160;the first point feasible with respect to the bounds and linear constraints.  If the functions are well scaled then the resulting derivative approximation should be accurate to <m:math><m:mrow><m:mi mathvariant="italic">O</m:mi><m:mfenced separators=""><m:mi>r</m:mi></m:mfenced></m:mrow></m:math>.  See <a class="ref" href="#ref079">Gill <span class="italic">et al.</span> (1981)</a> for a discussion of the accuracy in finite difference approximations.</div>
<div class="paramtext">If a difference interval is not specified by you then a finite difference interval will be computed automatically for each variable by a procedure that requires up to six intermediate exits for each element.  This option is recommended if the function is badly scaled or you wish to have E04UFF/E04UFA determine constant elements in the objective and constraint gradients.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_feasibilitytolerance" id="feasibilitytolerance"/><b><span class="u">Fe</span>asibility Tolerance</b></td><td class="optparam-center"><i>r</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math></td></tr></table><div class="paramtext">The scalar <m:math><m:mi>r</m:mi></m:math>&#160;defines the maximum acceptable <span class="italic">absolute</span> violations in linear and nonlinear constraints at a &#8216;feasible&#8217; point; i.e., a constraint is considered satisfied if its violation does not exceed <m:math><m:mi>r</m:mi></m:math>.  If <m:math><m:mi>r</m:mi><m:mo>&lt;</m:mo><m:mi>&#949;</m:mi></m:math>&#160;or <m:math><m:mi>r</m:mi><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math>, the default value is used.  Using this keyword sets both optional parameters <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_lf-tolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Linear Feasibility Tolerance</m:mi></m:maction></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_nonlf-tolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Nonlinear Feasibility Tolerance</m:mi></m:maction></m:math>&#160;to <m:math><m:mi>r</m:mi></m:math>, if <m:math><m:mi>&#949;</m:mi><m:mo>&#8804;</m:mo><m:mi>r</m:mi><m:mo>&lt;</m:mo><m:mn>1</m:mn></m:math>.  (Additional details are given under the descriptions of these optional parameters.)</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_functionprecision" id="functionprecision"/><b><span class="u">Fu</span>nction Precision</b></td><td class="optparam-center"><i>r</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:msup><m:mi>&#949;</m:mi><m:mn>0.9</m:mn></m:msup></m:math></td></tr></table><div class="paramtext">This parameter defines <m:math><m:msub><m:mi>&#949;</m:mi><m:mi>r</m:mi></m:msub></m:math>, which is intended to be a measure of the accuracy with which the problem functions <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;and <m:math><m:mi>c</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;can be computed.  If <m:math><m:mi>r</m:mi><m:mo>&lt;</m:mo><m:mi>&#949;</m:mi></m:math>&#160;or <m:math><m:mi>r</m:mi><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math>, the default value is used.</div>
<div class="paramtext">The value of <m:math><m:msub><m:mi>&#949;</m:mi><m:mi>r</m:mi></m:msub></m:math>&#160;should reflect the relative precision of <m:math><m:mn>1</m:mn><m:mo>+</m:mo><m:mfenced open="|" close="|" separators=""><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:mfenced></m:math>; i.e., <m:math><m:msub><m:mi>&#949;</m:mi><m:mi>r</m:mi></m:msub></m:math>&#160;acts as a relative precision when <m:math><m:mfenced open="|" close="|" separators=""><m:mi>F</m:mi></m:mfenced></m:math>&#160;is large and as an absolute precision when <m:math><m:mfenced open="|" close="|" separators=""><m:mi>F</m:mi></m:mfenced></m:math>&#160;is small.  For example, if <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is typically of order <m:math><m:mn>1000</m:mn></m:math>&#160;and the first six significant digits are known to be correct, an appropriate value for <m:math><m:msub><m:mi>&#949;</m:mi><m:mi>r</m:mi></m:msub></m:math>&#160;would be <m:math><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>6</m:mn></m:mrow></m:msup></m:math>.  In contrast, if <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is typically of order <m:math><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>4</m:mn></m:mrow></m:msup></m:math>&#160;and the first six significant digits are known to be correct, an appropriate value for <m:math><m:msub><m:mi>&#949;</m:mi><m:mi>r</m:mi></m:msub></m:math>&#160;would be <m:math><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>10</m:mn></m:mrow></m:msup></m:math>.  The choice of <m:math><m:msub><m:mi>&#949;</m:mi><m:mi>r</m:mi></m:msub></m:math>&#160;can be quite complicated for badly scaled problems; see Chapter 8 of <a class="ref" href="#ref079">Gill <span class="italic">et al.</span> (1981)</a> for a discussion of scaling techniques.  The default value is appropriate for most simple functions that are computed with full accuracy.  However, when the accuracy of the computed function values is known to be significantly worse than full precision, the value of <m:math><m:msub><m:mi>&#949;</m:mi><m:mi>r</m:mi></m:msub></m:math>&#160;should be large enough so that E04UFF/E04UFA will not attempt to distinguish between function values that differ by less than the error inherent in the calculation.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_hessian" id="hessian"/><b><span class="u">H</span>essian</b></td><td class="optparam-center"/><td class="optparam-right">Default <m:math><m:mo>=</m:mo><m:mi mathvariant="normal">No</m:mi></m:math></td></tr></table><div class="paramtext">This option controls the contents of the upper triangular matrix <m:math><m:mi>R</m:mi></m:math>&#160;(see <a class="sec" href="#parameters">Section 5</a>).  E04UFF/E04UFA works exclusively with the <span class="italic">transformed and reordered</span> Hessian <m:math><m:msub><m:mi>H</m:mi><m:mi>Q</m:mi></m:msub></m:math>&#160;<a class="eqn" href="#eqn6">(6)</a>, and hence extra computation is required to form the Hessian itself.  If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_hessian"><m:mi mathcolor="#800080;" mathvariant="bold">Hessian</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">No</m:mi></m:math>, <a class="arg" href="#R">R</a> contains the Cholesky factor of the transformed and reordered Hessian.  If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_hessian"><m:mi mathcolor="#800080;" mathvariant="bold">Hessian</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">Yes</m:mi></m:math>, the Cholesky factor of the approximate Hessian itself is formed and stored in <a class="arg" href="#R">R</a>.  You should select <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_hessian"><m:mi mathcolor="#800080;" mathvariant="bold">Hessian</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">Yes</m:mi></m:math>&#160;if a <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_warmstart"><m:mi mathcolor="#800080;" mathvariant="bold">Warm Start</m:mi></m:maction></m:math>&#160;will be used for the next call to E04UFF/E04UFA.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_infiniteboundsize" id="infiniteboundsize"/><b><span class="u">In</span>finite <span class="u">B</span>ound Size</b></td><td class="optparam-center"><i>r</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:msup><m:mn>10</m:mn><m:mn>20</m:mn></m:msup></m:math></td></tr></table><div class="paramtext">If <m:math><m:mi>r</m:mi><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:mi>r</m:mi></m:math>&#160;defines the &#8216;infinite&#8217; bound <m:math><m:mi mathvariant="italic">infbnd</m:mi></m:math>&#160;in the definition of the problem constraints.  Any upper bound greater than or equal to <m:math><m:mi mathvariant="italic">infbnd</m:mi></m:math>&#160;will be regarded as <m:math><m:mrow><m:mo>+</m:mo><m:mi>&#8734;</m:mi></m:mrow></m:math>&#160;(and similarly any lower bound less than or equal to <m:math><m:mrow><m:mo>-</m:mo><m:mi mathvariant="italic">infbnd</m:mi></m:mrow></m:math>&#160;will be regarded as <m:math><m:mrow><m:mo>-</m:mo><m:mi>&#8734;</m:mi></m:mrow></m:math>).  If <m:math><m:mi>r</m:mi><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>, the default value is used.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_infinitestepsize" id="infinitestepsize"/><b><span class="u">In</span>finite <span class="u">S</span>tep Size</b></td><td class="optparam-center"><i>r</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mi mathvariant="italic">bigbnd</m:mi><m:mo>,</m:mo><m:msup><m:mn>10</m:mn><m:mn>20</m:mn></m:msup></m:mfenced></m:mrow></m:math></td></tr></table><div class="paramtext">If <m:math><m:mi>r</m:mi><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:mi>r</m:mi></m:math>&#160;specifies the magnitude of the change in variables that is treated as a step to an unbounded solution.  If the change in <m:math><m:mi>x</m:mi></m:math>&#160;during an iteration would exceed the value of <m:math><m:mi>r</m:mi></m:math>, the objective function is considered to be unbounded below in the feasible region.  If <m:math><m:mi>r</m:mi><m:mo>&#8804;</m:mo><m:mn>0</m:mn></m:math>, the default value is used.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_linesearchtolerance" id="linesearchtolerance"/><b><span class="u">Line</span> Search Tolerance</b></td><td class="optparam-center"><i>r</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>0.9</m:mn></m:math></td></tr></table><div class="paramtext">The value <m:math><m:mi>r</m:mi></m:math>&#160;(<m:math><m:mn>0</m:mn><m:mo>&#8804;</m:mo><m:mi>r</m:mi><m:mo>&lt;</m:mo><m:mn>1</m:mn></m:math>) controls the accuracy with which the step <m:math><m:mi>&#945;</m:mi></m:math>&#160;taken during each iteration approximates a minimum of the merit function along the search direction (the smaller the value of <m:math><m:mi>r</m:mi></m:math>, the more accurate the linesearch).  The default value <m:math><m:mi>r</m:mi><m:mo>=</m:mo><m:mn>0.9</m:mn></m:math>&#160;requests an inaccurate search and is appropriate for most problems, particularly those with any nonlinear constraints.</div>
<div class="paramtext">If there are no nonlinear constraints, a more accurate search may be appropriate when it is desirable to reduce the number of major iterations &#8211; for example, if the objective function is cheap to evaluate, or if a substantial number of derivatives are unspecified.  If <m:math><m:mi>r</m:mi><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math><m:mi>r</m:mi><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math>, the default value is used.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_lf-tolerance" id="lf-tolerance"/><b><span class="u">Linear</span> <span class="u">F</span>easibility Tolerance</b></td><td class="optparam-center"><i>r</i><sub>1</sub></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math></td></tr></table>
<table class="multi-optparam"><tr><td class="optparam-left"><a name="optparam_nonlf-tolerance" id="nonlf-tolerance"/><b><span class="u">Non</span>linear <span class="u">F</span>easibility Tolerance</b></td><td class="optparam-center"><i>r</i><sub>2</sub></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:msup><m:mi>&#949;</m:mi><m:mn>0.33</m:mn></m:msup></m:math>&#160;or <m:math><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math></td></tr></table><div class="paramtext">The default value of <m:math><m:msub><m:mi>r</m:mi><m:mn>2</m:mn></m:msub></m:math>&#160;is <m:math><m:msup><m:mi>&#949;</m:mi><m:mn>0.33</m:mn></m:msup></m:math>&#160;if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_derivativelevel"><m:mi mathcolor="#800080;" mathvariant="bold">Derivative Level</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>, and <m:math><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math>&#160;otherwise.</div>
<div class="paramtext">The scalars <m:math><m:msub><m:mi>r</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>r</m:mi><m:mn>2</m:mn></m:msub></m:math>&#160;define the maximum acceptable <span class="italic">absolute</span> violations in linear and nonlinear constraints at a &#8216;feasible&#8217; point; i.e., a linear constraint is considered satisfied if its violation does not exceed <m:math><m:msub><m:mi>r</m:mi><m:mn>1</m:mn></m:msub></m:math>.  Similarly a nonlinear constraint is considered satisfied if its violation does not exceed <m:math><m:msub><m:mi>r</m:mi><m:mn>2</m:mn></m:msub></m:math>.  If <m:math><m:msub><m:mi>r</m:mi><m:mi>m</m:mi></m:msub><m:mo>&lt;</m:mo><m:mi>&#949;</m:mi></m:math>&#160;or <m:math><m:msub><m:mi>r</m:mi><m:mi>m</m:mi></m:msub><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math>, the default value is used, for <m:math><m:mi>m</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>2</m:mn></m:math>.</div>
<div class="paramtext">On entry to E04UFF/E04UFA, an iterative procedure is executed in order to find a point that satisfies the linear constraints and bounds on the variables to within the tolerance <m:math><m:msub><m:mi>r</m:mi><m:mn>1</m:mn></m:msub></m:math>.  All subsequent iterates will satisfy the linear constraints to within the same tolerance (unless <m:math><m:msub><m:mi>r</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;is comparable to the finite difference interval).</div>
<div class="paramtext">For nonlinear constraints, the feasibility tolerance <m:math><m:msub><m:mi>r</m:mi><m:mn>2</m:mn></m:msub></m:math>&#160;defines the largest constraint violation that is acceptable at an optimal point.  Since nonlinear constraints are generally not satisfied until the final iterate, the value of optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_nonlf-tolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Nonlinear Feasibility Tolerance</m:mi></m:maction></m:math>&#160;acts as a partial termination criterion for the iterative sequence generated by E04UFF/E04UFA (see the discussion of optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_optimalitytolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Optimality Tolerance</m:mi></m:maction></m:math>).</div>
<div class="paramtext">These tolerances should reflect the precision of the corresponding constraints.  For example, if the variables and the coefficients in the linear constraints are of order unity, and the latter are correct to about <m:math><m:mn>6</m:mn></m:math>&#160;decimal digits, it would be appropriate to specify <m:math><m:msub><m:mi>r</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;as <m:math><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>6</m:mn></m:mrow></m:msup></m:math>.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_list" id="list"/><b><span class="u">List</span></b></td><td class="optparam-center"/><td class="optparam-right">Default for E04UFF</td></tr></table>
<table class="multi-optparam"><tr><td class="optparam-left"><a name="optparam_nolist" id="nolist"/><b><span class="u">Nolist</span></b></td><td class="optparam-center"/><td class="optparam-right">Default for E04UFA</td></tr></table><div class="paramtext">Normally each optional parameter specification is printed as it is supplied.  Optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_nolist"><m:mi mathcolor="#800080;" mathvariant="bold">Nolist</m:mi></m:maction></m:math>&#160;may be used to suppress the printing and optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_list"><m:mi mathcolor="#800080;" mathvariant="bold">List</m:mi></m:maction></m:math>&#160;may be used to restore printing.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_majoriterationlimit" id="majoriterationlimit"/><b><span class="u">Ma</span>jor <span class="u">It</span>eration Limit</b></td><td class="optparam-center"><i>i</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>50</m:mn><m:mo>,</m:mo><m:mrow><m:mn>3</m:mn><m:mfenced separators=""><m:mi>n</m:mi><m:mo>+</m:mo><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub></m:mfenced><m:mo>+</m:mo><m:mn>10</m:mn><m:msub><m:mi>n</m:mi><m:mi>N</m:mi></m:msub></m:mrow></m:mfenced></m:mrow></m:math></td></tr></table>
<table class="multi-optparam"><tr><td class="optparam-left"><a name="optparam_iterationlimit" id="iterationlimit"/><b><span class="u">Itera</span>tion Limit</b></td><td class="optparam-center"/><td class="optparam-right"/></tr></table>
<table class="multi-optparam"><tr><td class="optparam-left"><a name="optparam_iters" id="iters"/><b><span class="u">Iter</span>s</b></td><td class="optparam-center"/><td class="optparam-right"/></tr></table>
<table class="multi-optparam"><tr><td class="optparam-left"><a name="optparam_itns" id="itns"/><b><span class="u">Itns</span></b></td><td class="optparam-center"/><td class="optparam-right"/></tr></table><div class="paramtext">The value of <m:math><m:mi>i</m:mi></m:math>&#160;specifies the maximum number of major iterations allowed before termination.  Setting <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_majorprintlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Major Print Level</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>&#160;means that the workspace needed will be computed and printed, but no iterations will be performed.  If <m:math><m:mi>i</m:mi><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>, the default value is used.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_majorprintlevel" id="majorprintlevel"/><b><span class="u">Ma</span>jor <span class="u">P</span>rint Level</b></td><td class="optparam-center"><i>i</i></td><td class="optparam-right">Default for E04UFF
<m:math><m:mtext/><m:mo>=</m:mo><m:mn>10</m:mn></m:math></td></tr></table>
<table class="multi-optparam"><tr><td class="optparam-left"><a name="optparam_printlevel" id="printlevel"/><b><span class="u">Print</span> Level</b></td><td class="optparam-center"/><td class="optparam-right">Default for E04UFA
<m:math><m:mtext/><m:mo>=</m:mo><m:mn>0</m:mn></m:math></td></tr></table><div class="paramtext">The value of <m:math><m:mi>i</m:mi></m:math>&#160;controls the amount of printout produced by the major iterations of E04UFF/E04UFA, as indicated below.  A detailed description of the printed output is given in <a class="sec" href="#fc-printedoutput">Section 8.1</a> (summary output at each major iteration and the final solution) and <a class="sec" href="#monitoring">Section 12</a> (monitoring information at each major iteration).  (See also the description of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_minorprintlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Minor Print Level</m:mi></m:maction></m:math>.)</div>
<div class="paramtext">The following printout is sent to the current advisory message unit (as defined by <a class="rout" href="../X04/x04abf.xml">X04ABF</a>): 
<div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" align="center"><b><m:math><m:mi>i</m:mi></m:math></b></td> 
<td class="libdoc" valign="top" align="center"><b>Output</b></td> 
</tr><tr>
<td class="libdoc" valign="top" align="center"><m:math><m:mphantom><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:mphantom><m:mn>0</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">No output.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mphantom><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:mphantom><m:mn>1</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">The final solution only.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mphantom><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:mphantom><m:mn>5</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">One line of summary output (<m:math><m:mtext/><m:mo>&lt;</m:mo><m:mn>80</m:mn></m:math>&#160;characters; see <a class="sec" href="#fc-printedoutput">Section 8.1</a>) for each major iteration (no printout of the final solution).</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mtext/><m:mo>&#8805;</m:mo><m:mn>10</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">The final solution and one line of summary output for each major iteration.</td> 
</tr> 
</tbody> 
</table></div> 
</div>
<div class="paramtext">The following printout is sent to the logical unit number defined by the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_monitoringfile"><m:mi mathcolor="#800080;" mathvariant="bold">Monitoring File</m:mi></m:maction></m:math>: 
<div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" align="center"><b><m:math><m:mi>i</m:mi></m:math></b></td> 
<td class="libdoc" valign="top" align="center"><b>Output</b></td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mtext/><m:mo>&lt;</m:mo><m:mn>5</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">No output.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mtext/><m:mo>&#8805;</m:mo><m:mn>5</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">One long line of output (<m:math><m:mtext/><m:mo>&gt;</m:mo><m:mn>80</m:mn></m:math>&#160;characters; see <a class="sec" href="#monitoring">Section 12</a>) for each major iteration (no printout of the final solution).</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mtext/><m:mo>&#8805;</m:mo><m:mn>20</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">At each major iteration, the objective function, the Euclidean norm of the nonlinear constraint violations, the values of the nonlinear constraints (the vector <m:math><m:mi>c</m:mi></m:math>), the values of the linear constraints (the vector <m:math><m:msub><m:mi>A</m:mi><m:mi>L</m:mi></m:msub><m:mi>x</m:mi></m:math>) and the current values of the variables (the vector <m:math><m:mi>x</m:mi></m:math>).</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mtext/><m:mo>&#8805;</m:mo><m:mn>30</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">At each major iteration, the diagonal elements of the matrix <m:math><m:mi>T</m:mi></m:math>&#160;associated with the <m:math><m:mi>T</m:mi><m:mi>Q</m:mi></m:math>&#160;factorization <a class="eqn" href="#eqn5">(5)</a> (see <a class="sec" href="#ad-overview">Section 10.1</a>) of the QP working set and the diagonal elements of <m:math><m:mi>R</m:mi></m:math>, the triangular factor of the transformed and reordered Hessian <a class="eqn" href="#eqn6">(6)</a> (see <a class="sec" href="#ad-overview">Section 10.1</a>).</td> 
</tr> 
</tbody> 
</table></div> 
</div>
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_majorprintlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Major Print Level</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>5</m:mn></m:math>&#160;and the unit number defined by the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_monitoringfile"><m:mi mathcolor="#800080;" mathvariant="bold">Monitoring File</m:mi></m:maction></m:math>&#160;is the same as that defined by <a class="rout" href="../X04/x04abf.xml">X04ABF</a>, then the summary output for each major iteration is suppressed.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_minoriterationlimit" id="minoriterationlimit"/><b><span class="u">Min</span>or <span class="u">Itera</span>tion Limit</b></td><td class="optparam-center"><i>i</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>50</m:mn><m:mo>,</m:mo><m:mrow><m:mn>3</m:mn><m:mfenced separators=""><m:mi>n</m:mi><m:mo>+</m:mo><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub><m:mo>+</m:mo><m:msub><m:mi>n</m:mi><m:mi>N</m:mi></m:msub></m:mfenced></m:mrow></m:mfenced></m:mrow></m:math></td></tr></table><div class="paramtext">The value of <m:math><m:mi>i</m:mi></m:math>&#160;specifies the maximum number of iterations for finding a feasible point with respect to the bounds and linear constraints (if any).  The value of <m:math><m:mi>i</m:mi></m:math>&#160;also specifies the maximum number of minor iterations for the optimality phase of each QP subproblem.  If <m:math><m:mi>i</m:mi><m:mo>&#8804;</m:mo><m:mn>0</m:mn></m:math>, the default value is used.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_minorprintlevel" id="minorprintlevel"/><b><span class="u">Min</span>or <span class="u">P</span>rint Level</b></td><td class="optparam-center"><i>i</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>0</m:mn></m:math></td></tr></table><div class="paramtext">The value of <m:math><m:mi>i</m:mi></m:math>&#160;controls the amount of printout produced by the minor iterations of E04UFF/E04UFA (i.e., the iterations of the quadratic programming algorithm), as indicated below.  A detailed description of the printed output is given in <a class="sec" href="../E04/e04ncf.xml#fc-printedoutput">Section 8.2</a> in E04NCF/E04NCA (summary output at each minor iteration and the final QP solution) and <a class="sec" href="../E04/e04ncf.xml#monitoring">Section 12</a> in E04NCF/E04NCA) (monitoring information at each minor iteration).  (See also the description of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_majorprintlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Major Print Level</m:mi></m:maction></m:math>.)</div>
<div class="paramtext">The following printout is sent to the current advisory message unit (as defined by <a class="rout" href="../X04/x04abf.xml">X04ABF</a>): 
<div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" align="center"><b><m:math><m:mi>i</m:mi></m:math></b></td> 
<td class="libdoc" valign="top" align="center"><b>Output</b></td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mphantom><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:mphantom><m:mn>0</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">No output.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mphantom><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:mphantom><m:mn>1</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">The final QP solution only.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mphantom><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:mphantom><m:mn>5</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">One line of summary output (<m:math><m:mtext/><m:mo>&lt;</m:mo><m:mn>80</m:mn></m:math>&#160;characters; see <a class="sec" href="../E04/e04ncf.xml#fc-printedoutput">Section 8.2</a> in E04NCF/E04NCA) for each minor iteration (no printout of the final QP solution).</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mtext/><m:mo>&#8805;</m:mo><m:mn>10</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">The final QP solution and one line of summary output for each minor iteration.</td> 
</tr> 
</tbody> 
</table></div> 
</div>
<div class="paramtext">The following printout is sent to the logical unit number defined by the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_monitoringfile"><m:mi mathcolor="#800080;" mathvariant="bold">Monitoring File</m:mi></m:maction></m:math>: 
<div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" align="center"><b><m:math><m:mi>i</m:mi></m:math></b></td> 
<td class="libdoc" valign="top" align="center"><b>Output</b></td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mtext/><m:mo>&lt;</m:mo><m:mn>5</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">No output.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mtext/><m:mo>&#8805;</m:mo><m:mn>5</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">One long line of output (<m:math><m:mtext/><m:mo>&gt;</m:mo><m:mn>80</m:mn></m:math>&#160;characters; see <a class="sec" href="../E04/e04ncf.xml#fc-printedoutput">Section 8.2</a> in E04NCF/E04NCA) for each minor iteration (no printout of the final QP solution).</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mtext/><m:mo>&#8805;</m:mo><m:mn>20</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">At each minor iteration, the current estimates of the QP multipliers, the current estimate of the QP search direction, the QP constraint values and the status of each QP constraint.</td> 
</tr><tr>
<td class="libdoc" valign="top" align="center"><m:math><m:mtext/><m:mo>&#8805;</m:mo><m:mn>30</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">At each minor iteration, the diagonal elements of the matrix <m:math><m:mi>T</m:mi></m:math>&#160;associated with the <m:math><m:mi>T</m:mi><m:mi>Q</m:mi></m:math>&#160;factorization <a class="eqn" href="#eqn5">(5)</a> (see <a class="sec" href="#ad-overview">Section 10.1</a>) of the QP working set and the diagonal elements of the Cholesky factor <m:math><m:mi>R</m:mi></m:math>&#160;of the transformed Hessian <a class="eqn" href="#eqn6">(6)</a> (see <a class="sec" href="#ad-overview">Section 10.1</a>).</td> 
</tr> 
</tbody> 
</table></div> 
</div>
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_minorprintlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Minor Print Level</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>5</m:mn></m:math>&#160;and the unit number defined by the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_monitoringfile"><m:mi mathcolor="#800080;" mathvariant="bold">Monitoring File</m:mi></m:maction></m:math>&#160;is the same as that defined by <a class="rout" href="../X04/x04abf.xml">X04ABF</a> then the summary output for each minor iteration is suppressed.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_monitoringfile" id="monitoringfile"/><b><span class="u">Mo</span>nitoring File</b></td><td class="optparam-center"><i>i</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math></td></tr></table><div class="paramtext">If <m:math><m:mi>i</m:mi><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_majorprintlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Major Print Level</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>5</m:mn></m:math>&#160;or <m:math><m:mi>i</m:mi><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_minorprintlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Minor Print Level</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>5</m:mn></m:math>, monitoring information produced by E04UFF/E04UFA at every iteration is sent to a file with logical unit number <m:math><m:mi>i</m:mi></m:math>.  If <m:math><m:mi>i</m:mi><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>&#160;and/or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_majorprintlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Major Print Level</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>5</m:mn></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_minorprintlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Minor Print Level</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>5</m:mn></m:math>, no monitoring information is produced.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_optimalitytolerance" id="optimalitytolerance"/><b><span class="u">Op</span>timality Tolerance</b></td><td class="optparam-center"><i>r</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:msubsup><m:mi>&#949;</m:mi><m:mi>r</m:mi><m:mn>0.8</m:mn></m:msubsup></m:math></td></tr></table><div class="paramtext">The parameter <m:math><m:mi>r</m:mi></m:math>&#160;(<m:math><m:msub><m:mi>&#949;</m:mi><m:mi>r</m:mi></m:msub><m:mo>&#8804;</m:mo><m:mi>r</m:mi><m:mo>&lt;</m:mo><m:mn>1</m:mn></m:math>) specifies the accuracy to which you wish the final iterate to approximate a solution of the problem.  Broadly speaking, <m:math><m:mi>r</m:mi></m:math>&#160;indicates the number of correct figures desired in the objective function at the solution.  For example, if <m:math><m:mi>r</m:mi></m:math>&#160;is <m:math><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>6</m:mn></m:mrow></m:msup></m:math>&#160;and E04UFF/E04UFA terminates successfully, the final value of <m:math><m:mi>F</m:mi></m:math>&#160;should have approximately six correct figures.  If <m:math><m:mi>r</m:mi><m:mo>&lt;</m:mo><m:msub><m:mi>&#949;</m:mi><m:mi>r</m:mi></m:msub></m:math>&#160;or <m:math><m:mi>r</m:mi><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math>, the default value is used.</div>
<div class="paramtext">E04UFF/E04UFA will terminate successfully if the iterative sequence of <m:math><m:mi>x</m:mi></m:math>&#160;values is judged to have converged and the final point satisfies the first-order Kuhn&#8211;Tucker conditions (see <a class="sec" href="#ad-overview">Section 10.1</a>).  The sequence of iterates is considered to have converged at <m:math><m:mi>x</m:mi></m:math>&#160;if 
<div class="formula-eqn"><a name="eqnconvergence1" id="eqnconvergence1"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block"> <m:mi>&#945;</m:mi><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>p</m:mi></m:mfenced><m:mo>&#8804;</m:mo><m:msqrt><m:mi>r</m:mi></m:msqrt><m:mfenced separators=""><m:mn>1</m:mn><m:mo>+</m:mo><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>x</m:mi></m:mfenced></m:mfenced><m:mtext>,</m:mtext> </m:math></td><td class="formula-eqn2">
      (16)
     </td></tr></table></div>
 where <m:math><m:mi>p</m:mi></m:math>&#160;is the search direction and <m:math><m:mi>&#945;</m:mi></m:math>&#160;the step length from <a class="eqn" href="#eqn3">(3)</a>.  An iterate is considered to satisfy the first-order conditions for a minimum if 
<div class="formula-eqn"><a name="eqnconvergence2" id="eqnconvergence2"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block"> <m:mfenced open="&#8214;" close="&#8214;" separators=""> <m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup> <m:msub> <m:mi>g</m:mi> <m:mi mathvariant="normal">FR</m:mi> </m:msub> </m:mfenced> <m:mo>&#8804;</m:mo> <m:msqrt> <m:mi>r</m:mi> </m:msqrt> <m:mfenced separators=""> <m:mn>1</m:mn> <m:mo>+</m:mo> <m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mrow> <m:mn>1</m:mn> <m:mo>+</m:mo> <m:mfenced open="|" close="|" separators=""> <m:mi>F</m:mi> <m:mfenced separators=""> <m:mi>x</m:mi> </m:mfenced> </m:mfenced> </m:mrow><m:mo>,</m:mo><m:mfenced open="&#8214;" close="&#8214;" separators=""> <m:msub> <m:mi>g</m:mi> <m:mi mathvariant="normal">FR</m:mi> </m:msub> </m:mfenced></m:mfenced></m:mrow> </m:mfenced> </m:math></td><td class="formula-eqn2">
      (17)
     </td></tr></table></div>
 and 
<div class="formula-eqn"><a name="eqnconvergence3" id="eqnconvergence3"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block"> <m:mfenced open="|" close="|" separators=""><m:msub><m:mi mathvariant="italic">res</m:mi><m:mi>j</m:mi></m:msub></m:mfenced><m:mo>&#8804;</m:mo><m:mi mathvariant="italic">ftol</m:mi><m:mtext>&#8195; for all &#8195;</m:mtext><m:mi>j</m:mi><m:mtext>,</m:mtext> </m:math></td><td class="formula-eqn2">
      (18)
     </td></tr></table></div>
 where <m:math><m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:msub><m:mi>g</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;is the projected gradient (see <a class="sec" href="#ad-overview">Section 10.1</a>), <m:math><m:msub><m:mi>g</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;is the gradient of <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;with respect to the free variables, <m:math><m:msub><m:mi mathvariant="italic">res</m:mi><m:mi>j</m:mi></m:msub></m:math>&#160;is the violation of the <m:math><m:mi>j</m:mi></m:math>th active nonlinear constraint and <m:math><m:mi mathvariant="italic">ftol</m:mi></m:math>&#160;is the <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_nonlf-tolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Nonlinear Feasibility Tolerance</m:mi></m:maction></m:math>.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_start-obj-check-var" id="start-obj-check-var"/><b><span class="u">Sta</span>rt <span class="u">O</span>bjective Check At Variable</b></td><td class="optparam-center"><i>i</i><sub>1</sub></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>1</m:mn></m:math></td></tr></table>
<table class="multi-optparam"><tr><td class="optparam-left"><a name="optparam_stop-obj-check-var" id="stop-obj-check-var"/><b><span class="u">Sto</span>p <span class="u">O</span>bjective Check At Variable</b></td><td class="optparam-center"><i>i</i><sub>2</sub></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mi>n</m:mi></m:math></td></tr></table>
<table class="multi-optparam"><tr><td class="optparam-left"><a name="optparam_startcon-check-var" id="startcon-check-var"/><b><span class="u">Sta</span>rt <span class="u">C</span>onstraint Check At Variable</b></td><td class="optparam-center"><i>i</i><sub>3</sub></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>1</m:mn></m:math></td></tr></table>
<table class="multi-optparam"><tr><td class="optparam-left"><a name="optparam_stopcon-check-var" id="stopcon-check-var"/><b><span class="u">Sto</span>p <span class="u">C</span>onstraint Check At Variable</b></td><td class="optparam-center"><i>i</i><sub>4</sub></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mi>n</m:mi></m:math></td></tr></table><div class="paramtext">These keywords take effect only if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verifylevel"><m:mi mathcolor="#800080;" mathvariant="bold">Verify Level</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>.  They may be used to control the verification of gradient elements and/or Jacobian elements computed by the calling program during intermediate exits.  For example, if the first <m:math><m:mn>30</m:mn></m:math>&#160;elements of the objective gradient appeared to be correct in an earlier run, so that only element <m:math><m:mn>31</m:mn></m:math>&#160;remains questionable, it is reasonable to specify <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_start-obj-check-var"><m:mi mathcolor="#800080;" mathvariant="bold">Start Objective Check At Variable</m:mi></m:maction><m:mo>=</m:mo><m:mn>31</m:mn></m:math>.  If the first <m:math><m:mn>30</m:mn></m:math>&#160;variables appear linearly in the objective, so that the corresponding gradient elements are constant, the above choice would also be appropriate.</div>
<div class="paramtext">If <m:math><m:msub><m:mi>i</m:mi><m:mrow><m:mn>2</m:mn><m:mi>m</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>&#8804;</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math><m:msub><m:mi>i</m:mi><m:mrow><m:mn>2</m:mn><m:mi>m</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>&gt;</m:mo><m:mrow><m:mi>min</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mi>n</m:mi><m:mo>,</m:mo><m:msub><m:mi>i</m:mi><m:mrow><m:mn>2</m:mn><m:mi>m</m:mi></m:mrow></m:msub></m:mfenced></m:mrow></m:math>, the default value is used, for <m:math><m:mi>m</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>2</m:mn></m:math>.  If <m:math><m:msub><m:mi>i</m:mi><m:mrow><m:mn>2</m:mn><m:mi>m</m:mi></m:mrow></m:msub><m:mo>&#8804;</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math><m:msub><m:mi>i</m:mi><m:mrow><m:mn>2</m:mn><m:mi>m</m:mi></m:mrow></m:msub><m:mo>&gt;</m:mo><m:mi>n</m:mi></m:math>, the default value is used, for <m:math><m:mi>m</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>2</m:mn></m:math>.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_steplimit" id="steplimit"/><b><span class="u">St</span>ep Limit</b></td><td class="optparam-center"><i>r</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>2.0</m:mn></m:math></td></tr></table><div class="paramtext">If <m:math><m:mi>r</m:mi><m:mo>&gt;</m:mo><m:mn>0</m:mn><m:mo>,</m:mo><m:mi>r</m:mi></m:math>&#160;specifies the maximum change in variables at the first step of the linesearch.  In some cases, such as <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:mi>a</m:mi><m:msup><m:mi>e</m:mi><m:mrow><m:mi>b</m:mi><m:mi>x</m:mi></m:mrow></m:msup></m:math>&#160;or <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:mi>a</m:mi><m:msup><m:mi>x</m:mi><m:mi>b</m:mi></m:msup></m:math>, even a moderate change in the elements of <m:math><m:mi>x</m:mi></m:math>&#160;can lead to floating-point overflow.  The parameter <m:math><m:mi>r</m:mi></m:math>&#160;is therefore used to encourage evaluation of the problem functions at meaningful points.  Given any major iterate <m:math><m:mi>x</m:mi></m:math>, the first point <m:math><m:mover><m:mi>x</m:mi><m:mo>~</m:mo></m:mover></m:math>&#160;at which <m:math><m:mi>F</m:mi></m:math>&#160;and <m:math><m:mi>c</m:mi></m:math>&#160;are evaluated during the linesearch is restricted so that 
<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block"> <m:msub><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mover><m:mi>x</m:mi><m:mo>~</m:mo></m:mover><m:mo>-</m:mo><m:mi>x</m:mi></m:mfenced><m:mn>2</m:mn></m:msub><m:mo>&#8804;</m:mo><m:mi>r</m:mi><m:mfenced separators=""><m:mn>1</m:mn><m:mo>+</m:mo><m:msub><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>x</m:mi></m:mfenced><m:mn>2</m:mn></m:msub></m:mfenced><m:mtext>.</m:mtext> </m:math></td><td class="formula2"/></tr></table></div>
 The linesearch may go on and evaluate <m:math><m:mi>F</m:mi></m:math>&#160;and <m:math><m:mi>c</m:mi></m:math>&#160;at points further from <m:math><m:mi>x</m:mi></m:math>&#160;if this will result in a lower value of the merit function (indicated by <span class="mono">L</span> at the end of each line of output produced by the major iterations; see <a class="sec" href="#fc-printedoutput">Section 8.1</a>).  If <span class="mono">L</span> is printed for most of the iterations, <m:math><m:mi>r</m:mi></m:math>&#160;should be set to a larger value.</div>
<div class="paramtext">Wherever possible, upper and lower bounds on <m:math><m:mi>x</m:mi></m:math>&#160;should be used to prevent evaluation of nonlinear functions at wild values.  The default value <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_steplimit"><m:mi mathcolor="#800080;" mathvariant="bold">Step Limit</m:mi></m:maction><m:mo>=</m:mo><m:mn>2.0</m:mn></m:math>&#160;should not affect progress on well-behaved functions, but values such as <m:math><m:mn>0.1</m:mn> <m:mtext>&#8203; or &#8203;</m:mtext> <m:mn>0.01</m:mn></m:math>&#160;may be helpful when rapidly varying functions are present.  If a small value of <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_steplimit"><m:mi mathcolor="#800080;" mathvariant="bold">Step Limit</m:mi></m:maction></m:math>&#160;is selected then a good starting point may be required.  An important application is to the class of nonlinear least-squares problems.  If <m:math><m:mi>r</m:mi><m:mo>&#8804;</m:mo><m:mn>0</m:mn></m:math>, the default value is used.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_verifylevel" id="verifylevel"/><b><span class="u">Ve</span>rify <span class="u">L</span>evel</b></td><td class="optparam-center"><i>i</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>0</m:mn></m:math></td></tr></table>
<table class="multi-optparam"><tr><td class="optparam-left"><a name="optparam_verify" id="verify"/><b><span class="u">Ve</span>rify</b></td><td class="optparam-center"/><td class="optparam-right"/></tr></table>
<table class="multi-optparam"><tr><td class="optparam-left"><a name="optparam_verifyconstraintgradients" id="verifyconstraintgradients"/><b><span class="u">Ve</span>rify <span class="u">C</span>onstraint Gradients</b></td><td class="optparam-center"/><td class="optparam-right"/></tr></table>
<table class="multi-optparam"><tr><td class="optparam-left"><a name="optparam_verifygradients" id="verifygradients"/><b><span class="u">Ve</span>rify <span class="u">G</span>radients</b></td><td class="optparam-center"/><td class="optparam-right"/></tr></table>
<table class="multi-optparam"><tr><td class="optparam-left"><a name="optparam_verifyobjectivegradients" id="verifyobjectivegradients"/><b><span class="u">Ve</span>rify <span class="u">O</span>bjective Gradients</b></td><td class="optparam-center"/><td class="optparam-right"/></tr></table><div class="paramtext">These keywords refer to finite difference checks on the gradient elements computed by the calling program during intermediate exits.  (Unspecified gradient elements are not checked.) The possible choices for <m:math><m:mi>i</m:mi></m:math>&#160;are as follows: 
<div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" align="center"><b><m:math><m:mi>i</m:mi></m:math></b></td> 
<td class="libdoc" valign="top" align="center"><b>Meaning</b></td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math></td> 
<td class="libdoc" valign="top" align="left">No checks are performed.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mphantom><m:mo>-</m:mo></m:mphantom><m:mn>0</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">Only a &#8216;cheap&#8217; test will be performed.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">In addition to the &#8216;cheap&#8217; test, individual gradient elements will also be checked using a reliable (but more expensive) test.</td> 
</tr> 
</tbody> 
</table></div> 
</div>
<div class="paramtext">It is possible to specify <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verifylevel"><m:mi mathcolor="#800080;" mathvariant="bold">Verify Level</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;to <m:math><m:mn>3</m:mn></m:math>&#160;in several ways.  For example, the objective gradient will be verified if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verify"><m:mi mathcolor="#800080;" mathvariant="bold">Verify</m:mi></m:maction></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verify"><m:mi mathcolor="#800080;" mathvariant="bold">Verify</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">Yes</m:mi></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verifygradients"><m:mi mathcolor="#800080;" mathvariant="bold">Verify Gradients</m:mi></m:maction></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verifyobjectivegradients"><m:mi mathcolor="#800080;" mathvariant="bold">Verify Objective Gradients</m:mi></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verifylevel"><m:mi mathcolor="#800080;" mathvariant="bold">Verify Level</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;is specified. The constraint gradients will be verified if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verify"><m:mi mathcolor="#800080;" mathvariant="bold">Verify</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">Yes</m:mi></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verifylevel"><m:mi mathcolor="#800080;" mathvariant="bold">Verify Level</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verify"><m:mi mathcolor="#800080;" mathvariant="bold">Verify</m:mi></m:maction></m:math>&#160;is specified. Similarly, the objective and the constraint gradients will be verified if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verify"><m:mi mathcolor="#800080;" mathvariant="bold">Verify</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">Yes</m:mi></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verifylevel"><m:mi mathcolor="#800080;" mathvariant="bold">Verify Level</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verify"><m:mi mathcolor="#800080;" mathvariant="bold">Verify</m:mi></m:maction></m:math>&#160;is specified.</div>
<div class="paramtext">If <m:math><m:mn>0</m:mn><m:mo>&#8804;</m:mo><m:mi>i</m:mi><m:mo>&#8804;</m:mo><m:mn>3</m:mn></m:math>, gradients will be verified at the first point that satisfies the linear constraints and bounds.</div>
<div class="paramtext">If <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, only a &#8216;cheap&#8217; test will be performed, requiring one intermediate exit for the objective function gradients and (if appropriate) one intermediate exit for the partial derivatives of the constraints.</div>
<div class="paramtext">If <m:math><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:mi>i</m:mi><m:mo>&#8804;</m:mo><m:mn>3</m:mn></m:math>, a more reliable (but more expensive) check will be made on individual gradient elements, within the ranges specified by the <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_start-obj-check-var"><m:mi mathcolor="#800080;" mathvariant="bold">Start Objective Check At Variable</m:mi></m:maction></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_stop-obj-check-var"><m:mi mathcolor="#800080;" mathvariant="bold">Stop Objective Check At Variable</m:mi></m:maction></m:math>&#160;keywords.  A result of the form <span class="mono">OK</span> or <span class="mono">BAD?</span> is printed by E04UFF/E04UFA to indicate whether or not each element appears to be correct.</div>
<div class="paramtext">If <m:math><m:mn>10</m:mn><m:mo>&#8804;</m:mo><m:mi>i</m:mi><m:mo>&#8804;</m:mo><m:mn>13</m:mn></m:math>, the action is the same as for <m:math><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>10</m:mn></m:math>, except that it will take place at the user-specified initial value of <m:math><m:mi>x</m:mi></m:math>.</div>
<div class="paramtext">If <m:math><m:mi>i</m:mi><m:mo>&lt;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>&#160;or <m:math><m:mn>4</m:mn><m:mo>&#8804;</m:mo><m:mi>i</m:mi><m:mo>&#8804;</m:mo><m:mn>9</m:mn></m:math>&#160;or <m:math><m:mi>i</m:mi><m:mo>&gt;</m:mo><m:mn>13</m:mn></m:math>, the default value is used.</div>
<div class="paramtext">We suggest that <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_verifylevel"><m:mi mathcolor="#800080;" mathvariant="bold">Verify Level</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math>&#160;be used whenever a new calling program is being developed.</div><h2 class="standard"><a class="sec" name="monitoring" id="monitoring"/>12&#160;&#160;Description of Monitoring Information</h2>
<div class="paramtext">This section describes the long line of output (<m:math><m:mtext/><m:mo>&gt;</m:mo><m:mn>80</m:mn></m:math>&#160;characters) which forms part of the monitoring information produced by E04UFF/E04UFA.  (See also the description of the optional parameters <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_majorprintlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Major Print Level</m:mi></m:maction></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_minorprintlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Minor Print Level</m:mi></m:maction></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_monitoringfile"><m:mi mathcolor="#800080;" mathvariant="bold">Monitoring File</m:mi></m:maction></m:math>.)  You can control the level of printed output (see the description of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_majorprintlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Major Print Level</m:mi></m:maction></m:math>).</div><div class="paramtext">When <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_majorprintlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Major Print Level</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>5</m:mn></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_monitoringfile"><m:mi mathcolor="#800080;" mathvariant="bold">Monitoring File</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:math>, the following line of output is produced at every major iteration of E04UFF/E04UFA on the unit number specified by <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_monitoringfile"><m:mi mathcolor="#800080;" mathvariant="bold">Monitoring File</m:mi></m:maction></m:math>.  In all cases, the values of the quantities printed are those in effect <span class="italic">on completion</span> of the given iteration.
<table class="standard-100"><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Maj</span></td>
<td valign="top">
is the major iteration count.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Mnr</span></td>
<td valign="top">

is the number of minor iterations required by the feasibility and optimality phases of the QP subproblem.  Generally, <span class="mono">Mnr</span> will be <m:math><m:mn>1</m:mn></m:math>&#160;in the later iterations, since theoretical analysis predicts that the correct active set will be identified near the solution
 (see <a class="sec" href="#algdetails">Section 10</a>).  <div class="paramtext">
Note that <span class="mono">Mnr</span> may be greater than the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_minoriterationlimit"><m:mi mathcolor="#800080;" mathvariant="bold">Minor Iteration Limit</m:mi></m:maction></m:math>&#160;if some iterations are required for the feasibility phase.</div>
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Step</span></td>
<td valign="top">
is the step <m:math><m:msub><m:mi>&#945;</m:mi><m:mi>k</m:mi></m:msub></m:math>&#160;taken along the computed search direction.  On reasonably well-behaved problems, the unit step (i.e., <m:math><m:msub><m:mi>&#945;</m:mi><m:mi>k</m:mi></m:msub><m:mo>=</m:mo><m:mn>1</m:mn></m:math>) will be taken as the solution is approached.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Nfun</span></td>
<td valign="top">
is the cumulative number of evaluations of the objective function needed for the linesearch.  Evaluations needed for the estimation of the gradients by finite differences are not included.  <span class="mono">Nfun</span> is printed as a guide to the amount of work required for the linesearch.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Merit Function</span></td>
<td valign="top">

is the value of the augmented Lagrangian merit function <a class="eqn" href="#eqnlmf">(12)</a> at the current iterate.  This function will decrease at each iteration unless it was necessary to increase the penalty parameters
 (see <a class="sec" href="#ad-meritfunction">Section 10.3</a>).  
As the solution is approached, <span class="mono">Merit Function</span> will converge to the value of the objective function at the solution.
 <div class="paramtext">

If the QP subproblem does not have a feasible point (signified by <span class="mono">I</span> at the end of the current output line) then the merit function is a large multiple of the constraint violations, weighted by the penalty parameters.  During a sequence of major iterations with infeasible subproblems, the sequence of <span class="mono">Merit Function</span> values will decrease monotonically until either a feasible subproblem is obtained or E04UFF/E04UFA terminates with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq3"><m:mn mathcolor="#003399" mathvariant="bold">3</m:mn></m:maction></m:math>&#160;(no feasible point could be found for the nonlinear constraints).</div>
<div class="paramtext">If there are no nonlinear constraints present (i.e., <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCNLN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>) then this entry contains <span class="mono">Objective</span>, the value of the objective function <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>.  The objective function will decrease monotonically to its optimal value when there are no nonlinear constraints.</div>
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Norm Gz</span></td>
<td valign="top">

is <m:math><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:msub><m:mi>g</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:mfenced></m:math>, the Euclidean norm of the projected gradient
 (see <a class="sec" href="#ad-QPS">Section 10.2</a>).  
<span class="mono">Norm Gz</span> will be approximately zero in the neighbourhood of a solution.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Violtn</span></td>
<td valign="top">
is the Euclidean norm of the residuals of constraints that are violated or in the predicted active set (not printed if <a class="arg" href="#NCNLN">NCNLN</a> is zero).  <span class="mono">Violtn</span> will be approximately zero in the neighbourhood of a solution.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Nz</span></td>
<td valign="top">
is the number of columns of <m:math><m:mi>Z</m:mi></m:math>&#160;(see <a class="sec" href="#ad-QPS">Section 10.2</a>).  The value of <span class="mono">Nz</span> is the number of variables minus the number of constraints in the predicted active set; i.e., <m:math><m:mi mathvariant="monospace">Nz</m:mi><m:mo>=</m:mo><m:mi>n</m:mi><m:mo>-</m:mo><m:mfenced separators=""><m:mi mathvariant="monospace">Bnd</m:mi><m:mo>+</m:mo><m:mi mathvariant="monospace">Lin</m:mi><m:mo>+</m:mo><m:mi mathvariant="monospace">Nln</m:mi></m:mfenced></m:math>.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Bnd</span></td>
<td valign="top">
is the number of simple bound constraints in the predicted active set.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Lin</span></td>
<td valign="top">
is the number of general linear constraints in the predicted working set.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Nln</span></td>
<td valign="top">
is the number of nonlinear constraints in the predicted active set (not printed if <a class="arg" href="#NCNLN">NCNLN</a> is zero).
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Penalty</span></td>
<td valign="top">
is the Euclidean norm of the vector of penalty parameters used in the augmented Lagrangian merit function (not printed if <a class="arg" href="#NCNLN">NCNLN</a> is zero).
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Cond H</span></td>
<td valign="top">
is a lower bound on the condition number of the Hessian approximation <m:math><m:mi>H</m:mi></m:math>.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Cond Hz</span></td>
<td valign="top">
is a lower bound on the condition number of the projected Hessian approximation <m:math>
 <m:msub><m:mi>H</m:mi><m:mi>Z</m:mi></m:msub>
</m:math>&#160;(<m:math>
 <m:msub><m:mi>H</m:mi><m:mi>Z</m:mi></m:msub>
 <m:mo>=</m:mo>
 <m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:msub><m:mi>H</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub>
 <m:mi>Z</m:mi>
 <m:mo>=</m:mo>
 <m:msubsup><m:mi>R</m:mi><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub>
</m:math>; see <a class="eqn" href="#eqn6">(6)</a>).  The larger this number, the more difficult the problem.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Cond T</span></td>
<td valign="top">
is a lower bound on the condition number of the matrix of predicted active constraints.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">Conv</span></td>
<td valign="top">
is a three-letter indication of the status of the three convergence tests <a class="eqn" href="#eqnconvergence1">(16)</a>&#8211;<a class="eqn" href="#eqnconvergence3">(18)</a> defined in the description of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_optimalitytolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Optimality Tolerance</m:mi></m:maction></m:math>.  Each letter is <span class="mono">T</span> if the test is satisfied and <span class="mono">F</span> otherwise.  The three tests indicate whether:
<table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline">(i)</td>
<td valign="top">the sequence of iterates has converged;</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(ii)</td>
<td valign="top">the projected gradient (<span class="mono">Norm Gz</span>) is sufficiently small; and</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(iii)</td>
<td valign="top">the norm of the residuals of constraints in the predicted active set (<span class="mono">Violtn</span>) is small enough.</td>
</tr></table>
<div class="paramtext">If any of these indicators is <span class="mono">F</span> when E04UFF/E04UFA terminates with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>, you should check the solution carefully.</div>
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">M</span></td>
<td valign="top">

is printed if the quasi-Newton update has been modified to ensure that the Hessian approximation is positive-definite
 (see <a class="sec" href="#ad-quasinewton">Section 10.4</a>).
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">I</span></td>
<td valign="top">
is printed if the QP subproblem has no feasible point.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">C</span></td>
<td valign="top">


is printed if central differences have been used to compute the unspecified objective and constraint gradients.  If the value of <span class="mono">Step</span> is zero then the switch to central differences was made because no lower point could be found in the linesearch.  (In this case, the QP subproblem is resolved with the central difference gradient and Jacobian.) If the value of <span class="mono">Step</span> is nonzero then central differences were computed because <span class="mono">Norm Gz</span> and <span class="mono">Violtn</span> imply that <m:math><m:mi>x</m:mi></m:math>&#160;is close to a Kuhn&#8211;Tucker point
 (see <a class="sec" href="#ad-overview">Section 10.1</a>).

</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">L</span></td>
<td valign="top">
is printed if the linesearch has produced a relative change in <m:math><m:mi>x</m:mi></m:math>&#160;greater than the value defined by the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_steplimit"><m:mi mathcolor="#800080;" mathvariant="bold">Step Limit</m:mi></m:maction></m:math>.  If this output occurs frequently during later iterations of the run, optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_steplimit"><m:mi mathcolor="#800080;" mathvariant="bold">Step Limit</m:mi></m:maction></m:math>&#160;should be set to a larger value.
</td>
</tr><tr>
<td style="width:10.2em;" valign="baseline"><span class="mono">R</span></td>
<td valign="top">
is printed if the approximate Hessian has been refactorized.  If the diagonal condition estimator of <m:math><m:mi>R</m:mi></m:math>&#160;indicates that the approximate Hessian is badly conditioned then the approximate Hessian is refactorized using column interchanges.  If necessary, <m:math><m:mi>R</m:mi></m:math>&#160;is modified so that its diagonal condition estimator is bounded.
</td>
</tr></table>
</div>
<hr/><div><a class="rout" href="../../pdf/E04/e04uff.pdf">E04UFF/E04UFA (PDF version)</a></div><div><a class="chap" href="e04conts.xml">E04 Chapter Contents</a></div><div><a class="chapint" href="e04intro.xml">E04 Chapter Introduction</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div>
<div><hr/><a class="genint" href="../FRONTMATTER/copyright.xml">&#169; The Numerical Algorithms Group Ltd, Oxford, UK. 2009</a></div></body></html>
