<?xml-stylesheet type="text/xsl" href="../styles/pmathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:dsi="http://www.w3.org/1999/xlink" xml:space="preserve"><head>
<!-- saved from url=(0014)about:internet -->
<title>
    NAG Fortran Library Manual, Mark 21 : 
   E04UCF</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 href="../../pdf/E04/e04ucf.pdf">E04UCF (pdf version)</a></div><div><a href="e04_conts.xml">Chapter Contents</a></div><div><a href="e04_intro.xml">Chapter Introduction</a></div>
<div><a href="../mark21.xml">NAG Library Manual</a></div><hr/><h1 class="libdoc">NAG Fortran Library Routine Document<br/><br/>E04UCF/E04UCA</h1><div class="paramtext"><div class="header"><b>Note:</b> 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 Sections <a class="secref" href="#purpose">1</a> to <a class="secref" href="#example">9</a> of this document. 
If, however, you wish to reset some or all of the settings please refer to 
Section <a class="secref" href="#algdetails">10</a> for a detailed description of the algorithm, to 
Section <a class="secref" href="#optparams">11</a> for a detailed description of the specification of the optional parameters and to 
Section <a class="secref" href="#monitoring">12</a> for a detailed description of the monitoring information produced by the routine</span>.</div> 
<div class="htmltoc">
<h2><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">&#160;1&#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">&#160;2&#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">&#160;2.1&#160;<b>Specification for </b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#routAspec">&#160;2.2&#160;<b>Specification for </b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#description">&#160;3&#160;<b>Description</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#references">&#160;4&#160;<b>References</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#parameters">&#160;5&#160;<b>Parameters</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#errors">&#160;6&#160;<b>Error Indicators and Warnings</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#accuracy">&#160;7&#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">&#160;8&#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">&#160;8.1&#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">&#160;9&#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">&#160;9.1&#160;<b>Program Text</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examdata">&#160;9.2&#160;<b>Program Data</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examresults">&#160;9.3&#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">&#160;10&#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">&#160;10.1&#160;<b>Overview</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#ad-QPS">&#160;10.2&#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">&#160;10.3&#160;<b>The Merit Function</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#ad-quasinewton">&#160;10.4&#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">&#160;11&#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">&#160;11.1&#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">&#160;11.2&#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">&#160;12&#160;<b>Description of Monitoring Information</b></a>
</div>
</div>
</div><h2><a name="purpose" id="purpose"/>1&#160;&#160;Purpose</h2><div class="paramtext">E04UCF/E04UCA 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">E04UCF/E04UCA may also be used for unconstrained, bound-constrained and linearly constrained optimization.</div>
<div class="paramtext">E04UCF/E04UCA uses <b>forward</b>
<b>communication</b> for evaluating the objective function, the nonlinear constraint functions, and any of their derivatives.</div>
<div class="paramtext">
E04UCA is a version of E04UCF that has additional parameters in order to make it safe for use in multithreaded applications (see Section <a class="secref" href="#parameters">5</a>).  The initialization routine <a class="rtnref" href="../E04/e04wbf.xml">E04WBF</a> <b>must</b> have been called prior to calling E04UCA.</div><h2><a name="specification" id="specification"/>2&#160;&#160;Specification</h2><h3><a name="routFspec" id="routFspec"/>2.1&#160;&#160;Specification for E04UCF</h3>
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;E04UCF&#160;(</td><td class="tdfspec2"><a class="argref" href="#N">N</a>, <a class="argref" href="#NCLIN">NCLIN</a>, <a class="argref" href="#NCNLN">NCNLN</a>, <a class="argref" href="#LDA">LDA</a>, <a class="argref" href="#LDCJ">LDCJ</a>, <a class="argref" href="#LDR">LDR</a>, <a class="argref" href="#A">A</a>, <a class="argref" href="#BL">BL</a>, <a class="argref" href="#BU">BU</a>, <a class="argref" href="#CONFUN">CONFUN</a>, <a class="argref" href="#OBJFUN">OBJFUN</a>, <a class="argref" href="#ITER">ITER</a>, <a class="argref" href="#ISTATE">ISTATE</a>, <a class="argref" href="#C">C</a>, <a class="argref" href="#CJAC">CJAC</a>, <a class="argref" href="#CLAMDA">CLAMDA</a>, <a class="argref" href="#OBJF">OBJF</a>, <a class="argref" href="#OBJGRD">OBJGRD</a>, <a class="argref" href="#R">R</a>, <a class="argref" href="#X">X</a>, <a class="argref" href="#IWORK">IWORK</a>, <a class="argref" href="#LIWORK">LIWORK</a>, <a class="argref" href="#WORK">WORK</a>, <a class="argref" href="#LWORK">LWORK</a>, <a class="argref" href="#IUSER">IUSER</a>, <a class="argref" href="#RUSER">RUSER</a>, <a class="argref" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">N, NCLIN, NCNLN, LDA, LDCJ, LDR, ITER, ISTATE(N+NCLIN+NCNLN), IWORK(LIWORK), LIWORK, LWORK, IUSER(*), 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), RUSER(*)</td></tr><tr><td class="tdfspec1">EXTERNAL</td><td class="tdfspec2">CONFUN, OBJFUN</td></tr></table><h3><a name="routAspec" id="routAspec"/>2.2&#160;&#160;Specification for E04UCA</h3>
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;E04UCA&#160;(</td><td class="tdfspec2"><a class="argref" href="#N">N</a>, <a class="argref" href="#NCLIN">NCLIN</a>, <a class="argref" href="#NCNLN">NCNLN</a>, <a class="argref" href="#LDA">LDA</a>, <a class="argref" href="#LDCJ">LDCJ</a>, <a class="argref" href="#LDR">LDR</a>, <a class="argref" href="#A">A</a>, <a class="argref" href="#BL">BL</a>, <a class="argref" href="#BU">BU</a>, <a class="argref" href="#CONFUN">CONFUN</a>, <a class="argref" href="#OBJFUN">OBJFUN</a>, <a class="argref" href="#ITER">ITER</a>, <a class="argref" href="#ISTATE">ISTATE</a>, <a class="argref" href="#C">C</a>, <a class="argref" href="#CJAC">CJAC</a>, <a class="argref" href="#CLAMDA">CLAMDA</a>, <a class="argref" href="#OBJF">OBJF</a>, <a class="argref" href="#OBJGRD">OBJGRD</a>, <a class="argref" href="#R">R</a>, <a class="argref" href="#X">X</a>, <a class="argref" href="#IWORK">IWORK</a>, <a class="argref" href="#LIWORK">LIWORK</a>, <a class="argref" href="#WORK">WORK</a>, <a class="argref" href="#LWORK">LWORK</a>, <a class="argref" href="#IUSER">IUSER</a>, <a class="argref" href="#RUSER">RUSER</a>, <a class="argref" href="#LWSAV">LWSAV</a>, <a class="argref" href="#IWSAV">IWSAV</a>, <a class="argref" href="#RWSAV">RWSAV</a>, <a class="argref" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">N, NCLIN, NCNLN, LDA, LDCJ, LDR, ITER, ISTATE(N+NCLIN+NCNLN), IWORK(LIWORK), LIWORK, LWORK, IUSER(*), 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), RUSER(*), RWSAV(475)</td></tr><tr><td class="tdfspec1">LOGICAL</td><td class="tdfspec2">LWSAV(120)</td></tr><tr><td class="tdfspec1">EXTERNAL</td><td class="tdfspec2">CONFUN, OBJFUN</td></tr></table><div class="paramtext">Before calling E04UCA, or either of the option setting routines <a class="rtnref" href="../E04/e04udf.xml">E04UDA</a> or <a class="rtnref" href="../E04/e04uef.xml">E04UEA</a>, <a class="rtnref" href="../E04/e04wbf.xml">E04WBF</a>
<b>must</b> be called.  The specification for <a class="rtnref" 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="argref" href="../E04/e04wbf.xml#RNAME">RNAME</a>, <a class="argref" href="../E04/e04wbf.xml#CWSAV">CWSAV</a>, <a class="argref" href="../E04/e04wbf.xml#LCWSAV">LCWSAV</a>, <a class="argref" href="../E04/e04wbf.xml#LWSAV">LWSAV</a>, <a class="argref" href="../E04/e04wbf.xml#LLWSAV">LLWSAV</a>, <a class="argref" href="../E04/e04wbf.xml#IWSAV">IWSAV</a>, <a class="argref" href="../E04/e04wbf.xml#LIWSAV">LIWSAV</a>, <a class="argref" href="../E04/e04wbf.xml#RWSAV">RWSAV</a>, <a class="argref" href="../E04/e04wbf.xml#LRWSAV">LRWSAV</a>, <a class="argref" 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="rtnref" href="../E04/e04wbf.xml">E04WBF</a> should be called with 
<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="../E04/e04wbf.xml#RNAME" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">RNAME</m:mi></m:maction><m:mo>=</m:mo><m:ms lquote="'" rquote="'">E04UCA</m:ms></m:math>.  
<a class="argref" href="../E04/e04wbf.xml#LCWSAV">LCWSAV</a>, 
<a class="argref" href="../E04/e04wbf.xml#LLWSAV">LLWSAV</a>, 
<a class="argref" href="../E04/e04wbf.xml#LIWSAV">LIWSAV</a> and 
<a class="argref" href="../E04/e04wbf.xml#LRWSAV">LRWSAV</a>, the declared lengths of 
<a class="argref" href="../E04/e04wbf.xml#CWSAV">CWSAV</a>, 
<a class="argref" href="../E04/e04wbf.xml#LWSAV">LWSAV</a>, 
<a class="argref" href="../E04/e04wbf.xml#IWSAV">IWSAV</a> and 
<a class="argref" href="../E04/e04wbf.xml#RWSAV">RWSAV</a> respectively, must satisfy:
</div><ul class="listind"><li class="listind"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="../E04/e04wbf.xml#LCWSAV" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">LCWSAV</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math>;</li><li class="listind"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="../E04/e04wbf.xml#LLWSAV" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="../E04/e04wbf.xml#LIWSAV" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="../E04/e04wbf.xml#LRWSAV" dsi:type="simple"><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 class="paramtext">
</div>
<div class="paramtext">The contents of the arrays 
<a class="argref" href="../E04/e04wbf.xml#CWSAV">CWSAV</a>, 
<a class="argref" href="../E04/e04wbf.xml#LWSAV">LWSAV</a>, 
<a class="argref" href="../E04/e04wbf.xml#IWSAV">IWSAV</a> and 
<a class="argref" href="../E04/e04wbf.xml#RWSAV">RWSAV</a>
<b>must not</b> be altered between calling routines 
<a class="rtnref" href="../E04/e04wbf.xml">E04WBF</a>, <a class="rtnref" href="../E04/e04ucf.xml">E04UCA</a>, <a class="rtnref" href="../E04/e04udf.xml">E04UDA</a> and <a class="rtnref" href="../E04/e04uef.xml">E04UEA</a>.</div><h2><a name="description" id="description"/>3&#160;&#160;Description</h2><div class="paramtext">E04UCF/E04UCA 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>
<div class="formula-eqn"><a name="eqn1" id="eqn1"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:munder><m:mi>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>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>A</m:mi><m:mi>L</m:mi></m:msub></m:math>&#160;is an <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub></m:math>&#160;by <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>n</m:mi></m:math>&#160;constant matrix, and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>c</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is an <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>n</m:mi><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:msub></m:math>&#160;element vector of nonlinear constraint functions.  (The matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>A</m:mi><m:mi>L</m:mi></m:msub></m:math>&#160;and the vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 E04UCF/E04UCA will usually solve (<a class="eqnref" 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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>l</m:mi></m:math>&#160;or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>u</m:mi></m:math>&#160;can be set to special values that will be treated as <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:mo>-</m:mo><m:mi>&#8734;</m:mi></m:mrow></m:math>&#160;or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:mo>+</m:mo><m:mi>&#8734;</m:mi></m:mrow></m:math>.  (See the description of the optional parameter <a class="optparamref" href="#optparam_infiniteboundsize">Infinite Bound Size</a>.)</div>
<div class="paramtext">If there are no nonlinear constraints in (<a class="eqnref" href="#eqn1">1</a>) and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="rtnref" href="../E04/e04mff.xml">E04MFF/E04MFA</a>, <a class="rtnref" href="../E04/e04ncf.xml">E04NCF/E04NCA</a> or <a class="rtnref" href="../E04/e04nff.xml">E04NFF/E04NFA</a>, or <a class="rtnref" href="../E04/e04nkf.xml">E04NKF/E04NKA</a> if the problem is large and sparse.  If the problem is large and sparse and does have nonlinear constraints, then <a class="rtnref" href="../E04/e04ugf.xml">E04UGF/E04UGA</a> should be used, since E04UCF/E04UCA treats all matrices as dense.</div>
<div class="paramtext">You must supply an initial estimate of the solution to (<a class="eqnref" href="#eqn1">1</a>), together with (sub)programs that define <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>c</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;and as many first partial derivatives as possible; unspecified derivatives are approximated by finite differences.</div>
<div class="paramtext">The objective function is defined by (sub)program <a class="argref" href="#OBJFUN">OBJFUN</a>, and the nonlinear constraints are defined by (sub)program <a class="argref" href="#CONFUN">CONFUN</a>.  On every call, these (sub)programs must return appropriate values of the objective and nonlinear constraints.  You should also provide the available partial derivatives.  Any unspecified derivatives are approximated by finite differences for a discussion of the optional parameter <a class="optparamref" href="#optparam_derivativelevel">Derivative Level</a>.  Just before either  <a class="argref" href="#OBJFUN">OBJFUN</a> or  <a class="argref" href="#CONFUN">CONFUN</a> is called, each element of the current gradient array  <a class="argref" href="#OBJGRD">OBJGRD</a> or  <a class="argref" href="#CJAC">CJAC</a> is initialized to a special value.  On exit, any element that retains the value is estimated by finite differences.  Note that if there <span class="italic">are</span> any nonlinear constraints then the <span class="italic">first</span> call to  <a class="argref" href="#CONFUN">CONFUN</a> will precede the <span class="italic">first</span> call to  <a class="argref" href="#OBJFUN">OBJFUN</a>.</div>
<div class="paramtext">For maximum reliability, it is preferable for you to provide all partial derivatives (see Chapter 8 of <a class="litref" href="#ref079">Gill <i>et al.</i> (1981)</a>, for a detailed discussion).  If all gradients cannot be provided, it is similarly advisable to provide as many as possible.  While developing the (sub)programs <a class="argref" href="#OBJFUN">OBJFUN</a> and <a class="argref" href="#CONFUN">CONFUN</a>, the optional parameter <a class="optparamref" href="#optparam_verify">Verify</a> should be used to check the calculation of any known gradients.</div>
<div class="paramtext">The method used by E04UCF/E04UCA is described in detail in Section <a class="secref" href="#algdetails">10</a>.</div>
<div class="paramtext"><a class="rtnref" href="../E04/e04uff.xml">E04UFF/E04UFA</a> is an alternative routine which uses exactly the same method, but uses <b>reverse</b>
<b>communication</b> for evaluating the objective and constraint functions.</div><h2><a name="references" id="references"/>4&#160;&#160;References</h2><div class="paramtext">
<p><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 </p>
<p><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> (ed O L Mangasarian, R R Meyer and S M Robinson) <b>4</b> 167&#8211;199 Academic Press </p>
<p><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 </p>
<p><a name="ref224" id="ref224"/>Fletcher R (1987) <i>Practical Methods of Optimization</i> (2nd Edition) Wiley </p>
<p><a name="ref091" id="ref091"/>Gill P E, Hammarling S, Murray W, Saunders M A and Wright M H (1986a) Users' guide for LSSOL (Version 1.0) <i>Report SOL 86-1</i> Department of Operations Research, Stanford University </p>
<p><a name="ref494" id="ref494"/>Gill P E, Murray W, Saunders M A and Wright M H (1984) Users' guide for SOL/QPSOL version 3.2 <i>Report SOL</i> 84&#8211;5 Department of Operations Research, Stanford University </p>
<p><a name="ref090" id="ref090"/>Gill P E, Murray W, Saunders M A and Wright M H (1984b) 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 </p>
<p><a name="ref092" id="ref092"/>Gill P E, Murray W, Saunders M A and Wright M H (1986b) Some theoretical properties of an augmented Lagrangian merit function <i>Report SOL</i> 86&#8211;6R Department of Operations Research, Stanford University </p>
<p><a name="ref540" id="ref540"/>Gill P E, Murray W, Saunders M A and Wright M H (1986c) 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 </p>
<p><a name="ref079" id="ref079"/>Gill P E, Murray W and Wright M H (1981) <i>Practical Optimization</i> Academic Press </p>
<p><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 </p>
<p><a name="ref096" id="ref096"/>Powell M J D (1974) Introduction to constrained optimization <i>Numerical Methods for Constrained Optimization</i> (ed P E Gill and W Murray) 1&#8211;28 Academic Press </p>
<p><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> (ed A Bachem, M Gr&#246;tschel and B Korte) 288&#8211;311 Springer&#8211;Verlag </p>
</div><h2><a name="parameters" id="parameters"/>5&#160;&#160;Parameters</h2><dl><dt class="paramhead"><a name="N" id="N"/>1:
  
  &#160;&#160;&#8194;
  N &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: 

<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>n</m:mi></m:math>, the number of variables.</div>
<div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><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"/>2:
  
  &#160;&#160;&#8194;
  NCLIN &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#NCLIN" dsi:type="simple"><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"/>3:
  
  &#160;&#160;&#8194;
  NCNLN &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><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"/>4:
  
  &#160;&#160;&#8194;
  LDA &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the first dimension of the array <a class="argref" href="#A">A</a> as declared in the (sub)program from which E04UCF/E04UCA is called.</div>
<div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#LDA" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">LDA</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:href="#NCLIN" dsi:type="simple"><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"/>5:
  
  &#160;&#160;&#8194;
  LDCJ &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the first dimension of the array <a class="argref" href="#CJAC">CJAC</a> as declared in the (sub)program from which E04UCF/E04UCA is called.</div>
<div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#LDCJ" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">LDCJ</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><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"/>6:
  
  &#160;&#160;&#8194;
  LDR &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the first dimension of the array <a class="argref" href="#R">R</a> as declared in the (sub)program from which E04UCF/E04UCA is called.</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#LDR" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">LDR</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>.



</div></dd><dt class="paramhead"><a name="A" id="A"/>7:
  
  &#160;&#160;&#8194;
  A(<a class="argref" href="#LDA">LDA</a>,<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="argref" href="#A">A</a> must be at least <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>&#160;if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#NCLIN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>&#160;and at least <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mn>1</m:mn></m:math>&#160;otherwise.</div><div class="paramtext"><i>On entry</i>: the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>th row of the array <a class="argref" href="#A">A</a> must contain the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>th row of the matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>A</m:mi><m:mi>L</m:mi></m:msub></m:math>&#160;of general linear constraints in (<a class="eqnref" href="#eqn1">1</a>).  That is, the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>th row contains the coefficients of the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>th general linear constraint, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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:href="#NCLIN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction></m:math>.  <div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#NCLIN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;then the array <a class="argref" href="#A">A</a> is not referenced.</div></div></dd><dt class="paramhead"><a name="BL" id="BL"/>8:
  
  &#160;&#160;&#8194;
  BL(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#NCLIN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><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"/>9:
  
  &#160;&#160;&#8194;
  BU(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#NCLIN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><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 entry</i>: <a class="argref" href="#BL">BL</a> must contain the lower bounds and <a class="argref" href="#BU">BU</a> the upper bounds for all the constraints in the following order.  The first <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>n</m:mi></m:math>&#160;elements of each array must contain the bounds on the variables, the next <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>n</m:mi><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:msub></m:math>&#160;elements the bounds for the general nonlinear constraints (if any).  To specify a non-existent lower bound (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#BL" dsi:type="simple"><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 non-existent upper bound (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#BU" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi mathvariant="italic">bigbnd</m:mi></m:math>&#160;is <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 <a class="optparamref" href="#optparam_infiniteboundsize">Infinite Bound Size</a>.  To specify the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>j</m:mi></m:math>th constraint as an <span class="italic">equality</span>, set <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#BL" dsi:type="simple"><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:href="#BU" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#BL" dsi:type="simple"><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:href="#BU" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#NCLIN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction></m:mrow></m:math>;</li>
<li class="listcons">if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#BL" dsi:type="simple"><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:href="#BU" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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="CONFUN" id="CONFUN"/>10:
  
  &#8194;
  CONFUN &#8211; SUBROUTINE, supplied by the user.<span class="pclass">External Procedure</span></dt><dd><div class="paramtext"><a class="argref" href="#CONFUN">CONFUN</a> must calculate the vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>c</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;of nonlinear constraint functions and (optionally) its Jacobian (<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:mi>c</m:mi></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:mi>x</m:mi></m:mrow>
 </m:mfrac>
</m:math>) for a specified <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>n</m:mi></m:math>&#160;element vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>.  If there are no nonlinear constraints (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#CONFUN_NCNLN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>), <a class="argref" href="#CONFUN">CONFUN</a> will never be called by E04UCF/E04UCA and <a class="argref" href="#CONFUN">CONFUN</a> may be the dummy routine E04UDM.  (E04UDM is included in the NAG Fortran Library and so need not be supplied by you.  Its name may be implementation-dependent, please refer to the <a class="secref" href="http://www.nag.co.uk/doc/inun.asp">Users' Note</a> for your implementation for details.) If there are nonlinear constraints, the first call to <a class="argref" href="#CONFUN">CONFUN</a> will occur before the first call to <a class="argref" href="#OBJFUN">OBJFUN</a>.</div>
<div class="paramtext">Its specification is:</div><div class="subprog">
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;CONFUN&#160;(</td><td class="tdfspec2"><a class="argref" href="#CONFUN_MODE">MODE</a>, <a class="argref" href="#CONFUN_NCNLN">NCNLN</a>, <a class="argref" href="#CONFUN_N">N</a>, <a class="argref" href="#CONFUN_LDCJ">LDCJ</a>, <a class="argref" href="#CONFUN_NEEDC">NEEDC</a>, <a class="argref" href="#CONFUN_X">X</a>, <a class="argref" href="#CONFUN_C">C</a>, <a class="argref" href="#CONFUN_CJAC">CJAC</a>, <a class="argref" href="#CONFUN_NSTATE">NSTATE</a>, <a class="argref" href="#CONFUN_IUSER">IUSER</a>, <a class="argref" href="#CONFUN_RUSER">RUSER</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">MODE, NCNLN, N, LDCJ, NEEDC(NCNLN), NSTATE, IUSER(*)</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">X(N), C(NCNLN), CJAC(LDCJ,N), RUSER(*)</td></tr></table>
<dl><dt class="paramhead"><a name="CONFUN_MODE" id="CONFUN_MODE"/>1:
  
  &#160;&#160;&#8194;
  MODE &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On entry</i>: indicates which values must be assigned during each call of <a class="argref" href="#CONFUN">CONFUN</a>.  Only the following values need be assigned, for each value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>&#160;such that <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#CONFUN_NEEDC" dsi:type="simple"><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>: 

<dl>
<dt class="paramval"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#CONFUN_MODE" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math></dt>
<dd><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#CONFUN_C" dsi:type="simple"><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>.</dd>
<dt class="paramval"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#CONFUN_MODE" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd>All available elements in the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>th row of <a class="argref" href="#CONFUN_CJAC">CJAC</a>.</dd>
<dt class="paramval"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#CONFUN_MODE" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#CONFUN_C" dsi:type="simple"><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 all available elements in the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>th row of <a class="argref" href="#CONFUN_CJAC">CJAC</a>.</dd></dl>
</div>
<div class="paramtext"><i>On exit</i>: may be set to a negative value if you wish to terminate the solution to the current problem.  In this case E04UCF/E04UCA will terminate with <a class="argref" href="#IFAIL">IFAIL</a> set to <a class="argref" href="#CONFUN_MODE">MODE</a>.</div></dd><dt class="paramhead"><a name="CONFUN_NCNLN" id="CONFUN_NCNLN"/>2:
  
  &#160;&#160;&#8194;
  NCNLN &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>n</m:mi><m:maction actiontype="link" dsi:href="#CONFUN_N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:msub></m:math>, the number of nonlinear constraints.</div></dd><dt class="paramhead"><a name="CONFUN_N" id="CONFUN_N"/>3:
  
  &#160;&#160;&#8194;
  N &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>n</m:mi></m:math>, the number of variables.</div></dd><dt class="paramhead"><a name="CONFUN_LDCJ" id="CONFUN_LDCJ"/>4:
  
  &#160;&#160;&#8194;
  LDCJ &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the first dimension of the array <a class="argref" href="#CONFUN_CJAC">CJAC</a>.</div></dd><dt class="paramhead"><a name="CONFUN_NEEDC" id="CONFUN_NEEDC"/>5:
  
  &#160;&#160;&#8194;
  NEEDC(<a class="argref" href="#CONFUN_NCNLN">NCNLN</a>) &#8211; INTEGER array<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the indices of the elements of <a class="argref" href="#CONFUN_C">C</a> and/or <a class="argref" href="#CONFUN_CJAC">CJAC</a> that must be evaluated by <a class="argref" href="#CONFUN">CONFUN</a>.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#CONFUN_NEEDC" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>th element of <a class="argref" href="#CONFUN_C">C</a> and/or the available elements of the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>th row of <a class="argref" href="#CONFUN_CJAC">CJAC</a> (see parameter  <a class="argref" href="#CONFUN_MODE">MODE</a>) must be evaluated at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>.</div></dd><dt class="paramhead"><a name="CONFUN_X" id="CONFUN_X"/>6:
  
  &#160;&#160;&#8194;
  X(<a class="argref" href="#CONFUN_N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>, the vector of variables at which the constraint functions and/or the available elements of the constraint Jacobian are to be evaluated.</div></dd><dt class="paramhead"><a name="CONFUN_C" id="CONFUN_C"/>7:
  
  &#160;&#160;&#8194;
  C(<a class="argref" href="#CONFUN_NCNLN">NCNLN</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#CONFUN_NEEDC" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#CONFUN_MODE" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mn>0</m:mn></m:math>&#160;or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mn>2</m:mn></m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#CONFUN_C" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>th constraint at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>.  The remaining elements of <a class="argref" href="#CONFUN_C">C</a>, corresponding to the non-positive elements of <a class="argref" href="#CONFUN_NEEDC">NEEDC</a>, are ignored.</div></dd><dt class="paramhead"><a name="CONFUN_CJAC" id="CONFUN_CJAC"/>8:
  
  &#160;&#160;&#8194;
  CJAC(<a class="argref" href="#CONFUN_LDCJ">LDCJ</a>,<a class="argref" href="#CONFUN_N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On entry</i>: the elements of <a class="argref" href="#CONFUN_CJAC">CJAC</a> are set to special values which enable E04UCF/E04UCA to detect whether they are changed by <a class="argref" href="#CONFUN">CONFUN</a>.</div>
<div class="paramtext"><i>On exit</i>: if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#CONFUN_NEEDC" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#CONFUN_MODE" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mn>1</m:mn></m:math>&#160;or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mn>2</m:mn></m:math>, the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>th row of <a class="argref" href="#CONFUN_CJAC">CJAC</a> must contain the available elements of the vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML" 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 xmlns:m="http://www.w3.org/1998/Math/MathML">
 <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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>th constraint with respect to the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>j</m:mi></m:math>th variable, evaluated at the point <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>.  See also the parameter <a class="argref" href="#CONFUN_NSTATE">NSTATE</a>.  The remaining rows of  <a class="argref" href="#CONFUN_CJAC">CJAC</a>, corresponding to non-positive elements of  <a class="argref" href="#CONFUN_NEEDC">NEEDC</a>, are ignored.
<div class="paramtext">If all elements of the constraint Jacobian are known (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_derivativelevel" dsi:type="simple"><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="argref" href="#CONFUN_CJAC">CJAC</a> one time only at the start of the optimization.  An element of <a class="argref" href="#CONFUN_CJAC">CJAC</a> that is not subsequently assigned in the user-supplied (sub)program <a class="argref" href="#CONFUN">CONFUN</a> will retain its initial value throughout.  Constant elements may be loaded into <a class="argref" href="#CONFUN_CJAC">CJAC</a> either before the call to E04UCF/E04UCA or during the first call to <a class="argref" href="#CONFUN">CONFUN</a> (signalled by the value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#CONFUN_NSTATE" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NSTATE</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>).  The ability to preload constants is useful when many Jacobian elements are identically zero, in which case <a class="argref" href="#CONFUN_CJAC">CJAC</a> may be initialized to zero and non-zero elements may be reset by <a class="argref" href="#CONFUN">CONFUN</a>.</div>
<div class="paramtext">Note that constant non-zero elements do affect the values of the constraints.  Thus, if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#CONFUN_CJAC" dsi:type="simple"><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 in subsequent calls to <a class="argref" href="#CONFUN">CONFUN</a>, but the value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#CONFUN_CJAC" dsi:type="simple"><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:href="#CONFUN_X" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#CONFUN_C" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#CONFUN_CJAC" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#CONFUN_CJAC" dsi:type="simple"><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>&#160;then the term <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mn>2</m:mn><m:mo>&#215;</m:mo><m:mrow><m:maction actiontype="link" dsi:href="#CONFUN_X" dsi:type="simple"><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:href="#CONFUN_X" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#CONFUN_C" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_derivativelevel" dsi:type="simple"><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="argref" href="#CONFUN_CJAC">CJAC</a> are not treated as constant; they are estimated by finite differences, at non-trivial expense.  If you do not supply a value for the optional parameter <a class="optparamref" href="#optparam_differenceinterval">Difference Interval</a>, an interval for each element of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="argref" href="#CONFUN_CJAC">CJAC</a>, which are then computed once only by finite differences.</div>
</div></dd><dt class="paramhead"><a name="CONFUN_NSTATE" id="CONFUN_NSTATE"/>9:
  
  &#160;&#160;&#8194;
  NSTATE &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#CONFUN_NSTATE" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NSTATE</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;then E04UCF/E04UCA is calling <a class="argref" href="#CONFUN">CONFUN</a> for the first time.  This parameter setting allows you to save computation time if certain data must be read or calculated only once.</div></dd><dt class="paramhead"><a name="CONFUN_IUSER" id="CONFUN_IUSER"/>10:
  
  &#8194;
  IUSER(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>*</m:mo></m:math>) &#8211; INTEGER array<span class="pclass">User Workspace</span></dt><dt class="multi-paramhead"><a name="CONFUN_RUSER" id="CONFUN_RUSER"/>11:
  
  &#8194;
  RUSER(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>*</m:mo></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">User Workspace</span></dt><dd>
<div class="paramtext">
<a class="argref" href="#CONFUN">CONFUN</a> is called from E04UCF/E04UCA with the parameters  <a class="argref" href="#CONFUN_IUSER">IUSER</a> and  <a class="argref" href="#CONFUN_RUSER">RUSER</a> as supplied to E04UCF/E04UCA.  You are free to use the arrays  <a class="argref" href="#CONFUN_IUSER">IUSER</a> and  <a class="argref" href="#CONFUN_RUSER">RUSER</a> to supply information to  <a class="argref" href="#CONFUN">CONFUN</a> as an alternative to using COMMON.</div></dd></dl>
</div>
<div class="paramtext"><a class="argref" href="#CONFUN">CONFUN</a>
 must be declared as EXTERNAL in the (sub)program from which E04UCF/E04UCA is called. Parameters denoted as <span class="italic">Input</span> must <b>not</b> be changed by this procedure.</div>
<div class="paramtext"><a class="argref" href="#CONFUN">CONFUN</a> should be tested separately before being used in conjunction with E04UCF/E04UCA.  See also the description of the optional parameter <a class="optparamref" href="#optparam_verify">Verify</a>.</div>
</dd><dt class="paramhead"><a name="OBJFUN" id="OBJFUN"/>11:
  
  &#8194;
  OBJFUN &#8211; SUBROUTINE, supplied by the user.<span class="pclass">External Procedure</span></dt><dd><div class="paramtext"><a class="argref" href="#OBJFUN">OBJFUN</a> must calculate the objective function <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;and (optionally) its gradient <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>g</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:mfenced separators=""><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:mi>x</m:mi></m:mrow>
 </m:mfrac></m:mfenced></m:math>&#160;for a specified <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>n</m:mi></m:math>&#160;element of vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>.</div>
<div class="paramtext">Its specification is:</div><div class="subprog">
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;OBJFUN&#160;(</td><td class="tdfspec2"><a class="argref" href="#OBJFUN_MODE">MODE</a>, <a class="argref" href="#OBJFUN_N">N</a>, <a class="argref" href="#OBJFUN_X">X</a>, <a class="argref" href="#OBJFUN_OBJF">OBJF</a>, <a class="argref" href="#OBJFUN_OBJGRD">OBJGRD</a>, <a class="argref" href="#OBJFUN_NSTATE">NSTATE</a>, <a class="argref" href="#OBJFUN_IUSER">IUSER</a>, <a class="argref" href="#OBJFUN_RUSER">RUSER</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">MODE, N, NSTATE, IUSER(*)</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">X(N), OBJF, OBJGRD(N), RUSER(*)</td></tr></table>
<dl><dt class="paramhead"><a name="OBJFUN_MODE" id="OBJFUN_MODE"/>1:
  
  &#160;&#160;&#8194;
  MODE &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On entry</i>: indicates which values must be assigned during each call of <a class="argref" href="#OBJFUN">OBJFUN</a>.  Only the following values need be assigned: 

<dl>
<dt class="paramval"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#OBJFUN_MODE" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math></dt>
<dd><a class="argref" href="#OBJFUN_OBJF">OBJF</a>.</dd>
<dt class="paramval"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#OBJFUN_MODE" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd>All available elements of <a class="argref" href="#OBJFUN_OBJGRD">OBJGRD</a>.</dd>
<dt class="paramval"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#OBJFUN_MODE" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd><a class="argref" href="#OBJFUN_OBJF">OBJF</a> and all available elements of <a class="argref" href="#OBJFUN_OBJGRD">OBJGRD</a>.</dd></dl>
</div>
<div class="paramtext"><i>On exit</i>: may be set to a negative value if you wish to terminate the solution to the current problem.  In this case E04UCF/E04UCA will terminate with <a class="argref" href="#IFAIL">IFAIL</a> set to <a class="argref" href="#OBJFUN_MODE">MODE</a>.</div></dd><dt class="paramhead"><a name="OBJFUN_N" id="OBJFUN_N"/>2:
  
  &#160;&#160;&#8194;
  N &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>n</m:mi></m:math>, the number of variables.</div></dd><dt class="paramhead"><a name="OBJFUN_X" id="OBJFUN_X"/>3:
  
  &#160;&#160;&#8194;
  X(<a class="argref" href="#OBJFUN_N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>, the vector of variables at which the objective function and/or all available elements of its gradient are to be evaluated.</div></dd><dt class="paramhead"><a name="OBJFUN_OBJF" id="OBJFUN_OBJF"/>4:
  
  &#160;&#160;&#8194;
  OBJF &#8211; <span class="bitalic">double precision</span><span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#OBJFUN_MODE" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mn>0</m:mn></m:math>&#160;or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mn>2</m:mn></m:math>, <a class="argref" href="#OBJFUN_OBJF">OBJF</a> must be set to the value of the objective function at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>.</div></dd><dt class="paramhead"><a name="OBJFUN_OBJGRD" id="OBJFUN_OBJGRD"/>5:
  
  &#160;&#160;&#8194;
  OBJGRD(<a class="argref" href="#OBJFUN_N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On entry</i>: the elements of <a class="argref" href="#OBJFUN_OBJGRD">OBJGRD</a> are set to special values which enable E04UCF/E04UCA to detect whether they are changed by <a class="argref" href="#OBJFUN">OBJFUN</a>.</div>
<div class="paramtext"><i>On exit</i>: if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#OBJFUN_MODE" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mn>1</m:mn></m:math>&#160;or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mn>2</m:mn></m:math>, <a class="argref" href="#OBJFUN_OBJGRD">OBJGRD</a> must return the available elements of the gradient evaluated at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>.</div></dd><dt class="paramhead"><a name="OBJFUN_NSTATE" id="OBJFUN_NSTATE"/>6:
  
  &#160;&#160;&#8194;
  NSTATE &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#OBJFUN_NSTATE" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NSTATE</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;then E04UCF/E04UCA is calling <a class="argref" href="#OBJFUN">OBJFUN</a> for the first time.  This parameter setting allows you to save computation time if certain data must be read or calculated only once.</div></dd><dt class="paramhead"><a name="OBJFUN_IUSER" id="OBJFUN_IUSER"/>7:
  
  &#160;&#160;&#8194;
  IUSER(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>*</m:mo></m:math>) &#8211; INTEGER array<span class="pclass">User Workspace</span></dt><dt class="multi-paramhead"><a name="OBJFUN_RUSER" id="OBJFUN_RUSER"/>8:
  
  &#160;&#160;&#8194;
  RUSER(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>*</m:mo></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">User Workspace</span></dt><dd>
<div class="paramtext">
<a class="argref" href="#OBJFUN">OBJFUN</a> is called from E04UCF/E04UCA with the parameters  <a class="argref" href="#OBJFUN_IUSER">IUSER</a> and  <a class="argref" href="#OBJFUN_RUSER">RUSER</a> as supplied to E04UCF/E04UCA.  You are free to use the arrays  <a class="argref" href="#OBJFUN_IUSER">IUSER</a> and  <a class="argref" href="#OBJFUN_RUSER">RUSER</a> to supply information to  <a class="argref" href="#OBJFUN">OBJFUN</a> as an alternative to using COMMON.</div>
</dd></dl>
</div>
<div class="paramtext"><a class="argref" href="#OBJFUN">OBJFUN</a>
 must be declared as EXTERNAL in the (sub)program from which E04UCF/E04UCA is called. Parameters denoted as <span class="italic">Input</span> must <b>not</b> be changed by this procedure.</div>
<div class="paramtext"><a class="argref" href="#OBJFUN">OBJFUN</a> should be tested separately before being used in conjunction with E04UCF/E04UCA.  See also the description of the optional parameter <a class="optparamref" href="#optparam_verify">Verify</a>.</div>
</dd><dt class="paramhead"><a name="ITER" id="ITER"/>12:
  
  &#8194;
  ITER &#8211; INTEGER<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: the number of major iterations performed.</div></dd><dt class="paramhead"><a name="ISTATE" id="ISTATE"/>13:
  
  &#8194;
  ISTATE(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#NCLIN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><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 entry</i>: need not be set if the (default) optional parameter <a class="optparamref" href="#optparam_coldstart">Cold Start</a> is used.
<div class="paramtext">If the optional parameter <a class="optparamref" href="#optparam_warmstart">Warm Start</a> has been chosen, the elements of  <a class="argref" 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="argref" 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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>n</m:mi></m:math>&#160;elements of  <a class="argref" href="#ISTATE">ISTATE</a> refer to the upper and lower bounds on the variables, the next <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>n</m:mi><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:msub></m:math>&#160;elements refer to the upper and lower bounds on <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>c</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>.  Possible values for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#ISTATE" dsi:type="simple"><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><div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" align="center" style="width:7.5em;"><b><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#ISTATE" dsi:type="simple"><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" style="width:7.5em;">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" style="width:7.5em;">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" style="width:7.5em;">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" style="width:7.5em;">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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#BL" dsi:type="simple"><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:href="#BU" dsi:type="simple"><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 class="paramtext"> 
</div>
<div class="paramtext">The values <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow></m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>&#160;and 4 are also acceptable but will be modified by the routine.  If E04UCF/E04UCA has been called previously with the same values of <a class="argref" href="#N">N</a>, <a class="argref" href="#NCLIN">NCLIN</a> and <a class="argref" href="#NCNLN">NCNLN</a>, <a class="argref" href="#ISTATE">ISTATE</a> already contains satisfactory information.  The routine also adjusts (if necessary) the values supplied in <a class="argref" href="#X">X</a> to be consistent with <a class="argref" href="#ISTATE">ISTATE</a>.</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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:href="#ISTATE" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#NCLIN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction></m:mrow></m:math>.



</div>
<div class="paramtext"><i>On exit</i>: the status of the constraints in the QP working set at the point returned in <a class="argref" href="#X">X</a>.  The significance of each possible value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#ISTATE" dsi:type="simple"><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" style="width:7.5em;"><b><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#ISTATE" dsi:type="simple"><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" style="width:7.5em;"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 <a class="optparamref" href="#optparam_lf-tolerance">Linear Feasibility Tolerance</a> and <a class="optparamref" href="#optparam_nonlf-tolerance">Nonlinear Feasibility Tolerance</a>).  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" style="width:7.5em;"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 <a class="optparamref" href="#optparam_lf-tolerance">Linear Feasibility Tolerance</a> and <a class="optparamref" href="#optparam_nonlf-tolerance">Nonlinear Feasibility Tolerance</a>).  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" style="width:7.5em;"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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" style="width:7.5em;"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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" style="width:7.5em;"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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" style="width:7.5em;"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="argref" href="#ISTATE">ISTATE</a> can occur only when <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#BL" dsi:type="simple"><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:href="#BU" dsi:type="simple"><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"/>14:
  
  &#8194;
  C(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>*</m:mo></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd><div class="paramtext"><b>Note:</b> the dimension of the array <a class="argref" href="#C">C</a> must be at least <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction></m:mfenced></m:mrow></m:math>.</div>
<div class="paramtext"><i>On exit</i>: if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#C" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>th nonlinear constraint function <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>c</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;at the final iterate, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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:href="#NCNLN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction></m:math>.
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><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="argref" href="#C">C</a> is not referenced.</div>
</div></dd><dt class="paramhead"><a name="CJAC" id="CJAC"/>15:
  
  &#8194;
  CJAC(<a class="argref" href="#LDCJ">LDCJ</a>,<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="argref" href="#CJAC">CJAC</a> must be at least <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>&#160;if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><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 at least <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mn>1</m:mn></m:math>&#160;otherwise.</div>
<div class="paramtext"><i>On entry</i>: in general, <a class="argref" href="#CJAC">CJAC</a> need not be initialized before the call to E04UCF/E04UCA.  However, if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_derivativelevel" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">Derivative Level</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math>, you may optionally set the constant elements of <a class="argref" href="#CJAC">CJAC</a> (see parameter <a class="argref" href="#CONFUN_NSTATE">NSTATE</a> in the description of the user-supplied (sub)program  <a class="argref" href="#CONFUN">CONFUN</a>).  Such constant elements need not be re-assigned on subsequent calls to  <a class="argref" href="#CONFUN">CONFUN</a>.</div>
<div class="paramtext"><i>On exit</i>: if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><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="argref" href="#CJAC">CJAC</a> contains the Jacobian matrix of the nonlinear constraint functions at the final iterate, i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#CJAC" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>th constraint function with respect to the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>j</m:mi></m:math>th variable, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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:href="#NCNLN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction></m:math>; <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>.  (See the discussion of parameter  <a class="argref" href="#CJAC">CJAC</a> under  <a class="argref" href="#CONFUN">CONFUN</a>.)
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><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="argref" href="#CJAC">CJAC</a> is not referenced.</div>
</div></dd><dt class="paramhead"><a name="CLAMDA" id="CLAMDA"/>16:
  
  &#8194;
  CLAMDA(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#NCLIN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><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 entry</i>: need not be set if the (default) optional parameter <a class="optparamref" href="#optparam_coldstart">Cold Start</a> is used.
<div class="paramtext">If the optional parameter <a class="optparamref" href="#optparam_warmstart">Warm Start</a> has been chosen, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#CLAMDA" dsi:type="simple"><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="argref" href="#ISTATE">ISTATE</a> array, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>j</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#NCLIN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#NCLIN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><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:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#NCLIN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>j</m:mi></m:math>th constraint is defined as &#8216;inactive&#8217; by the initial value of the  <a class="argref" href="#ISTATE">ISTATE</a> array (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#ISTATE" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#CLAMDA" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>j</m:mi></m:math>th constraint is an inequality active at its lower bound (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#ISTATE" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#CLAMDA" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>j</m:mi></m:math>th constraint is an inequality active at its upper bound (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#ISTATE" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#CLAMDA" dsi:type="simple"><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-positive.  If necessary, the routine will modify  <a class="argref" href="#CLAMDA">CLAMDA</a> to match these rules.</div>
</div>
<div class="paramtext"><i>On exit</i>: the values of the QP multipliers from the last QP subproblem.  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#CLAMDA" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#ISTATE" dsi:type="simple"><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 non-positive if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#ISTATE" dsi:type="simple"><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"/>17:
  
  &#8194;
  OBJF &#8211; <span class="bitalic">double precision</span><span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: the value of the objective function at the final iterate.</div></dd><dt class="paramhead"><a name="OBJGRD" id="OBJGRD"/>18:
  
  &#8194;
  OBJGRD(<a class="argref" href="#N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On 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"/>19:
  
  &#8194;
  R(<a class="argref" href="#LDR">LDR</a>,<a class="argref" 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 entry</i>: need not be initialized if the (default) optional parameter <a class="optparamref" href="#optparam_coldstart">Cold Start</a> is used.
<div class="paramtext">If the optional parameter <a class="optparamref" href="#optparam_warmstart">Warm Start</a> has been chosen,  <a class="argref" href="#R">R</a> must contain the upper triangular Cholesky factor <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="argref" href="#R">R</a> are assumed to be zero and need not be assigned.</div>
</div>
<div class="paramtext"><i>On exit</i>: if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_hessian" dsi:type="simple"><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="argref" href="#R">R</a> contains the upper triangular Cholesky factor <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>R</m:mi></m:math>&#160;of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mrow><m:mi>H</m:mi><m:mo>&#732;</m:mo></m:mrow><m:mi>Q</m:mi></m:math>, an estimate of the transformed and reordered Hessian of the Lagrangian at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>&#160;(see (<a class="eqnref" href="#eqn6">6</a>) in Section <a class="secref" href="#ad-overview">10.1</a>).  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_hessian" dsi:type="simple"><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="argref" href="#R">R</a> contains the upper triangular Cholesky factor <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>R</m:mi></m:math>&#160;of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>H</m:mi></m:math>, the approximate (untransformed) Hessian of the Lagrangian, with the variables in the natural order.</div></dd><dt class="paramhead"><a name="X" id="X"/>20:
  
  &#8194;
  X(<a class="argref" 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 entry</i>: an initial estimate of the solution.</div>
<div class="paramtext"><i>On exit</i>: the final estimate of the solution.</div></dd><dt class="paramhead"><a name="IWORK" id="IWORK"/>21:
  
  &#8194;
  IWORK(<a class="argref" href="#LIWORK">LIWORK</a>) &#8211; INTEGER array<span class="pclass">Workspace</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 entry</i>: the dimension of the array <a class="argref" href="#IWORK">IWORK</a> as declared in the (sub)program from which E04UCF/E04UCA is called.</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#LIWORK" dsi:type="simple"><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:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#NCLIN" dsi:type="simple"><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:href="#NCNLN" dsi:type="simple"><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="argref" href="#LWORK">LWORK</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Workspace</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 entry</i>: the dimension of the array <a class="argref" href="#WORK">WORK</a> as declared in the (sub)program from which E04UCF/E04UCA is called.</div><div class="paramtext"><i>Constraints</i>:
   <div class="paramtext"/><ul class="listcons">
<li class="listcons">if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#NCLIN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#LWORK" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>20</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>;</li>
<li class="listcons">if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#NCLIN" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#LWORK" dsi:type="simple"><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:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mn>2</m:mn></m:msup><m:mo>+</m:mo><m:mn>20</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><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:href="#NCLIN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction></m:math>;</li>
<li class="listcons">if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#NCLIN" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#LWORK" dsi:type="simple"><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:href="#N" dsi:type="simple"><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:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:href="#NCLIN" dsi:type="simple"><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:href="#N" dsi:type="simple"><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:href="#NCNLN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction><m:mo>+</m:mo><m:mn>20</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><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:href="#NCLIN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:mn>21</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">NCNLN</m:mi></m:maction></m:math>.</li>
</ul></div>
<div class="paramtext">The amounts of workspace provided and required are (by default) output on the current advisory message unit (as defined by <a class="rtnref" href="../X04/x04abf.xml">X04ABF</a>).  As an alternative to computing <a class="argref" href="#LIWORK">LIWORK</a> and <a class="argref" href="#LWORK">LWORK</a> from the formulas given above, you may prefer to obtain appropriate values from the output of a preliminary run with <a class="argref" href="#LIWORK">LIWORK</a> and <a class="argref" href="#LWORK">LWORK</a> set to 1.  (E04UCF/E04UCA will then terminate with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><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 mathvariant="bold" mathcolor="#003399">9</m:mn></m:maction></m:math>.)</div></dd><dt class="paramhead"><a name="IUSER" id="IUSER"/>25:
  
  &#8194;
  IUSER(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>*</m:mo></m:math>) &#8211; INTEGER array<span class="pclass">User Workspace</span></dt><dd><div class="paramtext"><b>Note:</b> the dimension of the array <a class="argref" href="#IUSER">IUSER</a> must be at least <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mn>1</m:mn></m:math>.</div>
<div class="paramtext"><a class="argref" href="#IUSER">IUSER</a> is not used by E04UCF/E04UCA, but is passed directly to user-supplied (sub)programs <a class="argref" href="#CONFUN">CONFUN</a> and <a class="argref" href="#OBJFUN">OBJFUN</a> and may be used to pass information to those routines.</div></dd><dt class="paramhead"><a name="RUSER" id="RUSER"/>26:
  
  &#8194;
  RUSER(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>*</m:mo></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">User Workspace</span></dt><dd><div class="paramtext"><b>Note:</b> the dimension of the array <a class="argref" href="#RUSER">RUSER</a> must be at least <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mn>1</m:mn></m:math>.</div>
<div class="paramtext"><a class="argref" href="#RUSER">RUSER</a> is not used by E04UCF/E04UCA, but is passed directly to user-supplied (sub)programs <a class="argref" href="#CONFUN">CONFUN</a> and <a class="argref" href="#OBJFUN">OBJFUN</a> and may be used to pass information to those routines.</div></dd><dt class="paramhead"><a name="IFAIL" id="IFAIL"/>27:
  
  &#8194;
  IFAIL &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><b>Note:</b> <span class="italic">for E04UCA, <a class="argref" href="#IFAIL2">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 initial entry</i>: <a class="argref" href="#IFAIL">IFAIL</a> must be set to 0, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 Chapter <a class="secref" href="../P01/p01_conts.xml">P01</a> for details.</div><div class="paramtext"><i>On final exit</i>: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction> <m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#errors" dsi:type="simple"><m:mn mathvariant="bold" mathcolor="#003399">0</m:mn></m:maction></m:math>&#160;unless the routine detects an error (see Section <a class="secref" href="#errors">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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 1 is recommended.  Otherwise, because for this routine the values of the output parameters may be useful even if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction> <m:mo>&#8800;</m:mo><m:maction actiontype="link" dsi:href="#errors" dsi:type="simple"><m:mn mathvariant="bold" mathcolor="#003399">0</m:mn></m:maction></m:math>&#160;on exit, the recommended value is <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>.  <b>When the value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="argref" href="#IFAIL">IFAIL</a> on exit.</b></div>
</div><div class="paramtext">E04UCF/E04UCA returns with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction> <m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#errors" dsi:type="simple"><m:mn mathvariant="bold" mathcolor="#003399">0</m:mn></m:maction></m:math>&#160;if the iterates have converged to a point <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>&#160;that satisfies the first-order Kuhn&#8211;Tucker (see Section <a class="secref" href="#ad-overview">10.1</a>) conditions to the accuracy requested by the optional parameter <a class="optparamref" href="#optparam_optimalitytolerance">Optimality Tolerance</a> (<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>&#949;</m:mi><m:mi>R</m:mi></m:msub></m:math>&#160;is the value of the optional parameter <a class="optparamref" href="#optparam_functionprecision">Function Precision</a> (<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#949;</m:mi></m:math>&#160;is the <span class="bitalic">machine precision</span>)), i.e., the projected gradient and active constraint residuals are negligible at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>.</div>
<div class="paramtext">You should check whether the following four conditions are satisfied:
</div><ol class="listroman"><li class="listroman">the final value of <span class="mono">Norm Gz</span> (see Section <a class="secref" href="#fc-printedoutput">8.1</a>) is significantly less than that at the starting point;</li><li class="listroman">during the final major iterations, the values of <span class="mono">Step</span> and <span class="mono">Mnr</span> (see Section <a class="secref" href="#fc-printedoutput">8.1</a>) are both one;</li><li class="listroman">the last few values of both <span class="mono">Norm Gz</span> and <span class="mono">Violtn</span> (see Section <a class="secref" href="#fc-printedoutput">8.1</a>) become small at a fast linear rate; and</li><li class="listroman"><span class="mono">Cond Hz</span> (see Section <a class="secref" href="#fc-printedoutput">8.1</a>) is small.</li></ol><div class="paramtext">
</div>
<div class="paramtext">If all these conditions hold, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>&#160;is almost certainly a local minimum of (<a class="eqnref" href="#eqn1">1</a>).</div>
</dd><dd class="note"><b>Note:</b> <span class="italic">the following are additional parameters for specific use with E04UCA.  Users of E04UCF therefore need not read the remainder of this description</span>.</dd><dt class="paramhead"><a name="LWSAV" id="LWSAV"/>27:
  
  &#8194;
  LWSAV(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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"/>28:
  
  &#8194;
  IWSAV(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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"/>29:
  
  &#8194;
  RWSAV(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="argref" href="#LWSAV">LWSAV</a>, <a class="argref" href="#IWSAV">IWSAV</a> and <a class="argref" href="#RWSAV">RWSAV</a> <b>must not</b> be altered between calls to any of the routines <a class="rtnref" href="../E04/e04wbf.xml">E04WBF</a>, E04UCA, <a class="rtnref" href="../E04/e04udf.xml">E04UDA</a> or <a class="rtnref" href="../E04/e04uef.xml">E04UEA</a>.</div></dd><dt class="paramhead"><a name="IFAIL2" id="IFAIL2"/>30:
  
  &#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="argref" href="#IFAIL">IFAIL</a> above.</div></dd></dl><h2><a name="errors" id="errors"/>6&#160;&#160;Error Indicators and Warnings</h2>
<div class="paramtext">If on entry <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction> <m:mo>=</m:mo></m:math>&#160;<a class="ifailref" href="#errors">0</a> or <a class="ifailref" href="#errors">&#8722;1</a>, explanatory error messages are output on the current error message unit (as defined by <a class="rtnref" href="../X04/x04aaf.xml">X04AAF</a>).</div><div class="paramtext">Errors or warnings detected by the routine:</div>
<dl class="ifails"><dt class="errorhead"><a name="IFlt0" id="IFlt0"/><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><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="argref" href="#IFAIL">IFAIL</a> indicates an exit from E04UCF/E04UCA because you set <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#OBJFUN_MODE" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>&#160;in the user-supplied (sub)program <a class="argref" href="#OBJFUN">OBJFUN</a> or <a class="argref" href="#CONFUN">CONFUN</a>.  The value of <a class="argref" href="#IFAIL">IFAIL</a> will be the same as your setting of <a class="argref" href="#OBJFUN_MODE">MODE</a>.</div>
</dd><dt class="errorhead"><a name="IFeq1" id="IFeq1"/><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>&#160;satisfies the first-order Kuhn&#8211;Tucker conditions (see Section <a class="secref" href="#ad-overview">10.1</a>) to the accuracy requested, but the sequence of iterates has not yet converged.  E04UCF/E04UCA was terminated because no further improvement could be made in the merit function (see Section <a class="secref" href="#fc-printedoutput">8.1</a>).</div>
<div class="paramtext">This value of <a class="argref" 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 <a class="optparamref" href="#optparam_functionprecision">Function Precision</a> (<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#949;</m:mi></m:math>&#160;is the <span class="bitalic">machine precision</span>)).  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 Section <a class="secref" href="#parameters">5</a> for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction> <m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#errors" dsi:type="simple"><m:mn mathvariant="bold" mathcolor="#003399">0</m:mn></m:maction></m:math>&#160;are satisfied, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>&#160;is likely to be a solution of (<a class="eqnref" href="#eqn1">1</a>) even if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><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 mathvariant="bold" mathcolor="#003399">1</m:mn></m:maction></m:math>.</div>
</dd><dt class="errorhead"><a name="IFeq2" id="IFeq2"/><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><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">E04UCF/E04UCA 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 <a class="optparamref" href="#optparam_lf-tolerance">Linear Feasibility Tolerance</a> (<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext>default value</m:mtext><m:mo>=</m:mo><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math>, where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#949;</m:mi></m:math>&#160;is the <span class="bitalic">machine precision</span>), or no feasible point could be found in the number of iterations specified by the optional parameter <a class="optparamref" href="#optparam_minoriterationlimit">Minor Iteration Limit</a> (<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext>default value</m:mtext><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><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:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:msub></m:mfenced></m:mrow></m:mfenced></m:mrow></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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#963;</m:mi></m:math>, you should ensure that the value of the optional parameter <a class="optparamref" href="#optparam_lf-tolerance">Linear Feasibility Tolerance</a> is greater than <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#963;</m:mi></m:math>.  For example, if all elements of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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, <a class="optparamref" href="#optparam_lf-tolerance">Linear Feasibility Tolerance</a> should be at least <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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><dt class="errorhead"><a name="IFeq3" id="IFeq3"/><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><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 Section <a class="secref" href="#fc-printedoutput">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="argref" href="#ISTATE">ISTATE</a>.  If you are convinced that a feasible point does exist, E04UCF/E04UCA should be restarted at a different starting point.</div>
</dd><dt class="errorhead"><a name="IFeq4" id="IFeq4"/><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><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 <a class="optparamref" href="#optparam_majoriterationlimit">Major Iteration Limit</a> (<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext>default value</m:mtext><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><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:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:msub></m:mrow></m:mfenced></m:mrow></m:math>)) has been reached.</div>
<div class="paramtext">If the algorithm appears to be making satisfactory progress, then <a class="optparamref" href="#optparam_majoriterationlimit">Major Iteration Limit</a> may be too small.  If so, either increase its value and rerun E04UCF/E04UCA or, alternatively, rerun E04UCF/E04UCA using the optional parameter <a class="optparamref" href="#optparam_warmstart">Warm Start</a>.  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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><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 mathvariant="bold" mathcolor="#003399">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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>R</m:mi></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="argref" href="#R">R</a></span> occurs at the end of each line of intermediate printout; see Section <a class="secref" href="#fc-printedoutput">8.1</a>), it may be worthwhile to try a <a class="optparamref" href="#optparam_warmstart">Warm Start</a> at the final point as suggested above.</div>
</dd><dt class="errorhead"><a name="IFeq5" id="IFeq5"/><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><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><dt class="errorhead"><a name="IFeq6" id="IFeq6"/><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>&#160;does not satisfy the first-order Kuhn&#8211;Tucker conditions (see Section <a class="secref" href="#ad-overview">10.1</a>) and no improved point for the merit function (see Section <a class="secref" href="#fc-printedoutput">8.1</a>) could be found during the final line search.</div>
<div class="paramtext">This sometimes occurs because an overly stringent accuracy has been requested, i.e., the value of the optional parameter <a class="optparamref" href="#optparam_optimalitytolerance">Optimality Tolerance</a> (<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>&#949;</m:mi><m:mi>R</m:mi></m:msub></m:math>&#160;is the value of the optional parameter <a class="optparamref" href="#optparam_functionprecision">Function Precision</a> (<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#949;</m:mi></m:math>&#160;is the <span class="bitalic">machine precision</span>)) is too small.  In this case you should apply the four tests described under <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction> <m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#errors" dsi:type="simple"><m:mn mathvariant="bold" mathcolor="#003399">0</m:mn></m:maction></m:math>&#160;to determine whether or not the final solution is acceptable (see <a class="litref" href="#ref079">Gill <i>et al.</i> (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 E04UCF/E04UCA has failed completely to move from the initial point then (sub)programs <a class="argref" href="#OBJFUN">OBJFUN</a> and/or <a class="argref" href="#CONFUN">CONFUN</a> may be incorrect.  You should refer to comments under <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><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 mathvariant="bold" mathcolor="#003399">7</m:mn></m:maction></m:math>&#160;and check the gradients using the optional parameter <a class="optparamref" href="#optparam_verify">Verify</a> (<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext>default value</m:mtext><m:mo>=</m:mo><m:mn>0</m:mn></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 Section <a class="secref" href="#fc-printedoutput">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 Section <a class="secref" href="#fc-printedoutput">8.1</a>).</div>
<div class="paramtext">If the condition estimate of the projected Hessian (<span class="mono">Cond Hz</span>; see Section <a class="secref" href="#fc-printedoutput">8.1</a>) is extremely large, it may be worthwhile rerunning E04UCF/E04UCA from the final point with the optional parameter <a class="optparamref" href="#optparam_warmstart">Warm Start</a>.  In this situation,  <a class="argref" href="#ISTATE">ISTATE</a> and  <a class="argref" href="#CLAMDA">CLAMDA</a> should be left unaltered and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>R</m:mi></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 Section <a class="secref" href="#monitoring">12</a>), it may be helpful to run E04UCF/E04UCA with a relaxed value of the <a class="optparamref" href="#optparam_feasibilitytolerance">Feasibility Tolerance</a> (<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext>default value</m:mtext><m:mo>=</m:mo><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math>, where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#949;</m:mi></m:math>&#160;is the <span class="bitalic">machine precision</span>).  (Constraint dependencies are often indicated by wide variations in size in the diagonal elements of the matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>T</m:mi></m:math>, whose diagonals will be printed if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_majorprintlevel" dsi:type="simple"><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><dt class="errorhead"><a name="IFeq7" id="IFeq7"/><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><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="argref" 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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;are used to test function evaluation procedures, and how often the special properties of these numbers make the test meaningless.</div>
<div class="paramtext">Special care should be used in this 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 prior to 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><dt class="errorhead"><a name="IFeq8" id="IFeq8"/><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><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><dt class="errorhead"><a name="IFeq9" id="IFeq9"/><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><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><dt class="errorhead"><a name="Overflow" id="Overflow"/><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction> <m:mo>=</m:mo> <m:mtext>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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 <a class="optparamref" href="#optparam_lf-tolerance">Linear Feasibility Tolerance</a> and/or the optional parameter <a class="optparamref" href="#optparam_nonlf-tolerance">Nonlinear Feasibility Tolerance</a> and rerunning the program.  If the message recurs even after this change then the offending linearly dependent constraint (with index &#8216;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>j</m:mi></m:math>&#8217;) must be removed from the problem.  If overflow occurs in one of the user-supplied (sub)programs (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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>l</m:mi><m:mi>j</m:mi></m:msub></m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>u</m:mi><m:mi>j</m:mi></m:msub></m:math>).</div>
</dd></dl><h2><a name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2><div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction> <m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#errors" dsi:type="simple"><m:mn mathvariant="bold" mathcolor="#003399">0</m:mn></m:maction></m:math>&#160;on exit, then the vector returned in the array <a class="argref" href="#X">X</a> is an estimate of the solution to an accuracy of approximately <a class="optparamref" href="#optparam_optimalitytolerance">Optimality Tolerance</a> (<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#949;</m:mi></m:math>&#160;is the <span class="bitalic">machine precision</span>).</div><h2><a name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2><h3><a 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 E04UCF/E04UCA.  The intermediate printout is a subset of the monitoring information produced by the routine at every iteration (see Section <a class="secref" href="#monitoring">12</a>).  The level of printed output can be controlled by you (see the description of the optional parameter <a class="optparamref" href="#optparam_majorprintlevel">Major Print Level</a>).  Note that the intermediate printout and final printout are produced only if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_majorprintlevel" dsi:type="simple"><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 E04UCF, by default no output is produced by E04UCA).</div>
<div class="paramtext">The following line of summary output (<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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.
</div><table style="width:100%;"><tr>
<td style="width:10.2em;" valign="top"><span class="mono">Maj</span></td>
<td valign="top">
is the major iteration count.
</td>
</tr><tr>
<td style="width:10.2em;" valign="top"><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 1 in the later iterations, since theoretical analysis predicts that the correct active set will be identified near the solution
 (see Section <a class="secref" href="#algdetails">10</a>).  <div class="paramtext">
Note that <span class="mono">Mnr</span> may be greater than the optional parameter <a class="optparamref" href="#optparam_minoriterationlimit">Minor Iteration Limit</a> if some iterations are required for the feasibility phase.</div>
</td>
</tr><tr>
<td style="width:10.2em;" valign="top"><span class="mono">Step</span></td>
<td valign="top">
is the step <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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="top"><span class="mono">Merit Function</span></td>
<td valign="top">

is the value of the augmented Lagrangian merit function (<a class="eqnref" 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 Section <a class="secref" href="#ad-meritfunction">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 E04UCF/E04UCA terminates with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><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 mathvariant="bold" mathcolor="#003399">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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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="top"><span class="mono">Norm Gz</span></td>
<td valign="top">

is <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 Section <a class="secref" href="#ad-QPS">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="top"><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="argref" 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="top"><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 xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub><m:mi>H</m:mi><m:mi>Z</m:mi></m:msub>
</m:math>&#160;(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <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="eqnref" href="#eqn6">6</a>)).  The larger this number, the more difficult the problem.
</td>
</tr><tr>
<td style="width:10.2em;" valign="top"><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 Section <a class="secref" href="#ad-quasinewton">10.4</a>).
</td>
</tr><tr>
<td style="width:10.2em;" valign="top"><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="top"><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 line search.  (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 non-zero then central differences were computed because <span class="mono">Norm Gz</span> and <span class="mono">Violtn</span> imply that <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>&#160;is close to a Kuhn&#8211;Tucker point
 (see Section <a class="secref" href="../E04/e04uff.xml#ad-overview">10.1</a> of the document for E04UFF/E04UFA).

</td>
</tr><tr>
<td style="width:10.2em;" valign="top"><span class="mono">L</span></td>
<td valign="top">
is printed if the line search has produced a relative change in <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>&#160;greater than the value defined by the optional parameter <a class="optparamref" href="#optparam_steplimit">Step Limit</a>.  If this output occurs frequently during later iterations of the run, optional parameter <a class="optparamref" href="#optparam_steplimit">Step Limit</a> should be set to a larger value.
</td>
</tr><tr>
<td style="width:10.2em;" valign="top"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>R</m:mi></m:math>&#160;is modified so that its diagonal condition estimator is bounded.
</td>
</tr></table><div class="paramtext">
</div>
<div class="paramtext">The final printout includes a listing of the status of every variable and constraint.  The following describes the printout for each variable.  A full stop (.)  is printed for any numerical value that is zero.
</div><table style="width:100%;"><tr>
<td style="width:10.2em;" valign="top"><span class="mono">Varbl</span></td>
<td valign="top">
gives the name (<span class="mono">V</span>) and index <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>j</m:mi></m:math>, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="top"><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 optional parameter <a class="optparamref" href="#optparam_feasibilitytolerance">Feasibility Tolerance</a>, <span class="mono">State</span> will be <span class="mono">++</span> or <span class="mono">--</span> respectively.
 (The latter situation can occur only when there is no feasible point for the bounds and linear constraints.)
 <div class="paramtext">
A key is sometimes printed before <span class="mono">State</span> to give some additional information about the state of a variable.

 </div><table style="width:100%;"><tr>
<td style="width:3em;" valign="top"><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:3em;" valign="top"><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:3em;" valign="top"><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 optional parameter <a class="optparamref" href="#optparam_feasibilitytolerance">Feasibility Tolerance</a>.
</td>
</tr></table><div class="paramtext">
 </div></td>
</tr><tr>
<td style="width:10.2em;" valign="top"><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="top"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#BL" dsi:type="simple"><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="top"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#BU" dsi:type="simple"><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="top"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#BL" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#BU" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 non-positive if <span class="mono">State</span> is <span class="mono">UL</span>.
</td>
</tr><tr>
<td style="width:10.2em;" valign="top"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#BL" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#BU" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#BL" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#BU" dsi:type="simple"><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 class="paramtext">
</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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#BL" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#BU" dsi:type="simple"><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;are replaced by <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#BL" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:maction actiontype="link" dsi:href="#BU" dsi:type="simple"><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:
</div><table style="width:100%;"><tr>
<td style="width:10.2em;" valign="top"><span class="mono">L Con</span></td>
<td valign="top">
gives the name (<span class="mono">L</span>) and index <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>j</m:mi></m:math>, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="top"><span class="mono">N Con</span></td>
<td valign="top">
gives the name (<span class="mono">N</span>) and index (<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 class="paramtext">
</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><a name="example" id="example"/>9&#160;&#160;Example</h2><div class="paramtext">This is based on Problem 71 in <a class="litref" href="#ref093">Hock  and Schittkowski (1981)</a> and involves the minimization of the nonlinear function
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
subject to the bounds
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
to the general linear constraint
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
and to the nonlinear constraints
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
<m:mtable>
 <m:mtr>
  <m:mtd columnalign="right"><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 columnalign="right"><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>
<div class="paramtext">
The initial point, which is infeasible, is
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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>
<div class="paramtext">The document for <a class="rtnref" href="../E04/e04udf.xml">E04UDF/E04UDA</a> includes an example program to solve the same problem using some of the optional parameters described in Section <a class="secref" href="#optparams">11</a>.</div><h3><a name="examtext" id="examtext"/>9.1&#160;&#160;Program Text</h3>
  <div class="paramtext"><b>Note:</b> <span class="italic">the following program illustrates the use of E04UCF.  An equivalent program illustrating the use of E04UCA is available with the supplied Library and is also available from the NAG web site</span>.</div>
<p><a href="../../examples/source/e04ucfe.f">Program Text (e04ucfe.f)</a></p><h3><a name="examdata" id="examdata"/>9.2&#160;&#160;Program Data</h3><p><a href="../../examples/data/e04ucfe.d">Program Data (e04ucfe.d)</a></p><h3><a name="examresults" id="examresults"/>9.3&#160;&#160;Program Results</h3><p><a href="../../examples/baseresults/e04ucfe.r">Program Results (e04ucfe.r)</a></p><div class="paramtext"><b>Note:</b> <span class="italic">the remainder of this document is intended for more advanced users.  Section <a class="secref" href="#algdetails">10</a> contains a detailed description of the algorithm which may be needed in order to understand Sections <a class="secref" href="#optparams">11</a> and <a class="secref" href="#monitoring">12</a>.  Section <a class="secref" href="#optparams">11</a> describes the optional parameters which may be set by calls to <a class="rtnref" href="../E04/e04udf.xml">E04UDF/E04UDA</a> and/or <a class="rtnref" href="../E04/e04uef.xml">E04UEF/E04UEA</a>.  Section <a class="secref" href="#monitoring">12</a> describes the quantities which can be requested to monitor the course of the computation</span>.</div><h2><a name="algdetails" id="algdetails"/>10&#160;&#160;Algorithmic Details</h2><div class="paramtext">This section contains a detailed description of the method used by E04UCF/E04UCA.</div><h3><a name="ad-overview" id="ad-overview"/>10.1&#160;&#160;Overview</h3><div class="paramtext">E04UCF/E04UCA is essentially identical to the (sub)program NPSOL described in <a class="litref" href="#ref540">Gill <i>et al.</i> (1986c)</a>.</div>
<div class="paramtext">At a solution of (<a class="eqnref" 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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#C" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction></m:math>&#160;denote the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>m</m:mi></m:math>&#160;by <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FX</m:mi></m:msub></m:math>, with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mfenced separators=""><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:mfenced></m:math>&#160;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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>&#160;is a <span class="italic">first-order Kuhn&#8211;Tucker point</span> for (<a class="eqnref" href="#eqn1">1</a>) (see <a class="litref" href="#ref096">Powell (1974)</a>) if the following conditions hold:
</div><ol class="listroman"><li class="listroman"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>&#160;is feasible;</li><li class="listroman">there exist vectors <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#958;</m:mi></m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML" 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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>g</m:mi></m:math>&#160;is the gradient of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>F</m:mi></m:math>&#160;evaluated at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>, and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>j</m:mi></m:math>th variable is free.</li><li class="listroman">The Lagrange-multiplier corresponding to an inequality constraint active at its lower bound must be non-negative, and non-positive for an inequality constraint active at its upper bound.</li></ol><div class="paramtext">
</div>
<div class="paramtext">Let <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>; i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="eqnref" href="#eqn2">2</a>) in terms of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>Z</m:mi></m:math>&#160;is
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
The vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>F</m:mi></m:math>&#160;at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="eqnref" href="#eqn1">1</a>) (see <a class="litref" href="#ref096">Powell (1974)</a>).</div>
<div class="paramtext">E04UCF/E04UCA implements a sequential quadratic programming (SQP) method.  For an overview of SQP methods, see, for example, <a class="litref" href="#ref224">Fletcher (1987)</a>, <a class="litref" href="#ref079">Gill <i>et al.</i> (1981)</a> and <a class="litref" href="#ref097">Powell (1983)</a>.</div>
<div class="paramtext">The basic structure of E04UCF/E04UCA involves <span class="italic">major</span> and <span class="italic">minor</span> iterations.  The major iterations generate a sequence of iterates <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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="eqnref" href="#eqn1">1</a>).  At a typical major iteration, the new iterate <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mover><m:mi>x</m:mi><m:mo>-</m:mo></m:mover></m:math>&#160;is defined by
</div>
<div class="formula-eqn"><a name="eqn3" id="eqn3"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>&#160;is the current iterate, the non-negative scalar <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#945;</m:mi></m:math>&#160;is the <span class="italic">step length,</span> and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>p</m:mi></m:math>&#160;in (<a class="eqnref" href="#eqn3">3</a>) is the solution of a quadratic programming subproblem of the form
</div>
<div class="formula-eqn"><a name="eqn4" id="eqn4"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:munder><m:mi>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>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>g</m:mi></m:math>&#160;is the gradient of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>F</m:mi></m:math>&#160;at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>, the matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>H</m:mi></m:math>&#160;is a positive-definite quasi-Newton approximation to the Hessian of the Lagrangian function (see Section <a class="secref" href="#ad-quasinewton">10.4</a>), and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>A</m:mi><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:msub></m:math>&#160;is the Jacobian matrix of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>c</m:mi></m:math>&#160;evaluated at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>.  (Finite difference estimates may be used for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>g</m:mi></m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>A</m:mi><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:msub></m:math>; see the optional parameter <a class="optparamref" href="#optparam_derivativelevel">Derivative Level</a>.)  Let <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>l</m:mi></m:math>&#160;in (<a class="eqnref" href="#eqn1">1</a>) be partitioned into three sections: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>l</m:mi><m:mi>B</m:mi></m:msub></m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>l</m:mi><m:mi>L</m:mi></m:msub></m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>l</m:mi><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:msub></m:math>, corresponding to the bound, linear and nonlinear constraints.  The vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mover><m:mi>l</m:mi><m:mo>-</m:mo></m:mover></m:math>&#160;in (<a class="eqnref" href="#eqn4">4</a>) is similarly partitioned, and is defined as
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>c</m:mi></m:math>&#160;is the vector of nonlinear constraints evaluated at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>.  The vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="eqnref" 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 E04UCF/E04UCA; see Section <a class="secref" href="#monitoring">12</a>.)  In E04UCF/E04UCA, (<a class="eqnref" href="#eqn4">4</a>) is solved using <a class="rtnref" 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 E04UCF/E04UCA are the iterations of <a class="rtnref" href="../E04/e04ncf.xml">E04NCF/E04NCA</a>.  (More details about solving the subproblem are given in Section <a class="secref" href="#ad-QPS">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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#C" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction></m:math>&#160;denote the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>m</m:mi></m:math>&#160;by <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>n</m:mi></m:math>&#160;matrix of gradients of the general linear and nonlinear constraints in the predicted active set.  First, we have available the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>T</m:mi><m:mi>Q</m:mi></m:math>&#160;factorization of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>:
</div>
<div class="formula-eqn"><a name="eqn5" id="eqn5"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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><m:mtable>
  <m:mtr>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mi>T</m:mi></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
<m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (5)
     </td></tr></table></div>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>T</m:mi></m:math>&#160;is a non-singular <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>m</m:mi></m:math>&#160;by <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>m</m:mi></m:math>&#160;reverse-triangular matrix (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 non-singular <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;by <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="litref" href="#ref494">Gill <i>et al.</i> (1984)</a>).  Second, we have the upper triangular Cholesky factor <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>R</m:mi></m:math>&#160;of the <span class="italic">transformed and reordered</span> Hessian matrix
</div>
<div class="formula-eqn"><a name="eqn6" id="eqn6"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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:mrow><m:mi>H</m:mi><m:mo>&#732;</m:mo></m:mrow><m:mi>Q</m:mi><m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (6)
     </td></tr></table></div>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:mi>H</m:mi><m:mo>&#732;</m:mo></m:mrow></m:math>&#160;is the Hessian <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>H</m:mi></m:math>&#160;with rows and columns permuted so that the free variables are first, and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>Q</m:mi></m:math>&#160;is the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>n</m:mi></m:math>&#160;by <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>n</m:mi></m:math>&#160;matrix
</div>
<div class="formula-eqn"><a name="eqn7" id="eqn7"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FX</m:mi></m:msub></m:math>.  If the columns of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>Q</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;are partitioned so that
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>n</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>Z</m:mi></m:math>&#160;form a basis for the null space of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>.  The matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>Z</m:mi></m:math>&#160;is used to compute the projected gradient <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 E04UCF/E04UCA give <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>n</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 Section <a class="secref" href="#monitoring">12</a>.)</div>
<div class="paramtext">A theoretical characteristic of SQP methods is that the predicted active set from the QP subproblem (<a class="eqnref" href="#eqn4">4</a>) is identical to the correct active set in a neighbourhood of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msup><m:mi>x</m:mi><m:mo>*</m:mo></m:msup></m:math>.  In E04UCF/E04UCA, 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 E04UCF/E04UCA also saves computation in factorizing <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>H</m:mi><m:mi>Q</m:mi></m:msub></m:math>.</div>
<div class="paramtext">Once <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>p</m:mi></m:math>&#160;has been computed, the major iteration proceeds by determining a step length <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 Section <a class="secref" href="#ad-meritfunction">10.3</a>).  Finally, the approximation to the transformed Hessian matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 Section <a class="secref" href="#ad-quasinewton">10.4</a>) to incorporate new curvature information obtained in the move from <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>&#160;to <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mover><m:mi>x</m:mi><m:mo>-</m:mo></m:mover></m:math>.</div>
<div class="paramtext">On entry to E04UCF/E04UCA, an iterative procedure from <a class="rtnref" 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 optional parameter <a class="optparamref" href="#optparam_lf-tolerance">Linear Feasibility Tolerance</a>).  If no feasible point exists for the bound and linear constraints, (<a class="eqnref" href="#eqn1">1</a>) has no solution and E04UCF/E04UCA 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 optional parameter <a class="optparamref" href="#optparam_differenceinterval">Difference Interval</a>).  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 <a class="optparamref" href="#optparam_verify">Verify</a>).  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 E04UCF/E04UCA first determines a point that satisfies the bound and linear constraints.  Thereafter, each iteration includes:
</div><ol class="listalpha"><li class="listalpha">the solution of a quadratic programming subproblem;</li><li class="listalpha">a line search with an augmented Lagrangian merit function; and</li><li class="listalpha">a quasi-Newton update of the approximate Hessian of the Lagrangian function.</li></ol><div class="paramtext">
</div>
<div class="paramtext">These three procedures are described in more detail in Sections <a class="secref" href="#ad-QPS">10.2</a> to <a class="secref" href="#ad-quasinewton">10.4</a>.</div><h3><a 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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>p</m:mi></m:math>&#160;is obtained by solving (<a class="eqnref" href="#eqn4">4</a>) using <a class="rtnref" href="../E04/e04ncf.xml">E04NCF/E04NCA</a> (see <a class="litref" href="#ref091">Gill <i>et al.</i> (1986a)</a>), which was specifically designed to be used within an SQP algorithm for nonlinear programming.</div>
<div class="paramtext"><a class="rtnref" 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 (sub)programs.  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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>p</m:mi></m:math>&#160;denote the current estimate of the solution of (<a class="eqnref" href="#eqn4">4</a>); the new iterate <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mover><m:mi>p</m:mi><m:mo>-</m:mo></m:mover></m:math>&#160;is defined by
</div>
<div class="formula-eqn"><a name="eqn8" id="eqn8"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
where, as in (<a class="eqnref" href="#eqn3">3</a>), <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#963;</m:mi></m:math>&#160;is a non-negative step length and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="rtnref" 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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#C" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction></m:math>&#160;denote the sub-matrix of rows of
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
corresponding to general constraints in the working set.  The general constraints in the working set will remain unaltered if
</div>
<div class="formula-eqn"><a name="eqn9" id="eqn9"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
which is equivalent to defining <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>d</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;as
</div>
<div class="formula-eqn"><a name="eqn10" id="eqn10"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
for some vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>d</m:mi><m:mi>Z</m:mi></m:msub></m:math>, where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>Z</m:mi></m:math>&#160;is the matrix associated with the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>T</m:mi><m:mi>Q</m:mi></m:math>&#160;factorization (<a class="eqnref" href="#eqn5">5</a>) of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>d</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;in (<a class="eqnref" href="#eqn10">10</a>) depends on whether the current <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>p</m:mi></m:math>&#160;is feasible.  If not, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#947;</m:mi></m:math>&#160;in the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>j</m:mi></m:math>th position, where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>j</m:mi></m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#947;</m:mi></m:math>&#160;are chosen so that the sum of infeasibilities is decreasing along <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>d</m:mi></m:math>.  (For further details, see <a class="litref" href="#ref091">Gill <i>et al.</i> (1986a)</a>.)  In the feasible case, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>d</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;satisfies the equations
</div>
<div class="formula-eqn"><a name="eqn11" id="eqn11"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;is the Cholesky factor of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>q</m:mi></m:math>&#160;is the gradient of the quadratic objective function <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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="eqnref" href="#eqn11">11</a>), <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#948;</m:mi></m:math>&#160;of the order of the <span class="bitalic">machine precision</span>, the Lagrange-multiplier <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>j</m:mi></m:math>th constraint is at its <span class="italic">upper bound</span>, or if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 non-optimal, 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 non-zero, 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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>&#956;</m:mi><m:mi>j</m:mi></m:msub></m:math>&#160;will satisfy <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#963;</m:mi></m:math>&#160;in the QP iteration (<a class="eqnref" href="#eqn8">8</a>) is based on remaining feasible with respect to the satisfied constraints.  During the optimality phase, if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>p</m:mi><m:mo>+</m:mo><m:mi>d</m:mi></m:math>&#160;is feasible, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#963;</m:mi></m:math>&#160;will be taken as unity.  (In this case, the projected gradient at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mover><m:mi>p</m:mi><m:mo>-</m:mo></m:mover></m:math>&#160;will be zero.)  Otherwise, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#963;</m:mi></m:math>&#160;is set to <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>T</m:mi></m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>Q</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>R</m:mi></m:math>, and of the vectors <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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><a 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 Section <a class="secref" href="#ad-QPS">10.2</a>, each major iteration proceeds by determining a step length <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#945;</m:mi></m:math>&#160;in (<a class="eqnref" href="#eqn3">3</a>) that produces a &#8216;sufficient decrease&#8217; in the augmented Lagrangian merit function
</div>
<div class="formula-eqn"><a name="eqnlmf" id="eqnlmf"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#955;</m:mi></m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>s</m:mi></m:math>&#160;vary during the line search.  The summation terms in (<a class="eqnref" href="#eqnlmf">12</a>) involve only the <span class="italic">nonlinear</span> constraints.  The vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#955;</m:mi></m:math>&#160;is an estimate of the Lagrange-multipliers for the nonlinear constraints of (<a class="eqnref" href="#eqn1">1</a>).  The non-negative <span class="italic">slack variables</span>
<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="eqnref" 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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#961;</m:mi></m:math>&#160;(the printed quantity <span class="mono">Penalty</span>; see Section <a class="secref" href="#monitoring">12</a>) is generally non-decreasing, although each <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="eqnref" href="#eqnlmf">12</a>) and its global convergence properties are described in <a class="litref" href="#ref092">Gill <i>et al.</i> (1986b)</a>.</div><h3><a name="ad-quasinewton" id="ad-quasinewton"/>10.4&#160;&#160;The Quasi-Newton Update</h3><div class="paramtext">The matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>H</m:mi></m:math>&#160;in (<a class="eqnref" 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="litref" href="#ref086">Dennis  and Schnabel (1983)</a>.)  At the end of each major iteration, a new Hessian approximation <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>H</m:mi></m:math>.  In E04UCF/E04UCA, the BFGS (Broyden&#8211;Fletcher&#8211;Goldfarb&#8211;Shanno) quasi-Newton update is used:
</div>
<div class="formula-eqn"><a name="eqn13" id="eqn13"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>).</div>
<div class="paramtext">In E04UCF/E04UCA, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>H</m:mi></m:math>&#160;is required to be positive-definite.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>H</m:mi></m:math>&#160;is positive-definite, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mover><m:mi>H</m:mi><m:mo>-</m:mo></m:mover></m:math>&#160;defined by (<a class="eqnref" href="#eqn13">13</a>) will be positive-definite if and only if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="litref" href="#ref084">Dennis  and Mor&#233; (1977)</a>).  Ideally, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>y</m:mi></m:math>&#160;in (<a class="eqnref" href="#eqn13">13</a>) would be taken as <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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>
<div class="formula-eqn"><a name="eqn14" id="eqn14"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>&#956;</m:mi><m:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:msub></m:math>&#160;denotes the QP multipliers associated with the nonlinear constraints of the original problem.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>y</m:mi></m:math>&#160;of the form
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>H</m:mi></m:math>&#160;itself, the Cholesky factor of the <span class="italic">transformed Hessian</span>
<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>H</m:mi><m:mi>Q</m:mi></m:msub></m:math>&#160;(<a class="eqnref" href="#eqn6">6</a>) is updated, where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>Q</m:mi></m:math>&#160;is the matrix from (<a class="eqnref" href="#eqn5">5</a>) associated with the active set of the QP subproblem.  The update (<a class="eqnref" href="#eqn13">13</a>) is equivalent to the following update to <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>H</m:mi><m:mi>Q</m:mi></m:msub></m:math>:
</div>
<div class="formula-eqn"><a name="eqn15" id="eqn15"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>R</m:mi></m:math>&#160;(see <a class="litref" href="#ref085">Dennis  and Schnabel (1981)</a>).</div><h2><a name="optparams" id="optparams"/>11&#160;&#160;Optional Parameters</h2><div class="paramtext">Several optional parameters in E04UCF/E04UCA define choices in the problem specification or the algorithm logic.  In order to reduce the number of formal parameters of E04UCF/E04UCA 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 Section <a class="secref" href="#op-checklist">11.1</a>.</div>
<div class="paramtext">Optional parameters may be specified by calling one, or both, of <a class="rtnref" href="../E04/e04udf.xml">E04UDF/E04UDA</a> and <a class="rtnref" href="../E04/e04uef.xml">E04UEF/E04UEA</a> prior to a call to E04UCF/E04UCA.</div>
<div class="paramtext"><a class="rtnref" 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,
</div><pre class="verbatim">
Begin 
  Print level = 1 
End
</pre><div class="paramtext">
</div>
<div class="paramtext">The call
</div><pre class="verbatim">
 CALL E04UDF (IOPTNS, INFORM)
</pre><div class="paramtext">
</div>
<div class="paramtext">can then be used to read the file on unit <a class="argref" href="../E04/e04udf.xml#IOPTNS">IOPTNS</a>. <a class="argref" href="../E04/e04udf.xml#INFORM">INFORM</a> will be zero on successful exit.  <a class="rtnref" 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="rtnref" href="../E04/e04uef.xml">E04UEF/E04UEA</a> can be called to supply options directly, one call being necessary for each optional parameter.  For example,
</div><pre class="verbatim">
 CALL E04UEF ('Print Level = 1')
</pre><div class="paramtext">
</div>
<div class="paramtext"><a class="rtnref" 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 E04UCF/E04UCA (unless they define invalid values) and so remain in effect for subsequent calls to E04UCF/E04UCA, unless altered by you.</div><h3><a 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 and the default value.  A definition for each option can be found in Section <a class="secref" href="#op-description">11.2</a>.  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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>a</m:mi></m:math>&#160;denotes a phrase (character string) that qualifies an option.  The letters <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#949;</m:mi></m:math>&#160;is a generic notation for <span class="bitalic">machine precision</span> (see <a class="rtnref" href="../X02/x02ajf.xml">X02AJF</a>), and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 (see optional parameter <a class="optparamref" href="#optparam_functionprecision">Function Precision</a>).</div><div class="left-tablediv"><table cellpadding="4"><tbody>
<tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><b>Optional 
     Parameters</b></td>
<td class="libdoc" valign="top" align="left"><b>Default Values</b></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparamref" href="#optparam_centraldiff-interval"><span class="u">Ce</span>ntral 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="optparamref" href="#optparam_coldstart"><span class="u">Col</span>d Start</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#optparam_coldstart" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">Cold Start</m:mi></m:maction></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparamref" href="#optparam_crashtolerance"><span class="u">Cr</span>ash Tolerance</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="optparamref" href="#optparam_defaults"><span class="u">Defaults</span></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="optparamref" href="#optparam_derivativelevel"><span class="u">Der</span>ivative Level</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="optparamref" href="#optparam_differenceinterval"><span class="u">Diff</span>erence 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="optparamref" href="#optparam_feasibilitytolerance"><span class="u">Fe</span>asibility Tolerance</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="optparamref" href="#optparam_functionprecision"><span class="u">Fu</span>nction Precision</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="optparamref" href="#optparam_hessian"><span class="u">H</span>essian</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="optparamref" href="#optparam_infiniteboundsize"><span class="u">In</span>finite <span class="u">B</span>ound Size</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="optparamref" href="#optparam_infinitestepsize"><span class="u">In</span>finite <span class="u">S</span>tep Size</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><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="optparamref" href="#optparam_iters"><span class="u">Iter</span>s</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="optparamref" href="#optparam_iterationlimit"><span class="u">Itera</span>tion Limit</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="optparamref" href="#optparam_itns"><span class="u">Itns</span></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="optparamref" href="#optparam_linesearchtolerance"><span class="u">Line</span> Search Tolerance</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="optparamref" href="#optparam_lf-tolerance"><span class="u">Linear</span> <span class="u">F</span>easibility Tolerance</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="optparamref" href="#optparam_list"><span class="u">List</span></a></td>
<td class="libdoc" valign="top" align="left">Default for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext>E04UCF</m:mtext><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#optparam_list" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">List</m:mi></m:maction></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparamref" href="#optparam_majoriterationlimit"><span class="u">Ma</span>jor <span class="u">It</span>eration Limit</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><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:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></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="optparamref" href="#optparam_majorprintlevel"><span class="u">Ma</span>jor <span class="u">P</span>rint Level</a></td>
<td class="libdoc" valign="top" align="left">Default for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext>E04UCF</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="optparamref" href="#optparam_minoriterationlimit"><span class="u">Min</span>or <span class="u">Itera</span>tion Limit</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><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:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></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="optparamref" href="#optparam_minorprintlevel"><span class="u">Min</span>or <span class="u">P</span>rint Level</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="optparamref" href="#optparam_monitoringfile"><span class="u">Mo</span>nitoring File</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="optparamref" href="#optparam_nolist"><span class="u">Nolist</span></a></td>
<td class="libdoc" valign="top" align="left">Default for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext>E04UCA</m:mtext><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#optparam_nolist" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">Nolist</m:mi></m:maction></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparamref" href="#optparam_nonlf-tolerance"><span class="u">Non</span>linear <span class="u">F</span>easibility Tolerance</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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="optparamref" href="#optparam_optimalitytolerance"><span class="u">Op</span>timality Tolerance</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="optparamref" href="#optparam_printlevel"><span class="u">Print</span> Level</a></td>
<td class="libdoc" valign="top" align="left">Default for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext>E04UCA</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="optparamref" href="#optparam_steplimit"><span class="u">St</span>ep Limit</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="optparamref" href="#optparam_startcon-check-var"><span class="u">Sta</span>rt <span class="u">C</span>onstraint Check At Variable</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="optparamref" href="#optparam_start-obj-check-var"><span class="u">Sta</span>rt <span class="u">O</span>bjective Check At Variable</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="optparamref" href="#optparam_stopcon-check-var"><span class="u">Sto</span>p <span class="u">C</span>onstraint Check At Variable</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="optparamref" href="#optparam_stop-obj-check-var"><span class="u">Sto</span>p <span class="u">O</span>bjective Check At Variable</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="optparamref" href="#optparam_verify"><span class="u">Ve</span>rify</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="optparamref" href="#optparam_verifyconstraintgradients"><span class="u">Ve</span>rify <span class="u">C</span>onstraint Gradients</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="optparamref" href="#optparam_verifygradients"><span class="u">Ve</span>rify <span class="u">G</span>radients</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="optparamref" href="#optparam_verifylevel"><span class="u">Ve</span>rify <span class="u">L</span>evel</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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="optparamref" href="#optparam_verifyobjectivegradients"><span class="u">Ve</span>rify <span class="u">O</span>bjective Gradients</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="optparamref" href="#optparam_warmstart"><span class="u">W</span>arm Start</a></td>
<td class="libdoc" valign="top" align="left">&#160;</td>
</tr>
</tbody>
</table></div><h3><a name="op-description" id="op-description"/>11.2&#160;&#160;Description of the Optional Parameters</h3><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_centraldiff-interval" id="optparam_centraldiff-interval"/><b><span class="u">Ce</span>ntral Difference Interval</b></td><td class="optparam" style="width:10%" align="left"><i>r</i></td><td class="optparam" style="width:45%" align="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, the value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi></m:math>&#160;is used as the difference interval for every element of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>.  The switch to central differences is indicated by <span class="mono">C</span> at the end of each line of intermediate printout produced by the major iterations (see Section <a class="secref" href="#fc-printedoutput">8.1</a>).  The use of finite differences is discussed further under the optional parameter <a class="optparamref" href="#optparam_differenceinterval">Difference Interval</a>.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_coldstart" id="optparam_coldstart"/><b><span class="u">Col</span>d Start</b></td><td class="optparam" style="width:10%" align="left"/><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#optparam_coldstart" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">Cold Start</m:mi></m:maction></m:math></td></tr></table>
<table width="100%" class="multi-optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_warmstart" id="optparam_warmstart"/><b><span class="u">W</span>arm Start</b></td><td class="optparam" style="width:10%" align="left"/><td class="optparam" style="width:45%" align="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 <a class="optparamref" href="#optparam_coldstart">Cold Start</a>, the first working set is chosen by E04UCF/E04UCA 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 <a class="optparamref" href="#optparam_crashtolerance">Crash Tolerance</a>).</div>
<div class="paramtext">With a <a class="optparamref" href="#optparam_warmstart">Warm Start</a>, you must set the <a class="argref" href="#ISTATE">ISTATE</a> array and define <a class="argref" href="#CLAMDA">CLAMDA</a> and <a class="argref" href="#R">R</a> as discussed in Section <a class="secref" href="#parameters">5</a>.  <a class="argref" 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="argref" 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.  E04UCF/E04UCA will override your specification of <a class="argref" 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="argref" href="#ISTATE">ISTATE</a> which are set to <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow></m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 3 when the corresponding elements of <a class="argref" href="#BL">BL</a> and <a class="argref" 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 E04UCF/E04UCA is called repeatedly to solve related problems.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_crashtolerance" id="optparam_crashtolerance"/><b><span class="u">Cr</span>ash Tolerance</b></td><td class="optparam" style="width:10%" align="left"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 <a class="optparamref" href="#optparam_coldstart">Cold Start</a> (the default value) when E04UCF/E04UCA selects an initial working set.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi></m:math>&#160;of their bounds.  In particular, a constraint of the form <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <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 xmlns:m="http://www.w3.org/1998/Math/MathML">
 <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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi><m:mo>&gt;</m:mo><m:mn>1</m:mn></m:math>, the default value is used.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_defaults" id="optparam_defaults"/><b><span class="u">Defaults</span></b></td><td class="optparam" style="width:10%" align="left"/><td class="optparam" style="width:45%" align="right"/></tr></table><div class="paramtext">This special keyword may be used to reset all optional parameters to their default values.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_derivativelevel" id="optparam_derivativelevel"/><b><span class="u">Der</span>ivative Level</b></td><td class="optparam" style="width:10%" align="left"/><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 in (sub)programs  <a class="argref" href="#OBJFUN">OBJFUN</a> and  <a class="argref" href="#CONFUN">CONFUN</a>.  The possible choices for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>&#160;are the following.  
</div><div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" align="center"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math></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 class="paramtext"> 
</div>
<div class="paramtext">The value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>3</m:mn></m:math>&#160;should be used whenever possible, since E04UCF/E04UCA is more reliable (and will usually be more efficient) when all derivatives are exact.</div>
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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>, E04UCF/E04UCA will estimate the unspecified elements of the objective gradient, using finite differences.  The computation of finite difference approximations usually increases the total run-time, since a call to <a class="argref" href="#OBJFUN">OBJFUN</a> is required for each unspecified element.  Furthermore, less accuracy can be attained in the solution (see Chapter 8 of <a class="litref" href="#ref079">Gill <i>et al.</i> (1981)</a>, for a discussion of limiting accuracy).</div>
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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>, E04UCF/E04UCA will approximate unspecified elements of the constraint Jacobian.  One call to <a class="argref" href="#CONFUN">CONFUN</a> is needed for each variable for which partial derivatives are not available.  For example, if the Jacobian has the form </div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext"> where &#8216;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>*</m:mo></m:math>&#8217; indicates an element provided by you and &#8216;?&#8217; indicates an unspecified element, E04UCF/E04UCA will call <a class="argref" href="#CONFUN">CONFUN</a> twice: once to estimate the missing element in column 2, and again to estimate the two missing elements in column 3.  (Since columns 1 and 4 are known, they require no calls to <a class="argref" href="#CONFUN">CONFUN</a>.)</div>
<div class="paramtext">At times, central differences are used rather than forward differences, in which case twice as many calls to <a class="argref" href="#OBJFUN">OBJFUN</a> and <a class="argref" href="#CONFUN">CONFUN</a> are needed.  (The switch to central differences is not under your control.)</div>
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi><m:mo>&gt;</m:mo><m:mn>3</m:mn></m:math>, the default value is used.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_differenceinterval" id="optparam_differenceinterval"/><b><span class="u">Diff</span>erence Interval</b></td><td class="optparam" style="width:10%" align="left"><i>r</i></td><td class="optparam" style="width:45%" align="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: </div><ol class="listalpha"><li class="listalpha">For verifying the objective and/or constraint gradients (see the description of the optional parameter <a class="optparamref" href="#optparam_verify">Verify</a>).</li><li class="listalpha">For estimating unspecified elements of the objective gradient or the constraint Jacobian.</li></ol><div class="paramtext"> </div>
<div class="paramtext">In general, a derivative with respect to the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>j</m:mi></m:math>th variable is approximated using the interval <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>&#948;</m:mi><m:mi>j</m:mi></m:msub></m:math>, where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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, the resulting derivative approximation should be accurate to <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:mi mathvariant="italic">O</m:mi><m:mo>&#8289;</m:mo><m:mfenced separators=""><m:mi>r</m:mi></m:mfenced></m:mrow></m:math>.  See <a class="litref" href="#ref079">Gill <i>et al.</i> (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, a finite difference interval will be computed automatically for each variable by a procedure that requires up to six calls of <a class="argref" href="#CONFUN">CONFUN</a> and <a class="argref" href="#OBJFUN">OBJFUN</a> for each element.  This option is recommended if the function is badly scaled or you wish to have E04UCF/E04UCA determine constant elements in the objective and constraint gradients (see the descriptions of <a class="argref" href="#CONFUN">CONFUN</a> and <a class="argref" href="#OBJFUN">OBJFUN</a> in Section <a class="secref" href="#parameters">5</a>).</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_feasibilitytolerance" id="optparam_feasibilitytolerance"/><b><span class="u">Fe</span>asibility Tolerance</b></td><td class="optparam" style="width:10%" align="left"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi></m:math>.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi><m:mo>&lt;</m:mo><m:mi>&#949;</m:mi></m:math>&#160;or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 <a class="optparamref" href="#optparam_lf-tolerance">Linear Feasibility Tolerance</a> and <a class="optparamref" href="#optparam_nonlf-tolerance">Nonlinear Feasibility Tolerance</a> to <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi></m:math>, if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 parameters.)</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_functionprecision" id="optparam_functionprecision"/><b><span class="u">Fu</span>nction Precision</b></td><td class="optparam" style="width:10%" align="left"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>c</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;can be computed.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi><m:mo>&lt;</m:mo><m:mi>&#949;</m:mi></m:math>&#160;or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mfenced open="|" close="|" separators=""><m:mi>F</m:mi></m:mfenced></m:math>&#160;is small.  For example, if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is typically of order 1000 and the first six significant digits are known to be correct, an appropriate value for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>&#949;</m:mi><m:mi>R</m:mi></m:msub></m:math>&#160;would be <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is typically of order <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>&#949;</m:mi><m:mi>R</m:mi></m:msub></m:math>&#160;would be <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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="litref" href="#ref079">Gill <i>et al.</i> (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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>&#949;</m:mi><m:mi>R</m:mi></m:msub></m:math>&#160;should be large enough so that E04UCF/E04UCA will not attempt to distinguish between function values that differ by less than the error inherent in the calculation.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_hessian" id="optparam_hessian"/><b><span class="u">H</span>essian</b></td><td class="optparam" style="width:10%" align="left"><b><span class="u">N</span>o</b></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>R</m:mi></m:math>&#160;(see Section <a class="secref" href="#parameters">5</a>).  E04UCF/E04UCA works exclusively with the <span class="italic">transformed and reordered</span> Hessian <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>H</m:mi><m:mi>Q</m:mi></m:msub></m:math>&#160;(<a class="eqnref" href="#eqn6">6</a>), and hence extra computation is required to form the Hessian itself.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_hessian" dsi:type="simple"><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="argref" href="#R">R</a> contains the Cholesky factor of the transformed and reordered Hessian.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_hessian" dsi:type="simple"><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="argref" href="#R">R</a>.  You should select <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_hessian" dsi:type="simple"><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 <a class="optparamref" href="#optparam_warmstart">Warm Start</a> will be used for the next call to E04UCF/E04UCA.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_infiniteboundsize" id="optparam_infiniteboundsize"/><b><span class="u">In</span>finite <span class="u">B</span>ound Size</b></td><td class="optparam" style="width:10%" align="left"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi></m:math>&#160;defines the &#8216;infinite&#8217; bound <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi mathvariant="italic">bigbnd</m:mi></m:math>&#160;in the definition of the problem constraints.  Any upper bound greater than or equal to <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi mathvariant="italic">bigbnd</m:mi></m:math>&#160;will be regarded as plus infinity (and similarly any lower bound less than or equal to <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:mo>-</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:mrow></m:math>&#160;will be regarded as minus infinity).  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi><m:mo>&#8804;</m:mo><m:mn>0</m:mn></m:math>, the default value is used.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_infinitestepsize" id="optparam_infinitestepsize"/><b><span class="u">In</span>finite <span class="u">S</span>tep Size</b></td><td class="optparam" style="width:10%" align="left"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>&#160;during an iteration would exceed the value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi></m:math>, the objective function is considered to be unbounded below in the feasible region.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi><m:mo>&#8804;</m:mo><m:mn>0</m:mn></m:math>, the default value is used.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_linesearchtolerance" id="optparam_linesearchtolerance"/><b><span class="u">Line</span> Search Tolerance</b></td><td class="optparam" style="width:10%" align="left"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mn>0.9</m:mn></m:math></td></tr></table><div class="paramtext">The value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi></m:math>&#160;(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi></m:math>, the more accurate the line search).  The default value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math>, the default value is used.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_lf-tolerance" id="optparam_lf-tolerance"/><b><span class="u">Linear</span> <span class="u">F</span>easibility Tolerance</b></td><td class="optparam" style="width:10%" align="left"><i>r</i><sub>1</sub></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math></td></tr></table>
<table width="100%" class="multi-optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_nonlf-tolerance" id="optparam_nonlf-tolerance"/><b><span class="u">Non</span>linear <span class="u">F</span>easibility Tolerance</b></td><td class="optparam" style="width:10%" align="left"><i>r</i><sub>2</sub></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math></td></tr></table><div class="paramtext">The default value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>r</m:mi><m:mn>2</m:mn></m:msub></m:math>&#160;is <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msup><m:mi>&#949;</m:mi><m:mn>0.33</m:mn></m:msup></m:math>&#160;if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_derivativelevel" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math>&#160;otherwise.</div>
<div class="paramtext">The scalars <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>r</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>r</m:mi><m:mn>1</m:mn></m:msub></m:math>, and similarly for a nonlinear constraint and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>r</m:mi><m:mn>2</m:mn></m:msub></m:math>.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>m</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn></m:math>.</div>
<div class="paramtext">On entry to E04UCF/E04UCA, 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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 <a class="optparamref" href="#optparam_nonlf-tolerance">Nonlinear Feasibility Tolerance</a> acts as a partial termination criterion for the iterative sequence generated by E04UCF/E04UCA (see the discussion of optional parameter <a class="optparamref" href="#optparam_optimalitytolerance">Optimality Tolerance</a>).</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 6 decimal digits, it would be appropriate to specify <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:msub><m:mi>r</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;as <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_list" id="optparam_list"/><b><span class="u">List</span></b></td><td class="optparam" style="width:10%" align="left"/><td class="optparam" style="width:45%" align="right">Default for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext>E04UCF</m:mtext><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#optparam_list" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">List</m:mi></m:maction></m:math></td></tr></table>
<table width="100%" class="multi-optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_nolist" id="optparam_nolist"/><b><span class="u">Nolist</span></b></td><td class="optparam" style="width:10%" align="left"/><td class="optparam" style="width:45%" align="right">Default for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext>E04UCA</m:mtext><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#optparam_nolist" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">Nolist</m:mi></m:maction></m:math></td></tr></table><div class="paramtext">For E04UCF, normally each optional parameter specification is printed as it is supplied.  Optional parameter <a class="optparamref" href="#optparam_nolist">Nolist</a> may be used to suppress the printing and optional parameter <a class="optparamref" href="#optparam_list">List</a> may be used to turn on printing.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_majoriterationlimit" id="optparam_majoriterationlimit"/><b><span class="u">Ma</span>jor <span class="u">It</span>eration Limit</b></td><td class="optparam" style="width:10%" align="left"><i>i</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><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:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:msub></m:mrow></m:mfenced></m:mrow></m:math></td></tr></table>
<table width="100%" class="multi-optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_iterationlimit" id="optparam_iterationlimit"/><b><span class="u">Itera</span>tion Limit</b></td><td class="optparam" style="width:10%" align="left"/><td class="optparam" style="width:45%" align="right"/></tr></table>
<table width="100%" class="multi-optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_iters" id="optparam_iters"/><b><span class="u">Iter</span>s</b></td><td class="optparam" style="width:10%" align="left"/><td class="optparam" style="width:45%" align="right"/></tr></table>
<table width="100%" class="multi-optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_itns" id="optparam_itns"/><b><span class="u">Itns</span></b></td><td class="optparam" style="width:10%" align="left"/><td class="optparam" style="width:45%" align="right"/></tr></table><div class="paramtext">The value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>&#160;specifies the maximum number of major iterations allowed before termination.  Setting <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_majorprintlevel" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>, the default value is used.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_majorprintlevel" id="optparam_majorprintlevel"/><b><span class="u">Ma</span>jor <span class="u">P</span>rint Level</b></td><td class="optparam" style="width:10%" align="left"><i>i</i></td><td class="optparam" style="width:45%" align="right">Default for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext>E04UCF</m:mtext><m:mo>=</m:mo><m:mn>10</m:mn></m:math></td></tr></table>
<table width="100%" class="multi-optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_printlevel" id="optparam_printlevel"/><b><span class="u">Print</span> Level</b></td><td class="optparam" style="width:10%" align="left"/><td class="optparam" style="width:45%" align="right">Default for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext>E04UCA</m:mtext><m:mo>=</m:mo><m:mn>0</m:mn></m:math></td></tr></table><div class="paramtext">The value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>&#160;controls the amount of printout produced by the major iterations of E04UCF/E04UCA, as indicated below.  A detailed description of the printed output is given in Section <a class="secref" href="#fc-printedoutput">8.1</a> (summary output at each major iteration and the final solution) and Section <a class="secref" href="#monitoring">12</a> (monitoring information at each major iteration).  (see also the description of the optional parameter <a class="optparamref" href="#optparam_minorprintlevel">Minor Print Level</a>.)</div>
<div class="paramtext">The following printout is sent to the current advisory message unit (as defined by <a class="rtnref" href="../X04/x04abf.xml">X04ABF</a>): 
</div><div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" align="center"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math></td> 
<td class="libdoc" valign="top" align="center"><b>Output</b></td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>&lt;</m:mo><m:mn>80</m:mn></m:math>&#160;characters; see Section <a class="secref" href="#fc-printedoutput">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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 class="paramtext"> 
</div>
<div class="paramtext">The following printout is sent to the logical unit number defined by the optional parameter <a class="optparamref" href="#optparam_monitoringfile">Monitoring File</a>: 
</div><div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" align="center"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math></td> 
<td class="libdoc" valign="top" align="center"><b>Output</b></td>
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>&gt;</m:mo><m:mn>80</m:mn></m:math>&#160;characters; see Section <a class="secref" href="#monitoring">12</a>) for each major iteration (no printout of the final solution).</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>c</m:mi></m:math>), the values of the linear constraints (the vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>).</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>T</m:mi></m:math>&#160;associated with the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>T</m:mi><m:mi>Q</m:mi></m:math>&#160;factorization (<a class="eqnref" href="#eqn5">5</a>) (see Section <a class="secref" href="#ad-overview">10.1</a>) of the QP working set, and the diagonal elements of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>R</m:mi></m:math>, the triangular factor of the transformed and reordered Hessian (<a class="eqnref" href="#eqn6">6</a>) (see Section <a class="secref" href="#ad-overview">10.1</a>).</td> 
</tr> 
</tbody> 
</table></div><div class="paramtext"> 
</div>
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_majorprintlevel" dsi:type="simple"><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 <a class="optparamref" href="#optparam_monitoringfile">Monitoring File</a> is the same as that defined by <a class="rtnref" href="../X04/x04abf.xml">X04ABF</a>, then the summary output for each major iteration is suppressed.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_minoriterationlimit" id="optparam_minoriterationlimit"/><b><span class="u">Min</span>or <span class="u">Itera</span>tion Limit</b></td><td class="optparam" style="width:10%" align="left"><i>i</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><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:maction actiontype="link" dsi:href="#N" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:msub></m:mfenced></m:mrow></m:mfenced></m:mrow></m:math></td></tr></table><div class="paramtext">The value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi><m:mo>&#8804;</m:mo><m:mn>0</m:mn></m:math>, the default value is used.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_minorprintlevel" id="optparam_minorprintlevel"/><b><span class="u">Min</span>or <span class="u">P</span>rint Level</b></td><td class="optparam" style="width:10%" align="left"><i>i</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mn>0</m:mn></m:math></td></tr></table><div class="paramtext">The value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>&#160;controls the amount of printout produced by the minor iterations of E04UCF/E04UCA (i.e., the iterations of the quadratic programming algorithm), as indicated below.  A detailed description of the printed output is given in Section <a class="secref" href="#fc-printedoutput">8.1</a> (summary output at each minor iteration and the final QP solution) and Section <a class="secref" href="../E04/e04ncf.xml#monitoring">12</a> of the document for E04NCF/E04NCA (monitoring information at each minor iteration).  (See also the description of the optional parameter <a class="optparamref" href="#optparam_majorprintlevel">Major Print Level</a>.) The following printout is sent to the current advisory message unit (as defined by <a class="rtnref" href="../X04/x04abf.xml">X04ABF</a>): 
</div><div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" align="center"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math></td> 
<td class="libdoc" valign="top" align="center"><b>Output</b></td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>&lt;</m:mo><m:mn>80</m:mn></m:math>&#160;characters; see Section <a class="secref" href="../E04/e04ncf.xml#fc-printedoutput">8.2</a> of the document for 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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 class="paramtext"> 
</div>
<div class="paramtext">The following printout is sent to the logical unit number defined by the optional parameter <a class="optparamref" href="#optparam_monitoringfile">Monitoring File</a>: 
</div><div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" align="center"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math></td> 
<td class="libdoc" valign="top" align="center"><b>Output</b></td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>&gt;</m:mo><m:mn>80</m:mn></m:math>&#160;characters; see Section <a class="secref" href="../E04/e04ncf.xml#fc-printedoutput">8.2</a> of the document for 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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>T</m:mi></m:math>&#160;associated with the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>T</m:mi><m:mi>Q</m:mi></m:math>&#160;factorization (<a class="eqnref" href="#eqn5">5</a>) (see Section <a class="secref" href="#ad-overview">10.1</a>) of the QP working set, and the diagonal elements of the Cholesky factor <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>R</m:mi></m:math>&#160;of the transformed Hessian (<a class="eqnref" href="#eqn6">6</a>) (see Section <a class="secref" href="#ad-overview">10.1</a>).</td> 
</tr> 
</tbody> 
</table></div><div class="paramtext"> 
</div>
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_minorprintlevel" dsi:type="simple"><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 <a class="optparamref" href="#optparam_monitoringfile">Monitoring File</a> is the same as that defined by <a class="rtnref" href="../X04/x04abf.xml">X04ABF</a>, then the summary output for each minor iteration is suppressed.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_monitoringfile" id="optparam_monitoringfile"/><b><span class="u">Mo</span>nitoring File</b></td><td class="optparam" style="width:10%" align="left"><i>i</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_majorprintlevel" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_minorprintlevel" dsi:type="simple"><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 E04UCF/E04UCA at every iteration is sent to a file with logical unit number <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>&#160;and/or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_majorprintlevel" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_minorprintlevel" dsi:type="simple"><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 width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_optimalitytolerance" id="optparam_optimalitytolerance"/><b><span class="u">Op</span>timality Tolerance</b></td><td class="optparam" style="width:10%" align="left"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi></m:math>&#160;(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi></m:math>&#160;is <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 E04UCF/E04UCA terminates successfully, the final value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>F</m:mi></m:math>&#160;should have approximately six correct figures.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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">E04UCF/E04UCA will terminate successfully if the iterative sequence of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 Section <a class="secref" href="#ad-overview">10.1</a>).  The sequence of iterates is considered to have converged at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>&#160;if </div>
<div class="formula-eqn"><a name="eqnconvergence1" id="eqnconvergence1"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext"> where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>p</m:mi></m:math>&#160;is the search direction and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>&#945;</m:mi></m:math>&#160;the step length from (<a class="eqnref" href="#eqn3">3</a>).  An iterate is considered to satisfy the first-order conditions for a minimum if </div>
<div class="formula-eqn"><a name="eqnconvergence2" id="eqnconvergence2"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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:mo>&#8289;</m:mo><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>
<div class="paramtext"> and </div>
<div class="formula-eqn"><a name="eqnconvergence3" id="eqnconvergence3"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" 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>
<div class="paramtext"> where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 Section <a class="secref" href="#ad-overview">10.1</a>), <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>j</m:mi></m:math>th active nonlinear constraint, and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi mathvariant="italic">ftol</m:mi></m:math>&#160;is the <a class="optparamref" href="#optparam_nonlf-tolerance">Nonlinear Feasibility Tolerance</a>.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_startcon-check-var" id="optparam_startcon-check-var"/><b><span class="u">Sta</span>rt <span class="u">C</span>onstraint Check At Variable</b></td><td class="optparam" style="width:10%" align="left"><i>i</i><sub>3</sub></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mn>1</m:mn></m:math></td></tr></table>
<table width="100%" class="multi-optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_start-obj-check-var" id="optparam_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" style="width:10%" align="left"><i>i</i><sub>1</sub></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mn>1</m:mn></m:math></td></tr></table>
<table width="100%" class="multi-optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_stopcon-check-var" id="optparam_stopcon-check-var"/><b><span class="u">Sto</span>p <span class="u">C</span>onstraint Check At Variable</b></td><td class="optparam" style="width:10%" align="left"><i>i</i><sub>4</sub></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mi>n</m:mi></m:math></td></tr></table>
<table width="100%" class="multi-optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_stop-obj-check-var" id="optparam_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" style="width:10%" align="left"><i>i</i><sub>2</sub></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_verifylevel" dsi:type="simple"><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 computed by (sub)program <a class="argref" href="#OBJFUN">OBJFUN</a> and/or Jacobian elements computed by (sub)program <a class="argref" href="#CONFUN">CONFUN</a>.  For example, if the first 30 elements of the objective gradient appeared to be correct in an earlier run, so that only element 31 remains questionable, it is reasonable to specify <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_start-obj-check-var" dsi:type="simple"><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 30 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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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:mo>&#8289;</m:mo><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>m</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn></m:math>.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>m</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn></m:math>.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_steplimit" id="optparam_steplimit"/><b><span class="u">St</span>ep Limit</b></td><td class="optparam" style="width:10%" align="left"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mn>2.0</m:mn></m:math></td></tr></table><div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 line search.  In some cases, such as <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>&#160;can lead to floating-point overflow.  The parameter <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>, the first point <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:mi>x</m:mi><m:mo>&#732;</m:mo></m:mrow></m:math>&#160;at which <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>F</m:mi></m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>c</m:mi></m:math>&#160;are evaluated during the line search is restricted so that </div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block"> <m:msub><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mrow><m:mi>x</m:mi><m:mo>&#732;</m:mo></m:mrow><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>
<div class="paramtext"> </div>
<div class="paramtext">The line search may go on and evaluate <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>F</m:mi></m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>c</m:mi></m:math>&#160;at points further from <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 Section <a class="secref" href="#fc-printedoutput">8.1</a>).  If <span class="mono">L</span> is printed for most of the iterations, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_steplimit" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 <a class="optparamref" href="#optparam_steplimit">Step Limit</a> is selected, a good starting point may be required.  An important application is to the class of nonlinear least-squares problems.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>r</m:mi><m:mo>&#8804;</m:mo><m:mn>0</m:mn></m:math>, the default value is used.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_verifylevel" id="optparam_verifylevel"/><b><span class="u">Ve</span>rify <span class="u">L</span>evel</b></td><td class="optparam" style="width:10%" align="left"><i>i</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mn>0</m:mn></m:math></td></tr></table>
<table width="100%" class="multi-optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_verifyobjectivegradients" id="optparam_verifyobjectivegradients"/><b><span class="u">Ve</span>rify <span class="u">O</span>bjective Gradients</b></td><td class="optparam" style="width:10%" align="left"/><td class="optparam" style="width:45%" align="right"/></tr></table>
<table width="100%" class="multi-optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_verifyconstraintgradients" id="optparam_verifyconstraintgradients"/><b><span class="u">Ve</span>rify <span class="u">C</span>onstraint Gradients</b></td><td class="optparam" style="width:10%" align="left"/><td class="optparam" style="width:45%" align="right"/></tr></table>
<table width="100%" class="multi-optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_verify" id="optparam_verify"/><b><span class="u">Ve</span>rify</b></td><td class="optparam" style="width:10%" align="left"/><td class="optparam" style="width:45%" align="right"/></tr></table>
<table width="100%" class="multi-optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_verifygradients" id="optparam_verifygradients"/><b><span class="u">Ve</span>rify <span class="u">G</span>radients</b></td><td class="optparam" style="width:10%" align="left"/><td class="optparam" style="width:45%" align="right"/></tr></table><div class="paramtext">These keywords refer to finite difference checks on the gradient elements computed by the user-supplied (sub)programs <a class="argref" href="#OBJFUN">OBJFUN</a> and <a class="argref" href="#CONFUN">CONFUN</a>.  Gradients are verified at the user-supplied initial estimate of the solution.  The possible choices for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>i</m:mi></m:math>&#160;are the following: 
</div><div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" align="center" style="width:3em;"><b><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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" style="width:3em;"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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" style="width:3em;"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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, requiring one call to <a class="argref" href="#OBJFUN">OBJFUN</a>.</td>
</tr><tr>
<td class="libdoc" valign="top" align="center" style="width:3em;"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mrow><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:mrow></m:math></td>
<td class="libdoc" valign="top" align="left">Individual gradient elements will also be checked using a reliable (but more expensive) test.</td>
</tr>
</tbody>
</table></div><div class="paramtext">
</div>
<div class="paramtext">It is possible to specify <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_verifylevel" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mn>3</m:mn></m:math>&#160;in several ways.  For example, the nonlinear objective gradient (if any) will be verified if either <a class="optparamref" href="#optparam_verifyobjectivegradients">Verify Objective Gradients</a> or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_verifylevel" dsi:type="simple"><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.  Similarly, the objective and the constraint gradients will be verified if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_verify" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_verifylevel" dsi:type="simple"><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 <a class="optparamref" href="#optparam_verify">Verify</a> is specified.</div>
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 call to <a class="argref" href="#OBJFUN">OBJFUN</a> and (if appropriate) one call to <a class="argref" href="#CONFUN">CONFUN</a>.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 <a class="optparamref" href="#optparam_startcon-check-var">Start</a> and <a class="optparamref" href="#optparam_stopcon-check-var">Stop</a> keywords.  A result of the form <span class="mono">OK</span> or <span class="mono">BAD?</span> is printed by E04UCF/E04UCA to indicate whether or not each element appears to be correct.</div>
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>.</div>
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_verifylevel" dsi:type="simple"><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 function routine is being developed.</div><h2><a 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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 E04UCF/E04UCA.  (See also the description of the optional parameters <a class="optparamref" href="#optparam_majorprintlevel">Major Print Level</a>, <a class="optparamref" href="#optparam_minorprintlevel">Minor Print Level</a> and <a class="optparamref" href="#optparam_monitoringfile">Monitoring File</a>.)  The level of printed output can be controlled by you.</div>
<div class="paramtext">When <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_majorprintlevel" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_monitoringfile" dsi:type="simple"><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 E04UCF/E04UCA on the unit number specified by <a class="optparamref" href="#optparam_monitoringfile">Monitoring File</a>.  In all cases, the values of the quantities printed are those in effect <span class="italic">on completion</span> of the given iteration.
</div><table style="width:100%;"><tr>
<td style="width:10.2em;" valign="top"><span class="mono">Maj</span></td>
<td valign="top">
is the major iteration count.
</td>
</tr><tr>
<td style="width:10.2em;" valign="top"><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 1 in the later iterations, since theoretical analysis predicts that the correct active set will be identified near the solution
 (see Section <a class="secref" href="#algdetails">10</a>).  <div class="paramtext">
Note that <span class="mono">Mnr</span> may be greater than the optional parameter <a class="optparamref" href="#optparam_minoriterationlimit">Minor Iteration Limit</a> if some iterations are required for the feasibility phase.</div>
</td>
</tr><tr>
<td style="width:10.2em;" valign="top"><span class="mono">Step</span></td>
<td valign="top">
is the step <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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="top"><span class="mono">Nfun</span></td>
<td valign="top">
is the cumulative number of evaluations of the objective function needed for the line search.  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 line search.
</td>
</tr><tr>
<td style="width:10.2em;" valign="top"><span class="mono">Merit Function</span></td>
<td valign="top">

is the value of the augmented Lagrangian merit function (<a class="eqnref" 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 Section <a class="secref" href="#ad-meritfunction">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 E04UCF/E04UCA terminates with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><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 mathvariant="bold" mathcolor="#003399">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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#NCNLN" dsi:type="simple"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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="top"><span class="mono">Norm Gz</span></td>
<td valign="top">

is <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><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 Section <a class="secref" href="#ad-QPS">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="top"><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="argref" 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="top"><span class="mono">Nz</span></td>
<td valign="top">
is the number of columns of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>Z</m:mi></m:math>&#160;(see Section <a class="secref" href="#ad-QPS">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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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="top"><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="top"><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="top"><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="argref" href="#NCNLN">NCNLN</a> is zero).
</td>
</tr><tr>
<td style="width:10.2em;" valign="top"><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="argref" href="#NCNLN">NCNLN</a> is zero).
</td>
</tr><tr>
<td style="width:10.2em;" valign="top"><span class="mono">Cond H</span></td>
<td valign="top">
is a lower bound on the condition number of the Hessian approximation <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>H</m:mi></m:math>.
</td>
</tr><tr>
<td style="width:10.2em;" valign="top"><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 xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub><m:mi>H</m:mi><m:mi>Z</m:mi></m:msub>
</m:math>&#160;(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <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="eqnref" href="#eqn6">6</a>)).  The larger this number, the more difficult the problem.
</td>
</tr><tr>
<td style="width:10.2em;" valign="top"><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="top"><span class="mono">Conv</span></td>
<td valign="top">
is a three-letter indication of the status of the three convergence tests (<a class="eqnref" href="#eqnconvergence1">16</a>)&#8211;(<a class="eqnref" href="#eqnconvergence3">18</a>) defined in the description of the optional parameter <a class="optparamref" href="#optparam_optimalitytolerance">Optimality Tolerance</a>.  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:<ol class="listalpha"><li class="listalpha">the sequence of iterates has converged;</li><li class="listalpha">the projected gradient (<span class="mono">Norm Gz</span>) is sufficiently small; and</li><li class="listalpha">the norm of the residuals of constraints in the predicted active set (<span class="mono">Violtn</span>) is small enough.</li></ol><div class="paramtext">If any of these indicators is <span class="mono">F</span> when E04UCF/E04UCA terminates with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#IFAIL" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction> <m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#errors" dsi:type="simple"><m:mn mathvariant="bold" mathcolor="#003399">0</m:mn></m:maction></m:math>, you should check the solution carefully.</div>
</td>
</tr><tr>
<td style="width:10.2em;" valign="top"><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 Section <a class="secref" href="#ad-quasinewton">10.4</a>).
</td>
</tr><tr>
<td style="width:10.2em;" valign="top"><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="top"><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 line search.  (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 non-zero then central differences were computed because <span class="mono">Norm Gz</span> and <span class="mono">Violtn</span> imply that <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>&#160;is close to a Kuhn&#8211;Tucker point
 (see Section <a class="secref" href="../E04/e04uff.xml#ad-overview">10.1</a> of the document for E04UFF/E04UFA).

</td>
</tr><tr>
<td style="width:10.2em;" valign="top"><span class="mono">L</span></td>
<td valign="top">
is printed if the line search has produced a relative change in <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>x</m:mi></m:math>&#160;greater than the value defined by the optional parameter <a class="optparamref" href="#optparam_steplimit">Step Limit</a>.  If this output occurs frequently during later iterations of the run, optional parameter <a class="optparamref" href="#optparam_steplimit">Step Limit</a> should be set to a larger value.
</td>
</tr><tr>
<td style="width:10.2em;" valign="top"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><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 xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi>R</m:mi></m:math>&#160;is modified so that its diagonal condition estimator is bounded.
</td>
</tr></table><div class="paramtext">
</div><hr/><div><a href="../../pdf/E04/e04ucf.pdf">E04UCF (pdf version)</a></div><div><a href="e04_conts.xml">Chapter Contents</a></div><div><a href="e04_intro.xml">Chapter Introduction</a></div>
<div><a href="../mark21.xml">NAG Library Manual</a></div>
<div><hr/>
  &#169; The Numerical Algorithms Group Ltd, Oxford, UK. 2006
  </div></body></html>