<?xml-stylesheet type="text/xsl" href="../styles/pmathml.xsl"?>
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:dsi="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xml:space="preserve"><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"/><title>E04NCF/E04NCA : NAG Library, Mark 22</title><link rel="stylesheet" href="../styles/libdoc.css" type="text/css"/><script type="text/javascript">
   function showLevel(_levelId){
    var thisLevel = document.getElementById(_levelId);
    var thisplus = document.getElementById( _levelId.concat('plus'));
    var thisminus = document.getElementById( _levelId.concat('minus'));
    if(thisLevel.style.display != "block"){
     thisLevel.style.display = "block";
     thisplus.style.display = "none";
     thisminus.style.display = "inline";
     }
    else{
     thisLevel.style.display = "none";
     thisminus.style.display = "none";
     thisplus.style.display = "inline";
     }
    }
  </script></head><body><hr/><div><a class="rout" href="../../pdf/E04/e04ncf.pdf">E04NCF/E04NCA (PDF version)</a></div><div><a class="chap" href="e04conts.xml">E04 Chapter Contents</a></div><div><a class="chapint" href="e04intro.xml">E04 Chapter Introduction</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div><hr/><h1 class="libdoc">NAG Library Routine Document<br/><br/>E04NCF/E04NCA</h1><div class="paramtext"><div class="header"><b>Note:</b>&#160; before using this routine, please read the Users' Note for your implementation to check the interpretation of <span class="bitalic">bold italicised</span> terms and other implementation-dependent details.</div></div> <div class="paramtext"><b>Note:</b> <span class="italic">this routine uses</span> <b>optional parameters</b> <span class="italic">to define choices in the problem specification and in the details of the algorithm. If you wish to use</span> default <span class="italic">settings for all of the optional parameters, you need only read <a class="sec" href="#purpose">Sections 1</a> to <a class="sec" href="#example">9</a> of this document. 
If, however, you wish to reset some or all of the settings please refer to 
<a class="sec" href="#algdetails">Section 10</a> for a detailed description of the algorithm, to 
<a class="sec" href="#optparams">Section 11</a> for a detailed description of the specification of the optional parameters and to 
<a class="sec" href="#monitoring">Section 12</a> for a detailed description of the monitoring information produced by the routine</span>.</div> 
<div class="htmltoc">
<h2 class="htmltoc"><span class="htmltochead" onclick="showLevel('htmltoc');"><span class="htmltocplus" id="htmltocplus">+</span><span class="htmltocminus" id="htmltocminus">&#8722;</span></span>&#160;Contents</h2>
<div class="htmltocitem" id="htmltoc">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#purpose">1&#160;&#160;<b>Purpose</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocspecification');"><span class="htmltocplus" id="tocspecificationplus">+</span><span class="htmltocminus" id="tocspecificationminus">&#8722;</span></span>
<a class="htmltoc" href="#specification">2&#160;&#160;<b>Specification</b></a>
<div class="htmltocitem" id="tocspecification">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#routFspec">2.1&#160;&#160;<b>Specification for E04NCF</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#routAspec">2.2&#160;&#160;<b>Specification for E04NCA</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#description">3&#160;&#160;<b>Description</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#references">4&#160;&#160;<b>References</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#parameters">5&#160;&#160;<b>Parameters</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#errors">6&#160;&#160;<b>Error Indicators and Warnings</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#accuracy">7&#160;&#160;<b>Accuracy</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocfcomments');"><span class="htmltocplus" id="tocfcommentsplus">+</span><span class="htmltocminus" id="tocfcommentsminus">&#8722;</span></span>
<a class="htmltoc" href="#fcomments">8&#160;&#160;<b>Further Comments</b></a>
<div class="htmltocitem" id="tocfcomments">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fc-scaling">8.1&#160;&#160;<b>Scaling</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fc-printedoutput">8.2&#160;&#160;<b>Description of the Printed Output</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocexample');"><span class="htmltocplus" id="tocexampleplus">+</span><span class="htmltocminus" id="tocexampleminus">&#8722;</span></span>
<a class="htmltoc" href="#example">9&#160;&#160;<b>Example</b></a>
<div class="htmltocitem" id="tocexample">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examtext">9.1&#160;&#160;<b>Program Text</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examdata">9.2&#160;&#160;<b>Program Data</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examresults">9.3&#160;&#160;<b>Program Results</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocalgdetails');"><span class="htmltocplus" id="tocalgdetailsplus">+</span><span class="htmltocminus" id="tocalgdetailsminus">&#8722;</span></span>
<a class="htmltoc" href="#algdetails">10&#160;&#160;<b>Algorithmic Details</b></a>
<div class="htmltocitem" id="tocalgdetails">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#ad-overview">10.1&#160;&#160;<b>Overview</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#ad-search">10.2&#160;&#160;<b>Definition of Search Direction</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#ad-mainiteration">10.3&#160;&#160;<b>Main Iteration</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocoptparams');"><span class="htmltocplus" id="tocoptparamsplus">+</span><span class="htmltocminus" id="tocoptparamsminus">&#8722;</span></span>
<a class="htmltoc" href="#optparams">11&#160;&#160;<b>Optional Parameters</b></a>
<div class="htmltocitem" id="tocoptparams">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#op-checklist">11.1&#160;&#160;<b>Optional Parameter Checklist and Default Values</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#op-description">11.2&#160;&#160;<b>Description of the Optional Parameters</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#monitoring">12&#160;&#160;<b>Description of Monitoring Information</b></a>
</div>
</div>
</div><h2 class="standard"><a class="sec" name="purpose" id="purpose"/>1&#160;&#160;Purpose</h2>
<div class="paramtext">E04NCF/E04NCA solves linearly constrained linear least-squares problems and convex quadratic programming problems.  It is not intended for large sparse problems.</div>
<div class="paramtext">E04NCA is a version of E04NCF that has additional parameters in order to make it safe for use in multithreaded applications (see <a class="sec" href="#parameters">Section 5</a>).  The initialization routine <a class="rout" href="../E04/e04wbf.xml">E04WBF</a> <b>must</b> have been called before calling E04NCA.</div><h2 class="standard"><a class="sec" name="specification" id="specification"/>2&#160;&#160;Specification</h2><h3 class="standard"><a class="sec" name="routFspec" id="routFspec"/>2.1&#160;&#160;Specification for E04NCF</h3>
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;E04NCF&#160;(</td><td class="tdfspec2"><a class="arg" href="#M">M</a>, <a class="arg" href="#N">N</a>, <a class="arg" href="#NCLIN">NCLIN</a>, <a class="arg" href="#LDC">LDC</a>, <a class="arg" href="#LDA">LDA</a>, <a class="arg" href="#C">C</a>, <a class="arg" href="#BL">BL</a>, <a class="arg" href="#BU">BU</a>, <a class="arg" href="#CVEC">CVEC</a>, <a class="arg" href="#ISTATE">ISTATE</a>, <a class="arg" href="#KX">KX</a>, <a class="arg" href="#X">X</a>, <a class="arg" href="#A">A</a>, <a class="arg" href="#B">B</a>, <a class="arg" href="#ITER">ITER</a>, <a class="arg" href="#OBJ">OBJ</a>, <a class="arg" href="#CLAMDA">CLAMDA</a>, <a class="arg" href="#IWORK">IWORK</a>, <a class="arg" href="#LIWORK">LIWORK</a>, <a class="arg" href="#WORK">WORK</a>, <a class="arg" href="#LWORK">LWORK</a>, <a class="arg" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">M, N, NCLIN, LDC, LDA, ISTATE(N+NCLIN), KX(N), ITER, IWORK(LIWORK), LIWORK, LWORK, IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">C(LDC,*), BL(N+NCLIN), BU(N+NCLIN), CVEC(*), X(N), A(LDA,*), B(*), OBJ, CLAMDA(N+NCLIN), WORK(LWORK)</td></tr></table><h3 class="standard"><a class="sec" name="routAspec" id="routAspec"/>2.2&#160;&#160;Specification for E04NCA</h3>
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;E04NCA&#160;(</td><td class="tdfspec2"><a class="arg" href="#M">M</a>, <a class="arg" href="#N">N</a>, <a class="arg" href="#NCLIN">NCLIN</a>, <a class="arg" href="#LDC">LDC</a>, <a class="arg" href="#LDA">LDA</a>, <a class="arg" href="#C">C</a>, <a class="arg" href="#BL">BL</a>, <a class="arg" href="#BU">BU</a>, <a class="arg" href="#CVEC">CVEC</a>, <a class="arg" href="#ISTATE">ISTATE</a>, <a class="arg" href="#KX">KX</a>, <a class="arg" href="#X">X</a>, <a class="arg" href="#A">A</a>, <a class="arg" href="#B">B</a>, <a class="arg" href="#ITER">ITER</a>, <a class="arg" href="#OBJ">OBJ</a>, <a class="arg" href="#CLAMDA">CLAMDA</a>, <a class="arg" href="#IWORK">IWORK</a>, <a class="arg" href="#LIWORK">LIWORK</a>, <a class="arg" href="#WORK">WORK</a>, <a class="arg" href="#LWORK">LWORK</a>, <a class="arg" href="#LWSAV">LWSAV</a>, <a class="arg" href="#IWSAV">IWSAV</a>, <a class="arg" href="#RWSAV">RWSAV</a>, <a class="arg" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">M, N, NCLIN, LDC, LDA, ISTATE(N+NCLIN), KX(N), ITER, IWORK(LIWORK), LIWORK, LWORK, IWSAV(610), IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">C(LDC,*), BL(N+NCLIN), BU(N+NCLIN), CVEC(*), X(N), A(LDA,*), B(*), OBJ, CLAMDA(N+NCLIN), WORK(LWORK), RWSAV(475)</td></tr><tr><td class="tdfspec1">LOGICAL</td><td class="tdfspec2">LWSAV(120)</td></tr></table><div class="paramtext">Before calling E04NCA, or either of the option setting routines <a class="rout" href="../E04/e04ndf.xml">E04NDA</a> or <a class="rout" href="../E04/e04nef.xml">E04NEA</a>, <a class="rout" href="../E04/e04wbf.xml">E04WBF</a>
<b>must</b> be called.  The specification for <a class="rout" href="../E04/e04wbf.xml">E04WBF</a> is:</div><table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;E04WBF&#160;(</td><td class="tdfspec2"><a class="arg" href="../E04/e04wbf.xml#RNAME">RNAME</a>, <a class="arg" href="../E04/e04wbf.xml#CWSAV">CWSAV</a>, <a class="arg" href="../E04/e04wbf.xml#LCWSAV">LCWSAV</a>, <a class="arg" href="../E04/e04wbf.xml#LWSAV">LWSAV</a>, <a class="arg" href="../E04/e04wbf.xml#LLWSAV">LLWSAV</a>, <a class="arg" href="../E04/e04wbf.xml#IWSAV">IWSAV</a>, <a class="arg" href="../E04/e04wbf.xml#LIWSAV">LIWSAV</a>, <a class="arg" href="../E04/e04wbf.xml#RWSAV">RWSAV</a>, <a class="arg" href="../E04/e04wbf.xml#LRWSAV">LRWSAV</a>, <a class="arg" href="../E04/e04wbf.xml#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">LCWSAV, LLWSAV, IWSAV(LIWSAV), LIWSAV, LRWSAV, IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">RWSAV(LRWSAV)</td></tr><tr><td class="tdfspec1">LOGICAL</td><td class="tdfspec2">LWSAV(LLWSAV)</td></tr><tr><td class="tdfspec1">CHARACTER*6</td><td class="tdfspec2">RNAME</td></tr><tr><td class="tdfspec1">CHARACTER*80</td><td class="tdfspec2">CWSAV(LCWSAV)</td></tr></table><div class="paramtext"><a class="rout" href="../E04/e04wbf.xml">E04WBF</a> should be called with 
<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="../E04/e04wbf.xml#RNAME"><m:mi mathcolor="#EE0000" mathvariant="bold">RNAME</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'E04NCA'</m:mtext></m:math>.  
<a class="arg" href="../E04/e04wbf.xml#LCWSAV">LCWSAV</a>, 
<a class="arg" href="../E04/e04wbf.xml#LLWSAV">LLWSAV</a>, 
<a class="arg" href="../E04/e04wbf.xml#LIWSAV">LIWSAV</a> and 
<a class="arg" href="../E04/e04wbf.xml#LRWSAV">LRWSAV</a>, the declared lengths of 
<a class="arg" href="../E04/e04wbf.xml#CWSAV">CWSAV</a>, 
<a class="arg" href="../E04/e04wbf.xml#LWSAV">LWSAV</a>, 
<a class="arg" href="../E04/e04wbf.xml#IWSAV">IWSAV</a> and 
<a class="arg" href="../E04/e04wbf.xml#RWSAV">RWSAV</a> respectively, must satisfy:
<ul class="listind"><li class="listind"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="../E04/e04wbf.xml#LCWSAV"><m:mi mathcolor="#EE0000" mathvariant="bold">LCWSAV</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math></li><li class="listind"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="../E04/e04wbf.xml#LLWSAV"><m:mi mathcolor="#EE0000" mathvariant="bold">LLWSAV</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>120</m:mn></m:math></li><li class="listind"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="../E04/e04wbf.xml#LIWSAV"><m:mi mathcolor="#EE0000" mathvariant="bold">LIWSAV</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>610</m:mn></m:math></li><li class="listind"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="../E04/e04wbf.xml#LRWSAV"><m:mi mathcolor="#EE0000" mathvariant="bold">LRWSAV</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>475</m:mn></m:math></li></ul>
</div><div class="paramtext">The contents of the arrays 
<a class="arg" href="../E04/e04wbf.xml#CWSAV">CWSAV</a>, 
<a class="arg" href="../E04/e04wbf.xml#LWSAV">LWSAV</a>, 
<a class="arg" href="../E04/e04wbf.xml#IWSAV">IWSAV</a> and 
<a class="arg" href="../E04/e04wbf.xml#RWSAV">RWSAV</a>
<b>must not</b> be altered between calling routines 
<a class="rout" href="../E04/e04ncf.xml">E04NCA</a>, <a class="rout" href="../E04/e04ndf.xml">E04NDA</a>, <a class="rout" href="../E04/e04nef.xml">E04NEA</a> and <a class="rout" href="../E04/e04wbf.xml">E04WBF</a>.</div><h2 class="standard"><a class="sec" name="description" id="description"/>3&#160;&#160;Description</h2>
<div class="paramtext">E04NCF/E04NCA is designed to solve a class of quadratic programming problems of the following general form:

<div class="formula-eqn"><a name="eqn1" id="eqn1"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:munder>
 <m:mi mathvariant="normal">minimize</m:mi>
 <m:mrow><m:mi>x</m:mi><m:mo>&#8712;</m:mo><m:msup><m:mi>R</m:mi><m:mi>n</m:mi></m:msup></m:mrow>
</m:munder><m:mspace width="0.25em"/>
<m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mtext>&#8195; subject to &#8195;</m:mtext><m:mi>l</m:mi><m:mo>&#8804;</m:mo><m:mfenced open="{" close="}" separators="">
 <m:mtable>
  <m:mtr>
   <m:mtd><m:mi>x</m:mi></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mi>C</m:mi><m:mi>x</m:mi></m:mtd>
  </m:mtr>
 </m:mtable>
</m:mfenced>
<m:mo>&#8804;</m:mo><m:mi>u</m:mi>
</m:math></td><td class="formula-eqn2">
      (1)
     </td></tr></table></div>

where <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction></m:math>&#160;is an <m:math><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;matrix and the objective function <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;may be specified in a variety of ways depending upon the particular problem to be solved.  The available forms for <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;are listed in <a class="table" href="#table1">Table 1</a>, in which the prefixes FP, LP, QP and LS stand for &#8216;feasible point&#8217;, &#8216;linear programming&#8217;, &#8216;quadratic programming&#8217; and &#8216;least-squares&#8217; respectively, <m:math><m:mi>c</m:mi></m:math>&#160;is an <m:math><m:mi>n</m:mi></m:math>&#160;element vector, <m:math><m:mi>b</m:mi></m:math>&#160;is an <m:math><m:mi>m</m:mi></m:math>&#160;element vector and <m:math><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>z</m:mi></m:mfenced></m:math>&#160;denotes the Euclidean length of <m:math><m:mi>z</m:mi></m:math>.
<div class="tablediv"><a name="table1" id="table1"/><table class="frame-none">
  
  
  
  <tbody>
   <tr>
    <td class="libdoc" valign="top" align="left" style="width:7.5em;">Problem type</td>
    <td class="libdoc" valign="top" align="left" style="width:10.5em;"><m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math></td>
    <td class="libdoc" valign="top" align="left" style="width:NaNem;">Matrix <m:math><m:mi>A</m:mi></m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left" style="width:7.5em;">FP</td>
    <td class="libdoc" valign="top" align="left" style="width:10.5em;">None</td>
    <td class="libdoc" valign="top" align="left" style="width:NaNem;">Not applicable</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left" style="width:7.5em;">LP</td>
    <td class="libdoc" valign="top" align="left" style="width:10.5em;"><m:math><m:msup><m:mi>c</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>x</m:mi></m:math></td>
    <td class="libdoc" valign="top" align="left" style="width:NaNem;">Not applicable</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left" style="width:7.5em;">QP1</td>
    <td class="libdoc" valign="top" align="left" style="width:10.5em;"><m:math><m:mphantom><m:msup><m:mi>c</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>x</m:mi><m:mo>+</m:mo></m:mphantom><m:mfrac other="small"><m:mn>1</m:mn><m:mn>2</m:mn></m:mfrac><m:msup><m:mi>x</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>A</m:mi><m:mi>x</m:mi></m:math></td>
    <td class="libdoc" valign="top" align="left" style="width:NaNem;"><m:math><m:mi>n</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;symmetric positive semi-definite</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left" style="width:7.5em;">QP2</td>
    <td class="libdoc" valign="top" align="left" style="width:10.5em;"><m:math><m:msup><m:mi>c</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>x</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>x</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>A</m:mi><m:mi>x</m:mi></m:math></td>
    <td class="libdoc" valign="top" align="left" style="width:NaNem;"><m:math><m:mi>n</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;symmetric positive semi-definite</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left" style="width:7.5em;">QP3</td>
    <td class="libdoc" valign="top" align="left" style="width:10.5em;"><m:math><m:mphantom><m:msup><m:mi>c</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>x</m:mi><m:mo>+</m:mo></m:mphantom><m:mfrac other="small"><m:mn>1</m:mn><m:mn>2</m:mn></m:mfrac><m:msup><m:mi>x</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:msup><m:mi>A</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>A</m:mi><m:mi>x</m:mi></m:math></td>
    <td class="libdoc" valign="top" align="left" style="width:NaNem;"><m:math><m:mi>m</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;upper trapezoidal</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left" style="width:7.5em;">QP4</td>
    <td class="libdoc" valign="top" align="left" style="width:10.5em;"><m:math><m:msup><m:mi>c</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>x</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>x</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:msup><m:mi>A</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>A</m:mi><m:mi>x</m:mi></m:math></td>
    <td class="libdoc" valign="top" align="left" style="width:NaNem;"><m:math><m:mi>m</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;upper trapezoidal</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left" style="width:7.5em;">LS1</td>
    <td class="libdoc" valign="top" align="left" style="width:10.5em;"><m:math><m:mphantom><m:msup><m:mi>c</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>x</m:mi><m:mo>+</m:mo></m:mphantom><m:mfrac other="small"><m:mn>1</m:mn><m:mn>2</m:mn></m:mfrac><m:msup><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>A</m:mi><m:mi>x</m:mi></m:mfenced><m:mn>2</m:mn></m:msup></m:math></td>
    <td class="libdoc" valign="top" align="left" style="width:NaNem;"><m:math><m:mi>m</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left" style="width:7.5em;">LS2</td>
    <td class="libdoc" valign="top" align="left" style="width:10.5em;"><m:math><m:msup><m:mi>c</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>x</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:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>A</m:mi><m:mi>x</m:mi></m:mfenced><m:mn>2</m:mn></m:msup></m:math></td>
    <td class="libdoc" valign="top" align="left" style="width:NaNem;"><m:math><m:mi>m</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left" style="width:7.5em;">LS3</td>
    <td class="libdoc" valign="top" align="left" style="width:10.5em;"><m:math><m:mphantom><m:msup><m:mi>c</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>x</m:mi><m:mo>+</m:mo></m:mphantom><m:mfrac other="small"><m:mn>1</m:mn><m:mn>2</m:mn></m:mfrac><m:msup><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>A</m:mi><m:mi>x</m:mi></m:mfenced><m:mn>2</m:mn></m:msup></m:math></td>
    <td class="libdoc" valign="top" align="left" style="width:NaNem;"><m:math><m:mi>m</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;upper trapezoidal</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left" style="width:7.5em;">LS4</td>
    <td class="libdoc" valign="top" align="left" style="width:10.5em;"><m:math><m:msup><m:mi>c</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>x</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:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>A</m:mi><m:mi>x</m:mi></m:mfenced><m:mn>2</m:mn></m:msup></m:math></td>
    <td class="libdoc" valign="top" align="left" style="width:NaNem;"><m:math><m:mi>m</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;upper trapezoidal</td>
   </tr>
  </tbody>
 </table><div class="caption"><b>Table 1</b><br/></div></div>
</div><div class="paramtext">In the standard LS problem <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;will usually have the form LS1, and in the standard convex QP problem <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;will usually have the form QP2.  The default problem type is LS1 and other objective functions are selected by using the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_problemtype"><m:mi mathcolor="#800080;" mathvariant="bold">Problem Type</m:mi></m:maction></m:math>.</div><div class="paramtext">When <m:math><m:mi>A</m:mi></m:math>&#160;is upper trapezoidal it will usually be the case that <m:math><m:mi>m</m:mi><m:mo>=</m:mo><m:mi>n</m:mi></m:math>, so that <m:math><m:mi>A</m:mi></m:math>&#160;is upper triangular, but full generality has been allowed for in the specification of the problem.  The upper trapezoidal form is intended for cases where a previous factorization, such as a <m:math><m:mi>Q</m:mi><m:mi>R</m:mi></m:math>&#160;factorization, has been performed.</div><div class="paramtext">The constraints involving <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction></m:math>&#160;are called the <span class="italic">general</span> constraints.  Note that upper and lower bounds are specified for all the variables and for all the general constraints.  An equality constraint can be specified by setting <m:math><m:msub><m:mi>l</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>u</m:mi><m:mi>i</m:mi></m:msub></m:math>.  If certain bounds are not present, the associated elements of <m:math><m:mi>l</m:mi></m:math>&#160;or <m:math><m:mi>u</m:mi></m:math>&#160;can be set to special values that will be treated as <m:math><m:mrow><m:mo>-</m:mo><m:mi>&#8734;</m:mi></m:mrow></m:math>&#160;or <m:math><m:mrow><m:mo>+</m:mo><m:mi>&#8734;</m:mi></m:mrow></m:math>.  (See the description of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_infiniteboundsize"><m:mi mathcolor="#800080;" mathvariant="bold">Infinite Bound Size</m:mi></m:maction></m:math>.)</div><div class="paramtext">The defining feature of a quadratic function <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is that the second-derivative matrix <m:math><m:mi>H</m:mi></m:math>&#160;(the <span class="italic">Hessian matrix</span>) is constant.  For the LP case <m:math><m:mi>H</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math>; for QP1 and QP2, <m:math><m:mi>H</m:mi><m:mo>=</m:mo><m:mi>A</m:mi></m:math>; for QP3 and QP4, <m:math><m:mi>H</m:mi><m:mo>=</m:mo><m:msup><m:mi>A</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>A</m:mi></m:math>&#160;and for LS1 (the default), LS2, LS3 and LS4, <m:math><m:mi>H</m:mi><m:mo>=</m:mo><m:msup><m:mi>A</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>A</m:mi></m:math>.</div><div class="paramtext">Problems of type QP3 and QP4 for which <m:math><m:mi>A</m:mi></m:math>&#160;is not in upper trapezoidal form should be solved as types LS1 and LS2 respectively, with <m:math><m:mi>b</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math>.</div><div class="paramtext">For problems of type LS, we refer to <m:math><m:mi>A</m:mi></m:math>&#160;as the <span class="italic">least-squares</span> matrix, or the <span class="italic">matrix of observations</span> and to <m:math><m:mi>b</m:mi></m:math>&#160;as the <span class="italic">vector of observations.</span></div><div class="paramtext">You must supply an initial estimate of the solution.</div><div class="paramtext">If <m:math><m:mi>H</m:mi></m:math>&#160;is nonsingular then E04NCF/E04NCA will obtain the unique (global) minimum.  If <m:math><m:mi>H</m:mi></m:math>&#160;is singular then the solution may still be a global minimum if all active constraints have nonzero Lagrange multipliers.  Otherwise the solution obtained will be either a weak minimum (i.e., with a unique optimal objective value, but an infinite set of optimal <m:math><m:mi>x</m:mi></m:math>), or else the objective function is unbounded below in the feasible region.  The last case can only occur when <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;contains an explicit linear term (as in problems LP, QP2, QP4, LS2 and LS4).</div><div class="paramtext">The method used by E04NCF/E04NCA is described in detail in <a class="sec" href="#algdetails">Section 10</a>.</div><h2 class="standard"><a class="sec" name="references" id="references"/>4&#160;&#160;References</h2><div class="paramtext"><a name="ref091" id="ref091"/>Gill P E, Hammarling S, Murray W, Saunders M A and Wright M H (1986)  Users' guide for LSSOL (Version 1.0) <i>Report SOL 86-1</i> Department of Operations Research, Stanford University </div>
<div class="paramtext"><a name="ref090" id="ref090"/>Gill P E, Murray W, Saunders M A and Wright M H (1984)  Procedures for optimization problems with a mixture of bounds and general linear constraints <i>ACM Trans. Math. Software</i> <b>10</b> 282&#8211;298 </div>
<div class="paramtext"><a name="ref079" id="ref079"/>Gill P E, Murray W and Wright M H (1981)  <i>Practical Optimization</i> Academic Press </div>
<div class="paramtext"><a name="ref492" id="ref492"/>Stoer J (1971)  On the numerical solution of constrained least-squares problems <i>SIAM J. Numer. Anal.</i> <b>8</b> 382&#8211;411 </div><h2 class="standard"><a class="sec" name="parameters" id="parameters"/>5&#160;&#160;Parameters</h2>
<dl><dt class="paramhead"><a name="M" id="M"/>1: &#160;&#160;&#8194; M &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: 
<m:math><m:mi>m</m:mi></m:math>, the number of rows in the matrix <m:math><m:mi>A</m:mi></m:math>.  If the problem is specified as type FP or LP, <a class="arg" href="#M">M</a> is not referenced and is assumed to be zero.
<div class="paramtext">If the problem is of type QP, <a class="arg" href="#M">M</a> will usually be <m:math><m:mi>n</m:mi></m:math>, the number of variables.  However, a value of <a class="arg" href="#M">M</a> less than <m:math><m:mi>n</m:mi></m:math>&#160;is appropriate for QP3 or QP4 if <m:math><m:mi>A</m:mi></m:math>&#160;is an upper trapezoidal matrix with <m:math><m:mi>m</m:mi></m:math>&#160;rows.  Similarly, <a class="arg" href="#M">M</a> may be used to define the dimension of a leading block of nonzeros in the Hessian matrices of QP1 or QP2, in which case the last <m:math><m:mfenced separators=""><m:mi>n</m:mi><m:mo>-</m:mo><m:mi>m</m:mi></m:mfenced></m:math>&#160;rows and columns of <a class="arg" href="#A">A</a> are assumed to be zero.  In the QP case, <m:math><m:mi>m</m:mi></m:math>&#160;should not be greater than <m:math><m:mi>n</m:mi></m:math>; if it is, the last <m:math><m:mfenced separators=""><m:mi>m</m:mi><m:mo>-</m:mo><m:mi>n</m:mi></m:mfenced></m:math>&#160;rows of <m:math><m:mi>A</m:mi></m:math>&#160;are ignored.</div>
<div class="paramtext">If the problem is of type LS1 (the default) or specified as type LS2, LS3 or LS4, <a class="arg" href="#M">M</a> is also the dimension of the array <a class="arg" href="#B">B</a>.  Note that all possibilities (<m:math><m:mi>m</m:mi><m:mo>&lt;</m:mo><m:mi>n</m:mi></m:math>, <m:math><m:mi>m</m:mi><m:mo>=</m:mo><m:mi>n</m:mi></m:math>&#160;and <m:math><m:mi>m</m:mi><m:mo>&gt;</m:mo><m:mi>n</m:mi></m:math>) are allowed in this case.</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>&#160;if the problem is not of type FP or LP.
</div></dd><dt class="paramhead"><a name="N" id="N"/>2: &#160;&#160;&#8194; N &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: 

<m:math><m:mi>n</m:mi></m:math>, the number of variables.</div>
<div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="NCLIN" id="NCLIN"/>3: &#160;&#160;&#8194; NCLIN &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: 
<m:math><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub></m:math>, the number of general linear constraints.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="LDC" id="LDC"/>4: &#160;&#160;&#8194; LDC &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the first dimension of the array <a class="arg" href="#C">C</a> as declared in the (sub)program from which E04NCF/E04NCA is called.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDC"><m:mi mathcolor="#EE0000" mathvariant="bold">LDC</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction></m:mfenced></m:mrow></m:math>.
</div></dd><dt class="paramhead"><a name="LDA" id="LDA"/>5: &#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="arg" href="#A">A</a> as declared in the (sub)program from which E04NCF/E04NCA is called.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDA"><m:mi mathcolor="#EE0000" mathvariant="bold">LDA</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction></m:mfenced></m:mrow></m:math>.
</div></dd><dt class="paramhead"><a name="C" id="C"/>6: &#160;&#160;&#8194; C(<a class="arg" href="#LDC">LDC</a>,<m:math><m:mo>*</m:mo></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd><div class="paramtext"><b>Note:</b> the second dimension of the array <a class="arg" href="#C">C</a>
must be at least
<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>&#160;if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>&#160;and at least <m:math><m:mn>1</m:mn></m:math>&#160;if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>.</div>
<div class="paramtext"><i>On entry</i>: the <m:math><m:mi>i</m:mi></m:math>th row of <a class="arg" href="#C">C</a> must contain the coefficients of the <m:math><m:mi>i</m:mi></m:math>th general constraint, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction></m:math>.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <a class="arg" href="#C">C</a> is not referenced.</div>
</div></dd><dt class="paramhead"><a name="BL" id="BL"/>7: &#160;&#160;&#8194; BL(<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dt class="multi-paramhead"><a name="BU" id="BU"/>8: &#160;&#160;&#8194; BU(<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction></m: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="arg" href="#BL">BL</a> must contain the lower bounds and <a class="arg" href="#BU">BU</a> the upper bounds, for all the constraints, in the following order.  The first <m:math><m:mi>n</m:mi></m:math>&#160;elements of each array must contain the bounds on the variables, and the next <m:math><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub></m:math>&#160;elements must contain the bounds for the general linear constraints (if any).  To specify a nonexistent lower bound (i.e., <m:math><m:msub><m:mi>l</m:mi><m:mi>j</m:mi></m:msub><m:mo>=</m:mo><m:mrow><m:mo>-</m:mo><m:mi>&#8734;</m:mi></m:mrow></m:math>), set <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:mo>-</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>, and to specify a nonexistent upper bound (i.e., <m:math><m:msub><m:mi>u</m:mi><m:mi>j</m:mi></m:msub><m:mo>=</m:mo><m:mrow><m:mo>+</m:mo><m:mi>&#8734;</m:mi></m:mrow></m:math>), set <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>&#8805;</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>; the default value of <m:math><m:mi mathvariant="italic">bigbnd</m:mi></m:math>&#160;is <m:math><m:msup><m:mn>10</m:mn><m:mn>20</m:mn></m:msup></m:math>, but this may be changed by the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_infiniteboundsize"><m:mi mathcolor="#800080;" mathvariant="bold">Infinite Bound Size</m:mi></m:maction></m:math>.  To specify the <m:math><m:mi>j</m:mi></m:math>th constraint as an equality, set <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi>&#946;</m:mi></m:math>, say, where <m:math><m:mfenced open="|" close="|" separators=""><m:mi>&#946;</m:mi></m:mfenced><m:mo>&lt;</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>.</div><div class="paramtext"><i>Constraints</i>:
   <div class="paramtext"/><ul class="listcons">
<li class="listcons"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi mathvariant="italic">j</m:mi></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi mathvariant="italic">j</m:mi></m:mfenced></m:mrow></m:math>,  for <m:math><m:mi mathvariant="italic">j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction></m:mrow></m:math>;</li>
<li class="listcons">if <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi>&#946;</m:mi></m:math>, <m:math><m:mfenced open="|" close="|" separators=""><m:mi>&#946;</m:mi></m:mfenced><m:mo>&lt;</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>.</li>
</ul></div></dd><dt class="paramhead"><a name="CVEC" id="CVEC"/>9: &#160;&#160;&#8194; CVEC(<m:math><m:mo>*</m:mo></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd><div class="paramtext"><b>Note:</b> the dimension of the array <a class="arg" href="#CVEC">CVEC</a>
must be at least
<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>&#160;if the problem is of type LP, QP2, QP4, LS2 or LS4, and at least <m:math><m:mn>1</m:mn></m:math>&#160;(the default) otherwise.</div>
<div class="paramtext"><i>On entry</i>: the coefficients of the explicit linear term of the objective function.
<div class="paramtext">If the problem is of type FP, QP1, QP3, LS1 (the default) or LS3, <a class="arg" href="#CVEC">CVEC</a> is not referenced.</div>
</div></dd><dt class="paramhead"><a name="ISTATE" id="ISTATE"/>10: &#8194; ISTATE(<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction></m: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 <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_coldstart"><m:mi mathcolor="#800080;" mathvariant="bold">Cold Start</m:mi></m:maction></m:math>&#160;is used.
<div class="paramtext">If the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_warmstart"><m:mi mathcolor="#800080;" mathvariant="bold">Warm Start</m:mi></m:maction></m:math>&#160;has been chosen, <a class="arg" href="#ISTATE">ISTATE</a> specifies the desired status of the constraints at the start of the feasibility phase.  More precisely, the first <m:math><m:mi>n</m:mi></m:math>&#160;elements of <a class="arg" href="#ISTATE">ISTATE</a> refer to the upper and lower bounds on the variables, and the next <m:math><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub></m:math>&#160;elements refer to the general linear constraints (if any).  Possible values for <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISTATE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISTATE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;are as follows: 
<div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" align="center"><b><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISTATE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISTATE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math></b></td> 
<td class="libdoc" valign="top" align="center"><b>Meaning</b></td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center">0</td> 
<td class="libdoc" valign="top" align="left">The constraint should <span class="italic">not</span> be in the initial working set.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center">1</td> 
<td class="libdoc" valign="top" align="left">The constraint should be in the initial working set at its lower bound.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center">2</td> 
<td class="libdoc" valign="top" align="left">The constraint should be in the initial working set at its upper bound.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center">3</td> 
<td class="libdoc" valign="top" align="left">The constraint should be in the initial working set as an equality.  This value must not be specified unless <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>.</td> 
</tr> 
</tbody> 
</table></div>
 </div>
<div class="paramtext">The values <m:math><m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow></m:math>, <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>&#160;and <m:math><m:mn>4</m:mn></m:math>&#160;are also acceptable but will be reset to zero by the routine.  If E04NCF/E04NCA has been called previously with the same values of <a class="arg" href="#N">N</a> and <a class="arg" href="#NCLIN">NCLIN</a>, <a class="arg" href="#ISTATE">ISTATE</a> already contains satisfactory information.  (See also the description of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_warmstart"><m:mi mathcolor="#800080;" mathvariant="bold">Warm Start</m:mi></m:maction></m:math>.) The routine also adjusts (if necessary) the values supplied in <a class="arg" href="#X">X</a> to be consistent with <a class="arg" href="#ISTATE">ISTATE</a>.</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow><m:mo>&#8804;</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISTATE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISTATE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi mathvariant="italic">j</m:mi></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:mn>4</m:mn></m:math>,  for <m:math><m:mi mathvariant="italic">j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction></m:mrow></m:math>.</div>
<div class="paramtext"><i>On exit</i>: the status of the constraints in the working set at the point returned in <a class="arg" href="#X">X</a>.  The significance of each possible value of <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISTATE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISTATE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;is as follows: 
<div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" align="center"><b><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISTATE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISTATE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math></b></td> 
<td class="libdoc" valign="top" align="center"><b>Meaning</b></td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow></m:math></td> 
<td class="libdoc" valign="top" align="left">The constraint violates its lower bound by more than the feasibility tolerance.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math></td> 
<td class="libdoc" valign="top" align="left">The constraint violates its upper bound by more than the feasibility tolerance.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mphantom><m:mo>-</m:mo></m:mphantom><m:mn>0</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">The constraint is satisfied to within the feasibility tolerance, but is not in the working set.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mphantom><m:mo>-</m:mo></m:mphantom><m:mn>1</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">This inequality constraint is included in the working set at its lower bound.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mphantom><m:mo>-</m:mo></m:mphantom><m:mn>2</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">This inequality constraint is included in the working set at its upper bound.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mphantom><m:mo>-</m:mo></m:mphantom><m:mn>3</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">The constraint is included in the working set as an equality.  This value of <a class="arg" href="#ISTATE">ISTATE</a> can occur only when <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mphantom><m:mo>-</m:mo></m:mphantom><m:mn>4</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">This corresponds to optimality being declared with <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;being temporarily fixed at its current value.</td> 
</tr> 
</tbody> 
</table></div>
</div></dd><dt class="paramhead"><a name="KX" id="KX"/>11: &#8194; KX(<a class="arg" href="#N">N</a>) &#8211; INTEGER array<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On entry</i>: need not be initialized for problems of type FP, LP, QP1, QP2, LS1 (the default) or LS2.
<div class="paramtext">For problems QP3, QP4, LS3 or LS4, <a class="arg" href="#KX">KX</a> must specify the order of the columns of the matrix <m:math><m:mi>A</m:mi></m:math>&#160;with respect to the ordering of <a class="arg" href="#X">X</a>.  Thus if column <m:math><m:mi>j</m:mi></m:math>&#160;of <m:math><m:mi>A</m:mi></m:math>&#160;is the column associated with the variable <m:math><m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;then <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#KX"><m:mi mathcolor="#EE0000" mathvariant="bold">KX</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi>i</m:mi></m:math>.</div>
</div><div class="paramtext"><i>Constraints</i>:
   <div class="paramtext"/><ul class="listcons">
<li class="listcons"><m:math><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#KX"><m:mi mathcolor="#EE0000" mathvariant="bold">KX</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi mathvariant="italic">i</m:mi></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>,  for <m:math><m:mi mathvariant="italic">i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>;</li>
<li class="listcons">if <m:math><m:mi>i</m:mi><m:mo>&#8800;</m:mo><m:mi>j</m:mi></m:math>, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#KX"><m:mi mathcolor="#EE0000" mathvariant="bold">KX</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow><m:mo>&#8800;</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#KX"><m:mi mathcolor="#EE0000" mathvariant="bold">KX</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>.</li>
</ul></div>
<div class="paramtext"><i>On exit</i>: defines the order of the columns of <a class="arg" href="#A">A</a> with respect to the ordering of <a class="arg" href="#X">X</a>, as described above.</div></dd><dt class="paramhead"><a name="X" id="X"/>12: &#8194; X(<a class="arg" href="#N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On entry</i>: an initial estimate of the solution.</div>
<div class="paramtext"><i>On exit</i>: the point at which E04NCF/E04NCA terminated.  If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq1"><m:mn mathcolor="#003399" mathvariant="bold">1</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq4"><m:mn mathcolor="#003399" mathvariant="bold">4</m:mn></m:maction></m:math>, <a class="arg" href="#X">X</a> contains an estimate of the solution.</div></dd><dt class="paramhead"><a name="A" id="A"/>13: &#8194; A(<a class="arg" href="#LDA">LDA</a>,<m:math><m:mo>*</m:mo></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><b>Note:</b> the second dimension of the array <a class="arg" href="#A">A</a>
must be at least
<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>&#160;if the problem is of type QP1, QP2, QP3, QP4, LS1 (the default), LS2, LS3 or LS4, and at least <m:math><m:mn>1</m:mn></m:math>&#160;otherwise.</div>
<div class="paramtext"><i>On entry</i>: the array <a class="arg" href="#A">A</a> must contain the matrix <m:math><m:mi>A</m:mi></m:math>&#160;as specified in <a class="table" href="#table1">Table 1</a> (see <a class="sec" href="#description">Section 3</a>).
<div class="paramtext">If the problem is of type QP1 or QP2, the first <m:math><m:mi>m</m:mi></m:math>&#160;rows and columns of <a class="arg" href="#A">A</a> must contain the leading <m:math><m:mi>m</m:mi></m:math>&#160;by <m:math><m:mi>m</m:mi></m:math>&#160;rows and columns of the symmetric Hessian matrix.  Only the diagonal and upper triangular elements of the leading <m:math><m:mi>m</m:mi></m:math>&#160;rows and columns of <a class="arg" href="#A">A</a> are referenced.  The remaining elements are assumed to be zero and need not be assigned.</div>
<div class="paramtext">For problems QP3, QP4, LS3 or LS4, the first <m:math><m:mi>m</m:mi></m:math>&#160;rows of <a class="arg" href="#A">A</a> must contain an <m:math><m:mi>m</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;upper trapezoidal factor of either the Hessian matrix or the least-squares matrix, ordered according to the <a class="arg" href="#KX">KX</a> array.  The factor need not be of full rank, i.e., some of the diagonals may be zero.  However, as a general rule, the larger the dimension of the leading nonsingular sub-matrix of <m:math><m:mi>A</m:mi></m:math>, the fewer iterations will be required.  Elements outside the upper triangular part of the first <m:math><m:mi>m</m:mi></m:math>&#160;rows of <a class="arg" href="#A">A</a> are assumed to be zero and need not be assigned.</div>
<div class="paramtext">If a constrained least-squares problem contains a very large number of observations, storage limitations may prevent storage of the entire least-squares matrix.  In such cases, you should transform the original <m:math><m:mi>A</m:mi></m:math>&#160;into a triangular matrix before the call to E04NCF/E04NCA and solve the problem as type LS3 or LS4.</div>
</div>
<div class="paramtext"><i>On exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_hessian"><m:mi mathcolor="#800080;" mathvariant="bold">Hessian</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">No</m:mi></m:math>&#160;and the problem is of type LS or QP, <a class="arg" href="#A">A</a> contains the upper triangular Cholesky factor <m:math><m:mi>R</m:mi></m:math>&#160;of <a class="eqn" href="#eqn8">(8)</a> (see <a class="sec" href="#ad-mainiteration">Section 10.3</a>), with columns ordered as indicated by <a class="arg" href="#KX">KX</a>.  If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_hessian"><m:mi mathcolor="#800080;" mathvariant="bold">Hessian</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">Yes</m:mi></m:math>&#160;and the problem is of type LS or QP, <a class="arg" href="#A">A</a> contains the upper triangular Cholesky factor <m:math><m:mi>R</m:mi></m:math>&#160;of the Hessian matrix <m:math><m:mi>H</m:mi></m:math>, with columns ordered as indicated by <a class="arg" href="#KX">KX</a>.  In either case <m:math><m:mi>R</m:mi></m:math>&#160;may be used to obtain the variance-covariance matrix or to recover the upper triangular factor of the original least-squares matrix.
<div class="paramtext">If the problem is of type FP or LP, <a class="arg" href="#A">A</a> is not referenced.</div>
</div></dd><dt class="paramhead"><a name="B" id="B"/>14: &#8194; B(<m:math><m:mo>*</m:mo></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><b>Note:</b> the dimension of the array <a class="arg" href="#B">B</a>
must be at least
<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction></m:math>&#160;if the problem is of type LS1 (the default), LS2, LS3 or LS4, and at least <m:math><m:mn>1</m:mn></m:math>&#160;otherwise.</div>
<div class="paramtext"><i>On entry</i>: the <m:math><m:mi>m</m:mi></m:math>&#160;elements of the vector of observations.</div>
<div class="paramtext"><i>On exit</i>: the transformed residual vector of equation <a class="eqn" href="#eqn10">(10)</a> (see <a class="sec" href="#ad-mainiteration">Section 10.3</a>).
<div class="paramtext">If the problem is of type FP, LP, QP1, QP2, QP3 or QP4, <a class="arg" href="#B">B</a> is not referenced.</div>
</div></dd><dt class="paramhead"><a name="ITER" id="ITER"/>15: &#8194; ITER &#8211; INTEGER<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: the total number of iterations performed.</div></dd><dt class="paramhead"><a name="OBJ" id="OBJ"/>16: &#8194; OBJ &#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 <m:math><m:mi>x</m:mi></m:math>&#160;if <m:math><m:mi>x</m:mi></m:math>&#160;is feasible, or the sum of infeasibiliites at <m:math><m:mi>x</m:mi></m:math>&#160;otherwise.  If the problem is of type FP and <m:math><m:mi>x</m:mi></m:math>&#160;is feasible, <a class="arg" href="#OBJ">OBJ</a> is set to zero.</div></dd><dt class="paramhead"><a name="CLAMDA" id="CLAMDA"/>17: &#8194; CLAMDA(<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: the values of the Lagrange multipliers for each constraint with respect to the current working set.  The first <m:math><m:mi>n</m:mi></m:math>&#160;elements contain the multipliers for the bound constraints on the variables, and the next <m:math><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub></m:math>&#160;elements contain the multipliers for the general linear constraints (if any).  If <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISTATE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISTATE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;(i.e., constraint <m:math><m:mi>j</m:mi></m:math>&#160;is not in the working set), <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CLAMDA"><m:mi mathcolor="#EE0000" mathvariant="bold">CLAMDA</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;is zero.  If <m:math><m:mi>x</m:mi></m:math>&#160;is optimal, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CLAMDA"><m:mi mathcolor="#EE0000" mathvariant="bold">CLAMDA</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;should be non-negative if <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISTATE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISTATE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mn>1</m:mn></m:math>, nonpositive if <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISTATE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISTATE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mn>2</m:mn></m:math>&#160;and zero if <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISTATE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISTATE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mn>4</m:mn></m:math>.</div></dd><dt class="paramhead"><a name="IWORK" id="IWORK"/>18: &#8194; IWORK(<a class="arg" href="#LIWORK">LIWORK</a>) &#8211; INTEGER array<span class="pclass">Workspace</span></dt><dt class="multi-paramhead"><a name="LIWORK" id="LIWORK"/>19: &#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="arg" href="#IWORK">IWORK</a> as declared in the (sub)program from which E04NCF/E04NCA is called.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LIWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LIWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>.
</div></dd><dt class="paramhead"><a name="WORK" id="WORK"/>20: &#8194; WORK(<a class="arg" 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"/>21: &#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="arg" href="#WORK">WORK</a> as declared in the (sub)program from which E04NCF/E04NCA is called.</div><div class="paramtext"><i>Constraints</i>:
   <div class="paramtext"/><ul class="listcons">
<li class="listcons">if the problem is of type FP, <ul class="listcons">
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>6</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>;</li>
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>2</m:mn><m:mo>&#215;</m:mo><m:msup><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mn>2</m:mn></m:msup><m:mo>+</m:mo><m:mn>6</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:mn>6</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction></m:math>;</li>
<li class="listcons">otherwise <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>2</m:mn><m:mo>&#215;</m:mo><m:msup><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:mn>1</m:mn></m:mfenced><m:mn>2</m:mn></m:msup><m:mo>+</m:mo><m:mn>6</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:mn>6</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction></m:math>;</li>
</ul></li>
<li class="listcons">if the problem is of type LP, <ul class="listcons">
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>7</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>;</li>
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>2</m:mn><m:mo>&#215;</m:mo><m:msup><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mn>2</m:mn></m:msup><m:mo>+</m:mo><m:mn>7</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:mn>6</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction></m:math>;</li>
<li class="listcons">otherwise <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>2</m:mn><m:mo>&#215;</m:mo><m:msup><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>+</m:mo><m:mn>1</m:mn></m:mfenced><m:mn>2</m:mn></m:msup><m:mo>+</m:mo><m:mn>7</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:mn>6</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction></m:math>;</li>
</ul></li>
<li class="listcons">if For problems QP1, QP3, LS1 (the default) and LS3, <ul class="listcons">
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>2</m:mn><m:mo>&#215;</m:mo><m:msup><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mn>2</m:mn></m:msup><m:mo>+</m:mo><m:mn>9</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:mn>6</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction></m:math>;</li>
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>9</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>;</li>
</ul></li>
<li class="listcons">if For problems QP2, QP4, LS2 and LS4, <ul class="listcons">
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>2</m:mn><m:mo>&#215;</m:mo><m:msup><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mn>2</m:mn></m:msup><m:mo>+</m:mo><m:mn>10</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:mn>6</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction></m:math>;</li>
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NCLIN"><m:mi mathcolor="#EE0000" mathvariant="bold">NCLIN</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>10</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>.</li>
</ul></li>
</ul><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="rout" href="../X04/x04abf.xml">X04ABF</a>).  As an alternative to computing <a class="arg" href="#LIWORK">LIWORK</a> and <a class="arg" href="#LWORK">LWORK</a> from the formulas given above, you may prefer to obtain appropriate values from the output of a preliminary run with <a class="arg" href="#LIWORK">LIWORK</a> and <a class="arg" href="#LWORK">LWORK</a> set to <m:math><m:mn>1</m:mn></m:math>.  (E04NCF/E04NCA will then terminate with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq6"><m:mn mathcolor="#003399" mathvariant="bold">6</m:mn></m:maction></m:math>.)</div></div></dd><dt class="paramhead"><a name="IFAIL" id="IFAIL"/>22: &#8194; IFAIL &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><b>Note:</b> <span class="italic">for E04NCA, <a class="arg" href="#IFAIL">IFAIL</a> does not occur in this position in the parameter list.  See the additional parameters described below</span>.</div><div class="paramtext"><i>On entry</i>: <a class="arg" href="#IFAIL">IFAIL</a> must be set to <m:math><m:mn>0</m:mn></m:math>, <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>. If you are unfamiliar with this parameter you should refer to <a class="sec" href="../GENINT/essint.xml#library3">Section 3.3</a> in  the Essential Introduction for details.</div>
<div class="paramtext"><i>On exit</i>: <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;unless the routine detects an error (see <a class="sec" href="#errors">Section 6</a>).
<div class="paramtext">For environments where it might be inappropriate to halt program execution when an error is detected, the value <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>&#160;is recommended.  If the output of error messages is undesirable, then the value <m:math><m:mn>1</m:mn></m:math>&#160;is recommended.  Otherwise, because for this routine the values of the output parameters may be useful even if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>&#8800;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;on exit, the recommended value is <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>.  <b>When the value <m:math><m:mrow><m:mo>-</m:mo><m:mn mathvariant="bold">1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>&#160;is used it is essential to test the value of <a class="arg" href="#IFAIL">IFAIL</a> on exit.</b></div>
</div><div class="paramtext">E04NCF/E04NCA returns with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;if <m:math><m:mi>x</m:mi></m:math>&#160;is a strong local minimizer, i.e.,  the projected gradient (<span class="mono">Norm Gz</span>; see <a class="sec" href="#fc-printedoutput">Section 8.2</a>) is negligible, the Lagrange multipliers (<span class="mono">Lagr Mult</span>; see <a class="sec" href="#ad-search">Section 10.2</a>) are optimal and <m:math><m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;(see <a class="sec" href="#ad-mainiteration">Section 10.3</a>) is nonsingular.</div>
</dd><dd class="note"><b>Note:</b> <span class="italic"> the following are additional parameters for specific use with E04NCA.  Users of E04NCF therefore need not read the remainder of this description</span>.</dd><dt class="paramhead"><a name="LWSAV" id="LWSAV"/>22: &#8194; LWSAV(<m:math><m:mn>120</m:mn></m:math>) &#8211; LOGICAL array<span class="pclass">Communication Array</span></dt><dt class="multi-paramhead"><a name="IWSAV" id="IWSAV"/>23: &#8194; IWSAV(<m:math><m:mn>610</m:mn></m:math>) &#8211; INTEGER array<span class="pclass">Communication Array</span></dt><dt class="multi-paramhead"><a name="RWSAV" id="RWSAV"/>24: &#8194; RWSAV(<m:math><m:mn>475</m:mn></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Communication Array</span></dt><dd><div class="paramtext">The arrays <a class="arg" href="#LWSAV">LWSAV</a>, <a class="arg" href="#IWSAV">IWSAV</a> and <a class="arg" href="#RWSAV">RWSAV</a> <b>must not</b> be altered between calls to any of the routines <a class="rout" href="../E04/e04wbf.xml">E04WBF</a>, E04NCA, <a class="rout" href="../E04/e04ndf.xml">E04NDA</a> or <a class="rout" href="../E04/e04nef.xml">E04NEA</a>.</div></dd><dt class="paramhead"><a name="IFAIL2" id="IFAIL2"/>25: &#8194; IFAIL &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><b>Note:</b> see the parameter description for <a class="arg" href="#IFAIL">IFAIL</a> above.</div></dd></dl><h2 class="standard"><a class="sec" name="errors" id="errors"/>6&#160;&#160;Error Indicators and Warnings</h2>
<div class="paramtext">If on entry <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">-1</m:mn></m:maction></m:math>, explanatory error messages are output on the current error message unit (as defined by <a class="rout" href="../X04/x04aaf.xml">X04AAF</a>).</div><div class="paramtext"><b>Note:</b> E04NCF/E04NCA may return useful information for one or more of the following detected errors or warnings.</div><div class="paramtext">Errors or warnings detected by the routine:</div>
<dl class="ifail">
<dt class="errorhead"><a name="IFeq1" id="IFeq1"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd>
<div class="paramtext"><a class="arg" href="#X">X</a> is a weak local minimum, (i.e., the projected gradient is negligible, the Lagrange multipliers are optimal, but either <m:math><m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;(see <a class="sec" href="#ad-mainiteration">Section 10.3</a>) is singular, or there is a small multiplier).  This means that <m:math><m:mi>x</m:mi></m:math>&#160;is not unique.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq2" id="IFeq2"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd>
<div class="paramtext">The solution appears to be unbounded.  This value of <a class="arg" href="#IFAIL">IFAIL</a> implies that a step as large as <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_infiniteboundsize"><m:mi mathcolor="#800080;" mathvariant="bold">Infinite Bound Size</m:mi></m:maction></m:math>&#160;(<m:math><m:mtext>default value</m:mtext><m:mo>=</m:mo><m:msup><m:mn>10</m:mn><m:mn>20</m:mn></m:msup></m:math>) would have to be taken in order to continue the algorithm.  This situation can occur only when <m:math><m:mi>A</m:mi></m:math>&#160;is singular, there is an explicit linear term, and at least one variable has no upper or lower bound.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq3" id="IFeq3"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math></dt>
<dd>
<div class="paramtext">No feasible point was found, i.e., it was not possible to satisfy all the constraints to within the feasibility tolerance.  In this case, the constraint violations at the final <m:math><m:mi>x</m:mi></m:math>&#160;will reveal a value of the tolerance for which a feasible point will exist &#8211; for example, when the feasibility tolerance for each violated constraint exceeds its <span class="mono">Slack</span> (see <a class="sec" href="#fc-printedoutput">Section 8.2</a>) at the final point.  The modified problem (with an altered feasibility tolerance) may then be solved using a <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_warmstart"><m:mi mathcolor="#800080;" mathvariant="bold">Warm Start</m:mi></m:maction></m:math>.  You should check that there are no constraint redundancies.  If the data for the constraints are accurate only to the absolute precision <m:math><m:mi>&#963;</m:mi></m:math>, you should ensure that the value of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_feasibilitytolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Feasibility Tolerance</m:mi></m:maction></m:math>&#160;(<m:math><m:mtext>default value</m:mtext><m:mo>=</m:mo><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math>, where <m:math><m:mi>&#949;</m:mi></m:math>&#160;is the <span class="bitalic">machine precision</span>) is <span class="italic">greater</span> than <m:math><m:mi>&#963;</m:mi></m:math>.  For example, if all elements of <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction></m:math>&#160;are of order unity and are accurate only to three decimal places, the <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_feasibilitytolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Feasibility Tolerance</m:mi></m:maction></m:math>&#160;should be at least <m:math><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>3</m:mn></m:mrow></m:msup></m:math>.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq4" id="IFeq4"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>4</m:mn></m:math></dt>
<dd>
<div class="paramtext">The limiting number of iterations (determined by the optional parameters <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_feasibility-pi-limit"><m:mi mathcolor="#800080;" mathvariant="bold">Feasibility Phase Iteration Limit</m:mi></m:maction></m:math>&#160;(<m:math><m:mtext>default value</m:mtext><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>50</m:mn><m:mo>,</m:mo><m:mrow><m:mn>5</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:mrow></m:mfenced></m:mrow></m:math>) and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_optimality-pi-limit"><m:mi mathcolor="#800080;" mathvariant="bold">Optimality Phase Iteration Limit</m:mi></m:maction></m:math>&#160;(<m:math><m:mtext>default value</m:mtext><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>50</m:mn><m:mo>,</m:mo><m:mrow><m:mn>5</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:mrow></m:mfenced></m:mrow></m:math>)) was reached before normal termination occurred.  If the method appears to be making progress (e.g., the objective function is being satisfactorily reduced), either increase the iterations limit and rerun E04NCF/E04NCA or, alternatively, rerun E04NCF/E04NCA using the <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_warmstart"><m:mi mathcolor="#800080;" mathvariant="bold">Warm Start</m:mi></m:maction></m:math>&#160;facility to specify the initial working set.  If the iteration limit is already large, but some of the constraints could be nearly linearly dependent, check the monitoring information (see <a class="sec" href="#monitoring">Section 12</a>) for a repeated pattern of constraints entering and leaving the working set.  (Near-dependencies are often indicated by wide variations in size in the diagonal elements of the matrix <m:math><m:mi>T</m:mi></m:math>&#160;(see <a class="sec" href="#ad-search">Section 10.2</a>), which will be printed if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_printlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Print Level</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>30</m:mn></m:math>&#160;(<m:math><m:mtext>default value</m:mtext><m:mo>=</m:mo><m:mn>10</m:mn></m:math>).  In this case, the algorithm could be cycling (see the comments for <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq5"><m:mn mathcolor="#003399" mathvariant="bold">5</m:mn></m:maction></m:math>).</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq5" id="IFeq5"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>5</m:mn></m:math></dt>
<dd>
<div class="paramtext">The algorithm could be cycling, since a total of <m:math><m:mn>50</m:mn></m:math>&#160;changes were made to the working set without altering <m:math><m:mi>x</m:mi></m:math>.  You should check the monitoring information (see <a class="sec" href="#monitoring">Section 12</a>) for a repeated pattern of constraint deletions and additions.</div>
<div class="paramtext">If a sequence of constraint changes is being repeated, the iterates are probably cycling.  (E04NCF/E04NCA does not contain a method that is guaranteed to avoid cycling; such a method would be combinatorial in nature.)  Cycling may occur in two circumstances: at a constrained stationary point where there are some small or zero Lagrange multipliers; or at a point (usually a vertex) where the constraints that are satisfied exactly are nearly linearly dependent.  In the latter case, you have the option of identifying the offending dependent constraints and removing them from the problem, or restarting the run with a larger value of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_feasibilitytolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Feasibility Tolerance</m:mi></m:maction></m:math>&#160;(<m:math><m:mtext>default value</m:mtext><m:mo>=</m:mo><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math>, where <m:math><m:mi>&#949;</m:mi></m:math>&#160;is the <span class="bitalic">machine precision</span>).  If E04NCF/E04NCA terminates with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq5"><m:mn mathcolor="#003399" mathvariant="bold">5</m:mn></m:maction></m:math>, but no suspicious pattern of constraint changes can be observed, it may be worthwhile to restart with the final <m:math><m:mi>x</m:mi></m:math>&#160;(with or without the <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_warmstart"><m:mi mathcolor="#800080;" mathvariant="bold">Warm Start</m:mi></m:maction></m:math>&#160;option).</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq6" id="IFeq6"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>6</m:mn></m:math></dt>
<dd><div class="paramtext">
An input parameter is invalid.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="Overflow" id="Overflow"/><m:math><m:mtext mathvariant="bold">Overflow</m:mtext></m:math></dt>
<dd><div class="paramtext">
If the printed output before the overflow error contains a warning about serious ill-conditioning in the working set when adding the <m:math><m:mi>j</m:mi></m:math>th constraint, it may be possible to avoid the difficulty by increasing the magnitude of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_feasibilitytolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Feasibility Tolerance</m:mi></m:maction></m:math>&#160;and rerunning the program.  If the message recurs even after this change, the offending linearly dependent constraint (with index &#8216;<m:math><m:mi>j</m:mi></m:math>&#8217;) must be removed from the problem.</div>
</dd>
</dl><h2 class="standard"><a class="sec" name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2>
<div class="paramtext">E04NCF/E04NCA implements a numerically stable active set strategy and returns solutions that are as accurate as the condition of the problem warrants on the machine.</div><h2 class="standard"><a class="sec" name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2>
<div class="paramtext">This section contains some comments on scaling and a description of the printed output.</div><h3 class="standard"><a class="sec" name="fc-scaling" id="fc-scaling"/>8.1&#160;&#160;Scaling</h3>
<div class="paramtext">Sensible scaling of the problem is likely to reduce the number of iterations required and make the problem less sensitive to perturbations in the data, thus improving the condition of the problem.  In the absence of better information it is usually sensible to make the Euclidean lengths of each constraint of comparable magnitude.  See the <a class="chapint" href="../E04/e04intro.xml">E04 Chapter Introduction</a> and <a class="ref" href="#ref079">Gill <span class="italic">et al.</span> (1981)</a> for further information and advice.</div><h3 class="standard"><a class="sec" name="fc-printedoutput" id="fc-printedoutput"/>8.2&#160;&#160;Description of the Printed Output</h3>
<div class="paramtext">This section describes the intermediate printout and final printout produced by E04NCF/E04NCA.  The intermediate printout is a subset of the monitoring information produced by the routine at every iteration (see <a class="sec" href="#monitoring">Section 12</a>).  You can control the level of printed output (see the description of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_printlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Print Level</m:mi></m:maction></m:math>).  Note that the intermediate printout and final printout are produced only if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_printlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Print Level</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>10</m:mn></m:math>&#160;(the default for E04NCF, by default no output is produced by E04NCA).</div><div class="paramtext">The following line of summary output (<m:math><m:mtext/><m:mo>&lt;</m:mo><m:mn>80</m:mn></m:math>&#160;characters) is produced at every iteration.  In all cases, the values of the quantities printed are those in effect <span class="italic">on completion</span> of the given iteration.
<table class="standard-100"><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Itn</span></td>
<td valign="top">
is the iteration count.
</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Step</span></td>
<td valign="top">

is the step taken along the computed search direction.  If a constraint is added during the current iteration (i.e., <span class="mono">Jadd</span> is positive), <span class="mono">Step</span> will be the step to the nearest constraint.  During the optimality phase, the step can be greater than one only if the factor <m:math><m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;is singular.
 
(See <a class="sec" href="#ad-mainiteration">Section 10.3</a>.)

</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Ninf</span></td>
<td valign="top">
is the number of violated constraints (infeasibilities).  This will be zero during the optimality phase.
</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Sinf</span>/<span class="mono">Objective</span></td>
<td valign="top">
is the value of the current objective function.  If <m:math><m:mi>x</m:mi></m:math>&#160;is not feasible, <span class="mono">Sinf</span> gives a weighted sum of the magnitudes of constraint violations.  If <m:math><m:mi>x</m:mi></m:math>&#160;is feasible, <span class="mono">Objective</span> is the value of the objective function of <a class="eqn" href="#eqn1">(1)</a>.  The output line for the final iteration of the feasibility phase (i.e., the first iteration for which <span class="mono">Ninf</span> is zero) will give the value of the true objective at the first feasible point.<div class="paramtext">During the optimality phase the value of the objective function will be nonincreasing.  During the feasibility phase the number of constraint infeasibilities will not increase until either a feasible point is found or the optimality of the multipliers implies that no feasible point exists.  Once optimal multipliers are obtained the number of infeasibilities can increase, but the sum of infeasibilities will either remain constant or be reduced until the minimum sum of infeasibilities is found.</div>
</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Norm Gz</span></td>
<td valign="top">

is <m:math>
 <m:mfenced open="&#8214;" close="&#8214;" separators="">
  <m:msubsup><m:mi>Z</m:mi><m:mn>1</m:mn><m:mi mathvariant="normal">T</m:mi></m:msubsup>
  <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 reduced gradient with respect to <m:math><m:msub><m:mi>Z</m:mi><m:mn>1</m:mn></m:msub></m:math>.  During the optimality phase, this norm will be approximately zero after a unit step.
 
(See <a class="sec" href="#ad-search">Sections 10.2</a> and <a class="sec" href="#ad-mainiteration">10.3</a>.)

</td>
</tr></table>
</div><div class="paramtext">The final printout includes a listing of the status of every variable and constraint.</div><div class="paramtext">The following describes the printout for each variable.  A full stop (.)  is printed for any numerical value that is zero.
<table class="standard-100"><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Varbl</span></td>
<td valign="top">
gives the name (<span class="mono">V</span>) and index <m:math><m:mi>j</m:mi></m:math>, for <m:math><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>n</m:mi></m:math>, of the variable.
</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">State</span></td>
<td valign="top">
gives the state of the variable (<span class="mono">FR</span> if neither bound is in the working set, <span class="mono">EQ</span> if a fixed variable, <span class="mono">LL</span> if on its lower bound, <span class="mono">UL</span> if on its upper bound, <span class="mono">TF</span> if temporarily fixed at its current value).  If <span class="mono">Value</span> lies outside the upper or lower bounds by more than the <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_feasibilitytolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Feasibility Tolerance</m:mi></m:maction></m:math>, <span class="mono">State</span> will be <span class="mono">++</span> or <span class="mono">--</span> respectively.

 <div class="paramtext">
A key is sometimes printed before <span class="mono">State</span>.

 <table class="standard-100"><tr>
<td style="width:3.0em;" valign="baseline"><span class="mono">A</span></td>
<td valign="top">
<span class="italic">Alternative optimum possible</span>.  The variable is active at one of its bounds, but its Lagrange multiplier is essentially zero.  This means that if the variable were allowed to start moving away from its bound then there would be no change to the objective function.  The values of the other free variables <span class="italic">might</span> change, giving a genuine alternative solution.  However, if there are any degenerate variables (labelled <span class="mono">D</span>), the actual change might prove to be zero, since one of them could encounter a bound immediately.  In either case the values of the Lagrange multipliers might also change.
</td>
</tr><tr>
<td style="width:3.0em;" valign="baseline"><span class="mono">D</span></td>
<td valign="top">
<span class="italic">Degenerate</span>.  The variable is free, but it is equal to (or very close to) one of its bounds.
</td>
</tr><tr>
<td style="width:3.0em;" valign="baseline"><span class="mono">I</span></td>
<td valign="top">
<span class="italic">Infeasible</span>.  The variable is currently violating one of its bounds by more than the <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_feasibilitytolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Feasibility Tolerance</m:mi></m:maction></m:math>.
</td>
</tr></table>
 </div></td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Value</span></td>
<td valign="top">
is the value of the variable at the final iteration.
</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Lower Bound</span></td>
<td valign="top">
is the lower bound specified for the variable.  <span class="mono">None</span> indicates that <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:mo>-</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>.
</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Upper Bound</span></td>
<td valign="top">
is the upper bound specified for the variable.  <span class="mono">None</span> indicates that <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>&#8805;</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>.
</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Lagr Mult</span></td>
<td valign="top">
is the Lagrange multiplier for the associated bound.  This will be zero if <span class="mono">State</span> is <span class="mono">FR</span> unless <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:mo>-</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>&#8805;</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>, in which case the entry will be blank.  If <m:math><m:mi>x</m:mi></m:math>&#160;is optimal, the multiplier should be non-negative if <span class="mono">State</span> is <span class="mono">LL</span> and nonpositive if <span class="mono">State</span> is <span class="mono">UL</span>.
</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Slack</span></td>
<td valign="top">
is the difference between the variable <span class="mono">Value</span> and the nearer of its (finite) bounds <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>.  A blank entry indicates that the associated variable is not bounded (i.e., <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:mo>-</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>&#8805;</m:mo><m:mi mathvariant="italic">bigbnd</m:mi></m:math>).
</td>
</tr></table>
</div><div class="paramtext">The meaning of the printout for general constraints is the same as that given above for variables, with &#8216;variable&#8217; replaced by &#8216;constraint&#8217;, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;are replaced by <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BL"><m:mi mathcolor="#EE0000" mathvariant="bold">BL</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mrow><m:mi>n</m:mi><m:mo>+</m:mo><m:mi>j</m:mi></m:mrow></m:mfenced></m:mrow></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BU"><m:mi mathcolor="#EE0000" mathvariant="bold">BU</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mrow><m:mi>n</m:mi><m:mo>+</m:mo><m:mi>j</m:mi></m:mrow></m:mfenced></m:mrow></m:math>&#160;respectively, and with the following change in the heading:
<table class="standard-100"><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">L Con</span></td>
<td valign="top">
gives the name (<span class="mono">L</span>) and index <m:math><m:mi>j</m:mi></m:math>, for <m:math><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub></m:math>, of the linear constraint.
</td>
</tr></table>
</div><div class="paramtext">Note that movement off a constraint (as opposed to a variable moving away from its bound) can be interpreted as allowing the entry in the <span class="mono">Slack</span> column to become positive.</div><div class="paramtext">Numerical values are output with a fixed number of digits; they are not guaranteed to be accurate to this precision.</div><h2 class="standard"><a class="sec" name="example" id="example"/>9&#160;&#160;Example</h2>
<div class="paramtext">This example minimizes the function <m:math><m:mfrac><m:mn>1</m:mn><m:mn>2</m:mn></m:mfrac><m:msup><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>A</m:mi><m:mi>x</m:mi></m:mfenced><m:mn>2</m:mn></m:msup></m:math>, where

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>A</m:mi><m:mo>=</m:mo>
 <m:mfenced><m:mtable>
  <m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>2</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>2</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>3</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:mtd>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:mtd>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>3</m:mn></m:mrow></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>4</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>3</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>2</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>2</m:mn></m:mtd>
   <m:mtd><m:mn>2</m:mn></m:mtd>
   <m:mtd><m:mn>3</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>2</m:mn></m:mtd>
   <m:mtd><m:mn>2</m:mn></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
<m:mtext>&#8195; and &#8195;</m:mtext>
 <m:mi>b</m:mi><m:mo>=</m:mo>
 <m:mfenced><m:mtable>
  <m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>1</m:mn></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div>

subject to the bounds

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mtable columnalign="right">
 <m:mtr>
  <m:mtd><m:mn>0</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>2</m:mn></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mn>0</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>2</m:mn></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mrow><m:mo>-</m:mo><m:mi>&#8734;</m:mi></m:mrow><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>2</m:mn></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mn>0</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>2</m:mn></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mn>0</m:mn><m:mo>&#8804;</m:mo><m:msub><m:mi>x</m:mi><m:mn>5</m:mn></m:msub><m:mo>&#8804;</m:mo><m:mn>2</m:mn></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mn>0</m:mn><m:mo>&#8804;</m:mo><m:msub><m:mi>x</m:mi><m:mn>6</m:mn></m:msub><m:mo>&#8804;</m:mo><m:mn>2</m:mn></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mn>0</m:mn><m:mo>&#8804;</m:mo><m:msub><m:mi>x</m:mi><m:mn>7</m:mn></m:msub><m:mo>&#8804;</m:mo><m:mn>2</m:mn></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mn>0</m:mn><m:mo>&#8804;</m:mo><m:msub><m:mi>x</m:mi><m:mn>8</m:mn></m:msub><m:mo>&#8804;</m:mo><m:mn>2</m:mn></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mn>0</m:mn><m:mo>&#8804;</m:mo><m:msub><m:mi>x</m:mi><m:mn>9</m:mn></m:msub><m:mo>&#8804;</m:mo><m:mn>2</m:mn></m:mtd>
 </m:mtr>
</m:mtable>
</m:math></td><td class="formula2"/></tr></table></div>

and to the general constraints

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mtable>
 <m:mtr>
  <m:mtd><m:mn>2.0</m:mn></m:mtd>
  <m:mtd><m:mo>&#8804;</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>3</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>4</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>5</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>6</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>7</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>8</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:mn>4</m:mn><m:msub><m:mi>x</m:mi><m:mn>9</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>&#8804;</m:mo></m:mtd>
  <m:mtd><m:mi>&#8734;</m:mi></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mrow><m:mo>-</m:mo><m:mi>&#8734;</m:mi></m:mrow></m:mtd>
  <m:mtd><m:mo>&#8804;</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:mn>2</m:mn><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:mn>3</m:mn><m:msub><m:mi>x</m:mi><m:mn>3</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:mn>4</m:mn><m:msub><m:mi>x</m:mi><m:mn>4</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>-</m:mo></m:mtd>
  <m:mtd><m:mn>2</m:mn><m:msub><m:mi>x</m:mi><m:mn>5</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>6</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>7</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>8</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>9</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>&#8804;</m:mo></m:mtd>
  <m:mtd><m:mn>2.0</m:mn></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mn>1.0</m:mn></m:mtd>
  <m:mtd><m:mo>&#8804;</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>-</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>3</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>-</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>4</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>5</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>6</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>7</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>8</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>+</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>x</m:mi><m:mn>9</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>&#8804;</m:mo></m:mtd>
  <m:mtd><m:mn>4.0</m:mn></m:mtd>
 </m:mtr>
</m:mtable>
</m:math></td><td class="formula2"/></tr></table></div>

The initial point, which is infeasible, is

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msub><m:mi>x</m:mi><m:mn>0</m:mn></m:msub><m:mo>=</m:mo><m:msup><m:mfenced separators=""><m:mn>1.0</m:mn><m:mo>,</m:mo><m:mn>0.5</m:mn><m:mo>,</m:mo><m:mn>0.3333</m:mn><m:mo>,</m:mo><m:mn>0.25</m:mn><m:mo>,</m:mo><m:mn>0.2</m:mn><m:mo>,</m:mo><m:mn>0.1667</m:mn><m:mo>,</m:mo><m:mn>0.1428</m:mn><m:mo>,</m:mo><m:mn>0.125</m:mn><m:mo>,</m:mo><m:mn>0.1111</m:mn></m:mfenced><m:mi mathvariant="normal">T</m:mi></m:msup><m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

and <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mn>0</m:mn></m:msub></m:mfenced><m:mo>=</m:mo><m:mn>9.4746</m:mn></m:math>&#160;(to five figures).</div><div class="paramtext">The optimal solution (to five figures) is

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msub><m:mi>x</m:mi><m:mo>*</m:mo></m:msub><m:mo>=</m:mo><m:msup><m:mfenced separators=""><m:mn>0.0</m:mn><m:mo>,</m:mo><m:mn>0.041526</m:mn><m:mo>,</m:mo><m:mn>0.58718</m:mn><m:mo>,</m:mo><m:mn>0.0</m:mn><m:mo>,</m:mo><m:mn>0.099643</m:mn><m:mo>,</m:mo><m:mn>0.0</m:mn><m:mo>,</m:mo><m:mn>0.04906</m:mn><m:mo>,</m:mo><m:mn>0.0</m:mn><m:mo>,</m:mo><m:mn>0.30565</m:mn></m:mfenced><m:mi mathvariant="normal">T</m:mi></m:msup><m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

and <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:msup><m:mi>x</m:mi><m:mo>*</m:mo></m:msup></m:mfenced><m:mo>=</m:mo><m:mn>0.081341</m:mn></m:math>.  Four bound constraints and all three general constraints are active at the solution.</div><div class="paramtext">The document for <a class="rout" href="../E04/e04ndf.xml">E04NDF/E04NDA</a> includes an example program to solve a convex quadratic programming problem, using some of the optional parameters described in <a class="sec" href="#optparams">Section 11</a>.</div><h3 class="standard"><a class="sec" name="examtext" id="examtext"/>9.1&#160;&#160;Program Text</h3>
<div class="paramtext"><b>Note:</b> <span class="italic">the following programs illustrate the use of E04NCF and E04NCA</span>.</div><p><a class="verbatimref" href="../../examples/source/e04ncfe.f">Program Text (e04ncfe.f)</a></p><p><a class="verbatimref" href="../../examples/source/e04ncae.f">Program Text (e04ncae.f)</a></p><h3 class="standard"><a class="sec" name="examdata" id="examdata"/>9.2&#160;&#160;Program Data</h3>
<p><a class="verbatimref" href="../../examples/data/e04ncfe.d">Program&#160;Data (e04ncfe.d)</a></p><p><a class="verbatimref" href="../../examples/data/e04ncae.d">Program&#160;Data (e04ncae.d)</a></p><h3 class="standard"><a class="sec" name="examresults" id="examresults"/>9.3&#160;&#160;Program Results</h3>
<p><a class="verbatimref" href="../../examples/baseresults/e04ncfe.r">Program Results (e04ncfe.r)</a></p><p><a class="verbatimref" href="../../examples/baseresults/e04ncae.r">Program Results (e04ncae.r)</a></p>
<div class="paramtext"><b>Note:</b> <span class="italic">the remainder of this document is intended for more advanced users.  <a class="sec" href="#algdetails">Section 10</a> contains a detailed description of the algorithm which may be needed in order to understand <a class="sec" href="#optparams">Sections 11</a> and <a class="sec" href="#monitoring">12</a>.  <a class="sec" href="#optparams">Section 11</a> describes the optional parameters which may be set by calls to <a class="rout" href="../E04/e04ndf.xml">E04NDF/E04NDA</a> and/or <a class="rout" href="../E04/e04nef.xml">E04NEF/E04NEA</a>.  <a class="sec" href="#monitoring">Section 12</a> describes the quantities which can be requested to monitor the course of the computation</span>.</div><h2 class="standard"><a class="sec" name="algdetails" id="algdetails"/>10&#160;&#160;Algorithmic Details</h2>
<div class="paramtext">This section contains a detailed description of the method used by E04NCF/E04NCA.</div><h3 class="standard"><a class="sec" name="ad-overview" id="ad-overview"/>10.1&#160;&#160;Overview</h3>
<div class="paramtext">E04NCF/E04NCA is essentially identical to the subroutine LSSOL described in <a class="ref" href="#ref091">Gill <span class="italic">et al.</span> (1986)</a>.  It is based on a two-phase (primal) quadratic programming method with features to exploit the convexity of the objective function due to <a class="ref" href="#ref090">Gill <span class="italic">et al.</span> (1984)</a>.  (In the full-rank case, the method is related to that of <a class="ref" href="#ref492">Stoer (1971)</a>.)  E04NCF/E04NCA has two phases: 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 two-phase nature of the algorithm is reflected by changing the function being minimized from the sum of infeasibilities to the quadratic objective function.  The feasibility phase does <span class="italic">not</span> perform the standard simplex method (i.e., it does not necessarily find a vertex), except in the LP case when <m:math><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub><m:mo>&#8804;</m:mo><m:mi>n</m:mi></m:math>.  Once any iterate is feasible, all subsequent iterates remain feasible.</div><div class="paramtext">E04NCF/E04NCA has been designed to be efficient when used to solve a <span class="italic">sequence</span> of related problems &#8211; for example, within a sequential quadratic programming method for nonlinearly constrained optimization (e.g., <a class="rout" href="../E04/e04uff.xml">E04UFF/E04UFA</a> or <a class="rout" href="../E04/e04wdf.xml">E04WDF</a>).  In particular, you may specify an initial working set (the indices of the constraints believed to be satisfied exactly at the solution); see the discussion of the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_warmstart"><m:mi mathcolor="#800080;" mathvariant="bold">Warm Start</m:mi></m:maction></m:math>.</div><div class="paramtext">In general, an iterative process is required to solve a quadratic program.  (For simplicity, we shall always consider a typical iteration and avoid reference to the index of the iteration.)  Each new iterate <m:math><m:mover><m:mi>x</m:mi><m:mo>-</m:mo></m:mover></m:math>&#160;is defined by

<div class="formula-eqn"><a name="eqn2" id="eqn2"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:mover><m:mi>x</m:mi><m:mo>-</m:mo></m:mover><m:mo>=</m:mo><m:mi>x</m:mi><m:mo>+</m:mo><m:mi>&#945;</m:mi><m:mi>p</m:mi><m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (2)
     </td></tr></table></div>

where the <span class="italic">step length</span>
<m:math><m:mi>&#945;</m:mi></m:math>&#160;is a non-negative scalar, and <m:math><m:mi>p</m:mi></m:math>&#160;is called the <span class="italic">search direction.</span></div><div class="paramtext">At each point <m:math><m:mi>x</m:mi></m:math>, a <span class="italic">working set</span> of constraints is defined to be a linearly independent subset of the constraints that are satisfied &#8216;exactly&#8217; (to within the tolerance defined by the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_feasibilitytolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Feasibility Tolerance</m:mi></m:maction></m:math>).  The working set is the current prediction of the constraints that hold with equality at a solution of <a class="eqn" href="#eqn1">(1)</a>.  The search direction is constructed so that the constraints in the working set remain <span class="italic">unaltered</span> for any value of the step length.  For a bound constraint in the working set, this property is achieved by setting the corresponding element of the search direction to zero.  Thus, the associated variable is <span class="italic">fixed</span>, and specification of the working set induces a partition of <m:math><m:mi>x</m:mi></m:math>&#160;into <span class="italic">fixed</span> and <span class="italic">free</span> variables.  During a given iteration, the fixed variables are effectively removed from the problem; since the relevant elements of the search direction are zero, the columns of <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction></m:math>&#160;corresponding to fixed variables may be ignored.</div><div class="paramtext">Let <m:math><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">W</m:mi></m:msub></m:math>&#160;denote the number of general constraints in the working set and let <m:math><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FX</m:mi></m:msub></m:math>&#160;denote the number of variables fixed at one of their bounds (<m:math><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">W</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FX</m:mi></m:msub></m:math>&#160;are the quantities <span class="mono">Lin</span> and <span class="mono">Bnd</span> in the monitoring file output from E04NCF/E04NCA; see <a class="sec" href="#monitoring">Section 12</a>).  Similarly, let <m:math><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><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;denote the number of free variables.  At every iteration, <span class="italic">the variables are reordered so that the last</span>
<m:math><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FX</m:mi></m:msub></m:math>&#160;<span class="italic">variables are fixed,</span> with all other relevant vectors and matrices ordered accordingly.  The order of the variables is indicated by the contents of the array <a class="arg" href="#KX">KX</a> on exit (see <a class="sec" href="#parameters">Section 5</a>).</div><h3 class="standard"><a class="sec" name="ad-search" id="ad-search"/>10.2&#160;&#160;Definition of Search Direction</h3>
<div class="paramtext">Let <m:math><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;denote the <m:math><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">W</m:mi></m:msub></m:math>&#160;by <m:math><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;sub-matrix of general constraints in the working set corresponding to the free variables, and let <m:math><m:msub><m:mi>p</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;denote the search direction with respect to the free variables only.  The general constraints in the working set will be unaltered by any move along <m:math><m:mi>p</m:mi></m:math>&#160;if

<div class="formula-eqn"><a name="eqn3" id="eqn3"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><m:msub><m:mi>p</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">
      (3)
     </td></tr></table></div>

In order to compute <m:math><m:msub><m:mi>p</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>, the <m:math><m:mi>T</m:mi><m:mi>Q</m:mi></m:math>&#160;<span class="italic">factorization</span> of <m:math><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;is used:

<div class="formula-eqn"><a name="eqn4" id="eqn4"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><m:msub><m:mi>Q</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><m:mo>=</m:mo><m:mfenced separators=""><m:mn>0</m:mn><m:mtext>&#8195;</m:mtext><m:mi>T</m:mi></m:mfenced>
</m:math></td><td class="formula-eqn2">
      (4)
     </td></tr></table></div>

where <m:math><m:mi>T</m:mi></m:math>&#160;is a nonsingular <m:math><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">W</m:mi></m:msub></m:math>&#160;by <m:math><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">W</m:mi></m:msub></m:math>&#160;reverse-triangular matrix (i.e., <m:math><m:msub><m:mi>t</m:mi><m:mrow><m:mi>i</m:mi><m:mi>j</m:mi></m:mrow></m:msub><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;if <m:math><m:mi>i</m:mi><m:mo>+</m:mo><m:mi>j</m:mi><m:mo>&lt;</m:mo><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">W</m:mi></m:msub></m:math>), and the nonsingular <m:math><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;by <m:math><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;matrix <m:math><m:msub><m:mi>Q</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;is the product of orthogonal transformations (see <a class="ref" href="#ref090">Gill <span class="italic">et al.</span> (1984)</a>).  If the columns of <m:math><m:msub><m:mi>Q</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;are partitioned so that

<div class="formula-eqn"><a name="eqn5" id="eqn5"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:msub><m:mi>Q</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><m:mo>=</m:mo><m:mfenced separators=""><m:mi>Z</m:mi><m:mtext>&#8195;</m:mtext><m:mi>Y</m:mi></m:mfenced><m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (5)
     </td></tr></table></div>

where <m:math><m:mi>Y</m:mi></m:math>&#160;is <m:math><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;by <m:math><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">W</m:mi></m:msub></m:math>, then the <m:math><m:msub><m:mi>n</m:mi><m:mi>Z</m:mi></m:msub><m:mfenced separators=""><m:msub><m:mi>n</m:mi><m:mi>Z</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><m:mo>-</m:mo><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">W</m:mi></m:msub></m:mfenced></m:math>&#160;columns of <m:math><m:mi>Z</m:mi></m:math>&#160;form a basis for the null space of <m:math><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>.  Let <m:math><m:msub><m:mi>n</m:mi><m:mi>R</m:mi></m:msub></m:math>&#160;be an integer such that <m:math><m:mn>0</m:mn><m:mo>&#8804;</m:mo><m:msub><m:mi>n</m:mi><m:mi>R</m:mi></m:msub><m:mo>&#8804;</m:mo><m:msub><m:mi>n</m:mi><m:mi>Z</m:mi></m:msub></m:math>, and let <m:math><m:msub><m:mi>Z</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;denote a matrix whose <m:math><m:msub><m:mi>n</m:mi><m:mi>R</m:mi></m:msub></m:math>&#160;columns are a subset of the columns of <m:math><m:mi>Z</m:mi></m:math>.  (The integer <m:math><m:msub><m:mi>n</m:mi><m:mi>R</m:mi></m:msub></m:math>&#160;is the quantity <span class="mono">Zr</span> in the monitoring file output from E04NCF/E04NCA.  In many cases, <m:math><m:msub><m:mi>Z</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;will include <span class="italic">all</span> the columns of <m:math><m:mi>Z</m:mi></m:math>.)  The direction <m:math><m:msub><m:mi>p</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;will satisfy <a class="eqn" href="#eqn3">(3)</a> if

<div class="formula-eqn"><a name="eqn6" id="eqn6"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:msub><m:mi>p</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>Z</m:mi><m:mn>1</m:mn></m:msub><m:msub><m:mi>p</m:mi><m:mi>Z</m:mi></m:msub>
</m:math></td><td class="formula-eqn2">
      (6)
     </td></tr></table></div>

where <m:math><m:msub><m:mi>p</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;is any <m:math><m:msub><m:mi>n</m:mi><m:mi>R</m:mi></m:msub></m:math>-vector.</div><h3 class="standard"><a class="sec" name="ad-mainiteration" id="ad-mainiteration"/>10.3&#160;&#160;Main Iteration</h3>
<div class="paramtext">Let <m:math><m:mi>Q</m:mi></m:math>&#160;denote the <m:math><m:mi>n</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;matrix

<div class="formula-eqn"><a name="eqn7" id="eqn7"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:mi>Q</m:mi><m:mo>=</m:mo>
 <m:mfenced><m:mtable>
  <m:mtr>
   <m:mtd><m:msub><m:mi>Q</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:mtd>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd/>
   <m:mtd><m:msub><m:mi>I</m:mi><m:mi mathvariant="normal">FX</m:mi></m:msub></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
<m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (7)
     </td></tr></table></div>

where <m:math><m:msub><m:mi>I</m:mi><m:mi mathvariant="normal">FX</m:mi></m:msub></m:math>&#160;is the identity matrix of order <m:math><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FX</m:mi></m:msub></m:math>.  Let <m:math><m:mi>R</m:mi></m:math>&#160;denote an <m:math><m:mi>n</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;upper triangular matrix (the <span class="italic">Cholesky factor</span>) such that

<div class="formula-eqn"><a name="eqn8" id="eqn8"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:msup><m:mi>R</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>R</m:mi><m:mo>=</m:mo><m:msub><m:mi>H</m:mi><m:mi>Q</m:mi></m:msub><m:mo>&#8801;</m:mo><m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mover><m:mi>H</m:mi><m:mo>~</m:mo></m:mover><m:mi>Q</m:mi><m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (8)
     </td></tr></table></div>

where <m:math><m:mover><m:mi>H</m:mi><m:mo>~</m:mo></m:mover></m:math>&#160;is the Hessian <m:math><m:mi>H</m:mi></m:math>&#160;with rows and columns permuted so that the free variables are first.</div><div class="paramtext">Let the matrix of the first <m:math><m:msub><m:mi>n</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;rows and columns of <m:math><m:mi>R</m:mi></m:math>&#160;be denoted by <m:math><m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub></m:math>.  The definition of <m:math><m:msub><m:mi>p</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;in <a class="eqn" href="#eqn6">(6)</a> depends on whether or not the matrix <m:math><m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;is singular at <m:math><m:mi>x</m:mi></m:math>.  In the nonsingular case, <m:math><m:msub><m:mi>p</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;satisfies the equations

<div class="formula-eqn"><a name="eqn9" id="eqn9"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
 <m:msubsup><m:mi>R</m:mi><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub>
 <m:msub><m:mi>p</m:mi><m:mi>Z</m:mi></m:msub>
 <m:mo>=</m:mo>
 <m:mo>-</m:mo>
 <m:msub><m:mi>g</m:mi><m:mi>Z</m:mi></m:msub>
 </m:math></td><td class="formula-eqn2">
      (9)
     </td></tr></table></div>

where <m:math><m:msub><m:mi>g</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;denotes the vector <m:math><m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:msub><m:mi>g</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;and <m:math><m:mi>g</m:mi></m:math>&#160;denotes the objective gradient.  (The norm of <m:math><m:msub><m:mi>g</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;is the printed quantity <span class="mono">Norm Gf</span>; see <a class="sec" href="#monitoring">Section 12</a>.)  When <m:math><m:msub><m:mi>p</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;is defined by <a class="eqn" href="#eqn9">(9)</a>, <m:math><m:mi>x</m:mi><m:mo>+</m:mo><m:mi>p</m:mi></m:math>&#160;is the minimizer of the objective function subject to the constraints (bounds and general) in the working set treated as equalities.  In general, a vector <m:math><m:msub><m:mi>f</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;is available such that <m:math>
 <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>f</m:mi><m:mi>Z</m:mi></m:msub>
 <m:mo>=</m:mo>
 <m:mo>-</m:mo>
 <m:msub><m:mi>g</m:mi><m:mi>Z</m:mi></m:msub>
</m:math>, which allows <m:math><m:msub><m:mi>p</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;to be computed from a single back-substitution <m:math><m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub><m:msub><m:mi>p</m:mi><m:mi>Z</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>f</m:mi><m:mi>Z</m:mi></m:msub></m:math>.  For example, when solving problem LS1, <m:math><m:msub><m:mi>f</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;comprises the first <m:math><m:msub><m:mi>n</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;elements of the <span class="italic">transformed residual vector</span><div class="formula-eqn"><a name="eqn10" id="eqn10"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:mi>f</m:mi><m:mo>=</m:mo><m:mi>P</m:mi><m:mfenced separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>A</m:mi><m:mi>x</m:mi></m:mfenced><m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (10)
     </td></tr></table></div>

which is recurred from one iteration to the next, where <m:math><m:mi>P</m:mi></m:math>&#160;is an orthogonal matrix.</div><div class="paramtext">In the singular case, <m:math><m:msub><m:mi>p</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;is defined such that

<div class="formula-eqn"><a name="eqn11" id="eqn11"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
 <m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub>
 <m:msub><m:mi>p</m:mi><m:mi>Z</m:mi></m:msub>
 <m:mo>=</m:mo>
 <m:mn>0</m:mn>
 <m:mtext>&#8195; and &#8195;</m:mtext>
 <m:msubsup><m:mi>g</m:mi><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:msub><m:mi>p</m:mi><m:mi>Z</m:mi></m:msub>
 <m:mo>&lt;</m:mo>
 <m:mn>0</m:mn>
 <m:mtext>.</m:mtext>
</m:math></td><td class="formula-eqn2">
      (11)
     </td></tr></table></div>

This vector has the property that the objective function is linear along <m:math><m:mi>p</m:mi></m:math>&#160;and may be reduced by any step of the form <m:math><m:mi>x</m:mi><m:mo>+</m:mo><m:mi>&#945;</m:mi><m:mi>p</m:mi></m:math>, where <m:math><m:mi>&#945;</m:mi><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>.</div><div class="paramtext">The vector <m:math><m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:msub><m:mi>g</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;is known as the <span class="italic">projected gradient</span> at <m:math><m:mi>x</m:mi></m:math>.  If the projected gradient is zero, <m:math><m:mi>x</m:mi></m:math>&#160;is a constrained stationary point in the subspace defined by <m:math><m:mi>Z</m:mi></m:math>.  During the feasibility phase, the projected gradient will usually be zero only at a vertex (although it may be zero at non-vertices in the presence of constraint dependencies).  During the optimality phase, a zero projected gradient implies that <m:math><m:mi>x</m:mi></m:math>&#160;minimizes the quadratic objective when the constraints in the working set are treated as equalities.  At a constrained stationary point, Lagrange multipliers <m:math><m:msub><m:mi>&#955;</m:mi><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>&#955;</m:mi><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction></m:msub></m:math>&#160;for the general and bound constraints are defined from the equations

<div class="formula-eqn"><a name="eqn12" id="eqn12"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:msubsup><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup><m:msub><m:mi>&#955;</m:mi><m:mi>C</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>g</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><m:mtext>and &#8203;</m:mtext><m:msub><m:mi>&#955;</m:mi><m:mi>B</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>g</m:mi><m:mi mathvariant="normal">FX</m:mi></m:msub><m:mo>-</m:mo><m:msubsup><m:mi>C</m:mi><m:mi mathvariant="normal">FX</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup><m:msub><m:mi>&#955;</m:mi><m:mi>C</m:mi></m:msub><m:mtext>.</m:mtext>
</m:math></td><td class="formula-eqn2">
      (12)
     </td></tr></table></div>

Given a positive constant <m:math><m:mi>&#948;</m:mi></m:math>&#160;of the order of the <span class="bitalic">machine precision</span>, the Lagrange multiplier <m:math><m:msub><m:mi>&#955;</m:mi><m:mi>j</m:mi></m:msub></m:math>&#160;corresponding to an inequality constraint in the working set is said to be <span class="italic">optimal</span> if <m:math><m:msub><m:mi>&#955;</m:mi><m:mi>j</m:mi></m:msub><m:mo>&#8804;</m:mo><m:mi>&#948;</m:mi></m:math>&#160;when the associated constraint is at its <span class="italic">upper bound</span>, or if <m:math><m:msub><m:mi>&#955;</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 a multiplier is nonoptimal, the objective function (either the true objective or the sum of infeasibilities) can be reduced by deleting the corresponding constraint (with index <span class="mono">Jdel</span>; see <a class="sec" href="#monitoring">Section 12</a>) from the working set.</div><div class="paramtext">If optimal multipliers occur during the feasibility phase and the sum of infeasibilities is nonzero, there is no feasible point, and E04NCF/E04NCA will continue until the minimum value of the sum of infeasibilities has been found.  At this point, the Lagrange multiplier <m:math><m:msub><m:mi>&#955;</m:mi><m:mi>j</m:mi></m:msub></m:math>&#160;corresponding to an inequality constraint in the working set will be such that <m:math><m:mrow><m:mo>-</m:mo><m:mfenced separators=""><m:mn>1</m:mn><m:mo>+</m:mo><m:mi>&#948;</m:mi></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:msub><m:mi>&#955;</m:mi><m:mi>j</m:mi></m:msub><m:mo>&#8804;</m:mo><m:mi>&#948;</m:mi></m:math>&#160;when the associated constraint is at its <span class="italic">upper bound</span>, and <m:math><m:mrow><m:mo>-</m:mo><m:mi>&#948;</m:mi></m:mrow><m:mo>&#8804;</m:mo><m:msub><m:mi>&#955;</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;when the associated constraint is at its <span class="italic">lower bound</span>.  Lagrange multipliers for equality constraints will satisfy <m:math><m:mfenced open="|" close="|" separators=""><m:msub><m:mi>&#955;</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 is based on remaining feasible with respect to the satisfied constraints.  If <m:math><m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;is nonsingular and <m:math><m:mi>x</m:mi><m:mo>+</m:mo><m:mi>p</m:mi></m:math>&#160;is feasible, <m:math><m:mi>&#945;</m:mi></m:math>&#160;will be taken as unity.  In this case, the projected gradient at <m:math><m:mover><m:mi>x</m:mi><m:mo>-</m:mo></m:mover></m:math>&#160;will be zero, and Lagrange multipliers are computed.  Otherwise, <m:math><m:mi>&#945;</m:mi></m:math>&#160;is set to <m:math><m:msub><m:mi>&#945;</m:mi><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction></m:msub></m:math>, the step to the &#8216;nearest&#8217; constraint (with index <span class="mono">Jadd</span>; see <a class="sec" href="#monitoring">Section 12</a>), which is added to the working set at the next iteration.</div><div class="paramtext">If <m:math><m:mi>A</m:mi></m:math>&#160;is not input as a triangular matrix, it is overwritten by a triangular matrix <m:math><m:mi>R</m:mi></m:math>&#160;satisfying <a class="eqn" href="#eqn8">(8)</a> obtained using the Cholesky factorization in the QP case, or the <m:math><m:mi>Q</m:mi><m:mi>R</m:mi></m:math>&#160;factorization in the LS case.  Column interchanges are used in both cases, and an estimate is made of the rank of the triangular factor.  Thereafter, the dependent rows of <m:math><m:mi>R</m:mi></m:math>&#160;are eliminated from the problem.</div><div class="paramtext">Each change in the working set leads to a simple change to <m:math><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>: if the status of a general constraint changes, a <span class="italic">row</span> of <m:math><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;is altered; if a bound constraint enters or leaves the working set, a <span class="italic">column</span> of <m:math><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;changes.  Explicit representations are recurred of the matrices <m:math><m:mi>T</m:mi><m:mo>,</m:mo><m:msub><m:mi>Q</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;and <m:math><m:mi>R</m:mi></m:math>; and of vectors <m:math><m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>g</m:mi></m:math>, <m:math><m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>c</m:mi></m:math>&#160;and <m:math><m:mi>f</m:mi></m:math>, which are related by the formulae

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:mi>f</m:mi><m:mo>=</m:mo><m:mi>P</m:mi><m:mi>b</m:mi><m:mo>-</m:mo>
  <m:mfenced><m:mtable>
   <m:mtr>
    <m:mtd><m:mi>R</m:mi></m:mtd>
   </m:mtr><m:mtr>
    <m:mtd><m:mn>0</m:mn></m:mtd>
   </m:mtr>
  </m:mtable></m:mfenced>
 <m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>x</m:mi>
 <m:mtext>, &#8195;</m:mtext>
 <m:mfenced separators="">
  <m:mi>b</m:mi><m:mo>&#8801;</m:mo><m:mn>0</m:mn>
  <m:mtext>for the &#8203;</m:mtext>
  <m:mi>Q</m:mi><m:mi>P</m:mi>
  <m:mtext>&#8203; case</m:mtext>
 </m:mfenced>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

and

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>g</m:mi><m:mo>=</m:mo><m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>c</m:mi><m:mo>-</m:mo><m:msup><m:mi>R</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>f</m:mi><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

Note that the triangular factor <m:math><m:mi>R</m:mi></m:math>&#160;associated with the Hessian of the original problem is updated during both the optimality <span class="italic">and</span> the feasibility phases.</div><div class="paramtext">The treatment of the singular case depends critically on the following feature of the matrix updating schemes used in E04NCF/E04NCA: if a given factor <m:math><m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;is nonsingular, it can become singular during subsequent iterations only when a constraint leaves the working set, in which case only its last diagonal element can become zero.  This property implies that a vector satisfying <a class="eqn" href="#eqn11">(11)</a> may be found using the single back-substitution <m:math><m:msub><m:mover><m:mi>R</m:mi><m:mo>-</m:mo></m:mover><m:mi>Z</m:mi></m:msub><m:msub><m:mi>p</m:mi><m:mi>Z</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>e</m:mi><m:mi>Z</m:mi></m:msub></m:math>, where <m:math><m:msub><m:mover><m:mi>R</m:mi><m:mo>-</m:mo></m:mover><m:mi>Z</m:mi></m:msub></m:math>&#160;is the matrix <m:math><m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;with a unit last diagonal, and <m:math><m:msub><m:mi>e</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;is a vector of all zeros except in the last position.  If <m:math><m:mi>H</m:mi></m:math>&#160;is singular, the matrix <m:math><m:mi>R</m:mi></m:math>&#160;(and hence <m:math><m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub></m:math>) may be singular at the start of the optimality phase.  However, <m:math><m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;will be nonsingular if enough constraints are included in the initial working set.  (The matrix with no rows and columns is positive-definite by definition, corresponding to the case when <m:math><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;contains <m:math><m:msub><m:mi>n</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;constraints.)  The idea is to include as many general constraints as necessary to ensure a nonsingular <m:math><m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub></m:math>.</div><div class="paramtext">At the beginning of each phase, an upper triangular matrix <m:math><m:msub><m:mi>R</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;is determined that is the largest nonsingular leading sub-matrix of <m:math><m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub></m:math>.  The use of interchanges during the factorization of <m:math><m:mi>A</m:mi></m:math>&#160;tends to maximize the dimension of <m:math><m:msub><m:mi>R</m:mi><m:mn>1</m:mn></m:msub></m:math>.  (The rank of <m:math><m:msub><m:mi>R</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;is estimated using the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_ranktolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Rank Tolerance</m:mi></m:maction></m:math>.)  Let <m:math><m:msub><m:mi>Z</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;denote the columns of <m:math><m:mi>Z</m:mi></m:math>&#160;corresponding to <m:math><m:msub><m:mi>R</m:mi><m:mn>1</m:mn></m:msub></m:math>, and let <m:math><m:mi>Z</m:mi></m:math>&#160;be partitioned as <m:math><m:mi>Z</m:mi><m:mo>=</m:mo><m:mfenced separators=""><m:msub><m:mi>Z</m:mi><m:mn>1</m:mn></m:msub><m:mtext>&#8195;</m:mtext><m:msub><m:mi>Z</m:mi><m:mn>2</m:mn></m:msub></m:mfenced></m:math>.  A working set for which <m:math><m:msub><m:mi>Z</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;defines the null space can be obtained by including <span class="italic">the rows of</span> <m:math>
 <m:msubsup><m:mi>Z</m:mi><m:mn>2</m:mn><m:mi mathvariant="normal">T</m:mi></m:msubsup>
</m:math>&#160;as &#8216;artificial constraints&#8217;.  Minimization of the objective function then proceeds within the subspace defined by <m:math><m:msub><m:mi>Z</m:mi><m:mn>1</m:mn></m:msub></m:math>.</div><div class="paramtext">The artificially augmented working set is given by

<div class="formula-eqn"><a name="eqn13" id="eqn13"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:msub><m:mover><m:mi>C</m:mi><m:mo>-</m:mo></m:mover><m:mi mathvariant="normal">FR</m:mi></m:msub><m:mo>=</m:mo>
 <m:mfenced><m:mtable>
  <m:mtr>
   <m:mtd><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:msubsup><m:mi>Z</m:mi><m:mn>2</m:mn><m:mi mathvariant="normal">T</m:mi></m:msubsup></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
<m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (13)
     </td></tr></table></div>


so that <m:math><m:msub><m:mi>p</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;will satisfy <m:math><m:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><m:msub><m:mi>p</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;and <m:math>
 <m:msubsup><m:mi>Z</m:mi><m:mn>2</m:mn><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:msub><m:mi>p</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub>
 <m:mo>=</m:mo>
 <m:mn>0</m:mn>
</m:math>.  By definition of the <m:math><m:mi>T</m:mi><m:mi>Q</m:mi></m:math>&#160;factorization,
<m:math><m:msub><m:mover><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>-</m:mo></m:mover><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>&#160;<span class="italic">automatically</span> satisfies the following:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msub><m:mover><m:mi>C</m:mi><m:mo>-</m:mo></m:mover><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:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:msubsup><m:mi>Z</m:mi><m:mn>2</m:mn><m:mi mathvariant="normal">T</m:mi></m:msubsup></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
<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:msub><m:mi>C</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:msubsup><m:mi>Z</m:mi><m:mn>2</m:mn><m:mi mathvariant="normal">T</m:mi></m:msubsup></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
 <m:mfenced><m:mtable>
  <m:mtr>
   <m:mtd><m:msub><m:mi>Z</m:mi><m:mn>1</m:mn></m:msub></m:mtd>
   <m:mtd><m:msub><m:mi>Z</m:mi><m:mn>2</m:mn></m:msub></m:mtd>
   <m:mtd><m:mi>Y</m:mi></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
 <m:mo>=</m:mo>
 <m:mfenced><m:mtable>
  <m:mtr>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mover><m:mi>T</m:mi><m:mo>-</m:mo></m:mover></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
<m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

where

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mover><m:mi>T</m:mi><m:mo>-</m:mo></m:mover><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:mtr>
   <m:mtd><m:mi>I</m:mi></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
<m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

and hence the <m:math><m:mi>T</m:mi><m:mi>Q</m:mi></m:math>&#160;factorization of <a class="eqn" href="#eqn13">(13)</a> requires no additional work.</div><div class="paramtext">The matrix <m:math><m:msub><m:mi>Z</m:mi><m:mn>2</m:mn></m:msub></m:math>&#160;need not be kept fixed, since its role is purely to define an appropriate null space; the <m:math><m:mi>T</m:mi><m:mi>Q</m:mi></m:math>&#160;factorization can therefore be updated in the normal fashion as the iterations proceed.  No work is required to &#8216;delete&#8217; the artificial constraints associated with <m:math><m:msub><m:mi>Z</m:mi><m:mn>2</m:mn></m:msub></m:math>&#160;when <m:math>
 <m:msubsup><m:mi>Z</m:mi><m:mn>1</m:mn><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <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:math>, since this simply involves repartitioning <m:math><m:msub><m:mi>Q</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub></m:math>.  When deciding which constraint to delete, the &#8216;artificial&#8217; multiplier vector associated with the rows of <m:math>
 <m:msubsup><m:mi>Z</m:mi><m:mn>2</m:mn><m:mi mathvariant="normal">T</m:mi></m:msubsup>
</m:math>&#160;is equal to <m:math>
 <m:msubsup><m:mi>Z</m:mi><m:mn>2</m:mn><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:msub><m:mi>g</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub>
</m:math>, and the multipliers corresponding to the rows of the &#8216;true&#8217; working set are the multipliers that would be obtained if the temporary constraints were not present.</div><div class="paramtext">The number of columns in <m:math><m:msub><m:mi>Z</m:mi><m:mn>2</m:mn></m:msub></m:math>&#160;and <m:math>
 <m:msub><m:mi>Z</m:mi><m:mn>1</m:mn></m:msub>
</m:math>, the Euclidean norm of <m:math>
 <m:msubsup><m:mi>Z</m:mi><m:mn>1</m:mn><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:msub><m:mi>g</m:mi><m:mi mathvariant="normal">FR</m:mi></m:msub>
</m:math>, and the condition estimator of <m:math><m:msub><m:mi>R</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;appear in the monitoring file output as <span class="mono">Art</span>, <span class="mono">Zr</span>, <span class="mono">Norm Gz</span> and <span class="mono">Cond Rz</span> respectively (see <a class="sec" href="#monitoring">Section 12</a>).</div><div class="paramtext">Although the algorithm of E04NCF/E04NCA does not perform simplex steps in general, there is one exception: a linear program with fewer general constraints than variables (i.e., <m:math><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub><m:mo>&#8804;</m:mo><m:mi>n</m:mi></m:math>).  Use of the simplex method in this situation leads to savings in storage.  At the starting point, the &#8216;natural&#8217; working set (the set of constraints exactly or nearly satisfied at the starting point) is augmented with a suitable number of &#8216;temporary&#8217; bounds, each of which has the effect of temporarily fixing a variable at its current value.  In subsequent iterations, a temporary bound is treated as a standard constraint until it is deleted from the working set, in which case it is never added again.</div><div class="paramtext">One of the most important features of E04NCF/E04NCA is its control of the conditioning of the working set, whose nearness to linear dependence is estimated by the ratio of the largest to smallest diagonals of the <m:math><m:mi>T</m:mi><m:mi>Q</m:mi></m:math>&#160;factor <m:math><m:mi>T</m:mi></m:math>&#160;(the printed value <span class="mono">Cond T</span>; see <a class="sec" href="#monitoring">Section 12</a>).  In constructing the initial working set, constraints are excluded that would result in a large value of <span class="mono">Cond T</span>.  Thereafter, E04NCF/E04NCA allows constraints to be violated by as much as a user-specified optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_feasibilitytolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Feasibility Tolerance</m:mi></m:maction></m:math>&#160;in order to provide, whenever possible, a <span class="italic">choice</span> of constraints to be added to the working set at a given iteration.  Let <m:math><m:msub><m:mi>&#945;</m:mi><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction></m:msub></m:math>&#160;denote the maximum step at which <m:math><m:mi>x</m:mi><m:mo>+</m:mo><m:msub><m:mi>&#945;</m:mi><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction></m:msub><m:mi>p</m:mi></m:math>&#160;does not violate any constraint by more than its feasibility tolerance.  All constraints at distance <m:math><m:mi>&#945;</m:mi><m:mfenced separators=""><m:mi>&#945;</m:mi><m:mo>&#8804;</m:mo><m:msub><m:mi>&#945;</m:mi><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction></m:msub></m:mfenced></m:math>&#160;along <m:math><m:mi>p</m:mi></m:math>&#160;from the current point are then viewed as acceptable candidates for inclusion in the working set.  The constraint whose normal makes the largest angle with the search direction is added to the working set.  In order to ensure that the new iterate satisfies the constraints in the working set as accurately as possible, the step taken is the exact distance to the newly added constraint.  As a consequence, negative steps are occasionally permitted, since the current iterate may violate the constraint to be added by as much as the feasibility tolerance.</div><h2 class="standard"><a class="sec" name="optparams" id="optparams"/>11&#160;&#160;Optional Parameters</h2>
<div class="paramtext">Several optional parameters in E04NCF/E04NCA define choices in the problem specification or the algorithm logic.  In order to reduce the number of formal parameters of E04NCF/E04NCA 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 wish to use the default values for all optional parameters.  A complete list of optional parameters and their default values is given in <a class="sec" href="#op-checklist">Section 11.1</a>.</div><div class="paramtext">Optional parameters may be specified by calling one, or both, of the routines <a class="rout" href="../E04/e04ndf.xml">E04NDF/E04NDA</a> and <a class="rout" href="../E04/e04nef.xml">E04NEF/E04NEA</a> before a call to E04NCF/E04NCA.</div><div class="paramtext"><a class="rout" href="../E04/e04ndf.xml">E04NDF/E04NDA</a> reads options from an external options file, with <span class="mono">Begin</span> and <span class="mono">End</span> as the first and last lines respectively and each intermediate line defining a single optional parameter.  For example,
<pre class="verbatim">
Begin  
  Print level = 1  
End
</pre>
</div><div class="paramtext">The call
<pre class="verbatim">
 CALL E04NDF (IOPTNS, INFORM)
</pre>
can then be used to read the file on unit <a class="arg" href="../E04/e04ndf.xml#IOPTNS">IOPTNS</a>. <a class="arg" href="../E04/e04ndf.xml#INFORM">INFORM</a> will be zero on successful exit.  <a class="rout" href="../E04/e04ndf.xml">E04NDF/E04NDA</a> should be consulted for a full description of this method of supplying optional parameters.</div><div class="paramtext"><a class="rout" href="../E04/e04nef.xml">E04NEF/E04NEA</a> can be called to supply options directly, one call being necessary for each optional parameter.  For example,
<pre class="verbatim">
 CALL E04NEF ('Print Level = 1')
</pre><a class="rout" href="../E04/e04nef.xml">E04NEF/E04NEA</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 E04NCF/E04NCA (unless they define invalid values) and so remain in effect for subsequent calls unless altered by you.</div><h3 class="standard"><a class="sec" name="op-checklist" id="op-checklist"/>11.1&#160;&#160;Optional Parameter Checklist and Default Values</h3>
<div class="paramtext">
The following list gives the valid options.  For each option, we give the keyword, any essential optional qualifiers and the default value.  A description for each option can be found in <a class="sec" href="#op-description">Section 11.2</a>, where the minimum abbreviation of each keyword is underlined (if no characters of an optional qualifier are underlined, the qualifier may be omitted), the letter <span class="italic">a</span> denotes a phrase (character string) that qualifies an option, the letters <m:math><m:mi>i</m:mi></m:math>&#160;and <m:math><m:mi>r</m:mi></m:math>&#160;denote INTEGER and <span class="bitalic">double precision</span> values required with certain options, and the number <m:math><m:mi>&#949;</m:mi></m:math>&#160;is a generic notation for <span class="bitalic">machine precision</span> (see <a class="rout" href="../X02/x02ajf.xml">X02AJF</a>).</div><div class="left-tablediv"><table class="optparam"><tbody>
<tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><b>Optional Parameter</b></td><td class="libdoc" valign="top" align="left"><b>Default&#160;Value</b></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04ncf.xml#optparam_coldstart">Cold Start</a></td>
<td class="libdoc" valign="top" align="left">Default</td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04ncf.xml#optparam_crashtolerance">Crash Tolerance</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>0.01</m:mn></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04ncf.xml#optparam_defaults">Defaults</a></td>
<td class="libdoc" valign="top" align="left">&#160;</td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04ncf.xml#optparam_feasibility-pi-limit">Feasibility Phase Iteration Limit</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>50</m:mn><m:mo>,</m:mo><m:mrow><m:mn>5</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:mrow></m:mfenced></m:mrow></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04ncf.xml#optparam_feasibilitytolerance">Feasibility Tolerance</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04ncf.xml#optparam_hessian">Hessian</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mi mathvariant="normal">No</m:mi></m:math>&#160;</td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04ncf.xml#optparam_infiniteboundsize">Infinite Bound Size</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:msup><m:mn>10</m:mn><m:mn>20</m:mn></m:msup></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04ncf.xml#optparam_infinitestepsize">Infinite Step Size</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mi mathvariant="italic">bigbnd</m:mi><m:mo>,</m:mo><m:msup><m:mn>10</m:mn><m:mn>20</m:mn></m:msup></m:mfenced></m:mrow></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04ncf.xml#optparam_iterationlimit">Iteration Limit</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>50</m:mn><m:mo>,</m:mo><m:mrow><m:mn>5</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:mrow></m:mfenced></m:mrow></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04ncf.xml#optparam_iters">Iters</a></td>
<td class="libdoc" valign="top" align="left"/>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04ncf.xml#optparam_itns">Itns</a></td>
<td class="libdoc" valign="top" align="left"/>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04ncf.xml#optparam_list">List</a></td>
<td class="libdoc" valign="top" align="left">Default for <m:math><m:mi mathvariant="normal">E04NCF</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_list"><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="optparam" href="../E04/e04ncf.xml#optparam_monitoringfile">Monitoring File</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04ncf.xml#optparam_nolist">Nolist</a></td>
<td class="libdoc" valign="top" align="left">Default for <m:math><m:mi mathvariant="normal">E04NCA</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_nolist"><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="optparam" href="../E04/e04ncf.xml#optparam_optimality-pi-limit">Optimality Phase Iteration Limit</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>50</m:mn><m:mo>,</m:mo><m:mrow><m:mn>5</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:mrow></m:mfenced></m:mrow></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04ncf.xml#optparam_printlevel">Print Level</a></td>
<td class="libdoc" valign="top" align="left">Default for E04NCF
<m:math><m:mtext/><m:mo>=</m:mo><m:mn>10</m:mn></m:math><br/>
Default for E04NCA
<m:math><m:mtext/><m:mo>=</m:mo><m:mn>0</m:mn></m:math></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04ncf.xml#optparam_problemtype">Problem Type</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mo>=</m:mo></m:math>&#160;LS1</td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04ncf.xml#optparam_ranktolerance">Rank Tolerance</a></td>
<td class="libdoc" valign="top" align="left">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>100</m:mn><m:mi>&#949;</m:mi></m:math>&#160;or <m:math><m:mn>10</m:mn><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math>&#160;(see below)</td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:19.5em;"><a class="optparam" href="../E04/e04ncf.xml#optparam_warmstart">Warm Start</a></td>
<td class="libdoc" valign="top" align="left"/>
</tr>
</tbody>
</table></div><h3 class="standard"><a class="sec" name="op-description" id="op-description"/>11.2&#160;&#160;Description of the Optional Parameters</h3><table class="optparam"><tr><td class="optparam-left"><a name="optparam_coldstart" id="coldstart"/><b><span class="u">Co</span>ld Start</b></td><td class="optparam-center"/><td class="optparam-right">Default</td></tr></table>
<table class="multi-optparam"><tr><td class="optparam-left"><a name="optparam_warmstart" id="warmstart"/><b><span class="u">W</span>arm Start</b></td><td class="optparam-center"/><td class="optparam-right"/></tr></table><div class="paramtext">This option specifies how the initial working set is chosen.  With a <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_coldstart"><m:mi mathcolor="#800080;" mathvariant="bold">Cold Start</m:mi></m:maction></m:math>, E04NCF/E04NCA chooses the initial working set based on the values of the variables and constraints at the initial point.  Broadly speaking, the initial working set will include equality constraints and bounds or inequality constraints that violate or &#8216;nearly&#8217; satisfy their bounds (to within <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_crashtolerance"><m:mi mathcolor="#800080;" mathvariant="bold">Crash Tolerance</m:mi></m:maction></m:math>).</div>
<div class="paramtext">With a <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_warmstart"><m:mi mathcolor="#800080;" mathvariant="bold">Warm Start</m:mi></m:maction></m:math>, you must provide a valid definition of every element of the array <a class="arg" href="#ISTATE">ISTATE</a>.  E04NCF/E04NCA will override your specification of <a class="arg" href="#ISTATE">ISTATE</a> if necessary, so that a poor choice of the working set will not cause a fatal error.  For instance, any elements of <a class="arg" href="#ISTATE">ISTATE</a> which are set to <m:math><m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow></m:math>, <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>4</m:mn></m:math>&#160;will be reset to zero, as will any elements which are set to <m:math><m:mn>3</m:mn></m:math>&#160;when the corresponding elements of <a class="arg" href="#BL">BL</a> and <a class="arg" href="#BU">BU</a> are not equal.  A warm start will be advantageous if a good estimate of the initial working set is available &#8211; for example, when E04NCF/E04NCA is called repeatedly to solve related problems.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_crashtolerance" id="crashtolerance"/><b><span class="u">Cr</span>ash Tolerance</b></td><td class="optparam-center"><i>r</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>0.01</m:mn></m:math></td></tr></table><div class="paramtext">This value is used in conjunction with the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_coldstart"><m:mi mathcolor="#800080;" mathvariant="bold">Cold Start</m:mi></m:maction></m:math>&#160;(the default value) when E04NCF/E04NCA selects an initial working set.  If <m:math><m:mn>0</m:mn><m:mo>&#8804;</m:mo><m:mi>r</m:mi><m:mo>&#8804;</m:mo><m:mn>1</m:mn></m:math>, the initial working set will include (if possible) bounds or general inequality constraints that lie within <m:math><m:mi>r</m:mi></m:math>&#160;of their bounds.  In particular, a constraint of the form <m:math>
 <m:msubsup><m:mi>c</m:mi><m:mi>j</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:mi>x</m:mi><m:mo>&#8805;</m:mo><m:mi>l</m:mi>
</m:math>&#160;will be included in the initial working set if <m:math>
 <m:mfenced open="|" close="|" separators="">
  <m:msubsup><m:mi>c</m:mi><m:mi>j</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
  <m:mi>x</m:mi><m:mo>-</m:mo><m:mi>l</m:mi>
 </m:mfenced>
 <m:mo>&#8804;</m:mo>
 <m:mi>r</m:mi>
 <m:mfenced separators=""><m:mn>1</m:mn><m:mo>+</m:mo><m:mfenced open="|" close="|" separators=""><m:mi>l</m:mi></m:mfenced></m:mfenced>
</m:math>.  If <m:math><m:mi>r</m:mi><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math><m:mi>r</m:mi><m:mo>&gt;</m:mo><m:mn>1</m:mn></m:math>, the default value is used.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_defaults" id="defaults"/><b><span class="u">Defaults</span></b></td><td class="optparam-center"/><td class="optparam-right"/></tr></table><div class="paramtext">This special keyword may be used to reset all optional parameters to their default values.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_feasibility-pi-limit" id="feasibility-pi-limit"/><b><span class="u">F</span>easibility <span class="u">P</span>hase Iteration Limit</b></td><td class="optparam-center"><i>i</i><sub>1</sub></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>50</m:mn><m:mo>,</m:mo><m:mrow><m:mn>5</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:mrow></m:mfenced></m:mrow></m:math></td></tr></table>
<table class="multi-optparam"><tr><td class="optparam-left"><a name="optparam_optimality-pi-limit" id="optimality-pi-limit"/><b><span class="u">O</span>ptimality <span class="u">P</span>hase Iteration Limit</b></td><td class="optparam-center"><i>i</i><sub>2</sub></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>50</m:mn><m:mo>,</m:mo><m:mrow><m:mn>5</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:mrow></m:mfenced></m:mrow></m:math></td></tr></table><div class="paramtext">The scalars <m:math><m:msub><m:mi>i</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>i</m:mi><m:mn>2</m:mn></m:msub></m:math>&#160;specify the maximum number of iterations allowed in the feasibility and optimality phases.  Optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_optimality-pi-limit"><m:mi mathcolor="#800080;" mathvariant="bold">Optimality Phase Iteration Limit</m:mi></m:maction></m:math>&#160;is equivalent to optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_iterationlimit"><m:mi mathcolor="#800080;" mathvariant="bold">Iteration Limit</m:mi></m:maction></m:math>.  Setting <m:math><m:msub><m:mi>i</m:mi><m:mn>2</m:mn></m:msub><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_printlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Print Level</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>&#160;means that the workspace needed will be computed and printed, but no iterations will be performed.  If <m:math><m:msub><m:mi>i</m:mi><m:mn>1</m:mn></m:msub><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math><m:msub><m:mi>i</m:mi><m:mn>2</m:mn></m:msub><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>, the default value is used.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_feasibilitytolerance" id="feasibilitytolerance"/><b><span class="u">F</span>easibility <span class="u">To</span>lerance</b></td><td class="optparam-center"><i>r</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math></td></tr></table><div class="paramtext">If <m:math><m:mi>r</m:mi><m:mo>&gt;</m:mo><m:mi>&#949;</m:mi></m:math>, <m:math><m:mi>r</m:mi></m:math>&#160;defines the maximum acceptable <span class="italic">absolute</span> violation in each constraint at a &#8216;feasible&#8217; point.  For example, if the variables and the coefficients in the general constaints are of order unity, and the latter are correct to about <m:math><m:mn>6</m:mn></m:math>&#160;decimal digits, it would be appropriate to specify <m:math><m:mi>r</m:mi></m:math>&#160;as <m:math><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>6</m:mn></m:mrow></m:msup></m:math>.  If <m:math><m:mn>0</m:mn><m:mo>&#8804;</m:mo><m:mi>r</m:mi><m:mo>&lt;</m:mo><m:mi>&#949;</m:mi></m:math>, the default value is used.</div>
<div class="paramtext">Note that a &#8216;feasible solution&#8217; is a solution that satisfies the current constraints to within the tolerance <m:math><m:mi>r</m:mi></m:math>.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_hessian" id="hessian"/><b><span class="u">H</span>essian</b></td><td class="optparam-center"><b><span class="u">N</span>o</b></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mi mathvariant="normal">No</m:mi></m:math>&#160;</td></tr></table><div class="paramtext">This option controls the contents of the upper triangular matrix <m:math><m:mi>R</m:mi></m:math>&#160;(see the description of <a class="arg" href="#A">A</a> in <a class="sec" href="#parameters">Section 5</a>).  E04NCF/E04NCA works exclusively with the transformed and reordered matrix <m:math><m:msub><m:mi>H</m:mi><m:mi>Q</m:mi></m:msub></m:math>&#160;<a class="eqn" href="#eqn8">(8)</a>, and hence extra computation is required to form the Hessian itself.  If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_hessian"><m:mi mathcolor="#800080;" mathvariant="bold">Hessian</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">No</m:mi></m:math>, <a class="arg" href="#A">A</a> contains the Cholesky factor of the matrix <m:math><m:msub><m:mi>H</m:mi><m:mi>Q</m:mi></m:msub></m:math>&#160;with columns ordered as indicated by <a class="arg" href="#KX">KX</a> (see <a class="sec" href="#parameters">Section 5</a>).  If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_hessian"><m:mi mathcolor="#800080;" mathvariant="bold">Hessian</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">Yes</m:mi></m:math>, <a class="arg" href="#A">A</a> contains the Cholesky factor of the matrix <m:math><m:mi>H</m:mi></m:math>, with columns ordered as indicated by <a class="arg" href="#KX">KX</a>.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_infiniteboundsize" id="infiniteboundsize"/><b><span class="u">In</span>finite <span class="u">B</span>ound Size</b></td><td class="optparam-center"><i>r</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:msup><m:mn>10</m:mn><m:mn>20</m:mn></m:msup></m:math></td></tr></table><div class="paramtext">If <m:math><m:mi>r</m:mi><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:mi>r</m:mi></m:math>&#160;defines the &#8216;infinite&#8217; bound <m:math><m:mi mathvariant="italic">infbnd</m:mi></m:math>&#160;in the definition of the problem constraints.  Any upper bound greater than or equal to <m:math><m:mi mathvariant="italic">infbnd</m:mi></m:math>&#160;will be regarded as <m:math><m:mrow><m:mo>+</m:mo><m:mi>&#8734;</m:mi></m:mrow></m:math>&#160;(and similarly any lower bound less than or equal to <m:math><m:mrow><m:mo>-</m:mo><m:mi mathvariant="italic">infbnd</m:mi></m:mrow></m:math>&#160;will be regarded as <m:math><m:mrow><m:mo>-</m:mo><m:mi>&#8734;</m:mi></m:mrow></m:math>).  If <m:math><m:mi>r</m:mi><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>, the default value is used.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_infinitestepsize" id="infinitestepsize"/><b><span class="u">In</span>finite <span class="u">S</span>tep Size</b></td><td class="optparam-center"><i>r</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mi mathvariant="italic">bigbnd</m:mi><m:mo>,</m:mo><m:msup><m:mn>10</m:mn><m:mn>20</m:mn></m:msup></m:mfenced></m:mrow></m:math></td></tr></table><div class="paramtext">If <m:math><m:mi>r</m:mi><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:mi>r</m:mi></m:math>&#160;specifies the magnitude of the change in variables that will be considered a step to an unbounded solution.  (Note that an unbounded solution can occur only when the Hessian is singular and the objective contains an explicit linear term.) If the change in <m:math><m:mi>x</m:mi></m:math>&#160;during an iteration would exceed the value of <m:math><m:mi>r</m:mi></m:math>, the objective function is considered to be unbounded below in the feasible region.  If <m:math><m:mi>r</m:mi><m:mo>&#8804;</m:mo><m:mn>0</m:mn></m:math>, the default value is used.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_iterationlimit" id="iterationlimit"/><b><span class="u">It</span>eration Limit</b></td><td class="optparam-center"><i>i</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>50</m:mn><m:mo>,</m:mo><m:mrow><m:mn>5</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:mrow></m:mfenced></m:mrow></m:math></td></tr></table>
<table class="multi-optparam"><tr><td class="optparam-left"><a name="optparam_iters" id="iters"/><b><span class="u">It</span>ers</b></td><td class="optparam-center"/><td class="optparam-right"/></tr></table>
<table class="multi-optparam"><tr><td class="optparam-left"><a name="optparam_itns" id="itns"/><b><span class="u">It</span>ns</b></td><td class="optparam-center"/><td class="optparam-right"/></tr></table><div class="paramtext">See optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_feasibility-pi-limit"><m:mi mathcolor="#800080;" mathvariant="bold">Feasibility Phase Iteration Limit</m:mi></m:maction></m:math>.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_list" id="list"/><b><span class="u">List</span></b></td><td class="optparam-center"/><td class="optparam-right">Default for <m:math><m:mi mathvariant="normal">E04NCF</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_list"><m:mi mathcolor="#800080;" mathvariant="bold">List</m:mi></m:maction></m:math></td></tr></table>
<table class="multi-optparam"><tr><td class="optparam-left"><a name="optparam_nolist" id="nolist"/><b><span class="u">Nolist</span></b></td><td class="optparam-center"/><td class="optparam-right">Default for <m:math><m:mi mathvariant="normal">E04NCA</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_nolist"><m:mi mathcolor="#800080;" mathvariant="bold">Nolist</m:mi></m:maction></m:math></td></tr></table><div class="paramtext">Normally each optional parameter specification is printed as it is supplied.  Optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_nolist"><m:mi mathcolor="#800080;" mathvariant="bold">Nolist</m:mi></m:maction></m:math>&#160;may be used to suppress the printing and optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_list"><m:mi mathcolor="#800080;" mathvariant="bold">List</m:mi></m:maction></m:math>&#160;may be used to restore printing.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_monitoringfile" id="monitoringfile"/><b><span class="u">M</span>onitoring File</b></td><td class="optparam-center"><i>i</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math></td></tr></table><div class="paramtext">If <m:math><m:mi>i</m:mi><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_printlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Print Level</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>5</m:mn></m:math>, monitoring information produced by E04NCF/E04NCA at every iteration is sent to a file with logical unit number <m:math><m:mi>i</m:mi></m:math>.  If <m:math><m:mi>i</m:mi><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>&#160;and/or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_printlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Print Level</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>5</m:mn></m:math>, no monitoring information is produced.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_printlevel" id="printlevel"/><b><span class="u">Pri</span>nt Level</b></td><td class="optparam-center"><i>i</i></td><td class="optparam-right">Default for E04NCF
<m:math><m:mtext/><m:mo>=</m:mo><m:mn>10</m:mn></m:math><br/>
Default for E04NCA
<m:math><m:mtext/><m:mo>=</m:mo><m:mn>0</m:mn></m:math></td></tr></table><div class="paramtext">The value of <m:math><m:mi>i</m:mi></m:math>&#160;controls the amount of printout produced by E04NCF/E04NCA, as indicated below.  A detailed description of the printed output is given in <a class="sec" href="#fc-printedoutput">Section 8.2</a> (summary output at each iteration and the final solution) and <a class="sec" href="#monitoring">Section 12</a> (monitoring information at each iteration).</div>
<div class="paramtext">The following printout is sent to the current advisory message unit (as defined by <a class="rout" href="../X04/x04abf.xml">X04ABF</a>): 
<div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" align="center"><b><m:math><m:mi>i</m:mi></m:math></b></td> 
<td class="libdoc" valign="top" align="center"><b>Output</b></td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mphantom><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:mphantom><m:mn>0</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">No output.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mphantom><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:mphantom><m:mn>1</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">The final solution only.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mphantom><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:mphantom><m:mn>5</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">One line of summary output (<m:math><m:mtext/><m:mo>&lt;</m:mo><m:mn>80</m:mn></m:math>&#160;characters; see <a class="sec" href="#fc-printedoutput">Section 8.2</a>) for each iteration (no printout of the final solution).</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mtext/><m:mo>&#8805;</m:mo><m:mn>10</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">The final solution and one line of summary output for each iteration.</td> 
</tr> 
</tbody> 
</table></div> 
</div>
<div class="paramtext">The following printout is sent to the logical unit number defined by the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_monitoringfile"><m:mi mathcolor="#800080;" mathvariant="bold">Monitoring File</m:mi></m:maction></m:math>: 
<div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" align="center"><b><m:math><m:mi>i</m:mi></m:math></b></td> 
<td class="libdoc" valign="top" align="center"><b>Output</b></td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mtext/><m:mo>&lt;</m:mo><m:mn>5</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">No output.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mtext/><m:mo>&#8805;</m:mo><m:mn>5</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">One long line of output (<m:math><m:mtext/><m:mo>&gt;</m:mo><m:mn>80</m:mn></m:math>&#160;characters; see <a class="sec" href="#monitoring">Section 12</a>) for each iteration (no printout of the final solution).</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mtext/><m:mo>&#8805;</m:mo><m:mn>20</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">At each iteration, the Lagrange multipliers, the variables <m:math><m:mi>x</m:mi></m:math>, the constraint values <m:math><m:mi>C</m:mi><m:mi>x</m:mi></m:math>&#160;and the constraint status.</td> 
</tr><tr> 
<td class="libdoc" valign="top" align="center"><m:math><m:mtext/><m:mo>&#8805;</m:mo><m:mn>30</m:mn></m:math></td> 
<td class="libdoc" valign="top" align="left">At each iteration, the diagonal elements of the matrix <m:math><m:mi>T</m:mi></m:math>&#160;associated with the <m:math><m:mi>T</m:mi><m:mi>Q</m:mi></m:math>&#160;factorization <a class="eqn" href="#eqn4">(4)</a> (see <a class="sec" href="#ad-search">Section 10.2</a>) of the working set, and the diagonal elements of the upper triangular matrix <m:math><m:mi>R</m:mi></m:math>.</td> 
</tr> 
</tbody> 
</table></div> 
</div>
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_printlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Print Level</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>5</m:mn></m:math>&#160;and the unit number defined by the optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_monitoringfile"><m:mi mathcolor="#800080;" mathvariant="bold">Monitoring File</m:mi></m:maction></m:math>&#160;is the same as that defined by <a class="rout" href="../X04/x04abf.xml">X04ABF</a>, then the summary output is suppressed.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_problemtype" id="problemtype"/><b><span class="u">Pro</span>blem <span class="u">Ty</span>pe</b></td><td class="optparam-center"><i>a</i></td><td class="optparam-right">Default <m:math><m:mo>=</m:mo></m:math>&#160;LS1</td></tr></table><div class="paramtext">This option specifies the type of objective function to be minimized during the optimality phase.  The following are the nine optional keywords and the dimensions of the arrays that must be specified in order to define the objective function: 
<div class="left-tablediv"><table class="frame-none"> 
 
 
<tbody> 
<tr> 
<td class="libdoc" valign="top" style="width:6em;">LP</td> 
<td class="libdoc" valign="top"><a class="arg" href="#A">A</a> and <a class="arg" href="#B">B</a> not referenced, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CVEC"><m:mi mathcolor="#EE0000" mathvariant="bold">CVEC</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>;</td> 
</tr><tr> 
<td class="libdoc" valign="top" style="width:6em;">QP1</td> 
<td class="libdoc" valign="top"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDA"><m:mi mathcolor="#EE0000" mathvariant="bold">LDA</m:mi></m:maction><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>&#160;symmetric, <a class="arg" href="#B">B</a> and <a class="arg" href="#CVEC">CVEC</a> not referenced;</td> 
</tr><tr> 
<td class="libdoc" valign="top" style="width:6em;">QP2</td> 
<td class="libdoc" valign="top"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDA"><m:mi mathcolor="#EE0000" mathvariant="bold">LDA</m:mi></m:maction><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>&#160;symmetric, <a class="arg" href="#B">B</a> not referenced, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CVEC"><m:mi mathcolor="#EE0000" mathvariant="bold">CVEC</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>;</td> 
</tr><tr> 
<td class="libdoc" valign="top" style="width:6em;">QP3</td> 
<td class="libdoc" valign="top"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDA"><m:mi mathcolor="#EE0000" mathvariant="bold">LDA</m:mi></m:maction><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>&#160;upper trapezoidal, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#KX"><m:mi mathcolor="#EE0000" mathvariant="bold">KX</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>, <a class="arg" href="#B">B</a> and <a class="arg" href="#CVEC">CVEC</a> not referenced;</td> 
</tr><tr> 
<td class="libdoc" valign="top" style="width:6em;">QP4</td> 
<td class="libdoc" valign="top"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDA"><m:mi mathcolor="#EE0000" mathvariant="bold">LDA</m:mi></m:maction><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>&#160;upper trapezoidal, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#KX"><m:mi mathcolor="#EE0000" mathvariant="bold">KX</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>, <a class="arg" href="#B">B</a> not referenced, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CVEC"><m:mi mathcolor="#EE0000" mathvariant="bold">CVEC</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>;</td> 
</tr><tr> 
<td class="libdoc" valign="top" style="width:6em;">LS1</td> 
<td class="libdoc" valign="top"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDA"><m:mi mathcolor="#EE0000" mathvariant="bold">LDA</m:mi></m:maction><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction></m:mfenced></m:mrow></m:math>, <a class="arg" href="#CVEC">CVEC</a> not referenced;</td> 
</tr><tr> 
<td class="libdoc" valign="top" style="width:6em;">LS2</td> 
<td class="libdoc" valign="top"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDA"><m:mi mathcolor="#EE0000" mathvariant="bold">LDA</m:mi></m:maction><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction></m:mfenced></m:mrow></m:math>, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CVEC"><m:mi mathcolor="#EE0000" mathvariant="bold">CVEC</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>;</td> 
</tr><tr> 
<td class="libdoc" valign="top" style="width:6em;">LS3</td> 
<td class="libdoc" valign="top"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDA"><m:mi mathcolor="#EE0000" mathvariant="bold">LDA</m:mi></m:maction><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>&#160;upper trapezoidal, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#KX"><m:mi mathcolor="#EE0000" mathvariant="bold">KX</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction></m:mfenced></m:mrow></m:math>, <a class="arg" href="#CVEC">CVEC</a> not referenced;</td> 
</tr><tr> 
<td class="libdoc" valign="top" style="width:6em;">LS4</td> 
<td class="libdoc" valign="top"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDA"><m:mi mathcolor="#EE0000" mathvariant="bold">LDA</m:mi></m:maction><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>&#160;upper trapezoidal, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#KX"><m:mi mathcolor="#EE0000" mathvariant="bold">KX</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction></m:mfenced></m:mrow></m:math>, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CVEC"><m:mi mathcolor="#EE0000" mathvariant="bold">CVEC</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>.</td> 
</tr> 
</tbody> 
</table></div> 
</div>
<div class="paramtext">For problems of type FP, the objective function is omitted and <a class="arg" href="#A">A</a>, <a class="arg" href="#B">B</a> and <a class="arg" href="#CVEC">CVEC</a> are not referenced.</div>
<div class="paramtext">The following keywords are also acceptable.  The minimum abbreviation of each keyword is underlined.  <div class="left-tablediv"><table class="frame-none">  
<tbody>
<tr>
<td class="libdoc" valign="top" align="left" style="width:6em;"><m:math><m:mi>a</m:mi></m:math></td>
<td class="libdoc" valign="top" align="left"><b>Option</b></td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:6em;"><span class="u">Le</span>ast</td>
<td class="libdoc" valign="top" align="left">LS1</td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:6em;"><span class="u">Qu</span>adratic</td>
<td class="libdoc" valign="top" align="left">QP2</td>
</tr><tr>
<td class="libdoc" valign="top" align="left" style="width:6em;"><span class="u">Li</span>near</td>
<td class="libdoc" valign="top" align="left">LP</td>
</tr>
</tbody>
</table></div> </div>
<div class="paramtext">In addition, the keywords LS and LSQ are equivalent to the default option LS1, and the keyword QP is equivalent to the option QP2.</div>
<div class="paramtext">If <m:math><m:mi>A</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, i.e., the objective function is purely linear, the efficiency of E04NCF/E04NCA may be increased by specifying <m:math><m:mi>a</m:mi></m:math>&#160;as LP.</div><table class="optparam"><tr><td class="optparam-left"><a name="optparam_ranktolerance" id="ranktolerance"/><b><span class="u">R</span>ank Tolerance</b></td><td class="optparam-center"><i>r</i></td><td class="optparam-right">Default <m:math><m:mtext/><m:mo>=</m:mo><m:mn>100</m:mn><m:mi>&#949;</m:mi></m:math>&#160;or <m:math><m:mn>10</m:mn><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math>&#160;(see below)</td></tr></table><div class="paramtext">Note that this option does not apply to problems of type FP or LP.</div>
<div class="paramtext">The default value of <m:math><m:mi>r</m:mi></m:math>&#160;depends on the problem type.  If <m:math><m:mi>A</m:mi></m:math>&#160;occurs as a least-squares matrix, as it does in problem types QP1, LS1 and LS3, then the default value of <m:math><m:mi>r</m:mi></m:math>&#160;is <m:math><m:mn>100</m:mn><m:mi>&#949;</m:mi></m:math>.  In all other cases, <m:math><m:mi>A</m:mi></m:math>&#160;is treated as the &#8216;square root&#8217; of the Hessian matrix <m:math><m:mi>H</m:mi></m:math>&#160;and <m:math><m:mi>r</m:mi></m:math>&#160;has the default value <m:math><m:mn>10</m:mn><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math>.</div>
<div class="paramtext">This parameter enables you to control the estimate of the triangular factor <m:math><m:msub><m:mi>R</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;(see <a class="sec" href="#ad-mainiteration">Section 10.3</a>).  If <m:math><m:msub><m:mi>&#961;</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;denotes the function <m:math><m:msub><m:mi>&#961;</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced open="{" close="}" separators=""><m:mfenced open="|" close="|" separators=""><m:msub><m:mi>R</m:mi><m:mn>11</m:mn></m:msub></m:mfenced><m:mo>,</m:mo><m:mfenced open="|" close="|" separators=""><m:msub><m:mi>R</m:mi><m:mn>22</m:mn></m:msub></m:mfenced><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mfenced open="|" close="|" separators=""><m:msub><m:mi>R</m:mi><m:mrow><m:mi>i</m:mi><m:mi>i</m:mi></m:mrow></m:msub></m:mfenced></m:mfenced></m:mrow></m:math>, the rank of <m:math><m:mi>R</m:mi></m:math>&#160;is defined to be smallest index <span class="italic">i</span> such that <m:math><m:mfenced open="|" close="|" separators=""><m:msub><m:mi>R</m:mi><m:mrow><m:mi>i</m:mi><m:mo>+</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mi>i</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub></m:mfenced><m:mo>&#8804;</m:mo><m:mi>r</m:mi><m:mfenced open="|" close="|" separators=""><m:msub><m:mi>&#961;</m:mi><m:mrow><m:mi>i</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub></m:mfenced></m:math>.  If <m:math><m:mi>r</m:mi><m:mo>&#8804;</m:mo><m:mn>0</m:mn></m:math>, the default value is used.</div><h2 class="standard"><a class="sec" name="monitoring" id="monitoring"/>12&#160;&#160;Description of Monitoring Information</h2>
<div class="paramtext">This section describes the long line of output (<m:math><m:mtext/><m:mo>&gt;</m:mo><m:mn>80</m:mn></m:math>&#160;characters) which forms part of the monitoring information produced by E04NCF/E04NCA.  (See also the description of the optional parameters <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_monitoringfile"><m:mi mathcolor="#800080;" mathvariant="bold">Monitoring File</m:mi></m:maction></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_printlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Print Level</m:mi></m:maction></m:math>.)  You can control the level of printed output.</div><div class="paramtext">To aid interpretation of the printed results, the following convention is used for numbering the constraints: indices <m:math><m:mn>1</m:mn></m:math>&#160;through <m:math><m:mi>n</m:mi></m:math>&#160;refer to the bounds on the variables, and indices <m:math><m:mi>n</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:math>&#160;through <m:math><m:mi>n</m:mi><m:mo>+</m:mo><m:msub><m:mi>n</m:mi><m:mi>L</m:mi></m:msub></m:math>&#160;refer to the general constraints.  When the status of a constraint changes, the index of the constraint is printed, along with the designation <span class="mono">L</span> (lower bound), <span class="mono">U</span> (upper bound), <span class="mono">E</span> (equality), <span class="mono">F</span> (temporarily fixed variable) or <span class="mono">A</span> (artificial constraint).</div><div class="paramtext">When <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_printlevel"><m:mi mathcolor="#800080;" mathvariant="bold">Print Level</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>5</m:mn></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_monitoringfile"><m:mi mathcolor="#800080;" mathvariant="bold">Monitoring File</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:math>, the following line of output is produced at every iteration on the unit number specified by optional parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#optparam_monitoringfile"><m:mi mathcolor="#800080;" mathvariant="bold">Monitoring File</m:mi></m:maction></m:math>.  In all cases, the values of the quantities printed are those in effect <span class="italic">on completion</span> of the given iteration.
<table class="standard-100"><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Itn</span></td>
<td valign="top">
is the iteration count.
</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Jdel</span></td>
<td valign="top">
is the index of the constraint deleted from the working set.  If <span class="mono">Jdel</span> is zero, no constraint was deleted.
</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Jadd</span></td>
<td valign="top">
is the index of the constraint added to the working set.  If <span class="mono">Jadd</span> is zero, no constraint was added.
</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Step</span></td>
<td valign="top">

is the step taken along the computed search direction.  If a constraint is added during the current iteration (i.e., <span class="mono">Jadd</span> is positive), <span class="mono">Step</span> will be the step to the nearest constraint.  During the optimality phase, the step can be greater than one only if the factor <m:math><m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;is singular.

</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Ninf</span></td>
<td valign="top">
is the number of violated constraints (infeasibilities).  This will be zero during the optimality phase.
</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Sinf</span>/<span class="mono">Objective</span></td>
<td valign="top">
is the value of the current objective function.  If <m:math><m:mi>x</m:mi></m:math>&#160;is not feasible, <span class="mono">Sinf</span> gives a weighted sum of the magnitudes of constraint violations.  If <m:math><m:mi>x</m:mi></m:math>&#160;is feasible, <span class="mono">Objective</span> is the value of the objective function of <a class="eqn" href="#eqn1">(1)</a>.  The output line for the final iteration of the feasibility phase (i.e., the first iteration for which <span class="mono">Ninf</span> is zero) will give the value of the true objective at the first feasible point.<div class="paramtext">During the optimality phase the value of the objective function will be nonincreasing.  During the feasibility phase the number of constraint infeasibilities will not increase until either a feasible point is found or the optimality of the multipliers implies that no feasible point exists.  Once optimal multipliers are obtained the number of infeasibilities can increase, but the sum of infeasibilities will either remain constant or be reduced until the minimum sum of infeasibilities is found.</div>
</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Bnd</span></td>
<td valign="top">
is the number of simple bound constraints in the current working set.
</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Lin</span></td>
<td valign="top">
is the number of general linear constraints in the current working set.
</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Art</span></td>
<td valign="top">
is the number of artificial constraints in the working set, i.e., the number of columns of <m:math><m:msub><m:mi>Z</m:mi><m:mn>2</m:mn></m:msub></m:math>&#160;(see <a class="sec" href="#ad-mainiteration">Section 10.3</a>).
</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Zr</span></td>
<td valign="top">
is the number of columns of <m:math><m:msub><m:mi>Z</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;(see <a class="sec" href="#ad-search">Section 10.2</a>).  <span class="mono">Zr</span> is the dimension of the subspace in which the objective function is currently being minimized.  The value of <span class="mono">Zr</span> is the number of variables minus the number of constraints in the working set; i.e., <m:math><m:mi mathvariant="monospace">Zr</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">Art</m:mi></m:mfenced></m:math>.<div class="paramtext">The value of <m:math><m:msub><m:mi>n</m:mi><m:mi>Z</m:mi></m:msub></m:math>, the number of columns of <m:math><m:mi>Z</m:mi></m:math>&#160;(see <a class="sec" href="#ad-search">Section 10.2</a>) can be calculated as <m:math><m:msub><m:mi>n</m:mi><m:mi>Z</m:mi></m:msub><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:mfenced></m:math>.  A zero value of <m:math><m:msub><m:mi>n</m:mi><m:mi>Z</m:mi></m:msub></m:math>&#160;implies that <m:math><m:mi>x</m:mi></m:math>&#160;lies at a vertex of the feasible region.</div>
</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Norm Gz</span></td>
<td valign="top">

is <m:math>
 <m:mfenced open="&#8214;" close="&#8214;" separators="">
  <m:msubsup><m:mi>Z</m:mi><m:mn>1</m:mn><m:mi mathvariant="normal">T</m:mi></m:msubsup>
  <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 reduced gradient with respect to <m:math><m:msub><m:mi>Z</m:mi><m:mn>1</m:mn></m:msub></m:math>.  During the optimality phase, this norm will be approximately zero after a unit step.

</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Norm Gf</span></td>
<td valign="top">
is the Euclidean norm of the gradient function with respect to the free variables, i.e., variables not currently held at a bound.
</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Cond T</span></td>
<td valign="top">
is a lower bound on the condition number of the working set.
</td>
</tr><tr>
<td style="width:9.6em;" valign="baseline"><span class="mono">Cond Rz</span></td>
<td valign="top">
is a lower bound on the condition number of the triangular factor <m:math><m:msub><m:mi>R</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;(the first <span class="mono">Zr</span> rows and columns of the factor <m:math><m:msub><m:mi>R</m:mi><m:mi>Z</m:mi></m:msub></m:math>).  If the problem is specified to be of type LP or the estimated rank of the data matrix <m:math><m:mi>A</m:mi></m:math>&#160;is zero then <span class="mono">Cond Rz</span> is not printed.
</td>
</tr></table>
</div>
<hr/><div><a class="rout" href="../../pdf/E04/e04ncf.pdf">E04NCF/E04NCA (PDF version)</a></div><div><a class="chap" href="e04conts.xml">E04 Chapter Contents</a></div><div><a class="chapint" href="e04intro.xml">E04 Chapter Introduction</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div>
<div><hr/><a class="genint" href="../FRONTMATTER/copyright.xml">&#169; The Numerical Algorithms Group Ltd, Oxford, UK. 2009</a></div></body></html>
