<?xml-stylesheet type="text/xsl" href="../styles/pmathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:dsi="http://www.w3.org/1999/xlink" xml:space="preserve"><head>
<!-- saved from url=(0014)about:internet -->
<title>
    NAG C Library Manual, Mark 8 : 
   e04ucc</title><link rel="stylesheet" href="../styles/libdoc.css" type="text/css"/><script type="text/javascript">
   function showLevel(_levelId){
    var thisLevel = document.getElementById(_levelId);
    var thisplus = document.getElementById( _levelId.concat('plus'));
    var thisminus = document.getElementById( _levelId.concat('minus'));
    if(thisLevel.style.display != "block"){
     thisLevel.style.display = "block";
     thisplus.style.display = "none";
     thisminus.style.display = "inline";
     }
    else{
     thisLevel.style.display = "none";
     thisminus.style.display = "none";
     thisplus.style.display = "inline";
     }
    }
  </script></head><body><hr/><div><a href="../../pdf/E04/e04ucc.pdf">e04ucc (pdf version)</a></div><div><a href="e04_conts.xml">Chapter Contents</a></div><div><a href="e04_intro.xml">Chapter Introduction</a></div>
<div><a href="../mark8.xml">NAG C Library Manual</a></div><hr/><h1 class="libdoc">NAG C Library Function Document<br/><br/>nag_opt_nlp (e04ucc)</h1><div class="htmltoc">
<h2><span class="htmltochead" onclick="showLevel('htmltoc');"><span class="htmltocplus" id="htmltocplus">+</span><span class="htmltocminus" id="htmltocminus">&#8722;</span></span>&#160;Contents</h2>
<div class="htmltocitem" id="htmltoc">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#purpose">&#160;1&#160;<b>Purpose</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#specification">&#160;2&#160;<b>Specification</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#description">&#160;3&#160;<b>Description</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#references">&#160;4&#160;<b>References</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocparameters');"><span class="htmltocplus" id="tocparametersplus">+</span><span class="htmltocminus" id="tocparametersminus">&#8722;</span></span>
<a class="htmltoc" href="#parameters">&#160;5&#160;<b>Arguments</b></a>
<div class="htmltocitem" id="tocparameters">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#e04uccargus1">&#160;5.1&#160;<b>Description of Printed Output </b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#errors">&#160;6&#160;<b>Error Indicators and Warnings</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#accuracy">&#160;7&#160;<b>Accuracy</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocfcomments');"><span class="htmltocplus" id="tocfcommentsplus">+</span><span class="htmltocminus" id="tocfcommentsminus">&#8722;</span></span>
<a class="htmltoc" href="#fcomments">&#160;8&#160;<b>Further Comments</b></a>
<div class="htmltocitem" id="tocfcomments">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#e04uccfc1">&#160;8.1&#160;<b>Termination Criteria </b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocexample');"><span class="htmltocplus" id="tocexampleplus">+</span><span class="htmltocminus" id="tocexampleminus">&#8722;</span></span>
<a class="htmltoc" href="#example">&#160;9&#160;<b>Example</b></a>
<div class="htmltocitem" id="tocexample">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examtext">&#160;9.1&#160;<b>Program Text</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examdata">&#160;9.2&#160;<b>Program Data</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examresults">&#160;9.3&#160;<b>Program Results</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('toce04uccfd');"><span class="htmltocplus" id="toce04uccfdplus">+</span><span class="htmltocminus" id="toce04uccfdminus">&#8722;</span></span>
<a class="htmltoc" href="#e04uccfd">&#160;10&#160;<b>Further Description </b></a>
<div class="htmltocitem" id="toce04uccfd">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#e04uccfd1">&#160;10.1&#160;<b>Overview </b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#e04uccfd2">&#160;10.2&#160;<b>Solution of the Quadratic Programming Subproblem </b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#e04uccfd3">&#160;10.3&#160;<b>The Merit Function </b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#e04uccfd4">&#160;10.4&#160;<b>The Quasi-Newton Update </b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('toce04uccoptparams');"><span class="htmltocplus" id="toce04uccoptparamsplus">+</span><span class="htmltocminus" id="toce04uccoptparamsminus">&#8722;</span></span>
<a class="htmltoc" href="#e04uccoptparams">&#160;11&#160;<b>Optional Parameters </b></a>
<div class="htmltocitem" id="toce04uccoptparams">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#e04uccoptparams1">&#160;11.1&#160;<b>Optional Parameter Checklist and Default Values </b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#op-description">&#160;11.2&#160;<b>Description of the Optional Arguments</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('toce04uccoptparams3');"><span class="htmltocplus" id="toce04uccoptparams3plus">+</span><span class="htmltocminus" id="toce04uccoptparams3minus">&#8722;</span></span>
<a class="htmltoc" href="#e04uccoptparams3">&#160;11.3&#160;<b>Description of Printed Output </b></a>
<div class="htmltocitem" id="toce04uccoptparams3">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#printed-output">&#160;11.3.1&#160;<b>Output of results via a user-defined printing function</b></a>
</div>
</div>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#example2">&#160;12&#160;<b>Example 2 (EX2)</b></a>
</div>
</div>
</div><h2><a name="purpose" id="purpose"/>1&#160;&#160;Purpose</h2><div class="paramtext">nag_opt_nlp (e04ucc) is designed to minimize an arbitrary smooth function subject to constraints (which may include simple bounds on the variables, linear constraints and smooth nonlinear constraints) using a sequential quadratic programming (SQP) method.  As many first derivatives as possible should be supplied by the user; any unspecified derivatives are approximated by finite differences.  It is not intended for large sparse problems.</div>
<div class="paramtext">nag_opt_nlp (e04ucc) may also be used for unconstrained, bound-constrained and linearly constrained optimization.</div><h2><a name="specification" id="specification"/>2&#160;&#160;Specification</h2><table class="cspec">
<tr><td class="tdcspec" colspan="2">#include &lt;nag.h&gt;<br/>
#include &lt;nage04.h&gt;<br/><br/></td></tr>
<tr><td class="tdcspec">
void&#160;nag_opt_nlp</td><td class="tdcspec">(Integer&#160;<a class="argref" href="#n">n</a>, Integer&#160;<a class="argref" href="#nclin">nclin</a>, Integer&#160;<a class="argref" href="#ncnlin">ncnlin</a>, const&#160;double&#160;<a class="argref" href="#a">a</a>[], Integer&#160;<a class="argref" href="#tda">tda</a>, const&#160;double&#160;<a class="argref" href="#bl">bl</a>[], const&#160;double&#160;<a class="argref" href="#bu">bu</a>[], <table class="subspec"><tr><td class="tdcspec">void</td><td class="tdcspec">(*<a class="argref" href="#objfun">objfun</a>)(Integer&#160;<a class="argref" href="#objfun_n">n</a>, const&#160;double&#160;<a class="argref" href="#objfun_x">x</a>[], double&#160;*<a class="argref" href="#objfun_objf">objf</a>, double&#160;<a class="argref" href="#objfun_g">g</a>[], Nag_Comm&#160;*<a class="argref" href="#objfun_comm">comm</a>), </td></tr></table><table class="subspec"><tr><td class="tdcspec">void</td><td class="tdcspec">(*<a class="argref" href="#confun">confun</a>)(Integer&#160;<a class="argref" href="#confun_n">n</a>, Integer&#160;<a class="argref" href="#confun_ncnlin">ncnlin</a>, const&#160;Integer&#160;<a class="argref" href="#confun_needc">needc</a>[], const&#160;double&#160;<a class="argref" href="#confun_x">x</a>[], double&#160;<a class="argref" href="#confun_conf">conf</a>[], double&#160;<a class="argref" href="#confun_conjac">conjac</a>[], Nag_Comm&#160;*<a class="argref" href="#confun_comm">comm</a>), </td></tr></table>double&#160;<a class="argref" href="#x">x</a>[], double&#160;*<a class="argref" href="#objf">objf</a>, double&#160;<a class="argref" href="#g">g</a>[], Nag_E04_Opt&#160;*<a class="argref" href="#options">options</a>, Nag_Comm&#160;*<a class="argref" href="#comm">comm</a>, NagError&#160;*<a class="argref" href="#fail">fail</a>)
</td></tr>
</table><h2><a name="description" id="description"/>3&#160;&#160;Description</h2><div class="paramtext">nag_opt_nlp (e04ucc) is designed to solve the nonlinear programming problem &#8211; the minimization of a smooth nonlinear function subject to a set of constraints on the variables.  The problem is assumed to be stated in the following form:
</div>
<div class="formula-eqn"><a name="eqn1" id="eqn1"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:munder>
   <m:mtext>minimize</m:mtext>
   <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:msub>
       <m:mi>A</m:mi>
       <m:mi>L</m:mi>
      </m:msub>
      <m:mi>x</m:mi>
     </m:mtd>
    </m:mtr>
    <m:mtr>
     <m:mtd>
      <m:mi>c</m:mi>
      <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
     </m:mtd>
    </m:mtr>
   </m:mtable>
  </m:mfenced>
  <m:mo>&#8804;</m:mo>
  <m:mi>u</m:mi>
  <m:mtext>,</m:mtext>
 </m:mrow>
</m:math></td><td class="formula-eqn2">
      (1)
     </td></tr></table></div>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math>&#160;(the <span class="italic">objective function</span>) is a nonlinear function, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>A</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
</m:math>&#160;is an <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
</m:math>&#160;by <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>n</m:mi>
</m:math>&#160;constant matrix, and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>c</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math>&#160;is an <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>N</m:mi>
 </m:msub>
</m:math>&#160;element vector of nonlinear constraint functions.  (The matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>A</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
</m:math>&#160;and the vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>c</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math>&#160;may be empty.)  The objective function and the constraint functions are assumed to be smooth, i.e., at least twice-continuously differentiable.  (The method of nag_opt_nlp (e04ucc) will usually solve (<a class="eqnref" href="#eqn1">1</a>) if there are only isolated discontinuities away from the solution.)</div>
<div class="paramtext">Note that although the bounds on the variables could be included in the definition of the linear constraints, we prefer to distinguish between them for reasons of computational efficiency.  For the same reason, the linear constraints should <b>not</b> be included in the definition of the nonlinear constraints.  Upper and lower bounds are specified for all the variables and for all the constraints.  An <span class="italic">equality</span> constraint can be specified by setting <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>l</m:mi>
  <m:mi>i</m:mi>
 </m:msub>
 <m:mo>=</m:mo>
 <m:msub>
  <m:mi>u</m:mi>
  <m:mi>i</m:mi>
 </m:msub>
</m:math>.  If certain bounds are not present, the associated elements of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>l</m:mi>
</m:math>&#160;or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>u</m:mi>
</m:math>&#160;can be set to special values that will be treated as <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:mo>-</m:mo><m:mo>&#8734;</m:mo></m:mrow>
</m:math>&#160;or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:mo>+</m:mo><m:mo>&#8734;</m:mo></m:mrow>
</m:math>.  (See the description of the optional parameter <a class="optparamref" href="#optparam_inf_bound">options.inf_bound</a> in Section <a class="secref" href="#op-description">11.2</a>.)</div>
<div class="paramtext">If there are no nonlinear constraints in (<a class="eqnref" href="#eqn1">1</a>) and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
</m:math>&#160;is linear or quadratic, then one of <a class="rtnref" href="../E04/e04mfc.xml">nag_opt_lp (e04mfc)</a>, <a class="rtnref" href="../E04/e04ncc.xml">nag_opt_lin_lsq (e04ncc)</a> or <a class="rtnref" href="../E04/e04nfc.xml">nag_opt_qp (e04nfc)</a> will generally be more efficient.</div>
<div class="paramtext">The user must supply an initial estimate of the solution to (<a class="eqnref" href="#eqn1">1</a>), together with functions that define <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
 <m:mo>,</m:mo>
 <m:mi>c</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math>&#160;and as many first partial derivatives as possible; unspecified derivatives are approximated by finite differences.</div>
<div class="paramtext">The objective function is defined by function <a class="argref" href="#objfun">objfun</a>, and the nonlinear constraints are defined by function <a class="argref" href="#confun">confun</a>.  On every call, these functions must return appropriate values of the objective and nonlinear constraints.  The user should also provide the available partial derivatives.  Any unspecified derivatives are approximated by finite differences; see Section <a class="secref" href="#op-description">11.2</a> for a discussion of the optional parameters <a class="optparamref" href="#optparam_obj_deriv">options.obj_deriv</a> and <a class="optparamref" href="#optparam_con_deriv">options.con_deriv</a>.  Just before either <a class="argref" href="#objfun">objfun</a> or <a class="argref" href="#confun">confun</a> is called, each element of the current gradient array <a class="argref" href="#g">g</a> or <a class="argref" href="#confun_conjac">conjac</a> is initialized to a special value.  On exit, any element that retains the value is estimated by finite differences.  Note that if there <span class="italic">are</span> any nonlinear constraints, then the <span class="italic">first</span> call to <a class="argref" href="#confun">confun</a> will precede the <span class="italic">first</span> call to <a class="argref" href="#objfun">objfun</a>.</div>
<div class="paramtext">For maximum reliability, it is preferable for the user to provide all partial derivatives (see Chapter 8 of <a class="litref" href="#ref079">Gill <i>et al.</i> (1981)</a>, for a detailed discussion).  If all gradients cannot be provided, it is similarly advisable to provide as many as possible.  While developing the functions <a class="argref" href="#objfun">objfun</a> and <a class="argref" href="#confun">confun</a>, the optional parameter <a class="optparamref" href="#optparam_verify_grad">options.verify_grad</a> (see Section <a class="secref" href="#op-description">11.2</a>) should be used to check the calculation of any known gradients.</div>
<div class="paramtext">The method used by nag_opt_nlp (e04ucc) is described in detail in Section <a class="secref" href="#e04uccfd">10</a>.</div><h2><a name="references" id="references"/>4&#160;&#160;References</h2><div class="paramtext">
<p><a name="ref084" id="ref084"/>Dennis J E Jr and Mor&#233; J J (1977) Quasi-Newton methods, motivation and theory <i>SIAM Rev.</i> <b>19</b> 46&#8211;89 </p>
<p><a name="ref085" id="ref085"/>Dennis J E Jr and Schnabel R B (1981) A new derivation of symmetric positive-definite secant updates <i>nonlinear programming</i> (ed O L Mangasarian, R R Meyer and S M Robinson) <b>4</b> 167&#8211;199 Academic Press </p>
<p><a name="ref086" id="ref086"/>Dennis J E Jr and Schnabel R B (1983) <i>Numerical Methods for Unconstrained Optimization and Nonlinear Equations</i> Prentice&#8211;Hall </p>
<p><a name="ref224" id="ref224"/>Fletcher R (1987) <i>Practical Methods of Optimization</i> (2nd Edition) Wiley </p>
<p><a name="ref091" id="ref091"/>Gill P E, Hammarling S, Murray W, Saunders M A and Wright M H (1986a) Users' guide for LSSOL (Version 1.0) <i>Report SOL 86-1</i> Department of Operations Research, Stanford University </p>
<p><a name="ref442" id="ref442"/>Gill P E, Murray W, Saunders M A and Wright M H (1983a) Documentation for FDCALC and FDCORE <i>Technical Report SOL</i> 83&#8211;6 Stanford University </p>
<p><a name="ref089" id="ref089"/>Gill P E, Murray W, Saunders M A and Wright M H (1984a) Users' Guide for SOL/QPSOL Version 3.2 <i>Report</i> SOL 84&#8211;5 Department of Operations Research, Stanford University </p>
<p><a name="ref090" id="ref090"/>Gill P E, Murray W, Saunders M A and Wright M H (1984b) Procedures for optimization problems with a mixture of bounds and general linear constraints <i>ACM Trans. Math. Software</i> <b>10</b> 282&#8211;298 </p>
<p><a name="ref092" id="ref092"/>Gill P E, Murray W, Saunders M A and Wright M H (1986b) Some theoretical properties of an augmented Lagrangian merit function <i>Report SOL</i> 86&#8211;6R Department of Operations Research, Stanford University </p>
<p><a name="ref540" id="ref540"/>Gill P E, Murray W, Saunders M A and Wright M H (1986c) Users' guide for NPSOL (Version 4.0): a Fortran package for nonlinear programming <i>Report SOL 86-2</i> Department of Operations Research, Stanford University </p>
<p><a name="ref079" id="ref079"/>Gill P E, Murray W and Wright M H (1981) <i>Practical Optimization</i> Academic Press </p>
<p><a name="ref093" id="ref093"/>Hock W and Schittkowski K (1981) <i>Test Examples for Nonlinear Programming Codes. Lecture Notes in Economics and Mathematical Systems</i> <b>187</b> Springer&#8211;Verlag </p>
<p><a name="ref095" id="ref095"/>Murtagh B A and Saunders M A (1983) MINOS 5.0 user's guide <i>Report SOL 83-20</i> Department of Operations Research, Stanford University </p>
<p><a name="ref096" id="ref096"/>Powell M J D (1974) Introduction to constrained optimization <i>Numerical Methods for Constrained Optimization</i> (ed P E Gill and W Murray) 1&#8211;28 Academic Press </p>
<p><a name="ref097" id="ref097"/>Powell M J D (1983) Variable metric methods in constrained optimization <i>Mathematical Programming: The State of the Art</i> (ed A Bachem, M Gr&#246;tschel and B Korte) 288&#8211;311 Springer&#8211;Verlag </p>
</div><h2><a name="parameters" id="parameters"/>5&#160;&#160;Arguments</h2><dl><dt class="paramhead"><a name="n" id="n"/>1:
 &#160;&#160;&#8194;
 <b>n</b> &#8211; Integer&#160;<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>n</m:mi>
</m:math>, the number of variables.</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn>
</m:math>.
</div>
</dd><dt class="paramhead"><a name="nclin" id="nclin"/>2:
 &#160;&#160;&#8194;
 <b>nclin</b> &#8211; Integer&#160;<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
</m:math>, the number of general linear constraints.</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>0</m:mn>
</m:math>.
</div>
</dd><dt class="paramhead"><a name="ncnlin" id="ncnlin"/>3:
 &#160;&#160;&#8194;
 <b>ncnlin</b> &#8211; Integer&#160;<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>N</m:mi>
 </m:msub>
</m:math>, the number of nonlinear constraints.</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>0</m:mn>
</m:math>.
</div>
</dd><dt class="paramhead"><a name="a" id="a"/>4:
 &#160;&#160;&#8194;
 <b>a</b>[<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:href="#tda" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">tda</m:mi></m:maction></m:math>] &#8211; const&#160;double&#160;<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>i</m:mi>
</m:math>th row of <a class="argref" href="#a">a</a> must contain the coefficients of the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>i</m:mi>
</m:math>th general linear constraint (the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>i</m:mi>
</m:math>th row of the matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>A</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
</m:math>&#160;in (<a class="eqnref" href="#eqn1">1</a>)), for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>i</m:mi>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>,</m:mo>
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
</m:math>.
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn>
</m:math>&#160;then the array <a class="argref" href="#a">a</a> is not referenced.</div>
</div>
</dd><dt class="paramhead"><a name="tda" id="tda"/>5:
 &#160;&#160;&#8194;
 <b>tda</b> &#8211; Integer&#160;<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the 
     second
    dimension of the array <a class="argref" href="#a">a</a> as declared in the function from which nag_opt_nlp (e04ucc) is called.</div><div class="paramtext"><i>Constraint</i>:
  
if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
    <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn>
   </m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
    <m:maction actiontype="link" dsi:href="#tda" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">tda</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
   </m:math>.
</div>
</dd><dt class="paramhead"><a name="bl" id="bl"/>6:
 &#160;&#160;&#8194;
 <b>bl</b>[<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction></m:math>] &#8211; const&#160;double&#160;<span class="pclass">Input</span></dt><dt class="multi-paramhead"><a name="bu" id="bu"/>7:
 &#160;&#160;&#8194;
 <b>bu</b>[<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction></m:math>] &#8211; const&#160;double&#160;<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <a class="argref" href="#bl">bl</a> must contain the lower bounds and <a class="argref" href="#bu">bu</a> the upper bounds, for all the constraints in the following order.  The first <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>n</m:mi>
</m:math>&#160;elements of each array must contain the bounds on the variables, the next <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
</m:math>&#160;elements the bounds for the general linear constraints (if any), and the next <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>N</m:mi>
 </m:msub>
</m:math>&#160;elements the bounds for the nonlinear constraints (if any).  To specify a non-existent lower bound (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>l</m:mi>
  <m:mi>j</m:mi>
 </m:msub>
 <m:mo>=</m:mo>
 <m:mrow><m:mo>-</m:mo><m:mo>&#8734;</m:mo></m:mrow>
</m:math>), set <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>&#8804;</m:mo>
 <m:mrow><m:mo>-</m:mo><m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_bound</m:mi></m:maction></m:mrow>
</m:math>, and to specify a non-existent upper bound (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>u</m:mi>
  <m:mi>j</m:mi>
 </m:msub>
 <m:mo>=</m:mo>
 <m:mrow><m:mo>+</m:mo><m:mo>&#8734;</m:mo></m:mrow>
</m:math>), set <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>&#8805;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_bound</m:mi></m:maction></m:math>, where <a class="optparamref" href="#optparam_inf_bound">options.inf_bound</a> is one of the optional parameters (default value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup>
  <m:mn>10</m:mn>
  <m:mn>20</m:mn>
 </m:msup>
</m:math>, see Section <a class="secref" href="#op-description">11.2</a>).  To specify the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>th constraint as an equality, set <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>=</m:mo>
 <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>=</m:mo>
 <m:mi>&#946;</m:mi>
</m:math>, say, where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="|" close="|" separators="">
  <m:mi>&#946;</m:mi>
 </m:mfenced>
 <m:mo>&lt;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_bound</m:mi></m:maction></m:math>.</div><div class="paramtext"><i>Constraints</i>:
   <div class="paramtext"/><ul class="listcons">
<li class="listcons"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
   <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mi>j</m:mi><m:mo>]</m:mo></m:mrow></m:mrow>
   <m:mo>&#8804;</m:mo>
   <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mi>j</m:mi><m:mo>]</m:mo></m:mrow></m:mrow>
  </m:math>, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi mathvariant="italic">j</m:mi><m:mo>=</m:mo><m:mn>0</m:mn><m:mo>,</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mrow>
  <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
  <m:mo>+</m:mo>
  <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
  <m:mo>+</m:mo>
  <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
  <m:mo>-</m:mo>
  <m:mn>1</m:mn>
 </m:mrow></m:math>;</li>
<li class="listcons">if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
    <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mi>j</m:mi><m:mo>]</m:mo></m:mrow></m:mrow>
    <m:mo>=</m:mo>
    <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mi>j</m:mi><m:mo>]</m:mo></m:mrow></m:mrow>
    <m:mo>=</m:mo>
    <m:mi>&#946;</m:mi>
   </m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
    <m:mfenced open="|" close="|" separators="">
     <m:mi>&#946;</m:mi>
    </m:mfenced>
    <m:mo>&lt;</m:mo>
    <m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_bound</m:mi></m:maction>
   </m:math>.</li>
</ul></div>
</dd><dt class="paramhead"><a name="objfun" id="objfun"/>8:
 &#160;&#160;&#8194;
 <b>objfun</b> &#8211; function, supplied by the user&#160;<span class="pclass">External Function</span></dt><dd>
<div class="paramtext"><a class="argref" href="#objfun">objfun</a> must calculate the objective function <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math>&#160;and (optionally) its gradient <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>g</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
 <m:mo>=</m:mo>
 <m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:mi>F</m:mi></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mi>j</m:mi></m:msub></m:mrow>
 </m:mfrac>
</m:math>&#160;for a specified <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>n</m:mi>
</m:math>&#160;element vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>.</div><div class="paramtext">Its specification is:</div>
<div class="subprog"><table class="cspec"><tr><td class="tdcspec">
void&#160;objfun</td><td class="tdcspec">(Integer&#160;<a class="argref" href="#objfun_n">n</a>, const&#160;double&#160;<a class="argref" href="#objfun_x">x</a>[], double&#160;*<a class="argref" href="#objfun_objf">objf</a>, double&#160;<a class="argref" href="#objfun_g">g</a>[], Nag_Comm&#160;*<a class="argref" href="#objfun_comm">comm</a>)
</td></tr>
</table><dl><dt class="paramhead"><a name="objfun_n" id="objfun_n"/>1:
 &#160;&#160;&#8194;
 <b>n</b> &#8211; Integer&#160;<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>n</m:mi>
</m:math>, the number of variables.</div>
</dd><dt class="paramhead"><a name="objfun_x" id="objfun_x"/>2:
 &#160;&#160;&#8194;
 <b>x</b>[<a class="argref" href="#objfun_n">n</a>] &#8211; const&#160;double&#160;<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>, the vector of variables at which the value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
</m:math>&#160;and/or all available elements of its gradient are to be evaluated.</div>
</dd><dt class="paramhead"><a name="objfun_objf" id="objfun_objf"/>3:
 &#160;&#160;&#8194;
 <b>objf</b> &#8211; double&#160;*<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#objfun_comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#objfun_flag"><m:mi mathcolor="#FF00FF" mathvariant="bold">flag</m:mi></m:maction>
 <m:mo>=</m:mo>
 <m:mn>0</m:mn>
</m:math>&#160;or 2, <a class="argref" href="#objfun">objfun</a> must set <a class="argref" href="#objfun_objf">objf</a> to the value of the objective function <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
</m:math>&#160;at the current point <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>.  If it is not possible to evaluate <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
</m:math>&#160;then <a class="argref" href="#objfun">objfun</a> should assign a negative value to <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#objfun_comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#objfun_flag"><m:mi mathcolor="#FF00FF" mathvariant="bold">flag</m:mi></m:maction>
</m:math>; nag_opt_nlp (e04ucc) will then terminate.</div>
</dd><dt class="paramhead"><a name="objfun_g" id="objfun_g"/>4:
 &#160;&#160;&#8194;
 <b>g</b>[<a class="argref" href="#objfun_n">n</a>] &#8211; double&#160;<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#objfun_comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#objfun_flag"><m:mi mathcolor="#FF00FF" mathvariant="bold">flag</m:mi></m:maction>
 <m:mo>=</m:mo>
 <m:mn>2</m:mn>
</m:math>, <a class="argref" href="#objfun_g">g</a> must contain the elements of the vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>g</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math>&#160;given by

<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mi>g</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
 <m:mo>=</m:mo>
 <m:msup><m:mfenced separators=""><m:mfrac other="display">
    <m:mrow><m:mo>&#8706;</m:mo><m:mi>F</m:mi></m:mrow>
    <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub></m:mrow>
   </m:mfrac><m:mo>,</m:mo><m:mfrac other="display">
    <m:mrow><m:mo>&#8706;</m:mo><m:mi>F</m:mi></m:mrow>
    <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub></m:mrow>
   </m:mfrac><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mfrac other="display">
    <m:mrow><m:mo>&#8706;</m:mo><m:mi>F</m:mi></m:mrow>
    <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mi>n</m:mi></m:msub></m:mrow>
   </m:mfrac></m:mfenced><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:mi>F</m:mi></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub></m:mrow>
 </m:mfrac>
</m:math>&#160;is the partial derivative of the objective function with respect to the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>i</m:mi>
</m:math>th variable evaluated at the point <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>i</m:mi>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mi>n</m:mi>
</m:math>.
<div class="paramtext">If the optional parameter <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_obj_deriv" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.obj_deriv</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_True</m:mi>
</m:math>&#160;(the default), all elements of <a class="argref" href="#objfun_g">g</a> must be set; if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_obj_deriv" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.obj_deriv</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_False</m:mi>
</m:math>, any available elements of the vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>g</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math>&#160;must be assigned to the elements of <a class="argref" href="#objfun_g">g</a>; the remaining elements <span class="italic">must remain unchanged</span>.</div>
</div>
</dd><dt class="paramhead"><a name="objfun_comm" id="objfun_comm"/>5:
 &#160;&#160;&#8194;
 <b>comm</b> &#8211; Nag_Comm&#160;*</dt><dd>
<div class="paramtext">Pointer to structure of type <b>Nag_Comm</b>; the following members are relevant to <a class="argref" href="#objfun">objfun</a>.</div><div>
<dl>
<dt class="memberhead"><a name="objfun_comm_flag" id="objfun_comm_flag"/><b>flag</b> &#8211; Integer&#160;<span class="pclass">Input/Output</span></dt><dd>
<div class="membertext"><i>On entry</i>: <a class="argref" href="#objfun">objfun</a> is called with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#objfun_comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#objfun_comm_flag"><m:mi mathcolor="#FF00FF" mathvariant="bold">flag</m:mi></m:maction>
</m:math>&#160;set to 0 or 2.
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#objfun_comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#objfun_comm_flag"><m:mi mathcolor="#FF00FF" mathvariant="bold">flag</m:mi></m:maction>
 <m:mo>=</m:mo>
 <m:mn>0</m:mn>
</m:math>&#160;then only <a class="argref" href="#objfun_objf">objf</a> is referenced.</div>
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#objfun_comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#objfun_comm_flag"><m:mi mathcolor="#FF00FF" mathvariant="bold">flag</m:mi></m:maction>
 <m:mo>=</m:mo>
 <m:mn>2</m:mn>
</m:math>&#160;then both <a class="argref" href="#objfun_objf">objf</a> and <a class="argref" href="#objfun_g">g</a> are referenced.</div>
</div>
<div class="membertext"><i>On exit</i>: if <a class="argref" href="#objfun">objfun</a> resets <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#objfun_comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#objfun_comm_flag"><m:mi mathcolor="#FF00FF" mathvariant="bold">flag</m:mi></m:maction>
</m:math>&#160;to some negative number then nag_opt_nlp (e04ucc) will terminate immediately with the error indicator <a class="ifailref" href="#NE_USER_STOP">NE_USER_STOP</a>.  If <a class="argref" href="#fail">fail</a> is supplied to nag_opt_nlp (e04ucc), <b>fail.errnum</b> will be set to the user's setting of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#objfun_comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#objfun_comm_flag"><m:mi mathcolor="#FF00FF" mathvariant="bold">flag</m:mi></m:maction>
</m:math>.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="objfun_comm_first" id="objfun_comm_first"/><b>first</b> &#8211; Nag_Boolean&#160;<span class="pclass">Input</span></dt><dd>
<div class="membertext"><i>On entry</i>: will be set to <b>Nag_True</b> on the first call to <a class="argref" href="#objfun">objfun</a> and <b>Nag_False</b> for all subsequent calls.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="objfun_comm_nf" id="objfun_comm_nf"/><b>nf</b> &#8211; Integer&#160;<span class="pclass">Input</span></dt><dd>
<div class="membertext"><i>On entry</i>: the number of evaluations of the objective function; this value will be equal to the number of calls made to <a class="argref" href="#objfun">objfun</a> including the current one.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="objfun_comm_user" id="objfun_comm_user"/><b>user</b> &#8211; double&#160;*<span class="pclass"/></dt>
<dt class="multi-memberhead"><a name="objfun_comm_iuser" id="objfun_comm_iuser"/><b>iuser</b> &#8211; Integer&#160;*<span class="pclass"/></dt>
<dt class="multi-memberhead"><a name="objfun_comm_p" id="objfun_comm_p"/><b>p</b> &#8211; Pointer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The type Pointer will be <span class="mono">void *</span> with a C compiler that defines <span class="mono">void *</span> and <span class="mono">char *</span> otherwise.</div><div class="membertext">Before calling nag_opt_nlp (e04ucc) these pointers may be allocated memory by the user and initialized with various quantities for use by <a class="argref" href="#objfun">objfun</a> when called from nag_opt_nlp (e04ucc).</div>
</dd></dl>
</div>
</dd></dl>
</div>
<div class="paramtext"><b>Note:</b> <a class="argref" href="#objfun">objfun</a> should be tested separately before being used in conjunction with nag_opt_nlp (e04ucc).  The optional parameters <a class="optparamref" href="#optparam_verify_grad">options.verify_grad</a> and <a class="optparamref" href="#optparam_max_iter">options.max_iter</a> can be used to assist this process.  The array <a class="argref" href="#x">x</a> must <b>not</b> be changed by <a class="argref" href="#objfun">objfun</a>.</div>
<div class="paramtext">If the function <a class="argref" href="#objfun">objfun</a> does not calculate all of the gradient elements then the optional parameter <a class="optparamref" href="#optparam_obj_deriv">options.obj_deriv</a> should be set to <b>Nag_False</b>.</div>
</dd><dt class="paramhead"><a name="confun" id="confun"/>9:
 &#160;&#160;&#8194;
 <b>confun</b> &#8211; function, supplied by the user&#160;<span class="pclass">External Function</span></dt><dd>
<div class="paramtext"><a class="argref" href="#confun">confun</a> must calculate the vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>c</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math>&#160;of nonlinear constraint functions and (optionally) its Jacobian (<m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mtext/>
 <m:mo>=</m:mo>
 <m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:mi>c</m:mi></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:mi>x</m:mi></m:mrow>
 </m:mfrac>
</m:math>) for a specified <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>n</m:mi>
</m:math>&#160;element vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>.  If there are no nonlinear constraints (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn>
</m:math>), <a class="argref" href="#confun">confun</a> will never be called and the NAG defined null void function pointer, <span class="mono">NULLFN</span>, can be supplied in the call to nag_opt_nlp (e04ucc).  If there are nonlinear constraints the first call to <a class="argref" href="#confun">confun</a> will occur before the first call to <a class="argref" href="#objfun">objfun</a>.</div>
<div class="paramtext">Its specification is:</div>
<div class="subprog"><table class="cspec"><tr><td class="tdcspec">
void&#160;confun</td><td class="tdcspec">(Integer&#160;<a class="argref" href="#confun_n">n</a>, Integer&#160;<a class="argref" href="#confun_ncnlin">ncnlin</a>, const&#160;Integer&#160;<a class="argref" href="#confun_needc">needc</a>[], const&#160;double&#160;<a class="argref" href="#confun_x">x</a>[], double&#160;<a class="argref" href="#confun_conf">conf</a>[], double&#160;<a class="argref" href="#confun_conjac">conjac</a>[], Nag_Comm&#160;*<a class="argref" href="#confun_comm">comm</a>)
</td></tr>
</table><dl><dt class="paramhead"><a name="confun_n" id="confun_n"/>1:
 &#160;&#160;&#8194;
 <b>n</b> &#8211; Integer&#160;<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>n</m:mi>
</m:math>, the number of variables.</div>
</dd><dt class="paramhead"><a name="confun_ncnlin" id="confun_ncnlin"/>2:
 &#160;&#160;&#8194;
 <b>ncnlin</b> &#8211; Integer&#160;<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>N</m:mi>
 </m:msub>
</m:math>, the number of nonlinear constraints.</div>
</dd><dt class="paramhead"><a name="confun_needc" id="confun_needc"/>3:
 &#160;&#160;&#8194;
 <b>needc</b>[<a class="argref" href="#confun_ncnlin">ncnlin</a>] &#8211; const&#160;Integer&#160;<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the indices of the elements of <a class="argref" href="#confun_conf">conf</a> and/or <a class="argref" href="#confun_conjac">conjac</a> that must be evaluated by <a class="argref" href="#confun">confun</a>.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#confun_needc" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">needc</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>&gt;</m:mo>
 <m:mn>0</m:mn>
</m:math>&#160;then the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>i</m:mi>
</m:math>th element of <a class="argref" href="#confun_conf">conf</a> and/or the available elements of the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>i</m:mi>
</m:math>th row of <a class="argref" href="#confun_conjac">conjac</a> (see parameter <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#confun_comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#confun_flag"><m:mi mathcolor="#FF00FF" mathvariant="bold">flag</m:mi></m:maction>
</m:math>&#160;below) must be evaluated at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>.</div>
</dd><dt class="paramhead"><a name="confun_x" id="confun_x"/>4:
 &#160;&#160;&#8194;
 <b>x</b>[<a class="argref" href="#confun_n">n</a>] &#8211; const&#160;double&#160;<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the vector of variables <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;at which the constraint functions and/or all available elements of the constraint Jacobian are to be evaluated.</div>
</dd><dt class="paramhead"><a name="confun_conf" id="confun_conf"/>5:
 &#160;&#160;&#8194;
 <b>conf</b>[<a class="argref" href="#confun_ncnlin">ncnlin</a>] &#8211; double&#160;<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#confun_needc" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">needc</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>&gt;</m:mo>
 <m:mn>0</m:mn>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#confun_comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#confun_flag"><m:mi mathcolor="#FF00FF" mathvariant="bold">flag</m:mi></m:maction>
 <m:mo>=</m:mo>
 <m:mn>0</m:mn>
</m:math>&#160;or 2, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#confun_conf" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">conf</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;must contain the value of the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>i</m:mi>
</m:math>th constraint at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>.  The remaining elements of <a class="argref" href="#confun_conf">conf</a>, corresponding to the non-positive elements of <a class="argref" href="#confun_needc">needc</a>, are ignored.</div>
</dd><dt class="paramhead"><a name="confun_conjac" id="confun_conjac"/>6:
 &#160;&#160;&#8194;
 <b>conjac</b>[<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#confun_ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:href="#confun_n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction></m:math>] &#8211; double&#160;<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#confun_needc" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">needc</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>&gt;</m:mo>
 <m:mn>0</m:mn>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#confun_comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#confun_flag"><m:mi mathcolor="#FF00FF" mathvariant="bold">flag</m:mi></m:maction>
 <m:mo>=</m:mo>
 <m:mn>2</m:mn>
</m:math>, the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>i</m:mi>
</m:math>th row of <a class="argref" href="#confun_conjac">conjac</a> (i.e., the elements <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#confun_conjac" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">conjac</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow>
   <m:mfenced separators=""><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced>
   <m:mo>&#215;</m:mo>
   <m:maction actiontype="link" dsi:href="#confun_n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
   <m:mo>+</m:mo>
   <m:mi>j</m:mi>
   <m:mo>-</m:mo>
   <m:mn>1</m:mn>
  </m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>,</m:mo>
 <m:mi>n</m:mi>
</m:math>) must contain the available elements of the vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mo>&#8711;</m:mo>
 <m:msub>
  <m:mi>c</m:mi>
  <m:mi>i</m:mi>
 </m:msub>
</m:math>&#160;given by

<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mo>&#8711;</m:mo>
 <m:msub>
  <m:mi>c</m:mi>
  <m:mi>i</m:mi>
 </m:msub>
 <m:mo>=</m:mo>
 <m:msup><m:mfenced separators=""><m:mfrac other="display">
    <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>c</m:mi><m:mi>i</m:mi></m:msub></m:mrow>
    <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub></m:mrow>
   </m:mfrac><m:mo>,</m:mo><m:mfrac other="display">
    <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>c</m:mi><m:mi>i</m:mi></m:msub></m:mrow>
    <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub></m:mrow>
   </m:mfrac><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mfrac other="display">
    <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>c</m:mi><m:mi>i</m:mi></m:msub></m:mrow>
    <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mi>n</m:mi></m:msub></m:mrow>
   </m:mfrac></m:mfenced><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>c</m:mi><m:mi>i</m:mi></m:msub></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mi>j</m:mi></m:msub></m:mrow>
 </m:mfrac>
</m:math>&#160;is the partial derivative of the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>i</m:mi>
</m:math>th constraint with respect to the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>th variable, evaluated at the point <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>.  The remaining rows of <a class="argref" href="#confun_conjac">conjac</a>, corresponding to non-positive elements of <a class="argref" href="#confun_needc">needc</a>, are ignored.
<div class="paramtext">If the optional parameter <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_con_deriv" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.con_deriv</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_True</m:mi>
</m:math>&#160;(the default), all elements of <a class="argref" href="#confun_conjac">conjac</a> must be set; if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_con_deriv" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.con_deriv</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_False</m:mi>
</m:math>, then any available partial derivatives of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>c</m:mi>
  <m:mi>i</m:mi>
 </m:msub>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math>&#160;must be assigned to the elements of <a class="argref" href="#confun_conjac">conjac</a>; the remaining elements <span class="italic">must remain unchanged</span>.</div>
<div class="paramtext">If all elements of the constraint Jacobian are known (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_con_deriv" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.con_deriv</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_True</m:mi>
</m:math>; see Section <a class="secref" href="#op-description">11.2</a>), any constant elements may be assigned to <a class="argref" href="#confun_conjac">conjac</a> one time only at the start of the optimization.  An element of <a class="argref" href="#confun_conjac">conjac</a> that is not subsequently assigned in <a class="argref" href="#confun">confun</a> will retain its initial value throughout.</div>
<div class="paramtext">Constant elements may be loaded into <a class="argref" href="#confun_conjac">conjac</a> during the first call to <a class="argref" href="#confun">confun</a>.  The ability to preload constants is useful when many Jacobian elements are identically zero, in which case <a class="argref" href="#confun_conjac">conjac</a> may be initialized to zero at the first call when <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#confun_comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#confun_first"><m:mi mathcolor="#FF00FF" mathvariant="bold">first</m:mi></m:maction>
 <m:mo>=</m:mo>
 <m:mi mathvariant="bold">Nag_True</m:mi></m:math>.  
</div>
<div class="paramtext">It must be emphasized that, if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_con_deriv" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.con_deriv</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_False</m:mi>
</m:math>, unassigned elements of <a class="argref" href="#confun_conjac">conjac</a> are not treated as constant; they are estimated by finite differences, at non-trivial expense.  If the user does not supply a value for the optional argument <a class="optparamref" href="#optparam_f_diff_int">options.f_diff_int</a> (the default; see Section <a class="secref" href="#op-description">11.2</a>), an interval for each element of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;is computed automatically at the start of the optimization.  The automatic procedure can usually identify constant elements of <a class="argref" href="#confun_conjac">conjac</a>, which are then computed once only by finite differences.</div>
</div>
</dd><dt class="paramhead"><a name="confun_comm" id="confun_comm"/>7:
 &#160;&#160;&#8194;
 <b>comm</b> &#8211; Nag_Comm&#160;*</dt><dd>
<div class="paramtext">Pointer to structure of type <b>Nag_Comm</b>; the following members are relevant to <a class="argref" href="#confun">confun</a>.</div><div>
<dl>
<dt class="memberhead"><a name="confun_comm_flag" id="confun_comm_flag"/><b>flag</b> &#8211; Integer&#160;<span class="pclass">Input/Output</span></dt><dd>
<div class="membertext"><i>On entry</i>: <a class="argref" href="#confun">confun</a> is called with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#confun_comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#confun_comm_flag"><m:mi mathcolor="#FF00FF" mathvariant="bold">flag</m:mi></m:maction>
</m:math>&#160;set to 0 or 2.
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#confun_comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#confun_comm_flag"><m:mi mathcolor="#FF00FF" mathvariant="bold">flag</m:mi></m:maction>
 <m:mo>=</m:mo>
 <m:mn>0</m:mn>
</m:math>&#160;then only <a class="argref" href="#confun_conf">conf</a> is referenced.</div>
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#confun_comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#confun_comm_flag"><m:mi mathcolor="#FF00FF" mathvariant="bold">flag</m:mi></m:maction>
 <m:mo>=</m:mo>
 <m:mn>2</m:mn>
</m:math>&#160;then both <a class="argref" href="#confun_conf">conf</a> and <a class="argref" href="#confun_conjac">conjac</a> are referenced.</div>
</div>
<div class="membertext"><i>On exit</i>: if <a class="argref" href="#confun">confun</a> resets <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#confun_comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#confun_comm_flag"><m:mi mathcolor="#FF00FF" mathvariant="bold">flag</m:mi></m:maction>
</m:math>&#160;to some negative number then nag_opt_nlp (e04ucc) will terminate immediately with the error indicator <a class="ifailref" href="#NE_USER_STOP">NE_USER_STOP</a>.  If <a class="argref" href="#fail">fail</a> is supplied to nag_opt_nlp (e04ucc) <b>fail.errnum</b> will be set to the user's setting of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#confun_comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#confun_comm_flag"><m:mi mathcolor="#FF00FF" mathvariant="bold">flag</m:mi></m:maction>
</m:math>.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="confun_comm_first" id="confun_comm_first"/><b>first</b> &#8211; Nag_Boolean&#160;<span class="pclass">Input</span></dt><dd>
<div class="membertext"><i>On entry</i>: will be set to <b>Nag_True</b> on the first call to <a class="argref" href="#confun">confun</a> and <b>Nag_False</b> for all subsequent calls.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="confun_comm_user" id="confun_comm_user"/><b>user</b> &#8211; double&#160;*<span class="pclass"/></dt>
<dt class="multi-memberhead"><a name="confun_comm_iuser" id="confun_comm_iuser"/><b>iuser</b> &#8211; Integer&#160;*<span class="pclass"/></dt>
<dt class="multi-memberhead"><a name="confun_comm_p" id="confun_comm_p"/><b>p</b> &#8211; Pointer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The type Pointer will be <span class="mono">void *</span> with a C compiler that defines <span class="mono">void *</span> and <span class="mono">char *</span> otherwise.</div><div class="membertext">Before calling nag_opt_nlp (e04ucc) these pointers may be allocated memory by the user and initialized with various quantities for use by <a class="argref" href="#confun">confun</a> when called from nag_opt_nlp (e04ucc).</div>
</dd></dl>
</div>
</dd></dl>
</div>
<div class="paramtext"><b>Note:</b> <a class="argref" href="#confun">confun</a> should be tested separately before being used in conjunction with nag_opt_nlp (e04ucc).  The optional parameters <a class="optparamref" href="#optparam_verify_grad">options.verify_grad</a> and <a class="optparamref" href="#optparam_max_iter">options.max_iter</a> can be used to assist this process.  The array <a class="argref" href="#x">x</a> must <b>not</b> be changed by <a class="argref" href="#confun">confun</a>.</div>
<div class="paramtext">If <a class="argref" href="#confun">confun</a> does not calculate all of the elements of the constraint gradients then the optional parameter <a class="optparamref" href="#optparam_con_deriv">options.con_deriv</a> should be set to <b>Nag_False</b>.</div>
</dd><dt class="paramhead"><a name="x" id="x"/>10:
 &#8194;
 <b>x</b>[<a class="argref" href="#n">n</a>] &#8211; double&#160;<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On entry</i>: an initial estimate of the solution.</div>
<div class="paramtext"><i>On exit</i>: the final estimate of the solution.</div>
</dd><dt class="paramhead"><a name="objf" id="objf"/>11:
 &#8194;
 <b>objf</b> &#8211; double&#160;*<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: the value of the objective function at the final iterate.</div>
</dd><dt class="paramhead"><a name="g" id="g"/>12:
 &#8194;
 <b>g</b>[<a class="argref" href="#n">n</a>] &#8211; double&#160;<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: the gradient of the objective function at the final iterate (or its finite difference approximation).</div>
</dd><dt class="paramhead"><a name="options" id="options"/>13:
 &#8194;
 <b>options</b> &#8211; Nag_E04_Opt&#160;*<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On entry/exit</i>: a pointer to a structure of type <b>Nag_E04_Opt</b> whose members are optional parameters for nag_opt_nlp (e04ucc).  These structure members offer the means of adjusting some of the parameter values of the algorithm and on output will supply further details of the results.  A description of the members of <a class="argref" href="#options">options</a> is given below in Section <a class="secref" href="#e04uccoptparams">11</a>.  Some of the results returned in <a class="argref" href="#options">options</a> can be used by nag_opt_nlp (e04ucc) to perform a &#8216;warm start&#8217; (see the member <a class="optparamref" href="#optparam_start">options.start</a> in Section <a class="secref" href="#op-description">11.2</a>).
<div class="paramtext">If any of these optional parameters are required then the structure <a class="argref" href="#options">options</a> should be declared and initialized by a call to <a class="rtnref" href="../E04/e04xxc.xml">nag_opt_init (e04xxc)</a> and supplied as an argument to nag_opt_nlp (e04ucc).  However, if the optional parameters are not required the NAG defined null pointer, <span class="mono">E04_DEFAULT</span>, can be used in the function call.</div>
</div>
</dd><dt class="paramhead"><a name="comm" id="comm"/>14:
 &#8194;
 <b>comm</b> &#8211; Nag_Comm&#160;*<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On entry/exit</i>: structure containing pointers for communication to the user-supplied functions <a class="argref" href="#objfun">objfun</a> and <a class="argref" href="#confun">confun</a>, and the optional user-defined printing function; see the description of <a class="argref" href="#objfun">objfun</a> and <a class="argref" href="#confun">confun</a> and Section <a class="secref" href="#printed-output">11.3.1</a> for details.  If the user does not need to make use of this communication feature the null pointer <span class="mono">NAGCOMM_NULL</span> may be used in the call to nag_opt_nlp (e04ucc); <a class="argref" href="#comm">comm</a> will then be declared internally for use in calls to user-supplied functions.</div>
</dd><dt class="paramhead"><a name="fail" id="fail"/>15:
 &#8194;
 <b>fail</b> &#8211; NagError&#160;*<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext">The NAG error parameter, see the <a class="secref" href="../genint/cl_essint.xml">Essential Introduction</a>.</div>
</dd></dl><h3><a name="e04uccargus1" id="e04uccargus1"/>5.1&#160;&#160;Description of Printed Output </h3><div class="paramtext">Intermediate and final results are printed out by default.  The level of printed output can be controlled by the user with the structure members <a class="optparamref" href="#optparam_print_level">options.print_level</a> and <a class="optparamref" href="#optparam_minor_print_level">options.minor_print_level</a> (see Section <a class="secref" href="#op-description">11.2</a>).  The default setting of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_level" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.print_level</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Soln_Iter</m:mi></m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_minor_print_level" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.minor_print_level</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_NoPrint</m:mi></m:math>&#160;provides a single line of output at each iteration and the final result.  This section describes the default printout produced by nag_opt_nlp (e04ucc).</div>
<div class="paramtext">The following line of summary output (<m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mo>&lt;</m:mo>
 <m:mn>80</m:mn>
</m:math>&#160;characters) is produced at every major iteration.  In all cases, the values of the quantities printed are those in effect <span class="italic">on completion</span> of the given iteration.
</div><table style="width:90%;"><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Maj</span></td><td valign="top">is the major iteration count.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Mnr</span></td><td valign="top">is the number of minor iterations required by the feasibility and optimality phases of the QP subproblem.  Generally, <span class="mono">Mnr</span> will be 1 in the later iterations, since theoretical analysis predicts that the correct active set will be identified near the solution (see Section <a class="secref" href="#e04uccfd">10</a>).</td></tr><tr><td style="width:15%" class="libdoc" valign="top"/><td valign="top">Note that <span class="mono">Mnr</span> may be greater than the optional parameter <a class="optparamref" href="#optparam_minor_max_iter">options.minor_max_iter</a> (default value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mtext/>
 <m:mo>=</m:mo>
 <m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><m:mfenced separators=""><m:mn>50</m:mn><m:mo>,</m:mo><m:mrow>
    <m:mn>3</m:mn>
    <m:mfenced separators="">
     <m:mi>n</m:mi>
     <m:mo>+</m:mo>
     <m:msub>
      <m:mi>n</m:mi>
      <m:mi>L</m:mi>
     </m:msub>
     <m:mo>+</m:mo>
     <m:msub>
      <m:mi>n</m:mi>
      <m:mi>N</m:mi>
     </m:msub>
    </m:mfenced>
   </m:mrow></m:mfenced></m:mrow>
</m:math>; see Section <a class="secref" href="#op-description">11.2</a>) if some iterations are required for the feasibility phase.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Step</span></td><td valign="top">is the step taken along the computed search direction. On reasonably well-behaved problems, the unit step will be taken as the solution is approached.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Merit function</span></td><td valign="top">is the value of the augmented Lagrangian merit function (<a class="eqnref" href="#eqn12">12</a>) at the current iterate.  This function will decrease at each iteration unless it was necessary to increase the penalty parameters (see Section <a class="secref" href="#e04uccfd3">10.3</a>).  As the solution is approached, <span class="mono">Merit function</span> will converge to the value of the objective function at the solution.
<div class="paramtext">If the QP subproblem does not have a feasible point (signified by <span class="mono">I</span> at the end of the current output line), the merit function is a large multiple of the constraint violations, weighted by the penalty parameters.  During a sequence of major iterations with infeasible subproblems, the sequence of <span class="mono">Merit Function</span> values will decrease monotonically until either a feasible subproblem is obtained or nag_opt_nlp (e04ucc) terminates with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#fail" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">fail</m:mi></m:maction><m:mi mathvariant="bold">.code</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#NW_NONLIN_NOT_FEASIBLE" dsi:type="simple"><m:mi mathvariant="bold" mathcolor="#003399">NW_NONLIN_NOT_FEASIBLE</m:mi></m:maction>
</m:math>&#160;(no feasible point could be found for the nonlinear constraints).</div>
<div class="paramtext">If no nonlinear constraints are present (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn>
</m:math>), this entry contains <span class="mono">Objective</span>, the value of the objective function <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math>.  The objective function will decrease monotonically to its optimal value when there are no nonlinear constraints.</div></td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Violtn</span></td><td valign="top">is the Euclidean norm of the residuals of constraints that are violated or in the predicted active set (not printed if <a class="argref" href="#ncnlin">ncnlin</a> is zero).  <span class="mono">Violtn</span> will be approximately zero in the neighbourhood of a solution.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Norm Gz</span></td><td valign="top">is <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="&#8214;" close="&#8214;" separators="">
  <m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
  <m:msub>
   <m:mi>g</m:mi>
   <m:mi mathvariant="normal">FR</m:mi>
  </m:msub>
 </m:mfenced>
</m:math>, the Euclidean norm of the projected gradient (see Section <a class="secref" href="#e04uccfd1">10.1</a>).  <span class="mono">Norm</span> <span class="mono">Gz</span> will be approximately zero in the neighbourhood of a solution.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Cond Hz</span></td><td valign="top">is a lower bound on the condition number of the projected Hessian approximation <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>H</m:mi>
  <m:mi>Z</m:mi>
 </m:msub>
</m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced separators="">
  <m:msub>
   <m:mi>H</m:mi>
   <m:mi>Z</m:mi>
  </m:msub>
  <m:mo>=</m:mo>
  <m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
  <m:msub>
   <m:mi>H</m:mi>
   <m:mi mathvariant="normal">FR</m:mi>
  </m:msub>
  <m:mi>Z</m:mi>
  <m:mo>=</m:mo>
  <m:msubsup><m:mi>R</m:mi><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
  <m:msub>
   <m:mi>R</m:mi>
   <m:mi>Z</m:mi>
  </m:msub>
 </m:mfenced>
</m:math>; see (<a class="eqnref" href="#eqn6">6</a>) in Section <a class="secref" href="#e04uccfd1">10.1</a> and (<a class="eqnref" href="#eqn11">11</a>) in Section <a class="secref" href="#e04uccfd2">10.2</a>). The larger this number, the more difficult the problem.</td></tr></table><div class="paramtext">
</div>
<div class="paramtext">The line of output may be terminated by one of the following characters:
</div><table style="width:90%;"><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">M</span></td><td valign="top">is printed if the quasi-Newton update was modified to ensure that the Hessian approximation is positive-definite (see Section <a class="secref" href="#e04uccfd4">10.4</a>).</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">I</span></td><td valign="top">is printed if the QP subproblem has no feasible point.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">C</span></td><td valign="top">is printed if central differences were used to compute the unspecified objective and constraint gradients.  If the value of <span class="mono">Step</span> is zero, the switch to central differences was made because no lower point could be found in the line search.  (In this case, the QP subproblem is re-solved with the central difference gradient and Jacobian.)  If the value of <span class="mono">Step</span> is non-zero, central differences were computed because <span class="mono">Norm Gz</span> and <span class="mono">Violtn</span> imply that <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;is close to a Kuhn&#8211;Tucker point (see Section <a class="secref" href="#e04uccfd1">10.1</a>).</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">L</span></td><td valign="top">is printed if the line search has produced a relative change in <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;greater than the value defined by the optional parameter <a class="optparamref" href="#optparam_step_limit">options.step_limit</a> (default value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mtext/><m:mo>=</m:mo><m:mn>2.0</m:mn>
</m:math>; see Section <a class="secref" href="#op-description">11.2</a>).  If this output occurs frequently during later iterations of the run, <a class="optparamref" href="#optparam_step_limit">options.step_limit</a> should be set to a larger value.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">R</span></td><td valign="top">is printed if the approximate Hessian has been refactorized.  If the diagonal condition estimator of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>R</m:mi>
</m:math>&#160;indicates that the approximate Hessian is badly conditioned, the approximate Hessian is refactorized using column interchanges.  If necessary, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>R</m:mi>
</m:math>&#160;is modified so that its diagonal condition estimator is bounded.</td></tr></table><div class="paramtext">
</div>
<div class="paramtext">The final printout includes a listing of the status of every variable and constraint.</div>
<div class="paramtext">The following describes the printout for each variable.
</div><table style="width:90%;"><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Varbl</span></td><td valign="top">gives the name (<span class="mono">V</span>) and index <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>,</m:mo>
 <m:mi>n</m:mi>
</m:math>&#160;of the variable.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">State</span></td><td valign="top">gives the state of the variable (<span class="mono">FR</span> if neither bound is in the active 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).  If <span class="mono">Value</span> lies outside the upper or lower bounds by more than the feasibility tolerances specified by the optional parameters <a class="optparamref" href="#optparam_lin_feas_tol">options.lin_feas_tol</a> and <a class="optparamref" href="#optparam_nonlin_feas_tol">options.nonlin_feas_tol</a> (see Section <a class="secref" href="#op-description">11.2</a>), <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> to give some additional information about the state of a variable.
 </div><table style="width:100%;"><tr><td class="libdoc" valign="top"><span class="mono">A</span></td><td valign="top"><span class="italic">Alternative optimum possible</span>.  The variable is active at one of its bounds, but its Lagrange Multiplier is essentially zero.  This means that if the variable were allowed to start moving away from its bound, 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 class="libdoc" valign="top"><span class="mono">D</span></td><td valign="top"><span class="italic">Degenerate</span>. The variable is free, but it is equal to (or very close to) one of its bounds.</td></tr><tr><td class="libdoc" valign="top"><span class="mono">I</span></td><td valign="top"><span class="italic">Infeasible</span>.  The variable is currently violating one of its bounds by more than <a class="optparamref" href="#optparam_lin_feas_tol">options.lin_feas_tol</a>.</td></tr></table><div class="paramtext">
 </div></td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Value</span></td><td valign="top">is the value of the variable at the final iteration.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Lower bound</span></td><td valign="top">is the lower bound specified for the variable <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>.  (<span class="mono">None</span> indicates that <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_bound</m:mi></m:maction></m:math>, where <a class="optparamref" href="#optparam_inf_bound">options.inf_bound</a> is the optional parameter.)</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Upper bound</span></td><td valign="top">is the upper bound specified for the variable <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>.  (<span class="mono">None</span> indicates that <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>&#8805;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_bound</m:mi></m:maction></m:math>, where <a class="optparamref" href="#optparam_inf_bound">options.inf_bound</a> is the optional parameter.)</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Lagr Mult</span></td><td valign="top">is the value of the Lagrange multiplier for the associated bound constraint.  This will be zero if <span class="mono">State</span> is <span class="mono">FR</span> unless <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>&#8804;</m:mo>
 <m:mrow><m:mo>-</m:mo><m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_bound</m:mi></m:maction></m:mrow>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>&#8805;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_bound</m:mi></m:maction></m:math>, in which case the entry will be blank.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;is optimal, the multiplier should be non-negative if <span class="mono">State</span> is <span class="mono">LL</span>, and non-positive if <span class="mono">State</span> is <span class="mono">UL</span>.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Residual</span></td><td valign="top">is the difference between the variable <span class="mono">Value</span> and the nearer of its (finite) bounds <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>.  A blank entry indicates that the associated variable is not bounded (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>&#8804;</m:mo>
 <m:mrow><m:mo>-</m:mo><m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_bound</m:mi></m:maction></m:mrow>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>&#8805;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_bound</m:mi></m:maction></m:math>).</td></tr></table><div class="paramtext">
</div>
<div class="paramtext">The meaning of the printout for linear and nonlinear constraints is the same as that given above for variables, with &#8216;variable&#8217; replaced by &#8216;constraint&#8217;, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;are replaced by <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow>
   <m:mi>n</m:mi>
   <m:mo>+</m:mo>
   <m:mi>j</m:mi>
   <m:mo>-</m:mo>
   <m:mn>1</m:mn>
  </m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow>
   <m:mi>n</m:mi>
   <m:mo>+</m:mo>
   <m:mi>j</m:mi>
   <m:mo>-</m:mo>
   <m:mn>1</m:mn>
  </m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;respectively, and with the following changes in the heading:
</div><table style="width:90%;"><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">L Con</span></td><td valign="top">gives the name (<span class="mono">L</span>) and index <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>,</m:mo>
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
</m:math>&#160;of the linear constraint.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">N Con</span></td><td valign="top">gives the name (<span class="mono">N</span>) and index <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced separators="">
  <m:msub>
   <m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mi>n</m:mi></m:mrow>
   <m:mi>L</m:mi>
  </m:msub>
 </m:mfenced>
</m:math>, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
 <m:mo>=</m:mo>
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
 <m:mo>+</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
 <m:mo>+</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>,</m:mo>
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
 <m:mo>+</m:mo>
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>N</m:mi>
 </m:msub>
</m:math>&#160;of the nonlinear constraint.</td></tr></table><div class="paramtext">
</div>
<div class="paramtext">The <span class="mono">I</span> key in the <span class="mono">State</span> column is printed for general linear constraints which currently violate one of their bounds by more than <a class="optparamref" href="#optparam_lin_feas_tol">options.lin_feas_tol</a> and for nonlinear constraints which violate one of their bounds by more than <a class="optparamref" href="#optparam_nonlin_feas_tol">options.nonlin_feas_tol</a>.</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">Residual</span> column to become positive.</div>
<div class="paramtext">Numerical values are output with a fixed number of digits; they are not guaranteed to be accurate to this precision.</div><h2><a name="errors" id="errors"/>6&#160;&#160;Error Indicators and Warnings</h2><dl><dt class="errorhead"><a name="NE_2_INT_ARG_LT" id="NE_2_INT_ARG_LT"/><b>NE_2_INT_ARG_LT</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext">On entry, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#tda" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">tda</m:mi></m:maction><m:mo>=</m:mo><m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced>
</m:math>&#160;while <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction><m:mo>=</m:mo><m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced>
</m:math>.  These parameters must satisfy <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#tda" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">tda</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
</m:math>.  <br/>
This error message is output only if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn>
</m:math>.
</div></dd><dt class="errorhead"><a name="NE_2_INT_OPT_ARG_CONS" id="NE_2_INT_OPT_ARG_CONS"/><b>NE_2_INT_OPT_ARG_CONS</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext">On entry, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_con_check_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.con_check_start</m:mi></m:maction><m:mo>=</m:mo><m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced>
</m:math>&#160;while <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_con_check_stop" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.con_check_stop</m:mi></m:maction><m:mo>=</m:mo><m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced>
</m:math>.  <br/>
Constraint: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_con_check_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.con_check_start</m:mi></m:maction><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:href="#optparam_con_check_stop" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.con_check_stop</m:mi></m:maction>
</m:math>.
</div></dd><dt class="errorhead"><a name="NE_ALLOC_FAIL" id="NE_ALLOC_FAIL"/><b>NE_ALLOC_FAIL</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> Dynamic memory allocation failed.
</div></dd><dt class="errorhead"><a name="NE_BAD_PARAM" id="NE_BAD_PARAM"/><b>NE_BAD_PARAM</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext">On entry, parameter <a class="optparamref" href="#optparam_print_level">options.print_level</a> had an illegal value.</div></dd><dt class="errorhead"><a name="NE_BOUND" id="NE_BOUND"/><b>NE_BOUND</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> The lower bound for variable <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced></m:math>&#160;(array element <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>) is greater than the upper bound.
</div></dd><dt class="errorhead"><a name="NE_BOUND_EQ" id="NE_BOUND_EQ"/><b>NE_BOUND_EQ</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> The lower bound and upper bound for variable <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced></m:math>&#160;(array elements <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>) are equal but they are greater than or equal to <a class="optparamref" href="#optparam_inf_bound">options.inf_bound</a>.
</div></dd><dt class="errorhead"><a name="NE_BOUND_EQ_LCON" id="NE_BOUND_EQ_LCON"/><b>NE_BOUND_EQ_LCON</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> The lower bound and upper bound for linear constraint <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced></m:math>&#160;(array elements <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>) are equal but they are greater than or equal to <a class="optparamref" href="#optparam_inf_bound">options.inf_bound</a>.
</div></dd><dt class="errorhead"><a name="NE_BOUND_EQ_NLCON" id="NE_BOUND_EQ_NLCON"/><b>NE_BOUND_EQ_NLCON</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> The lower bound and upper bound for nonlinear constraint <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced></m:math>&#160;(array elements <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>) are equal but they are greater than or equal to <a class="optparamref" href="#optparam_inf_bound">options.inf_bound</a>.
</div></dd><dt class="errorhead"><a name="NE_BOUND_LCON" id="NE_BOUND_LCON"/><b>NE_BOUND_LCON</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> The lower bound for linear constraint <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced></m:math>&#160;(array element <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>) is greater than the upper bound.
</div></dd><dt class="errorhead"><a name="NE_BOUND_NLCON" id="NE_BOUND_NLCON"/><b>NE_BOUND_NLCON</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> The lower bound for nonlinear constraint <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced></m:math>&#160;(array element <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>) is greater than the upper bound.
</div></dd><dt class="errorhead"><a name="NE_DERIV_ERRORS" id="NE_DERIV_ERRORS"/><b>NE_DERIV_ERRORS</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> Large errors were found in the derivatives of the objective function and/or nonlinear constraints.  <br/>
This failure will occur if the verification process indicated that at least one gradient or Jacobian element had no correct figures.  The user should refer to the printed output to determine which elements are suspected to be in error.  <br/>
As a first-step, the user should check that the code for the objective and constraint values is correct &#8211; for example, by computing the function at a point where the correct value is known.  However, care should be taken that the chosen point fully tests the evaluation of the function.  It is remarkable how often the values <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi><m:mo>=</m:mo><m:mn>0</m:mn>
</m:math>&#160;or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi><m:mo>=</m:mo><m:mn>1</m:mn>
</m:math>&#160;are used to test function evaluation procedures, and how often the special properties of these numbers make the test meaningless.  <br/>
Gradient checking will be ineffective if the objective function uses information computed by the constraints, since they are not necessarily computed prior to each function evaluation.  <br/>
Errors in programming the function may be quite subtle in that the function value is &#8216;almost&#8217; correct.  For example, the function may not be accurate to full precision because of the inaccurate calculation of a subsidiary quantity, or the limited accuracy of data upon which the function depends.  A common error on machines where numerical calculations are usually performed in double precision is to include even one single precision constant in the calculation of the function; since some compilers do not convert such constants to double precision, half the correct figures may be lost by such a seemingly trivial error.
</div></dd><dt class="errorhead"><a name="NE_INT_ARG_LT" id="NE_INT_ARG_LT"/><b>NE_INT_ARG_LT</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext">On entry, <a class="argref" href="#n">n</a> must not be less than 1: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction><m:mo>=</m:mo><m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced>
</m:math>.</div></dd><dt class="errorhead"><a name="NE_INT_OPT_ARG_GT" id="NE_INT_OPT_ARG_GT"/><b>NE_INT_OPT_ARG_GT</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext">On entry, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_obj_check_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.obj_check_start</m:mi></m:maction><m:mo>=</m:mo><m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced>
</m:math>.  <br/>
Constraint: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_obj_check_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.obj_check_start</m:mi></m:maction><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
</m:math>.
</div></dd><dt class="errorhead"><a name="NE_INT_OPT_ARG_LT" id="NE_INT_OPT_ARG_LT"/><b>NE_INT_OPT_ARG_LT</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext">On entry, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_obj_check_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.obj_check_start</m:mi></m:maction><m:mo>=</m:mo><m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced>
</m:math>.  <br/>
Constraint: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_obj_check_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.obj_check_start</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>1</m:mn>
</m:math>.
</div></dd><dt class="errorhead"><a name="NE_INVALID_INT_RANGE_1" id="NE_INVALID_INT_RANGE_1"/><b>NE_INVALID_INT_RANGE_1</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> Value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced></m:math>&#160;given to <a class="optparamref" href="#optparam_max_iter">options.max_iter</a> not valid.  Correct range is <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_max_iter" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.max_iter</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>0</m:mn>
</m:math>.
</div></dd><dt class="errorhead"><a name="NE_INVALID_REAL_RANGE_EF" id="NE_INVALID_REAL_RANGE_EF"/><b>NE_INVALID_REAL_RANGE_EF</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> Value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced></m:math>&#160;given to <a class="optparamref" href="#optparam_f_prec">options.f_prec</a> not valid.   Correct range is <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#949;</m:mi>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_f_prec" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.f_prec</m:mi></m:maction>
 <m:mo>&lt;</m:mo>
 <m:mn>1.0</m:mn>
</m:math>.
</div></dd><dt class="errorhead"><a name="NE_INVALID_REAL_RANGE_F" id="NE_INVALID_REAL_RANGE_F"/><b>NE_INVALID_REAL_RANGE_F</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> Value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced></m:math>&#160;given to <a class="optparamref" href="#optparam_step_limit">options.step_limit</a> not valid.   Correct range is <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_step_limit" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.step_limit</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0.0</m:mn>
</m:math>.
</div></dd><dt class="errorhead"><a name="NE_INVALID_REAL_RANGE_FF" id="NE_INVALID_REAL_RANGE_FF"/><b>NE_INVALID_REAL_RANGE_FF</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> Value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced></m:math>&#160;given to <a class="optparamref" href="#optparam_linesearch_tol">options.linesearch_tol</a> not valid.   Correct range is <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mn>0.0</m:mn>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_linesearch_tol" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.linesearch_tol</m:mi></m:maction>
 <m:mo>&lt;</m:mo>
 <m:mn>1.0</m:mn>
</m:math>.
</div></dd><dt class="errorhead"><a name="NE_NOT_APPEND_FILE" id="NE_NOT_APPEND_FILE"/><b>NE_NOT_APPEND_FILE</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> Cannot open file <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="&#9001;" close="&#9002;" separators="">
  <m:mi mathvariant="italic">string</m:mi>
 </m:mfenced>
</m:math>&#160;for appending.
</div></dd><dt class="errorhead"><a name="NE_NOT_CLOSE_FILE" id="NE_NOT_CLOSE_FILE"/><b>NE_NOT_CLOSE_FILE</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> Cannot close file <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="&#9001;" close="&#9002;" separators="">
  <m:mi mathvariant="italic">string</m:mi>
 </m:mfenced>
</m:math>.
</div></dd><dt class="errorhead"><a name="NE_OPT_NOT_INIT" id="NE_OPT_NOT_INIT"/><b>NE_OPT_NOT_INIT</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> Options structure not initialized.
</div></dd><dt class="errorhead"><a name="NE_STATE_VAL" id="NE_STATE_VAL"/><b>NE_STATE_VAL</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#optparam_state" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.state</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;is out of range.  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#optparam_state" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.state</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>=</m:mo>
 <m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced></m:math>.
</div></dd><dt class="errorhead"><a name="NE_USER_STOP" id="NE_USER_STOP"/><b>NE_USER_STOP</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> User requested termination, user flag value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mtext/><m:mo>=</m:mo><m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced>
</m:math>.  <br/>
This exit occurs if the user sets <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#flag"><m:mi mathcolor="#FF00FF" mathvariant="bold">flag</m:mi></m:maction>
</m:math>&#160;to a negative value in <a class="argref" href="#objfun">objfun</a> or <a class="argref" href="#confun">confun</a>.  If <a class="argref" href="#fail">fail</a> is supplied the value of <b>fail.errnum</b> will be the same as the user's setting of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#flag"><m:mi mathcolor="#FF00FF" mathvariant="bold">flag</m:mi></m:maction>
</m:math>.
</div></dd><dt class="errorhead"><a name="NW_KT_CONDITIONS" id="NW_KT_CONDITIONS"/><b>NW_KT_CONDITIONS</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> The current point cannot be improved upon.  The final point does not satisfy the first-order Kuhn&#8211;Tucker conditions and no improved point for the merit function could be found during the final line search.  <br/>
The Kuhn&#8211;Tucker conditions are specified in Section <a class="secref" href="#e04uccfd1">10.1</a>, and the merit function is described in Section <a class="secref" href="#e04uccfd3">10.3</a> and Section <a class="secref" href="#e04uccoptparams3">11.3</a>.  <br/>
This sometimes occurs because an overly stringent accuracy has been requested, i.e., the value of the optional parameter <a class="optparamref" href="#optparam_optim_tol">options.optim_tol</a> (default value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mtext/>
 <m:mo>=</m:mo>
 <m:msubsup>
  <m:mi>&#949;</m:mi>
  <m:mi>r</m:mi>
  <m:mn>0.8</m:mn>
 </m:msubsup>
</m:math>, where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#949;</m:mi>
  <m:mi>r</m:mi>
 </m:msub>
</m:math>&#160;is the relative precision of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math>; see Section <a class="secref" href="#op-description">11.2</a>) is too small.  In this case the user should apply the four tests described in Section <a class="secref" href="#e04uccfc1">8.1</a> to determine whether or not the final solution is acceptable (see <a class="litref" href="#ref079">Gill <i>et al.</i> (1981)</a> for a discussion of the attainable accuracy).  <br/>
If many iterations have occurred in which essentially no progress has been made and nag_opt_nlp (e04ucc) has failed completely to move from the initial point then functions <a class="argref" href="#objfun">objfun</a> and/or <a class="argref" href="#confun">confun</a> may be incorrect.  The user should refer to comments below under <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#fail" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">fail</m:mi></m:maction><m:mi mathvariant="bold">.code</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#NE_DERIV_ERRORS" dsi:type="simple"><m:mi mathvariant="bold" mathcolor="#003399">NE_DERIV_ERRORS</m:mi></m:maction>
</m:math>&#160;and check the gradients using the optional parameter <a class="optparamref" href="#optparam_verify_grad">options.verify_grad</a> (default value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_verify_grad" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.verify_grad</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_SimpleCheck</m:mi></m:math>; see Section <a class="secref" href="#op-description">11.2</a>).  Unfortunately, there may be small errors in the objective and constraint gradients that cannot be detected by the verification process.  Finite difference approximations to first derivatives are catastrophically affected by even small inaccuracies.  An indication of this situation is a dramatic alteration in the iterates if the finite difference interval is altered.  One might also suspect this type of error if a switch is made to central differences even when <span class="mono">Norm Gz</span> and <span class="mono">Violtn</span> (see Section <a class="secref" href="#e04uccargus1">5.1</a>) are large.  <br/>
Another possibility is that the search direction has become inaccurate because of ill conditioning in the Hessian approximation or the matrix of constraints in the working set; either form of ill conditioning tends to be reflected in large values of <span class="mono">Mnr</span> (the number of iterations required to solve each QP subproblem; see Section <a class="secref" href="#e04uccargus1">5.1</a>).  <br/>
If the condition estimate of the projected Hessian (<span class="mono">Cond Hz</span>; see Section <a class="secref" href="#e04uccargus1">5.1</a>) is extremely large, it may be worthwhile rerunning nag_opt_nlp (e04ucc) from the final point with the optional parameter <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.start</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Warm</m:mi></m:math>&#160;(see Section <a class="secref" href="#op-description">11.2</a>).  In this situation, the optional parameters <a class="optparamref" href="#optparam_state">options.state</a> and <a class="optparamref" href="#optparam_lambda">options.lambda</a> should be left unaltered and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>R</m:mi>
</m:math>&#160;(in optional parameter <a class="optparamref" href="#optparam_h">options.h</a>) should be reset to the identity matrix.  <br/>
If the matrix of constraints in the working set is ill conditioned (i.e., <span class="mono">Cond T</span> is extremely large; see Section <a class="secref" href="#e04uccoptparams3">11.3</a>), it may be helpful to run nag_opt_nlp (e04ucc) with a relaxed value of the optional parameters <a class="optparamref" href="#optparam_lin_feas_tol">options.lin_feas_tol</a> and <a class="optparamref" href="#optparam_nonlin_feas_tol">options.nonlin_feas_tol</a> (default values <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msqrt>
  <m:mi>&#949;</m:mi>
 </m:msqrt>
</m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup>
  <m:mi>&#949;</m:mi>
  <m:mn>0.33</m:mn>
 </m:msup>
</m:math>&#160;or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msqrt>
  <m:mi>&#949;</m:mi>
 </m:msqrt>
</m:math>, respectively, where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#949;</m:mi>
</m:math>&#160;is the <span class="bitalic">machine precision</span>; see Section <a class="secref" href="#op-description">11.2</a>).  (Constraint dependencies are often indicated by wide variations in size in the diagonal elements of the matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>T</m:mi>
</m:math>, whose diagonals will be printed if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_level" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.print_level</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Soln_Iter_Full</m:mi></m:math>&#160;(default value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_level" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.print_level</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Soln_Iter</m:mi></m:math>; see Section <a class="secref" href="#op-description">11.2</a>).)
</div></dd><dt class="errorhead"><a name="NW_LIN_NOT_FEASIBLE" id="NW_LIN_NOT_FEASIBLE"/><b>NW_LIN_NOT_FEASIBLE</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> No feasible point was found for the linear constraints and bounds.  <br/>
nag_opt_nlp (e04ucc) has terminated without finding a feasible point for the linear constraints and bounds, which means that either no feasible point exists for the given value of the optional parameter <a class="optparamref" href="#optparam_lin_feas_tol">options.lin_feas_tol</a> (default value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mtext/>
 <m:mo>=</m:mo>
 <m:msqrt>
  <m:mi>&#949;</m:mi>
 </m:msqrt>
</m:math>, where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#949;</m:mi>
</m:math>&#160;is the <span class="bitalic">machine precision</span>; see Section <a class="secref" href="#op-description">11.2</a>), or no feasible point could be found in the number of iterations specified by the optional parameter <a class="optparamref" href="#optparam_minor_max_iter">options.minor_max_iter</a> (default value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mtext/>
 <m:mo>=</m:mo>
 <m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><m:mfenced separators=""><m:mn>50</m:mn><m:mo>,</m:mo><m:mrow>
    <m:mn>3</m:mn>
    <m:mfenced separators="">
     <m:mi>n</m:mi>
     <m:mo>+</m:mo>
     <m:msub>
      <m:mi>n</m:mi>
      <m:mi>L</m:mi>
     </m:msub>
     <m:mo>+</m:mo>
     <m:msub>
      <m:mi>n</m:mi>
      <m:mi>N</m:mi>
     </m:msub>
    </m:mfenced>
   </m:mrow></m:mfenced></m:mrow>
</m:math>; see Section <a class="secref" href="#op-description">11.2</a>).  The user should check that there are no constraint redundancies.  If the data for the constraints are accurate only to an absolute precision <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#963;</m:mi>
</m:math>, the user should ensure that the value of the optional parameter <a class="optparamref" href="#optparam_lin_feas_tol">options.lin_feas_tol</a> is greater than <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#963;</m:mi>
</m:math>.  For example, if all elements of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>A</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
</m:math>&#160;are of order unity and are accurate to only three decimal places, <a class="optparamref" href="#optparam_lin_feas_tol">options.lin_feas_tol</a> should be at least <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup>
  <m:mn>10</m:mn>
  <m:mrow><m:mo>-</m:mo><m:mn>3</m:mn></m:mrow>
 </m:msup>
</m:math>.
</div></dd><dt class="errorhead"><a name="NW_NONLIN_NOT_FEASIBLE" id="NW_NONLIN_NOT_FEASIBLE"/><b>NW_NONLIN_NOT_FEASIBLE</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> No feasible point could be found for the nonlinear constraints.  <br/>
The problem may have no feasible solution.  This means that there has been a sequence of QP subproblems for which no feasible point could be found (indicated by <span class="mono">I</span> at the end of each terse line of output; see Section <a class="secref" href="#e04uccargus1">5.1</a>).  This behaviour will occur if there is no feasible point for the nonlinear constraints.  (However, there is no general test that can determine whether a feasible point exists for a set of nonlinear constraints.)  If the infeasible subproblems occur from the very first major iteration, it is highly likely that no feasible point exists.  If infeasibilities occur when earlier subproblems have been feasible, small constraint inconsistencies may be present.  The user should check the validity of constraints with negative values of the optional parameter <a class="optparamref" href="#optparam_state">options.state</a>.  If the user is convinced that a feasible point does exist, nag_opt_nlp (e04ucc) should be restarted at a different starting point.
</div></dd><dt class="errorhead"><a name="NW_NOT_CONVERGED" id="NW_NOT_CONVERGED"/><b>NW_NOT_CONVERGED</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> Optimal solution found, but the sequence of iterates has not converged with the requested accuracy.  <br/>
The final iterate <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;satisfies the first-order Kuhn&#8211;Tucker conditions (see Section <a class="secref" href="#e04uccfd1">10.1</a>) to the accuracy requested, but the sequence of iterates has not yet converged.  nag_opt_nlp (e04ucc) was terminated because no further improvement could be made in the merit function (see Section <a class="secref" href="#e04uccoptparams3">11.3</a>).  <br/>
This value of <a class="argref" href="#fail">fail</a> may occur in several circumstances.  The most common situation is that the user asks for a solution with accuracy that is not attainable with the given precision of the problem (as specified by the optional parameter <a class="optparamref" href="#optparam_f_prec">options.f_prec</a> (default value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mtext/>
 <m:mo>=</m:mo>
 <m:msup>
  <m:mi>&#949;</m:mi>
  <m:mn>0.9</m:mn>
 </m:msup>
</m:math>, where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#949;</m:mi>
</m:math>&#160;is the <span class="bitalic">machine precision</span>; see Section <a class="secref" href="#op-description">11.2</a>)).  This condition will also occur if, by chance, an iterate is an &#8216;exact&#8217; Kuhn&#8211;Tucker point, but the change in the variables was significant at the previous iteration.  (This situation often happens when minimizing very simple functions, such as quadratics.)  <br/>
If the four conditions listed in Section <a class="secref" href="#e04uccfc1">8.1</a> are satisfied then <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;is likely to be a solution of (<a class="eqnref" href="#eqn1">1</a>) even if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#fail" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">fail</m:mi></m:maction><m:mi mathvariant="bold">.code</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#NW_NOT_CONVERGED" dsi:type="simple"><m:mi mathvariant="bold" mathcolor="#003399">NW_NOT_CONVERGED</m:mi></m:maction>
</m:math>.
</div></dd><dt class="errorhead"><a name="NW_OVERFLOW_WARN" id="NW_OVERFLOW_WARN"/><b>NW_OVERFLOW_WARN</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> Serious ill conditioning in the working set after adding constraint <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced></m:math>.  Overflow may occur in subsequent iterations.  <br/>
If overflow occurs preceded by this warning then serious ill conditioning has probably occurred in the working set when adding a constraint.  It may be possible to avoid the difficulty by increasing the magnitude of the optional parameter <a class="optparamref" href="#optparam_lin_feas_tol">options.lin_feas_tol</a> (default value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mtext/>
 <m:mo>=</m:mo>
 <m:msqrt>
  <m:mi>&#949;</m:mi>
 </m:msqrt>
</m:math>, where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#949;</m:mi>
</m:math>&#160;is the <span class="bitalic">machine precision</span>; see Section <a class="secref" href="#op-description">11.2</a>) and/or the optional parameter <a class="optparamref" href="#optparam_nonlin_feas_tol">options.nonlin_feas_tol</a> (default value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup>
  <m:mi>&#949;</m:mi>
  <m:mn>0.33</m:mn>
 </m:msup>
</m:math>&#160;or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msqrt>
  <m:mi>&#949;</m:mi>
 </m:msqrt>
</m:math>; see Section <a class="secref" href="#op-description">11.2</a>), and rerunning the program.  If the message recurs even after this change, the offending linearly dependent constraint <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>&#160;must be removed from the problem.  If overflow occurs in one of the user-supplied functions (e.g., if the nonlinear functions involve exponentials or singularities), it may help to specify tighter bounds for some of the variables (i.e., reduce the gap between the appropriate <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>l</m:mi>
  <m:mi>j</m:mi>
 </m:msub>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>u</m:mi>
  <m:mi>j</m:mi>
 </m:msub>
</m:math>).
</div></dd><dt class="errorhead"><a name="NW_TOO_MANY_ITER" id="NW_TOO_MANY_ITER"/><b>NW_TOO_MANY_ITER</b></dt>
<dd style="margin-top: .2em;"><div class="paramtext"> The maximum number of iterations, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="&#9001;" close="&#9002;" separators=""><m:mtext mathvariant="italic">value</m:mtext></m:mfenced></m:math>, have been performed.  <br/>
The value of the optional parameter <a class="optparamref" href="#optparam_max_iter">options.max_iter</a> may be too small.  If the method appears to be making progress (e.g., the objective function is being satisfactorily reduced), increase the value of the optional parameter <a class="optparamref" href="#optparam_max_iter">options.max_iter</a> and rerun nag_opt_nlp (e04ucc); alternatively, rerun nag_opt_nlp (e04ucc), setting the optional parameter <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.start</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Warm</m:mi></m:math>&#160;to specify the initial working set.  If the algorithm seems to be making little or no progress, however, then the user should check for incorrect gradients or ill conditioning as described below under <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#fail" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">fail</m:mi></m:maction><m:mi mathvariant="bold">.code</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#NW_KT_CONDITIONS" dsi:type="simple"><m:mi mathvariant="bold" mathcolor="#003399">NW_KT_CONDITIONS</m:mi></m:maction>
</m:math>.  <br/>
Note that ill conditioning in the working set is sometimes resolved automatically by the algorithm, in which case performing additional iterations may be helpful.  However, ill conditioning in the Hessian approximation tends to persist once it has begun, so that allowing additional iterations without altering <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>R</m:mi>
</m:math>&#160;is usually inadvisable.  If the quasi-Newton update of the Hessian approximation was reset during the latter iterations (i.e., an <span class="mono">R</span> occurs at the end of each line of output; see Section <a class="secref" href="#e04uccargus1">5.1</a>), it may be worthwhile setting <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.start</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Warm</m:mi></m:math>&#160;and calling nag_opt_nlp (e04ucc) from the final point.
</div></dd></dl><h2><a name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2><div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#fail" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">fail</m:mi></m:maction><m:mi mathvariant="bold">.code</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#errors" dsi:type="simple"><m:mi mathvariant="bold" mathcolor="#003399">NE_NOERROR</m:mi></m:maction>
</m:math>&#160;on exit, then the vector returned in the array <a class="argref" href="#x">x</a> is an estimate of the solution to an accuracy of approximately <a class="optparamref" href="#optparam_optim_tol">options.optim_tol</a> (default value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mtext/>
 <m:mo>=</m:mo>
 <m:msubsup>
  <m:mi>&#949;</m:mi>
  <m:mi>r</m:mi>
  <m:mn>0.8</m:mn>
 </m:msubsup>
</m:math>, where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#949;</m:mi>
  <m:mi>r</m:mi>
 </m:msub>
</m:math>&#160;is the relative precision of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math>; see Section <a class="secref" href="#op-description">11.2</a>).</div><h2><a name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2><h3><a name="e04uccfc1" id="e04uccfc1"/>8.1&#160;&#160;Termination Criteria </h3><div class="paramtext">The function exits with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#fail" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">fail</m:mi></m:maction><m:mi mathvariant="bold">.code</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#errors" dsi:type="simple"><m:mi mathvariant="bold" mathcolor="#003399">NE_NOERROR</m:mi></m:maction>
</m:math>&#160;if iterates have converged to a point <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;that satisfies the Kuhn&#8211;Tucker conditions (see Section <a class="secref" href="#e04uccfd1">10.1</a>) to the accuracy requested by the optional parameter <a class="optparamref" href="#optparam_optim_tol">options.optim_tol</a> (default value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mtext/>
 <m:mo>=</m:mo>
 <m:msubsup>
  <m:mi>&#949;</m:mi>
  <m:mi>r</m:mi>
  <m:mn>0.8</m:mn>
 </m:msubsup>
</m:math>, see Section <a class="secref" href="#op-description">11.2</a>).</div>
<div class="paramtext">The user should also examine the printout from nag_opt_nlp (e04ucc) (see Section <a class="secref" href="#e04uccargus1">5.1</a> or Section <a class="secref" href="#e04uccoptparams3">11.3</a>) to check whether the following four conditions are satisfied:
</div><ol class="listroman"><li class="listroman">the final value of <span class="mono">Norm Gz</span> is significantly less than at the starting point;</li><li class="listroman">during the final major iterations, the values of <span class="mono">Step</span> and <span class="mono">Mnr</span> are both one;</li><li class="listroman">the last few values of both <span class="mono">Violtn</span> and <span class="mono">Norm Gz</span> become small at a fast linear rate; and</li><li class="listroman"><span class="mono">Cond Hz</span> is small.</li></ol><div class="paramtext">
</div>
<div class="paramtext">If all these conditions hold, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;is almost certainly a local minimum.</div><h2><a name="example" id="example"/>9&#160;&#160;Example</h2><div class="paramtext">There is one example program file, the main program of which calls both examples EX1 and EX2.  Example 1 (EX1) shows the simple use of nag_opt_nlp (e04ucc) where default values are used for all optional parameters.  An example showing the use of optional parameters is given in EX2 and is described in Section <a class="secref" href="#example2">12</a>.</div>
<div class="paramtext"><b>Example 1</b> (EX1)</div>
<div class="paramtext">This is based on Problem 71 in <a class="litref" href="#ref093">Hock  and Schittkowski (1981)</a> and involves the minimization of the nonlinear function
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:mi>F</m:mi>
  <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
  <m:mo>=</m:mo>
  <m:msub>
   <m:mi>x</m:mi>
   <m:mn>1</m:mn>
  </m:msub>
  <m:msub>
   <m:mi>x</m:mi>
   <m:mn>4</m:mn>
  </m:msub>
  <m:mfenced separators="">
   <m:msub>
    <m:mi>x</m:mi>
    <m:mn>1</m:mn>
   </m:msub>
   <m:mo>+</m:mo>
   <m:msub>
    <m:mi>x</m:mi>
    <m:mn>2</m:mn>
   </m:msub>
   <m:mo>+</m:mo>
   <m:msub>
    <m:mi>x</m:mi>
    <m:mn>3</m:mn>
   </m:msub>
  </m:mfenced>
  <m:mo>+</m:mo>
  <m:msub>
   <m:mi>x</m:mi>
   <m:mn>3</m:mn>
  </m:msub>
 </m:mrow>
</m:math></td><td class="formula2"/></tr></table></div>
<div class="paramtext">
subject to the bounds
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mtable>
  <m:mtr>
   <m:mtd/>
   <m:mtd>
    <m:mn>1</m:mn>
    <m:mo>&#8804;</m:mo>
    <m:msub>
     <m:mi>x</m:mi>
     <m:mn>1</m:mn>
    </m:msub>
    <m:mo>&#8804;</m:mo>
    <m:mn>5</m:mn>
   </m:mtd>
  </m:mtr>
  <m:mtr>
   <m:mtd/>
   <m:mtd>
    <m:mn>1</m:mn>
    <m:mo>&#8804;</m:mo>
    <m:msub>
     <m:mi>x</m:mi>
     <m:mn>2</m:mn>
    </m:msub>
    <m:mo>&#8804;</m:mo>
    <m:mn>5</m:mn>
   </m:mtd>
  </m:mtr>
  <m:mtr>
   <m:mtd/>
   <m:mtd>
    <m:mn>1</m:mn>
    <m:mo>&#8804;</m:mo>
    <m:msub>
     <m:mi>x</m:mi>
     <m:mn>3</m:mn>
    </m:msub>
    <m:mo>&#8804;</m:mo>
    <m:mn>5</m:mn>
   </m:mtd>
  </m:mtr>
  <m:mtr>
   <m:mtd/>
   <m:mtd>
    <m:mn>1</m:mn>
    <m:mo>&#8804;</m:mo>
    <m:msub>
     <m:mi>x</m:mi>
     <m:mn>4</m:mn>
    </m:msub>
    <m:mo>&#8804;</m:mo>
    <m:mn>5</m:mn>
   </m:mtd>
  </m:mtr>
 </m:mtable>
</m:math></td><td class="formula2"/></tr></table></div>
<div class="paramtext">
to the general linear constraint
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:msub>
   <m:mi>x</m:mi>
   <m:mn>1</m:mn>
  </m:msub>
  <m:mo>+</m:mo>
  <m:msub>
   <m:mi>x</m:mi>
   <m:mn>2</m:mn>
  </m:msub>
  <m:mo>+</m:mo>
  <m:msub>
   <m:mi>x</m:mi>
   <m:mn>3</m:mn>
  </m:msub>
  <m:mo>+</m:mo>
  <m:msub>
   <m:mi>x</m:mi>
   <m:mn>4</m:mn>
  </m:msub>
  <m:mo>&#8804;</m:mo>
  <m:mn>20</m:mn>
  <m:mtext>,</m:mtext>
 </m:mrow>
</m:math></td><td class="formula2"/></tr></table></div>
<div class="paramtext">
and to the nonlinear constraints
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mtable>
  <m:mtr>
   <m:mtd/>
   <m:mtd>
    <m:msubsup>
     <m:mi>x</m:mi>
     <m:mn>1</m:mn>
     <m:mn>2</m:mn>
    </m:msubsup>
    <m:mo>+</m:mo>
    <m:msubsup>
     <m:mi>x</m:mi>
     <m:mn>2</m:mn>
     <m:mn>2</m:mn>
    </m:msubsup>
    <m:mo>+</m:mo>
    <m:msubsup>
     <m:mi>x</m:mi>
     <m:mn>3</m:mn>
     <m:mn>2</m:mn>
    </m:msubsup>
    <m:mo>+</m:mo>
    <m:msubsup>
     <m:mi>x</m:mi>
     <m:mn>4</m:mn>
     <m:mn>2</m:mn>
    </m:msubsup>
    <m:mo>&#8804;</m:mo>
    <m:mn>40</m:mn>
    <m:mtext>,</m:mtext>
   </m:mtd>
  </m:mtr>
  <m:mtr>
   <m:mtd/>
   <m:mtd>
    <m:msub>
     <m:mi>x</m:mi>
     <m:mn>1</m:mn>
    </m:msub>
    <m:msub>
     <m:mi>x</m:mi>
     <m:mn>2</m:mn>
    </m:msub>
    <m:msub>
     <m:mi>x</m:mi>
     <m:mn>3</m:mn>
    </m:msub>
    <m:msub>
     <m:mi>x</m:mi>
     <m:mn>4</m:mn>
    </m:msub>
    <m:mo>&#8805;</m:mo>
    <m:mn>25</m:mn>
    <m:mtext>.</m:mtext>
   </m:mtd>
  </m:mtr>
 </m:mtable>
</m:math></td><td class="formula2"/></tr></table></div>
<div class="paramtext">
The initial point, which is infeasible, is
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:msub>
   <m:mi>x</m:mi>
   <m:mn>0</m:mn>
  </m:msub>
  <m:mo>=</m:mo>
  <m:msup><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>5</m:mn><m:mo>,</m:mo><m:mn>5</m:mn><m:mo>,</m:mo><m:mn>1</m:mn></m:mfenced><m:mi mathvariant="normal">T</m:mi></m:msup>
  <m:mtext>,</m:mtext>
 </m:mrow>
</m:math></td><td class="formula2"/></tr></table></div>
<div class="paramtext">
and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
 <m:mfenced separators="">
  <m:msub>
   <m:mi>x</m:mi>
   <m:mn>0</m:mn>
  </m:msub>
 </m:mfenced>
 <m:mo>=</m:mo>
 <m:mn>16</m:mn>
</m:math>.</div>
<div class="paramtext">The optimal solution (to five figures) is
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:msup>
   <m:mi>x</m:mi>
   <m:mo>*</m:mo>
  </m:msup>
  <m:mo>=</m:mo>
  <m:msup><m:mfenced separators=""><m:mn>1.0</m:mn><m:mo>,</m:mo><m:mn>4.7430</m:mn><m:mo>,</m:mo><m:mn>3.8211</m:mn><m:mo>,</m:mo><m:mn>1.3794</m:mn></m:mfenced><m:mi mathvariant="normal">T</m:mi></m:msup>
  <m:mtext>,</m:mtext>
 </m:mrow>
</m:math></td><td class="formula2"/></tr></table></div>
<div class="paramtext">
and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
 <m:mfenced separators="">
  <m:msup>
   <m:mi>x</m:mi>
   <m:mo>*</m:mo>
  </m:msup>
 </m:mfenced>
 <m:mo>=</m:mo>
 <m:mn>17.014</m:mn>
</m:math>.  One bound constraint and both nonlinear constraints are active at the solution.</div><h3><a name="examtext" id="examtext"/>9.1&#160;&#160;Program Text</h3>
 
<p><a class="verbatimref" href="../../examples/source/e04ucce.c">Program Text (e04ucce.c)</a></p><h3><a name="examdata" id="examdata"/>9.2&#160;&#160;Program Data</h3><p><a class="verbatimref" href="../../examples/data/e04ucce.d">Program Data (e04ucce.d)</a></p><h3><a name="examresults" id="examresults"/>9.3&#160;&#160;Program Results</h3><p><a class="verbatimref" href="../../examples/baseresults/e04ucce.r">Program Results (e04ucce.r)</a></p><h2><a name="e04uccfd" id="e04uccfd"/>10&#160;&#160;Further Description </h2><div class="paramtext">This section gives a detailed description of the algorithm used in nag_opt_nlp (e04ucc).  This, and possibly the next section, Section <a class="secref" href="#e04uccoptparams">11</a>, may be omitted if the more sophisticated features of the algorithm and software are not currently of interest.</div><h3><a name="e04uccfd1" id="e04uccfd1"/>10.1&#160;&#160;Overview </h3><div class="paramtext">nag_opt_nlp (e04ucc) is based on the same algorithm as used in subroutine NPSOL described in <a class="litref" href="#ref540">Gill <i>et al.</i> (1986c)</a>.</div>
<div class="paramtext">At a solution of (<a class="eqnref" href="#eqn1">1</a>), some of the constraints will be <span class="italic">active</span>, i.e., satisfied exactly.  An active simple bound constraint implies that the corresponding variable is <span class="italic">fixed</span> at its bound, and hence the variables are partitioned into <span class="italic">fixed</span> and <span class="italic">free</span> variables.  Let <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>C</m:mi>
</m:math>&#160;denote the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>m</m:mi>
</m:math>&#160;by <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>n</m:mi>
</m:math>&#160;matrix of gradients of the active general linear and nonlinear constraints.  The number of fixed variables will be denoted by <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi mathvariant="normal">FX</m:mi>
 </m:msub>
</m:math>, with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced separators="">
  <m:msub>
   <m:mi>n</m:mi>
   <m:mi mathvariant="normal">FR</m:mi>
  </m:msub>
  <m:mo>=</m:mo>
  <m:mi>n</m:mi>
  <m:mo>-</m:mo>
  <m:msub>
   <m:mi>n</m:mi>
   <m:mi mathvariant="normal">FX</m:mi>
  </m:msub>
 </m:mfenced>
</m:math>&#160;the number of free variables.  The subscripts &#8216;FX&#8217; and &#8216;FR&#8217; on a vector or matrix will denote the vector or matrix composed of the elements corresponding to fixed or free variables.</div>
<div class="paramtext">A point <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;is a <span class="italic">first-order Kuhn&#8211;Tucker point</span> for (<a class="eqnref" href="#eqn1">1</a>) (see, e.g., <a class="litref" href="#ref096">Powell (1974)</a>) if the following conditions hold:
</div><ol class="listroman"><li class="listroman"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;is feasible;</li><li class="listroman">there exist vectors <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#958;</m:mi>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#955;</m:mi>
</m:math>&#160;(<span class="italic">the Lagrange multiplier vectors for the bound and general constraints</span>) such that

<div class="formula-eqn"><a name="eqn2" id="eqn2"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:mi>g</m:mi>
  <m:mo>=</m:mo>
  <m:msup><m:mi>C</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
  <m:mi>&#955;</m:mi>
  <m:mo>+</m:mo>
  <m:mi>&#958;</m:mi>
 </m:mrow>
</m:math></td><td class="formula-eqn2">
      (2)
     </td></tr></table></div>

where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>g</m:mi>
</m:math>&#160;is the gradient of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
</m:math>&#160;evaluated at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>, and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#958;</m:mi>
  <m:mi>j</m:mi>
 </m:msub>
 <m:mo>=</m:mo>
 <m:mn>0</m:mn>
</m:math>&#160;if the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>th variable is free.</li><li class="listroman">The Lagrange multiplier corresponding to an inequality constraint active at its lower bound must be non-negative, and it must be non-positive for an inequality constraint active at its upper bound.</li></ol><div class="paramtext">
Let <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>Z</m:mi>
</m:math>&#160;denote a matrix whose columns form a basis for the set of vectors orthogonal to the rows of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>C</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>; i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>C</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
 <m:mi>Z</m:mi>
 <m:mo>=</m:mo>
 <m:mn>0</m:mn>
</m:math>.  An equivalent statement of the condition (<a class="eqnref" href="#eqn2">2</a>) in terms of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>Z</m:mi>
</m:math>&#160;is
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
  <m:msub>
   <m:mi>g</m:mi>
   <m:mi mathvariant="normal">FR</m:mi>
  </m:msub>
  <m:mo>=</m:mo>
  <m:mn>0</m:mn>
  <m:mtext>.</m:mtext>
 </m:mrow>
</m:math></td><td class="formula2"/></tr></table></div>
<div class="paramtext">
The vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:msub>
  <m:mi>g</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>&#160;is termed the <span class="italic">projected gradient</span> of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
</m:math>&#160;at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>.  Certain additional conditions must be satisfied in order for a first-order Kuhn&#8211;Tucker point to be a solution of (<a class="eqnref" href="#eqn1">1</a>) (see, e.g., <a class="litref" href="#ref096">Powell (1974)</a>).  nag_opt_nlp (e04ucc) implements a sequential quadratic programming (SQP) method.  For an overview of SQP methods, see, for example, <a class="litref" href="#ref224">Fletcher (1987)</a>, <a class="litref" href="#ref079">Gill <i>et al.</i> (1981)</a> and <a class="litref" href="#ref097">Powell (1983)</a>.</div>
<div class="paramtext">The basic structure of nag_opt_nlp (e04ucc) involves <span class="italic">major</span> and <span class="italic">minor</span> iterations.  The major iterations generate a sequence of iterates <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="{" close="}" separators="">
  <m:msub>
   <m:mi>x</m:mi>
   <m:mi>k</m:mi>
  </m:msub>
 </m:mfenced>
</m:math>&#160;that converge to <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup>
  <m:mi>x</m:mi>
  <m:mo>*</m:mo>
 </m:msup>
</m:math>, a first-order Kuhn&#8211;Tucker point of (<a class="eqnref" href="#eqn1">1</a>).  At a typical major iteration, the new iterate <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mover>
  <m:mi>x</m:mi>
 <m:mo>-</m:mo></m:mover>
</m:math>&#160;is defined by
</div>
<div class="formula-eqn"><a name="eqn3" id="eqn3"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <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:mrow>
</m:math></td><td class="formula-eqn2">
      (3)
     </td></tr></table></div>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;is the current iterate, the non-negative scalar <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#945;</m:mi>
</m:math>&#160;is the <span class="italic">step length,</span> and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>p</m:mi>
</m:math>&#160;is the <span class="italic">search direction. </span> (For simplicity, we shall always consider a typical iteration and avoid reference to the index of the iteration.)  Also associated with each major iteration are estimates of the Lagrange multipliers and a prediction of the active set.</div>
<div class="paramtext">The search direction <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>p</m:mi>
</m:math>&#160;in (<a class="eqnref" href="#eqn3">3</a>) is the solution of a quadratic programming subproblem of the form
</div>
<div class="formula-eqn"><a name="eqn4" id="eqn4"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:munder>
  <m:mtext>Minimize</m:mtext>
  <m:mi>p</m:mi>
 </m:munder><m:mspace width="0.25em"/>
 <m:mtext>&#8195;</m:mtext> <m:msup><m:mi>g</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:mi>p</m:mi>
 <m:mo>+</m:mo>
 <m:mfrac>
  <m:mn>1</m:mn>
  <m:mn>2</m:mn>
 </m:mfrac>
 <m:msup><m:mi>p</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:mrow><m:mi>H</m:mi><m:mi>p</m:mi></m:mrow>
 <m:mtext>&#8195; subject to &#8195;</m:mtext>
 <m:mover>
  <m:mi>l</m:mi>
 <m:mo>-</m:mo></m:mover>
 <m:mo>&#8804;</m:mo>
 <m:mfenced open="{" close="}" separators="">
  <m:mtable>
   <m:mtr>
    <m:mtd>
     <m:mi>p</m:mi>
    </m:mtd>
   </m:mtr>
   <m:mtr>
    <m:mtd>
     <m:msub>
      <m:mi>A</m:mi>
      <m:mi>L</m:mi>
     </m:msub>
     <m:mi>p</m:mi>
    </m:mtd>
   </m:mtr>
   <m:mtr>
    <m:mtd>
     <m:msub>
      <m:mi>A</m:mi>
      <m:mi>N</m:mi>
     </m:msub>
     <m:mi>p</m:mi>
    </m:mtd>
   </m:mtr>
  </m:mtable>
 </m:mfenced>
 <m:mo>&#8804;</m:mo>
 <m:mover>
  <m:mi>u</m:mi>
 <m:mo>-</m:mo></m:mover>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (4)
     </td></tr></table></div>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>g</m:mi>
</m:math>&#160;is the gradient of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
</m:math>&#160;at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>, the matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>H</m:mi>
</m:math>&#160;is a positive-definite quasi-Newton approximation to the Hessian of the Lagrangian function (see Section <a class="secref" href="#e04uccfd4">10.4</a>), and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>A</m:mi>
  <m:mi>N</m:mi>
 </m:msub>
</m:math>&#160;is the Jacobian matrix of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>c</m:mi>
</m:math>&#160;evaluated at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>.  (Finite difference estimates may be used for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>g</m:mi>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>A</m:mi>
  <m:mi>N</m:mi>
 </m:msub>
</m:math>; see the optional parameters <a class="optparamref" href="#optparam_obj_deriv">options.obj_deriv</a> and <a class="optparamref" href="#optparam_con_deriv">options.con_deriv</a> in Section <a class="secref" href="#op-description">11.2</a>.)  Let <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>l</m:mi>
</m:math>&#160;in (<a class="eqnref" href="#eqn1">1</a>) be partitioned into three sections: <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>l</m:mi>
  <m:mi>B</m:mi>
 </m:msub>
</m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>l</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>l</m:mi>
  <m:mi>N</m:mi>
 </m:msub>
</m:math>, corresponding to the bound, linear and nonlinear constraints.  The vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mover>
  <m:mi>l</m:mi>
 <m:mo>-</m:mo></m:mover>
</m:math>&#160;in (<a class="eqnref" href="#eqn4">4</a>) is similarly partitioned, and is defined as
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:msub>
   <m:mover>
    <m:mi>l</m:mi>
   <m:mo>-</m:mo></m:mover>
   <m:mi>B</m:mi>
  </m:msub>
  <m:mo>=</m:mo>
  <m:msub>
   <m:mi>l</m:mi>
   <m:mi>B</m:mi>
  </m:msub>
  <m:mo>-</m:mo>
  <m:mi>x</m:mi>
  <m:mo>,</m:mo>
  <m:msub>
   <m:mover>
    <m:mi>l</m:mi>
   <m:mo>-</m:mo></m:mover>
   <m:mi>L</m:mi>
  </m:msub>
  <m:mo>=</m:mo>
  <m:msub>
   <m:mi>l</m:mi>
   <m:mi>L</m:mi>
  </m:msub>
  <m:mo>-</m:mo>
  <m:msub>
   <m:mi>A</m:mi>
   <m:mi>L</m:mi>
  </m:msub>
  <m:mi>x</m:mi>
  <m:mtext>, and &#8203;</m:mtext>
  <m:msub>
   <m:mover>
    <m:mi>l</m:mi>
   <m:mo>-</m:mo></m:mover>
   <m:mi>N</m:mi>
  </m:msub>
  <m:mo>=</m:mo>
  <m:msub>
   <m:mi>l</m:mi>
   <m:mi>N</m:mi>
  </m:msub>
  <m:mo>-</m:mo>
  <m:mi>c</m:mi>
  <m:mtext>,</m:mtext>
 </m:mrow>
</m:math></td><td class="formula2"/></tr></table></div>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>c</m:mi>
</m:math>&#160;is the vector of nonlinear constraints evaluated at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>.  The vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mover>
  <m:mi>u</m:mi>
 <m:mo>-</m:mo></m:mover>
</m:math>&#160;is defined in an analogous fashion.</div>
<div class="paramtext">The estimated Lagrange multipliers at each major iteration are the Lagrange multipliers from the subproblem (<a class="eqnref" href="#eqn4">4</a>) (and similarly for the predicted active set).  (The numbers of bounds, general linear and nonlinear constraints in the QP active set are the quantities <span class="mono">Bnd</span>, <span class="mono">Lin</span> and <span class="mono">Nln</span> in the output of nag_opt_nlp (e04ucc); see Section <a class="secref" href="#e04uccoptparams3">11.3</a>.)  In nag_opt_nlp (e04ucc), (<a class="eqnref" href="#eqn4">4</a>) is solved using the same algorithm as used in function <a class="rtnref" href="../E04/e04ncc.xml">nag_opt_lin_lsq (e04ncc)</a>.  Since solving a quadratic program is an iterative procedure, the minor iterations of nag_opt_nlp (e04ucc) are the iterations of <a class="rtnref" href="../E04/e04ncc.xml">nag_opt_lin_lsq (e04ncc)</a>.  (More details about solving the subproblem are given in Section <a class="secref" href="#e04uccfd2">10.2</a>.)</div>
<div class="paramtext">Certain matrices associated with the QP subproblem are relevant in the major iterations.  Let the subscripts &#8216;FX&#8217; and &#8216;FR&#8217; refer to the <span class="italic">predicted</span> fixed and free variables, and let <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>C</m:mi>
</m:math>&#160;denote the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>m</m:mi>
</m:math>&#160;by <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>n</m:mi>
</m:math>&#160;matrix of gradients of the general linear and nonlinear constraints in the predicted active set.  First, we have available the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:mi>T</m:mi><m:mi>Q</m:mi></m:mrow>
</m:math>&#160;factorization of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>C</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>:
</div>
<div class="formula-eqn"><a name="eqn5" id="eqn5"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <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:mtable>
    <m:mtr>
     <m:mtd><m:mn>0</m:mn></m:mtd>
     <m:mtd><m:mi>T</m:mi></m:mtd>
    </m:mtr>
   </m:mtable>
  </m:mfenced>
  <m:mtext>,</m:mtext>
 </m:mrow>
</m:math></td><td class="formula-eqn2">
      (5)
     </td></tr></table></div>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>T</m:mi>
</m:math>&#160;is a non-singular <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>m</m:mi>
</m:math>&#160;by <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>m</m:mi>
</m:math>&#160;reverse-triangular matrix (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>t</m:mi>
  <m:mrow><m:mi>i</m:mi><m:mi>j</m:mi></m:mrow>
 </m:msub>
 <m:mo>=</m:mo>
 <m:mn>0</m:mn>
</m:math>&#160;if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>i</m:mi>
 <m:mo>+</m:mo>
 <m:mi>j</m:mi>
 <m:mo>&lt;</m:mo>
 <m:mi>m</m:mi>
</m:math>, and the non-singular <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>&#160;by <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>&#160;matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>Q</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>&#160;is the product of orthogonal transformations (see <a class="litref" href="#ref089">Gill <i>et al.</i> (1984a)</a>).  Second, we have the upper triangular Cholesky factor <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>R</m:mi>
</m:math>&#160;of the <span class="italic">transformed and re-ordered</span> Hessian matrix
</div>
<div class="formula-eqn"><a name="eqn6" id="eqn6"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:msup><m:mi>R</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
  <m:mi>R</m:mi>
  <m:mo>=</m:mo>
  <m:msub>
   <m:mi>H</m:mi>
   <m:mi>Q</m:mi>
  </m:msub>
  <m:mo>&#8801;</m:mo>
  <m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
  <m:mrow>
   <m:mi>H</m:mi>
  <m:mo>&#732;</m:mo></m:mrow>
  <m:mi>Q</m:mi>
  <m:mtext>,</m:mtext>
 </m:mrow>
</m:math></td><td class="formula-eqn2">
      (6)
     </td></tr></table></div>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow>
  <m:mi>H</m:mi>
 <m:mo>&#732;</m:mo></m:mrow>
</m:math>&#160;is the Hessian <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>H</m:mi>
</m:math>&#160;with rows and columns permuted so that the free variables are first, and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>Q</m:mi>
</m:math>&#160;is the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>n</m:mi>
</m:math>&#160;by <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>n</m:mi>
</m:math>&#160;matrix
</div>
<div class="formula-eqn"><a name="eqn7" id="eqn7"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:mi>Q</m:mi>
  <m:mo>=</m:mo>
  <m:mfenced separators="">
   <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:mrow>
</m:math></td><td class="formula-eqn2">
      (7)
     </td></tr></table></div>
<div class="paramtext">
with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>I</m:mi>
  <m:mi mathvariant="normal">FX</m:mi>
 </m:msub>
</m:math>&#160;the identity matrix of order <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi mathvariant="normal">FX</m:mi>
 </m:msub>
</m:math>.  If the columns of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>Q</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>&#160;are partitioned so that
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:msub>
   <m:mi>Q</m:mi>
   <m:mi mathvariant="normal">FR</m:mi>
  </m:msub>
  <m:mo>=</m:mo>
  <m:mfenced separators="">
   <m:mtable>
    <m:mtr>
     <m:mtd><m:mi>Z</m:mi></m:mtd>
     <m:mtd><m:mi>Y</m:mi></m:mtd>
    </m:mtr>
   </m:mtable>
  </m:mfenced>
  <m:mtext>,</m:mtext>
 </m:mrow>
</m:math></td><td class="formula2"/></tr></table></div>
<div class="paramtext">
the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>Z</m:mi>
 </m:msub>
</m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced separators="">
  <m:msub>
   <m:mi>n</m:mi>
   <m:mi>Z</m:mi>
  </m:msub>
  <m:mo>&#8801;</m:mo>
  <m:msub>
   <m:mi>n</m:mi>
   <m:mi mathvariant="normal">FR</m:mi>
  </m:msub>
  <m:mo>-</m:mo>
  <m:mi>m</m:mi>
 </m:mfenced>
</m:math>&#160;columns of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>Z</m:mi>
</m:math>&#160;form a basis for the null space of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>C</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>.  The matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>Z</m:mi>
</m:math>&#160;is used to compute the projected gradient <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:msub>
  <m:mi>g</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>&#160;at the current iterate.  (The values <span class="mono">Nz</span>, <span class="mono">Norm Gf</span> and <span class="mono">Norm Gz</span> printed by nag_opt_nlp (e04ucc) give <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>Z</m:mi>
 </m:msub>
</m:math>&#160;and the norms of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>g</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:msub>
  <m:mi>g</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>; see Section <a class="secref" href="#e04uccoptparams3">11.3</a>.)</div>
<div class="paramtext">A theoretical characteristic of SQP methods is that the predicted active set from the QP subproblem (<a class="eqnref" href="#eqn4">4</a>) is identical to the correct active set in a neighbourhood of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup>
  <m:mi>x</m:mi>
  <m:mo>*</m:mo>
 </m:msup>
</m:math>.  In nag_opt_nlp (e04ucc), this feature is exploited by using the QP active set from the previous iteration as a prediction of the active set for the next QP subproblem, which leads in practice to optimality of the subproblems in only one iteration as the solution is approached.  Separate treatment of bound and linear constraints in nag_opt_nlp (e04ucc) also saves computation in factorizing <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>C</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>H</m:mi>
  <m:mi>Q</m:mi>
 </m:msub>
</m:math>.</div>
<div class="paramtext">Once <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>p</m:mi>
</m:math>&#160;has been computed, the major iteration proceeds by determining a step length <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#945;</m:mi>
</m:math>&#160;that produces a &#8216;sufficient decrease&#8217; in an augmented Lagrangian <span class="italic">merit function</span> (see Section <a class="secref" href="#e04uccfd3">10.3</a>).  Finally, the approximation to the transformed Hessian matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>H</m:mi>
  <m:mi>Q</m:mi>
 </m:msub>
</m:math>&#160;is updated using a modified BFGS quasi-Newton update (see Section <a class="secref" href="#e04uccfd4">10.4</a>) to incorporate new curvature information obtained in the move from <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;to <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mover>
  <m:mi>x</m:mi>
 <m:mo>-</m:mo></m:mover>
</m:math>.</div>
<div class="paramtext">On entry to nag_opt_nlp (e04ucc), an iterative procedure from <a class="rtnref" href="../E04/e04ncc.xml">nag_opt_lin_lsq (e04ncc)</a> is executed, starting with the user-provided initial point, to find a point that is feasible with respect to the bounds and linear constraints (using the tolerance specified by <a class="optparamref" href="#optparam_lin_feas_tol">options.lin_feas_tol</a>; see Section <a class="secref" href="#op-description">11.2</a>).  If no feasible point exists for the bound and linear constraints, (<a class="eqnref" href="#eqn1">1</a>) has no solution and nag_opt_nlp (e04ucc) terminates.  Otherwise, the problem functions will thereafter be evaluated only at points that are feasible with respect to the bounds and linear constraints.  The only exception involves variables whose bounds differ by an amount comparable to the finite difference interval (see the discussion of <a class="optparamref" href="#optparam_f_diff_int">options.f_diff_int</a> in Section <a class="secref" href="#op-description">11.2</a>).  In contrast to the bounds and linear constraints, it must be emphasized that <span class="italic">the nonlinear constraints will not generally be satisfied until an optimal point</span> is reached.</div>
<div class="paramtext">Facilities are provided to check whether the user-provided gradients appear to be correct (see the optional parameter <a class="optparamref" href="#optparam_verify_grad">options.verify_grad</a> in Section <a class="secref" href="#op-description">11.2</a>).  In general, the check is provided at the first point that is feasible with respect to the linear constraints and bounds.  However, the user may request that the check be performed at the initial point.</div>
<div class="paramtext">In summary, the method of nag_opt_nlp (e04ucc) first determines a point that satisfies the bound and linear constraints.  Thereafter, each iteration includes:
</div><ol class="listalpha"><li class="listalpha">the solution of a quadratic programming subproblem (see Section <a class="secref" href="#e04uccfd2">10.2</a>);</li><li class="listalpha">a linesearch with an augmented Lagrangian merit function (see Section <a class="secref" href="#e04uccfd3">10.3</a>); and</li><li class="listalpha">a quasi-Newton update of the approximate Hessian of the Lagrangian function (Section <a class="secref" href="#e04uccfd4">10.4</a>).</li></ol><div class="paramtext">
</div><h3><a name="e04uccfd2" id="e04uccfd2"/>10.2&#160;&#160;Solution of the Quadratic Programming Subproblem </h3><div class="paramtext">The search direction <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>p</m:mi>
</m:math>&#160;is obtained by solving (<a class="eqnref" href="#eqn4">4</a>) using the algorithm of <a class="rtnref" href="../E04/e04ncc.xml">nag_opt_lin_lsq (e04ncc)</a> (see <a class="litref" href="#ref091">Gill <i>et al.</i> (1986a)</a>), which was specifically designed to be used within an SQP algorithm for nonlinear programming.</div>
<div class="paramtext">The method of <a class="rtnref" href="../E04/e04ncc.xml">nag_opt_lin_lsq (e04ncc)</a> is a two-phase (primal) quadratic programming method.  The two phases of the method are: finding an initial feasible point by minimizing the sum of infeasibilities (the <span class="italic">feasibility phase</span>), and minimizing the quadratic objective function within the feasible region (the <span class="italic">optimality phase</span>).  The computations in both phases are performed by the same segments of code.  The two-phase nature of the algorithm is reflected by changing the function being minimized from the sum of infeasibilities to the quadratic objective function.</div>
<div class="paramtext">In general, a quadratic program must be solved by iteration.  Let <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>p</m:mi>
</m:math>&#160;denote the current estimate of the solution of 4; the new iterate <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mover>
  <m:mi>p</m:mi>
 <m:mo>-</m:mo></m:mover>
</m:math>&#160;is defined by
</div>
<div class="formula-eqn"><a name="eqn8" id="eqn8"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:mover>
   <m:mi>p</m:mi>
  <m:mo>-</m:mo></m:mover>
  <m:mo>=</m:mo>
  <m:mi>p</m:mi>
  <m:mo>+</m:mo>
  <m:mi>&#963;</m:mi>
  <m:mi>d</m:mi>
 </m:mrow>
</m:math></td><td class="formula-eqn2">
      (8)
     </td></tr></table></div>
<div class="paramtext">
where, as in (<a class="eqnref" href="#eqn3">3</a>), <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#963;</m:mi>
</m:math>&#160;is a non-negative step length and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>d</m:mi>
</m:math>&#160;is a search direction.</div>
<div class="paramtext">At the beginning of each iteration of <a class="rtnref" href="../E04/e04ncc.xml">nag_opt_lin_lsq (e04ncc)</a>, a <span class="italic">working</span> set is defined of constraints (general and bound) that are satisfied exactly.  The vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>d</m:mi>
</m:math>&#160;is then constructed so that the values of constraints in the working set remain <span class="italic">unaltered</span> for any move along <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>d</m:mi>
</m:math>.  For a bound constraint in the working set, this property is achieved by setting the corresponding element of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>d</m:mi>
</m:math>&#160;to zero, i.e., by fixing the variable at its bound.  As before, the subscripts &#8216;FX&#8217; and &#8216;FR&#8217; denote selection of the elements associated with the fixed and free variables.</div>
<div class="paramtext">Let <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>C</m:mi>
</m:math>&#160;denote the sub-matrix of rows of
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mfenced separators="">
  <m:mtable>
   <m:mtr>
    <m:mtd>
     <m:msub>
      <m:mi>A</m:mi>
      <m:mi>L</m:mi>
     </m:msub>
    </m:mtd>
   </m:mtr>
   <m:mtr>
    <m:mtd>
     <m:msub>
      <m:mi>A</m:mi>
      <m:mi>N</m:mi>
     </m:msub>
    </m:mtd>
   </m:mtr>
  </m:mtable>
 </m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div>
<div class="paramtext">
corresponding to general constraints in the working set.  The general constraints in the working set will remain unaltered if
</div>
<div class="formula-eqn"><a name="eqn9" id="eqn9"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:msub>
   <m:mi>C</m:mi>
   <m:mi mathvariant="normal">FR</m:mi>
  </m:msub>
  <m:msub>
   <m:mi>d</m:mi>
   <m:mi mathvariant="normal">FR</m:mi>
  </m:msub>
  <m:mo>=</m:mo>
  <m:mn>0</m:mn>
 </m:mrow>
</m:math></td><td class="formula-eqn2">
      (9)
     </td></tr></table></div>
<div class="paramtext">
which is equivalent to defining <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>d</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>&#160;as
</div>
<div class="formula-eqn"><a name="eqn10" id="eqn10"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:msub>
   <m:mi>d</m:mi>
   <m:mi mathvariant="normal">FR</m:mi>
  </m:msub>
  <m:mo>=</m:mo>
  <m:msub>
   <m:mrow><m:mi>Z</m:mi><m:mi>d</m:mi></m:mrow>
   <m:mi>Z</m:mi>
  </m:msub>
 </m:mrow>
</m:math></td><td class="formula-eqn2">
      (10)
     </td></tr></table></div>
<div class="paramtext">
for some vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>d</m:mi>
  <m:mi>Z</m:mi>
 </m:msub>
</m:math>, where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>Z</m:mi>
</m:math>&#160;is the matrix associated with the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:mi>T</m:mi><m:mi>Q</m:mi></m:mrow>
</m:math>&#160;factorization (<a class="eqnref" href="#eqn5">5</a>) of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>C</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>.</div>
<div class="paramtext">The definition of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>d</m:mi>
  <m:mi>Z</m:mi>
 </m:msub>
</m:math>&#160;in (<a class="eqnref" href="#eqn10">10</a>) depends on whether the current <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>p</m:mi>
</m:math>&#160;is feasible.  If not, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>d</m:mi>
  <m:mi>Z</m:mi>
 </m:msub>
</m:math>&#160;is zero except for a element <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#947;</m:mi>
</m:math>&#160;in the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>th position, where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#947;</m:mi>
</m:math>&#160;are chosen so that the sum of infeasibilities is decreasing along <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>d</m:mi>
</m:math>.  (For further details, see <a class="litref" href="#ref091">Gill <i>et al.</i> (1986a)</a>.)  In the feasible case, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>d</m:mi>
  <m:mi>Z</m:mi>
 </m:msub>
</m:math>&#160;satisfies the equations
</div>
<div class="formula-eqn"><a name="eqn11" id="eqn11"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:msubsup><m:mi>R</m:mi><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
  <m:msub>
   <m:mi>R</m:mi>
   <m:mi>Z</m:mi>
  </m:msub>
  <m:msub>
   <m:mi>d</m:mi>
   <m:mi>Z</m:mi>
  </m:msub>
  <m:mo>=</m:mo>
  <m:mo>-</m:mo>
  <m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
  <m:msub>
   <m:mi>q</m:mi>
   <m:mi mathvariant="normal">FR</m:mi>
  </m:msub>
 </m:mrow>
</m:math></td><td class="formula-eqn2">
      (11)
     </td></tr></table></div>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>R</m:mi>
  <m:mi>Z</m:mi>
 </m:msub>
</m:math>&#160;is the Cholesky factor of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:msub>
  <m:mi>H</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
 <m:mi>Z</m:mi>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>q</m:mi>
</m:math>&#160;is the gradient of the quadratic objective function <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced separators="">
  <m:mi>q</m:mi>
  <m:mo>=</m:mo>
  <m:mi>g</m:mi>
  <m:mo>+</m:mo>
  <m:mrow><m:mi>H</m:mi><m:mi>p</m:mi></m:mrow>
 </m:mfenced>
</m:math>.  (The vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:msub>
  <m:mi>q</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>&#160;is the projected gradient of the QP.)  With (<a class="eqnref" href="#eqn11">11</a>), <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>p</m:mi><m:mo>+</m:mo><m:mi>d</m:mi>
</m:math>&#160;is the minimizer of the quadratic objective function subject to treating the constraints in the working set as equalities.</div>
<div class="paramtext">If the QP projected gradient is zero, the current point is a constrained stationary point in the subspace defined by the working set.  During the feasibility phase, the projected gradient will usually be zero only at a vertex (although it may vanish at non-vertices in the presence of constraint dependencies).  During the optimality phase, a zero projected gradient implies that <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>p</m:mi>
</m:math>&#160;minimizes the quadratic objective function when the constraints in the working set are treated as equalities.  In either case, Lagrange multipliers are computed.  Given a positive constant <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#948;</m:mi>
</m:math>&#160;of the order of the <span class="bitalic">machine precision</span>, the Lagrange multiplier <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#956;</m:mi>
  <m:mi>j</m:mi>
 </m:msub>
</m:math>&#160;corresponding to an inequality constraint in the working set at its upper bound is said to be <span class="italic">optimal</span> if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#956;</m:mi>
  <m:mi>j</m:mi>
 </m:msub>
 <m:mo>&#8804;</m:mo>
 <m:mi>&#948;</m:mi>
</m:math>&#160;when the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>th constraint is at its <span class="italic">upper bound</span>, or if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#956;</m:mi>
  <m:mi>j</m:mi>
 </m:msub>
 <m:mo>&#8805;</m:mo>
 <m:mrow><m:mo>-</m:mo><m:mi>&#948;</m:mi></m:mrow>
</m:math>&#160;when the associated constraint is at its <span class="italic">lower bound</span>.  If any multiplier is non-optimal, the current objective function (either the true objective or the sum of infeasibilities) can be reduced by deleting the corresponding constraint from the working set.</div>
<div class="paramtext">If optimal multipliers occur during the feasibility phase and the sum of infeasibilities is non-zero, no feasible point exists.  The QP algorithm will then continue iterating to determine the minimum sum of infeasibilities.  At this point, the Lagrange multiplier <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#956;</m:mi>
  <m:mi>j</m:mi>
 </m:msub>
</m:math>&#160;will satisfy <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mo>-</m:mo>
 <m:mfenced separators=""><m:mn>1</m:mn><m:mo>+</m:mo><m:mi>&#948;</m:mi></m:mfenced>
 <m:mo>&#8804;</m:mo>
 <m:msub>
  <m:mi>&#956;</m:mi>
  <m:mi>j</m:mi>
 </m:msub>
 <m:mo>&#8804;</m:mo>
 <m:mi>&#948;</m:mi>
</m:math>&#160;for an inequality constraint at its upper bound, and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:mo>-</m:mo><m:mi>&#948;</m:mi></m:mrow>
 <m:mo>&#8804;</m:mo>
 <m:msub>
  <m:mi>&#956;</m:mi>
  <m:mi>j</m:mi>
 </m:msub>
 <m:mo>&#8804;</m:mo>
 <m:mfenced separators=""><m:mn>1</m:mn><m:mo>+</m:mo><m:mi>&#948;</m:mi></m:mfenced>
</m:math>&#160;for an inequality at its lower bound.  The Lagrange multiplier for an equality constraint will satisfy <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="|" close="|" separators="">
  <m:msub>
   <m:mi>&#956;</m:mi>
   <m:mi>j</m:mi>
  </m:msub>
 </m:mfenced>
 <m:mo>&#8804;</m:mo>
 <m:mn>1</m:mn>
 <m:mo>+</m:mo>
 <m:mi>&#948;</m:mi>
</m:math>.</div>
<div class="paramtext">The choice of step length <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#963;</m:mi>
</m:math>&#160;in the QP iteration (<a class="eqnref" href="#eqn8">8</a>) is based on remaining feasible with respect to the satisfied constraints.  During the optimality phase, if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>p</m:mi><m:mo>+</m:mo><m:mi>d</m:mi>
</m:math>&#160;is feasible, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#963;</m:mi>
</m:math>&#160;will be taken as unity.  (In this case, the projected gradient at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mover>
  <m:mi>p</m:mi>
 <m:mo>-</m:mo></m:mover>
</m:math>&#160;will be zero.)  Otherwise, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#963;</m:mi>
</m:math>&#160;is set to <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#963;</m:mi>
  <m:mi>M</m:mi>
 </m:msub>
</m:math>, the step to the &#8216;nearest&#8217; constraint, which is added to the working set at the next iteration.</div>
<div class="paramtext">Each change in the working set leads to a simple change to <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>C</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>: if the status of a general constraint changes, a <span class="italic">row</span> of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>C</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>&#160;is altered; if a bound constraint enters or leaves the working set, a <span class="italic">column</span> of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>C</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>&#160;changes.  Explicit representations are recurred of the matrices <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>T</m:mi>
</m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>Q</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>R</m:mi>
</m:math>, and of the vectors <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:mi>q</m:mi>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:mi>g</m:mi>
</m:math>.</div><h3><a name="e04uccfd3" id="e04uccfd3"/>10.3&#160;&#160;The Merit Function </h3><div class="paramtext">After computing the search direction as described in Section <a class="secref" href="#e04uccfd2">10.2</a>, each major iteration proceeds by determining a step length <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#945;</m:mi>
</m:math>&#160;in (<a class="eqnref" href="#eqn3">3</a>) that produces a &#8216;sufficient decrease&#8217; in the augmented Lagrangian merit function
</div>
<div class="formula-eqn"><a name="eqn12" id="eqn12"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:mi>L</m:mi>
  <m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>&#955;</m:mi><m:mo>,</m:mo><m:mi>s</m:mi></m:mfenced>
  <m:mo>=</m:mo>
  <m:mi>F</m:mi>
  <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
  <m:mo>-</m:mo>
  <m:munder>
   <m:mo>&#8721;</m:mo>
   <m:mi>i</m:mi>
  </m:munder><m:mspace width="0.25em"/>
  <m:msub>
   <m:mi>&#955;</m:mi>
   <m:mi>i</m:mi>
  </m:msub>
  <m:mfenced separators="">
   <m:msub>
    <m:mi>c</m:mi>
    <m:mi>i</m:mi>
   </m:msub>
   <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
   <m:mo>-</m:mo>
   <m:msub>
    <m:mi>s</m:mi>
    <m:mi>i</m:mi>
   </m:msub>
  </m:mfenced>
  <m:mo>+</m:mo>
  <m:mfrac>
   <m:mn>1</m:mn>
   <m:mn>2</m:mn>
  </m:mfrac>
  <m:munder>
   <m:mo>&#8721;</m:mo>
   <m:mi>i</m:mi>
  </m:munder><m:mspace width="0.25em"/>
  <m:msub>
   <m:mi>&#961;</m:mi>
   <m:mi>i</m:mi>
  </m:msub>
  <m:msup>
   <m:mfenced separators="">
    <m:msub>
     <m:mi>c</m:mi>
     <m:mi>i</m:mi>
    </m:msub>
    <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
    <m:mo>-</m:mo>
    <m:msub>
     <m:mi>s</m:mi>
     <m:mi>i</m:mi>
    </m:msub>
   </m:mfenced>
   <m:mn>2</m:mn>
  </m:msup>
  <m:mtext>,</m:mtext>
 </m:mrow>
</m:math></td><td class="formula-eqn2">
      (12)
     </td></tr></table></div>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#955;</m:mi>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>s</m:mi>
</m:math>&#160;vary during the <span class="italic">linesearch</span>.  The summation terms in (<a class="eqnref" href="#eqn12">12</a>) involve only the <span class="italic">nonlinear</span> constraints.  The vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#955;</m:mi>
</m:math>&#160;is an estimate of the Lagrange multipliers for the nonlinear constraints of (<a class="eqnref" href="#eqn1">1</a>).  The non-negative <span class="italic">slack variables</span> <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="{" close="}" separators="">
  <m:msub>
   <m:mi>s</m:mi>
   <m:mi>i</m:mi>
  </m:msub>
 </m:mfenced>
</m:math>&#160;allow nonlinear inequality constraints to be treated without introducing discontinuities.  The solution of the QP subproblem (<a class="eqnref" href="#eqn4">4</a>) provides a vector triple that serves as a direction of search for the three sets of variables.  The non-negative vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#961;</m:mi>
</m:math>&#160;of <span class="italic">penalty parameters</span> is initialized to zero at the beginning of the first major iteration.  Thereafter, selected elements are increased whenever necessary to ensure descent for the merit function.  Thus, the sequence of norms of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#961;</m:mi>
</m:math>&#160;(the printed quantity <span class="mono">Penalty</span>; see Section <a class="secref" href="#e04uccoptparams3">11.3</a>) is generally non-decreasing, although each <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#961;</m:mi>
  <m:mi>i</m:mi>
 </m:msub>
</m:math>&#160;may be reduced a limited number of times.</div>
<div class="paramtext">The merit function (<a class="eqnref" href="#eqn12">12</a>) and its global convergence properties are described in <a class="litref" href="#ref092">Gill <i>et al.</i> (1986b)</a>.</div><h3><a name="e04uccfd4" id="e04uccfd4"/>10.4&#160;&#160;The Quasi-Newton Update </h3><div class="paramtext">The matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>H</m:mi>
</m:math>&#160;in (<a class="eqnref" href="#eqn4">4</a>) is a <span class="italic">positive-definite quasi-Newton</span> approximation to the Hessian of the Lagrangian function.  (For a review of quasi-Newton methods, see <a class="litref" href="#ref086">Dennis  and Schnabel (1983)</a>.)  At the end of each major iteration, a new Hessian approximation <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mover>
  <m:mi>H</m:mi>
 <m:mo>-</m:mo></m:mover>
</m:math>&#160;is defined as a rank-two modification of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>H</m:mi>
</m:math>.  In nag_opt_nlp (e04ucc), the BFGS quasi-Newton update is used:
</div>
<div class="formula-eqn"><a name="eqn13" id="eqn13"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:mover>
   <m:mi>H</m:mi>
  <m:mo>-</m:mo></m:mover>
  <m:mo>=</m:mo>
  <m:mi>H</m:mi>
  <m:mo>-</m:mo>
  <m:mfrac>
   <m:mn>1</m:mn>
   <m:mrow>
    <m:msup><m:mi>s</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
    <m:mrow><m:mi>H</m:mi><m:mi>s</m:mi></m:mrow>
   </m:mrow>
  </m:mfrac>
  <m:msup><m:mrow><m:mi>H</m:mi><m:mi>s</m:mi><m:mi>s</m:mi></m:mrow><m:mi mathvariant="normal">T</m:mi></m:msup>
  <m:mi>H</m:mi>
  <m:mo>+</m:mo>
  <m:mfrac>
   <m:mn>1</m:mn>
   <m:mrow>
    <m:msup><m:mi>y</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
    <m:mi>s</m:mi>
   </m:mrow>
  </m:mfrac>
  <m:msup><m:mrow><m:mi>y</m:mi><m:mi>y</m:mi></m:mrow><m:mi mathvariant="normal">T</m:mi></m:msup>
  <m:mtext>,</m:mtext>
 </m:mrow>
</m:math></td><td class="formula-eqn2">
      (13)
     </td></tr></table></div>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>s</m:mi>
 <m:mo>=</m:mo>
 <m:mover>
  <m:mi>x</m:mi>
 <m:mo>-</m:mo></m:mover>
 <m:mo>-</m:mo>
 <m:mi>x</m:mi>
</m:math>&#160;(the change in <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>).</div>
<div class="paramtext">In nag_opt_nlp (e04ucc), <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>H</m:mi>
</m:math>&#160;is required to be positive-definite.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>H</m:mi>
</m:math>&#160;is positive-definite, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mover>
  <m:mi>H</m:mi>
 <m:mo>-</m:mo></m:mover>
</m:math>&#160;defined by (<a class="eqnref" href="#eqn13">13</a>) will be positive-definite if and only if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup><m:mi>y</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:mi>s</m:mi>
</m:math>&#160;is positive (see, e.g., <a class="litref" href="#ref084">Dennis  and Mor&#233; (1977)</a>).  Ideally, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>y</m:mi>
</m:math>&#160;in (<a class="eqnref" href="#eqn13">13</a>) would be taken as <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>y</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
</m:math>, the change in gradient of the Lagrangian function
</div>
<div class="formula-eqn"><a name="eqn14" id="eqn14"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:msub>
   <m:mi>y</m:mi>
   <m:mi>L</m:mi>
  </m:msub>
  <m:mo>=</m:mo>
  <m:mover>
   <m:mi>g</m:mi>
  <m:mo>-</m:mo></m:mover>
  <m:mo>-</m:mo>
  <m:msubsup><m:mover><m:mi>A</m:mi><m:mo>-</m:mo></m:mover><m:mi>N</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
  <m:msub>
   <m:mi>&#956;</m:mi>
   <m:mi>N</m:mi>
  </m:msub>
  <m:mo>-</m:mo>
  <m:mi>g</m:mi>
  <m:mo>+</m:mo>
  <m:msubsup><m:mi>A</m:mi><m:mi>N</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
  <m:msub>
   <m:mi>&#956;</m:mi>
   <m:mi>N</m:mi>
  </m:msub>
 </m:mrow>
</m:math></td><td class="formula-eqn2">
      (14)
     </td></tr></table></div>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#956;</m:mi>
  <m:mi>N</m:mi>
 </m:msub>
</m:math>&#160;denotes the QP multipliers associated with the nonlinear constraints of the original problem.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msubsup><m:mi>y</m:mi><m:mi>L</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:mi>s</m:mi>
</m:math>&#160;is not sufficiently positive, an attempt is made to perform the update with a vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>y</m:mi>
</m:math>&#160;of the form
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:mi>y</m:mi>
  <m:mo>=</m:mo>
  <m:msub>
   <m:mi>y</m:mi>
   <m:mi>L</m:mi>
  </m:msub>
  <m:mo>+</m:mo>
  <m:munder>
   <m:mo>&#8721;</m:mo>
   <m:mi>i</m:mi>
  </m:munder><m:mspace width="0.25em"/>
  <m:msub>
   <m:mi>&#969;</m:mi>
   <m:mi>i</m:mi>
  </m:msub>
  <m:mfenced separators="">
   <m:msub>
    <m:mi>a</m:mi>
    <m:mi>i</m:mi>
   </m:msub>
   <m:mfenced separators="">
    <m:mover>
     <m:mi>x</m:mi>
    <m:mo>-</m:mo></m:mover>
   </m:mfenced>
   <m:msub>
    <m:mi>c</m:mi>
    <m:mi>i</m:mi>
   </m:msub>
   <m:mfenced separators="">
    <m:mover>
     <m:mi>x</m:mi>
    <m:mo>-</m:mo></m:mover>
   </m:mfenced>
   <m:mo>-</m:mo>
   <m:msub>
    <m:mi>a</m:mi>
    <m:mi>i</m:mi>
   </m:msub>
   <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
   <m:msub>
    <m:mi>c</m:mi>
    <m:mi>i</m:mi>
   </m:msub>
   <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
  </m:mfenced>
  <m:mtext>,</m:mtext>
 </m:mrow>
</m:math></td><td class="formula2"/></tr></table></div>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#969;</m:mi>
  <m:mi>i</m:mi>
 </m:msub>
 <m:mo>&#8805;</m:mo>
 <m:mn>0</m:mn>
</m:math>.  If no such vector can be found, the update is performed with a scaled <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>y</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
</m:math>; in this case, <span class="mono">M</span> is printed to indicate that the update was modified.</div>
<div class="paramtext">Rather than modifying <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>H</m:mi>
</m:math>&#160;itself, the Cholesky factor of the <span class="italic">transformed Hessian</span> <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>H</m:mi>
  <m:mi>Q</m:mi>
 </m:msub>
</m:math>&#160;(<a class="eqnref" href="#eqn6">6</a>) is updated, where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>Q</m:mi>
</m:math>&#160;is the matrix from (<a class="eqnref" href="#eqn5">5</a>) associated with the active set of the QP subproblem.  The update (<a class="eqnref" href="#eqn12">12</a>) is equivalent to the following update to <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>H</m:mi>
  <m:mi>Q</m:mi>
 </m:msub>
</m:math>:
</div>
<div class="formula-eqn"><a name="eqn15" id="eqn15"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:msub>
   <m:mover>
    <m:mi>H</m:mi>
   <m:mo>-</m:mo></m:mover>
   <m:mi>Q</m:mi>
  </m:msub>
  <m:mo>=</m:mo>
  <m:msub>
   <m:mi>H</m:mi>
   <m:mi>Q</m:mi>
  </m:msub>
  <m:mo>-</m:mo>
  <m:mfrac>
   <m:mn>1</m:mn>
   <m:mrow>
    <m:msubsup><m:mi>s</m:mi><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
    <m:msub>
     <m:mi>H</m:mi>
     <m:mi>Q</m:mi>
    </m:msub>
    <m:msub>
     <m:mi>s</m:mi>
     <m:mi>Q</m:mi>
    </m:msub>
   </m:mrow>
  </m:mfrac>
  <m:msub>
   <m:mi>H</m:mi>
   <m:mi>Q</m:mi>
  </m:msub>
  <m:msub>
   <m:mi>s</m:mi>
   <m:mi>Q</m:mi>
  </m:msub>
  <m:msubsup><m:mi>s</m:mi><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
  <m:msub>
   <m:mi>H</m:mi>
   <m:mi>Q</m:mi>
  </m:msub>
  <m:mo>+</m:mo>
  <m:mfrac>
   <m:mn>1</m:mn>
   <m:mrow>
    <m:msubsup><m:mi>y</m:mi><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
    <m:msub>
     <m:mi>s</m:mi>
     <m:mi>Q</m:mi>
    </m:msub>
   </m:mrow>
  </m:mfrac>
  <m:msub>
   <m:mi>y</m:mi>
   <m:mi>Q</m:mi>
  </m:msub>
  <m:msubsup><m:mi>y</m:mi><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
  <m:mtext>,</m:mtext>
 </m:mrow>
</m:math></td><td class="formula-eqn2">
      (15)
     </td></tr></table></div>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>y</m:mi>
  <m:mi>Q</m:mi>
 </m:msub>
 <m:mo>=</m:mo>
 <m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:mi>y</m:mi>
</m:math>, and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>s</m:mi>
  <m:mi>Q</m:mi>
 </m:msub>
 <m:mo>=</m:mo>
 <m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:mi>s</m:mi>
</m:math>.  This update may be expressed as a <span class="italic">rank-one</span> update to <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>R</m:mi>
</m:math>&#160;(see <a class="litref" href="#ref085">Dennis  and Schnabel (1981)</a>).</div><h2><a name="e04uccoptparams" id="e04uccoptparams"/>11&#160;&#160;Optional Parameters </h2><div class="paramtext">A number of optional input and output parameters to nag_opt_nlp (e04ucc) are available through the structure argument <a class="argref" href="#options">options</a>, type <b>Nag_E04_Opt</b>.  A parameter may be selected by assigning an appropriate value to the relevant structure member; those parameters not selected will be assigned default values.  If no use is to be made of any of the optional parameters the user should use the NAG defined null pointer, <span class="mono">E04_DEFAULT</span>, in place of <a class="argref" href="#options">options</a> when calling nag_opt_nlp (e04ucc); the default settings will then be used for all parameters.</div>
<div class="paramtext">Before assigning values to <a class="argref" href="#options">options</a> directly the structure <b>must</b> be initialized by a call to the function <a class="rtnref" href="../E04/e04xxc.xml">nag_opt_init (e04xxc)</a>.  Values may then be assigned to the structure members in the normal C manner.</div>
<div class="paramtext">Option settings may also be read from a text file using the function <a class="rtnref" href="../E04/e04xyc.xml">nag_opt_read (e04xyc)</a> in which case initialization of the <a class="argref" href="#options">options</a> structure will be performed automatically if not already done.  Any subsequent direct assignment to the <a class="argref" href="#options">options</a> structure must <b>not</b> be preceded by initialization.</div>
<div class="paramtext">If assignment of functions and memory to pointers in the <a class="argref" href="#options">options</a> structure is required, this must be done directly in the calling program; they cannot be assigned using <a class="rtnref" href="../E04/e04xyc.xml">nag_opt_read (e04xyc)</a>.</div><h3><a name="e04uccoptparams1" id="e04uccoptparams1"/>11.1&#160;&#160;Optional Parameter Checklist and Default Values </h3><div class="paramtext">For easy reference, the following list shows the members of <a class="argref" href="#options">options</a> which are valid for nag_opt_nlp (e04ucc) together with their default values where relevant.  The number <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#949;</m:mi>
</m:math>&#160;is a generic notation for <span class="bitalic">machine precision</span> (see <a class="rtnref" href="../X02/x02_intro.xml">nag_machine_precision (X02AJC)</a>).</div>
<div class="paramtext">
</div><div class="left-tablediv"><table class="frame-none">
  
  
  <tbody>
   <tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">Nag_Start start</span></td>
    <td class="libdoc" valign="top" align="left"><b>Nag_Cold</b></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">Boolean list</span></td>
    <td class="libdoc" valign="top" align="left"><b>Nag_True</b></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">Nag_PrintType print_level</span></td>
    <td class="libdoc" valign="top" align="left"><b>Nag_Soln_Iter</b></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">Nag_PrintType minor_print_level</span></td>
    <td class="libdoc" valign="top" align="left"><b>Nag_NoPrint</b></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">char outfile[80]</span></td>
    <td class="libdoc" valign="top" align="left"><span class="mono">stdout</span></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">void (*print_fun)()</span></td>
    <td class="libdoc" valign="top" align="left"><b>NULL</b></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">Boolean obj_deriv</span></td>
    <td class="libdoc" valign="top" align="left"><b>Nag_True</b></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">Boolean con_deriv</span></td>
    <td class="libdoc" valign="top" align="left"><b>Nag_True</b></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">Nag_GradChk verify_grad</span></td>
    <td class="libdoc" valign="top" align="left"><b>Nag_SimpleCheck</b></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">Nag_DPrintType print_deriv</span></td>
    <td class="libdoc" valign="top" align="left"><b>Nag_D_Full</b></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">Integer obj_check_start</span></td>
    <td class="libdoc" valign="top" align="left">1</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">Integer obj_check_stop</span></td>
    <td class="libdoc" valign="top" align="left"><a class="argref" href="#n">n</a></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">Integer con_check_start</span></td>
    <td class="libdoc" valign="top" align="left">1</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">Integer con_check_stop</span></td>
    <td class="libdoc" valign="top" align="left"><a class="argref" href="#n">n</a></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">double f_diff_int</span></td>
    <td class="libdoc" valign="top" align="left">Computed automatically</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">double c_diff_int</span></td>
    <td class="libdoc" valign="top" align="left">Computed automatically</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">Integer max_iter</span></td>
    <td class="libdoc" valign="top" align="left"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><m:mfenced separators=""><m:mn>50</m:mn><m:mo>,</m:mo><m:mrow>
    <m:mn>3</m:mn>
    <m:mfenced separators=""><m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction></m:mfenced>
    <m:mo>+</m:mo>
    <m:mn>10</m:mn>
    <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
   </m:mrow></m:mfenced></m:mrow>
</m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">Integer minor_max_iter</span></td>
    <td class="libdoc" valign="top" align="left"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><m:mfenced separators=""><m:mn>50</m:mn><m:mo>,</m:mo><m:mrow>
    <m:mn>3</m:mn>
    <m:mfenced separators="">
     <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
     <m:mo>+</m:mo>
     <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
     <m:mo>+</m:mo>
     <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
    </m:mfenced>
   </m:mrow></m:mfenced></m:mrow>
</m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">double f_prec</span></td>
    <td class="libdoc" valign="top" align="left"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup>
  <m:mi>&#949;</m:mi>
  <m:mn>0.9</m:mn>
 </m:msup>
</m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">double optim_tol</span></td>
    <td class="libdoc" valign="top" align="left"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup>
  <m:maction actiontype="link" dsi:href="#optparam_f_prec" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.f_prec</m:mi></m:maction>
  <m:mn>0.8</m:mn>
 </m:msup>
</m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">double lin_feas_tol</span></td>
    <td class="libdoc" valign="top" align="left"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msqrt>
  <m:mi>&#949;</m:mi>
 </m:msqrt>
</m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">double nonlin_feas_tol</span></td>
    <td class="libdoc" valign="top" align="left"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup>
  <m:mi>&#949;</m:mi>
  <m:mn>0.33</m:mn>
 </m:msup>
</m:math>&#160;or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msqrt>
  <m:mi>&#949;</m:mi>
 </m:msqrt>
</m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">double linesearch_tol</span></td>
    <td class="libdoc" valign="top" align="left">0.9</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">double step_limit</span></td>
    <td class="libdoc" valign="top" align="left"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mn>2.0</m:mn>
</m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">double crash_tol</span></td>
    <td class="libdoc" valign="top" align="left">0.01</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">double inf_bound</span></td>
    <td class="libdoc" valign="top" align="left"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup>
  <m:mn>10</m:mn>
  <m:mn>20</m:mn>
 </m:msup>
</m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">double inf_step</span></td>
    <td class="libdoc" valign="top" align="left"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><m:mfenced separators=""><m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_bound</m:mi></m:maction><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"><span class="mono">double *conf</span></td>
    <td class="libdoc" valign="top" align="left">size <a class="argref" href="#ncnlin">ncnlin</a></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">double *conjac</span></td>
    <td class="libdoc" valign="top" align="left">size <a class="argref" href="#ncnlin">ncnlin</a>*<a class="argref" href="#n">n</a></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">Integer *state</span></td>
    <td class="libdoc" valign="top" align="left">size <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
</m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">double *lambda</span></td>
    <td class="libdoc" valign="top" align="left">size <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
</m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">double *h</span></td>
    <td class="libdoc" valign="top" align="left">size <a class="argref" href="#n">n</a>*<a class="argref" href="#n">n</a></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">Boolean hessian</span></td>
    <td class="libdoc" valign="top" align="left"><b>Nag_False</b></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">Integer iter</span></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><span class="mono">Integer nf</span></td>
   </tr>
  </tbody>
 </table></div><div class="paramtext">
</div><h3><a name="op-description" id="op-description"/>11.2&#160;&#160;Description of the Optional Arguments</h3><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_start" id="optparam_start"/><b>start</b> &#8211; Nag_Start&#160;</td><td class="optparam" align="center"/><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Cold</m:mi></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: specifies how the initial working set is chosen in both the procedure for finding a feasible point for the linear constraints and bounds, and in the first QP subproblem thereafter.  With <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">start</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Cold</m:mi></m:math>, nag_opt_nlp (e04ucc) 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 the value of optional parameter <a class="optparamref" href="#optparam_crash_tol">options.crash_tol</a>; see below).
<div class="paramtext">With <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">start</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Warm</m:mi></m:math>, the user must provide a valid definition of every array element of the optional parameters <a class="optparamref" href="#optparam_state">options.state</a>, <a class="optparamref" href="#optparam_lambda">options.lambda</a> and <a class="optparamref" href="#optparam_h">options.h</a> (see below for their definitions).  The <a class="optparamref" href="#optparam_state">options.state</a> values associated with bounds and linear constraints determine the initial working set of the procedure to find a feasible point with respect to the bounds and linear constraints.  The <a class="optparamref" href="#optparam_state">options.state</a> values associated with nonlinear constraints determine the initial working set of the first QP subproblem after such a feasible point has been found.  nag_opt_nlp (e04ucc) will override the user's specification of <a class="optparamref" href="#optparam_state">options.state</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="optparamref" href="#optparam_state">options.state</a> which are set to <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow>
</m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow>
</m:math>&#160;or 4 will be reset to zero, as will any elements which are set to 3 when the corresponding elements of <a class="argref" href="#bl">bl</a> and <a class="argref" href="#bu">bu</a> are not equal.  A warm start will be advantageous if a good estimate of the initial working set is available &#8211; for example, when nag_opt_nlp (e04ucc) is called repeatedly to solve related problems.</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.start</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<b>Nag_Cold</b> or <b>Nag_Warm</b>.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_list" id="optparam_list"/><b>list</b> &#8211; Nag_Boolean&#160;</td><td class="optparam" align="center"/><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_True</m:mi></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_list" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">list</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_True</m:mi>
</m:math>&#160;the parameter settings in the call to nag_opt_nlp (e04ucc) will be printed.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_print_level" id="optparam_print_level"/><b>print_level</b> &#8211; Nag_PrintType&#160;</td><td class="optparam" align="center"/><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Soln_Iter</m:mi></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: the level of results printout produced by nag_opt_nlp (e04ucc) at each major iteration.  The following values are available:
<table style="width:90%;"><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_NoPrint</b></td><td valign="top">No output.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_Soln</b></td><td valign="top">The final solution only.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_Iter</b></td><td valign="top">One line of output for each iteration.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_Iter_Long</b></td><td valign="top">A longer line of output for each iteration with more information (line exceeds 80 characters).</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_Soln_Iter</b></td><td valign="top">The final solution and one line of output for each iteration.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_Soln_Iter_Long</b></td><td valign="top">The final solution and one long line of output for each iteration (line exceeds 80 characters).</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_Soln_Iter_Const</b></td><td valign="top">As <b>Nag_Soln_Iter_Long</b> with the objective function, the values of the variables, the Euclidean norm of the nonlinear constraint violations, the nonlinear constraint values, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>c</m:mi>
</m:math>, and the linear constraint values <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>A</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
 <m:mi>x</m:mi>
</m:math>&#160;also printed at each iteration.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_Soln_Iter_Full</b></td><td valign="top">As <b>Nag_Soln_Iter_Const</b> with the diagonal elements of the upper triangular matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>T</m:mi>
</m:math>&#160;associated with the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:mi>T</m:mi><m:mi>Q</m:mi></m:mrow>
</m:math>&#160;factorization (<a class="eqnref" href="#eqn5">5</a>) of the QP working set, and the diagonal elements of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>R</m:mi>
</m:math>, the triangular factor of the transformed and re-ordered Hessian (<a class="eqnref" href="#eqn6">6</a>).</td></tr></table>
<div class="paramtext">Details of each level of results printout are described in Section <a class="secref" href="#e04uccoptparams3">11.3</a>.</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_level" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.print_level</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<b>Nag_NoPrint</b>, <b>Nag_Soln</b>, <b>Nag_Iter</b>, <b>Nag_Soln_Iter</b>, <b>Nag_Iter_Long</b>, <b>Nag_Soln_Iter_Long</b>, <b>Nag_Soln_Iter_Const</b> or <b>Nag_Soln_Iter_Full</b>.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_minor_print_level" id="optparam_minor_print_level"/><b>minor_print_level</b> &#8211; Nag_PrintType&#160;</td><td class="optparam" align="center"/><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_NoPrint</m:mi></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: the level of results printout produced by the minor iterations of nag_opt_nlp (e04ucc) (i.e., the iterations of the QP subproblem).  The following values are available:
<table style="width:90%;"><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_NoPrint</b></td><td valign="top">No output.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_Soln</b></td><td valign="top">The final solution only.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_Iter</b></td><td valign="top">One line of output for each iteration.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_Iter_Long</b></td><td valign="top">A longer line of output for each iteration with more information (line exceeds 80 characters).</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_Soln_Iter</b></td><td valign="top">The final solution and one line of output for each iteration.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_Soln_Iter_Long</b></td><td valign="top">The final solution and one long line of output for each iteration (line exceeds 80 characters).</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_Soln_Iter_Const</b></td><td valign="top">As <b>Nag_Soln_Iter_Long</b> with the Lagrange multipliers, the variables <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>, the constraint values <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>A</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
 <m:mi>x</m:mi>
</m:math>&#160;and the constraint status also printed at each iteration.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_Soln_Iter_Full</b></td><td valign="top">As <b>Nag_Soln_Iter_Const</b> with the diagonal elements of the upper triangular matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>T</m:mi>
</m:math>&#160;associated with the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:mi>T</m:mi><m:mi>Q</m:mi></m:mrow>
</m:math>&#160;factorization (<a class="eqnref" href="#eqn4">4</a>) of the working set, and the diagonal elements of the upper triangular matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>R</m:mi>
</m:math>&#160;printed at each iteration.</td></tr></table>
<div class="paramtext">Details of each level of results printout are described in Section <a class="secref" href="../E04/e04ncc.xml#e04nccoptparams">11</a> of the document for nag_opt_lin_lsq (e04ncc).  (<a class="optparamref" href="#optparam_minor_print_level">minor_print_level</a> in the present function is equivalent to <a class="optparamref" href="../E04/e04ncc.xml#optparam_print_level">options.print_level</a>.)</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_minor_print_level" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.minor_print_level</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<b>Nag_NoPrint</b>, <b>Nag_Soln</b>, <b>Nag_Iter</b>, <b>Nag_Soln_Iter</b>, <b>Nag_Iter_Long</b>, <b>Nag_Soln_Iter_Long</b>, <b>Nag_Soln_Iter_Const</b> or <b>Nag_Soln_Iter_Full</b>.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_outfile" id="optparam_outfile"/><b>outfile</b> &#8211; const&#160;char[80]&#160;</td><td class="optparam" align="center"/><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mi mathvariant="monospace">stdout</m:mi></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: the name of the file to which results should be printed.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#optparam_outfile" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">outfile</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mn>0</m:mn><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>=</m:mo>
 <m:ms lquote="'" rquote="'">
  \0
</m:ms>
</m:math>&#160;then the <span class="mono">stdout</span> stream is used.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_print_fun" id="optparam_print_fun"/><b>print_fun</b> &#8211; pointer to function&#160;</td><td class="optparam" align="center"/><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mi mathvariant="bold">NULL</m:mi></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: printing function defined by the user; the prototype of <a class="optparamref" href="#optparam_print_fun">print_fun</a> is
<pre class="verbatim">
void (*print_fun)(const Nag_Search_State *st, Nag_Comm *comm);
</pre>
See Section <a class="secref" href="#printed-output">11.3.1</a> below for further details.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_obj_deriv" id="optparam_obj_deriv"/><b>obj_deriv</b> &#8211; Nag_Boolean&#160;</td><td class="optparam" align="center"/><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_True</m:mi></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: this argument indicates whether all the derivatives of the objective function are provided by the user in function <a class="argref" href="#objfun">objfun</a>.  If none or only some of the derivatives are being supplied by <a class="argref" href="#objfun">objfun</a> then <a class="optparamref" href="#optparam_obj_deriv">obj_deriv</a> should be set to <b>Nag_False</b>.
<div class="paramtext">Whenever possible all derivatives should be supplied, since nag_opt_nlp (e04ucc) is more reliable and will usually be more efficient when all derivatives are exact.</div>
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_obj_deriv" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">obj_deriv</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_False</m:mi>
</m:math>, nag_opt_nlp (e04ucc) will approximate the unspecified components of the objective gradient, using finite differences.  The computation of finite-difference approximations usually increases the total run-time, since a call to <a class="argref" href="#objfun">objfun</a> is required for each unspecified element.  Furthermore, less accuracy can be attained in the solution (see Chapter 8 of <a class="litref" href="#ref540">Gill <i>et al.</i> (1986c)</a>, for a discussion of limiting accuracy).</div>
<div class="paramtext">At times, central differences are used rather than forward differences, in which case twice as many calls to <a class="argref" href="#objfun">objfun</a> are needed.  (The switch to central differences is not under the user's control.)</div>
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_con_deriv" id="optparam_con_deriv"/><b>con_deriv</b> &#8211; Nag_Boolean&#160;</td><td class="optparam" align="center"/><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_True</m:mi></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: this argument indicates whether all derivatives for the constraint Jacobian are provided by the user in function <a class="argref" href="#confun">confun</a>.  If none or only some of the derivatives are being supplied by <a class="argref" href="#confun">confun</a> then <a class="optparamref" href="#optparam_con_deriv">con_deriv</a> should be set to <b>Nag_False</b>.
<div class="paramtext">Whenever possible all derivatives should be supplied, since nag_opt_nlp (e04ucc) is more reliable and will usually be more efficient when all derivatives are exact.</div>
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_con_deriv" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">con_deriv</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_False</m:mi>
</m:math>, nag_opt_nlp (e04ucc) will approximate unspecified elements of the Jacobian.  One call to <a class="argref" href="#confun">confun</a> is needed for each variable for which partial derivatives are not available.  For example, if the constraint Jacobian has the form
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mfenced separators="">
  <m:mtable>
   <m:mtr>
    <m:mtd>
     <m:mo>*</m:mo>
    </m:mtd>
    <m:mtd>
     <m:mo>*</m:mo>
    </m:mtd>
    <m:mtd>
     <m:mo>*</m:mo>
    </m:mtd>
    <m:mtd>
     <m:mo>*</m:mo>
    </m:mtd>
   </m:mtr>
   <m:mtr>
    <m:mtd>
     <m:mo>*</m:mo>
    </m:mtd>
    <m:mtd>
     <m:mo>?</m:mo>
    </m:mtd>
    <m:mtd>
     <m:mo>?</m:mo>
    </m:mtd>
    <m:mtd>
     <m:mo>*</m:mo>
    </m:mtd>
   </m:mtr>
   <m:mtr>
    <m:mtd>
     <m:mo>*</m:mo>
    </m:mtd>
    <m:mtd>
     <m:mo>*</m:mo>
    </m:mtd>
    <m:mtd>
     <m:mo>?</m:mo>
    </m:mtd>
    <m:mtd>
     <m:mo>*</m:mo>
    </m:mtd>
   </m:mtr>
   <m:mtr>
    <m:mtd>
     <m:mo>*</m:mo>
    </m:mtd>
    <m:mtd>
     <m:mo>*</m:mo>
    </m:mtd>
    <m:mtd>
     <m:mo>*</m:mo>
    </m:mtd>
    <m:mtd>
     <m:mo>*</m:mo>
    </m:mtd>
   </m:mtr>
  </m:mtable>
 </m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div>
<div class="paramtext">
where &#8216;*&#8217; indicates an element provided by the user and &#8216;?&#8217; indicates an unspecified element, nag_opt_nlp (e04ucc) will call <a class="argref" href="#confun">confun</a> twice: once to estimate the missing element in column 2, and again to estimate the two missing elements in column 3.  (Since columns 1 and 4 are known, they require no calls to <a class="argref" href="#confun">confun</a>.)</div>
<div class="paramtext">At times, central differences are used rather than forward differences, in which case twice as many calls to <a class="argref" href="#confun">confun</a> are needed.  (The switch to central differences is not under the user's control.)</div>
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_verify_grad" id="optparam_verify_grad"/><b>verify_grad</b> &#8211; Nag_GradChk&#160;</td><td class="optparam" align="center"/><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_SimpleCheck</m:mi></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: specifies the level of derivative checking to be performed by nag_opt_nlp (e04ucc) on the gradient elements computed by the user supplied functions <a class="argref" href="#objfun">objfun</a> and <a class="argref" href="#confun">confun</a>.
<div class="paramtext">The following values are available:
</div><table style="width:90%;"><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_NoCheck</b></td><td valign="top">No derivative checking is performed.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_SimpleCheck</b></td><td valign="top">Perform a simple check of both the objective and constraint gradients.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_CheckObj</b></td><td valign="top">Perform a component check of the objective gradient elements.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_CheckCon</b></td><td valign="top">Perform a component check of the constraint gradient elements.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_CheckObjCon</b></td><td valign="top">Perform a component check of both the objective and constraint gradient elements.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_XSimpleCheck</b></td><td valign="top">Perform a simple check of both the objective and constraint gradients at the initial value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;specified in <a class="argref" href="#x">x</a>.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_XCheckObj</b></td><td valign="top">Perform a component check of the objective gradient elements at the initial value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;specified in <a class="argref" href="#x">x</a>.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_XCheckCon</b></td><td valign="top">Perform a component check of the constraint gradient elements at the initial value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;specified in <a class="argref" href="#x">x</a>.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><b>Nag_XCheckObjCon</b></td><td valign="top">Perform a component check of both the objective and constraint gradient elements at the initial value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;specified in <a class="argref" href="#x">x</a>.</td></tr></table><div class="paramtext">
</div>
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_verify_grad" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">verify_grad</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<b>Nag_SimpleCheck</b> or <b>Nag_XSimpleCheck</b> then a simple &#8216;cheap&#8217; test is performed, which requires only one call to <a class="argref" href="#objfun">objfun</a> and one call to <a class="argref" href="#confun">confun</a>.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_verify_grad" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">verify_grad</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<b>Nag_CheckObj</b>, <b>Nag_CheckCon</b> or <b>Nag_CheckObjCon</b> then a more reliable (but more expensive) test will be made on individual gradient components.  This component check will be made in the range specified by the optional parameters <a class="optparamref" href="#optparam_obj_check_start">options.obj_check_start</a> and <a class="optparamref" href="#optparam_obj_check_stop">options.obj_check_stop</a> for the objective gradient, with default values being <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mn>1</m:mn>
</m:math>&#160;and <a class="argref" href="#n">n</a> respectively.  For the constraint gradient the range is specified by <a class="optparamref" href="#optparam_con_check_start">options.con_check_start</a> and <a class="optparamref" href="#optparam_con_check_stop">options.con_check_stop</a>, with default values being <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mn>1</m:mn>
</m:math>&#160;and <a class="argref" href="#n">n</a>.</div>
<div class="paramtext">The procedure for the derivative check is based on finding an interval that produces an acceptable estimate of the second derivative, and then using that estimate to compute an interval that should produce a reasonable forward-difference approximation.  The gradient element is then compared with the difference approximation.  (The method of finite difference interval estimation is based on <a class="litref" href="#ref442">Gill <i>et al.</i> (1983a)</a>.)  The result of the test is printed out by nag_opt_nlp (e04ucc) if optional parameter <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_deriv" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.print_deriv</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mi mathvariant="bold">Nag_D_NoPrint</m:mi></m:math>.</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_verify_grad" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.verify_grad</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<b>Nag_NoCheck</b>, <b>Nag_SimpleCheck</b>, <b>Nag_CheckObj</b>, <b>Nag_CheckCon</b>, <b>Nag_CheckObjCon</b>, <b>Nag_XSimpleCheck</b>, <b>Nag_XCheckObj</b>, <b>Nag_XCheckCon</b> or <b>Nag_XCheckObjCon</b>.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_print_deriv" id="optparam_print_deriv"/><b>print_deriv</b> &#8211; Nag_DPrintType&#160;</td><td class="optparam" align="center"/><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_D_Full</m:mi></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: controls whether the results of any derivative checking are printed out (see optional parameter <a class="optparamref" href="#optparam_verify_grad">options.verify_grad</a>).
<div class="paramtext">If a component derivative check has been carried out, then full details will be printed if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_deriv" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">print_deriv</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_D_Full</m:mi></m:math>.  For a printout summarising the results of a component derivative check set <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_deriv" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">print_deriv</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_D_Sum</m:mi></m:math>.  If only a simple derivative check is requested then <b>Nag_D_Sum</b> and <b>Nag_D_Full</b> will give the same level of output.  To prevent any printout from a derivative check set <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_deriv" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">print_deriv</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_D_NoPrint</m:mi></m:math>.</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_deriv" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.print_deriv</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<b>Nag_D_NoPrint</b>, <b>Nag_D_Sum</b> or <b>Nag_D_Full</b>.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_obj_check_start" id="optparam_obj_check_start"/><b>obj_check_start</b> &#8211; Integer&#160;</td><td class="optparam" align="center"><i>i</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mn>1</m:mn></m:math></td></tr></table><table width="100%" class="multi-optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_obj_check_stop" id="optparam_obj_check_stop"/><b>obj_check_stop</b> &#8211; Integer&#160;</td><td class="optparam" align="center"><i>i</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction></m:math></td></tr></table><div class="paramtext">These options take effect only when <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_verify_grad" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.verify_grad</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<b>Nag_CheckObj</b>, <b>Nag_CheckObjCon</b>, <b>Nag_XCheckObj</b> or <b>Nag_XCheckObjCon</b>.</div><div class="paramtext"><i>On entry</i>: they may be used to control the verification of gradient elements computed by the function <a class="argref" href="#objfun">objfun</a>.  For example, if the first 30 elements appeared to be correct in an earlier run, so that only element 31 remains questionable, it is reasonable to specify <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_obj_check_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">obj_check_start</m:mi></m:maction><m:mo>=</m:mo><m:mn>31</m:mn>
</m:math>.  If the first 30 variables appear linearly in the objective, so that the corresponding gradient elements are constant, the above choice would also be appropriate.</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mn>1</m:mn>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_obj_check_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.obj_check_start</m:mi></m:maction>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_obj_check_stop" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.obj_check_stop</m:mi></m:maction>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
</m:math>.
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_con_check_start" id="optparam_con_check_start"/><b>con_check_start</b> &#8211; Integer&#160;</td><td class="optparam" align="center"><i>i</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mn>1</m:mn></m:math></td></tr></table><table width="100%" class="multi-optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_con_check_stop" id="optparam_con_check_stop"/><b>con_check_stop</b> &#8211; Integer&#160;</td><td class="optparam" align="center"><i>i</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction></m:math></td></tr></table><div class="paramtext">These options take effect only when <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_verify_grad" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.verify_grad</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<b>Nag_CheckCon</b>, <b>Nag_CheckObjCon</b>, <b>Nag_XCheckCon</b> or <b>Nag_XCheckObjCon</b>.</div><div class="paramtext"><i>On entry</i>: these parameters may be used to control the verification of the Jacobian elements computed by the function <a class="argref" href="#confun">confun</a>.  For example, if the first 30 columns of the constraint Jacobian appeared to be correct in an earlier run, so that only column 31 remains questionable, it is reasonable to specify <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_con_check_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">con_check_start</m:mi></m:maction><m:mo>=</m:mo><m:mn>31</m:mn>
</m:math>.</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mn>1</m:mn>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_con_check_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.con_check_start</m:mi></m:maction>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_con_check_stop" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.con_check_stop</m:mi></m:maction>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
</m:math>.
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_f_diff_int" id="optparam_f_diff_int"/><b>f_diff_int</b> &#8211; double&#160;</td><td class="optparam" align="center"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mtext>computed automatically</m:mtext></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: defines an interval used to estimate derivatives by finite differences in the following circumstances:
<ol class="listalpha"><li class="listalpha">For verifying the objective and/or constraint gradients (see the description of the optional parameter <a class="optparamref" href="#optparam_verify_grad">options.verify_grad</a>).</li><li class="listalpha">For estimating unspecified elements of the objective and/or constraint Jacobian matrix.</li></ol>
<div class="paramtext">In general, using the notation <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>r</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#optparam_f_diff_int" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">f_diff_int</m:mi></m:maction>
</m:math>, a derivative with respect to the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>th variable is approximated using the interval <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#948;</m:mi>
  <m:mi>j</m:mi>
 </m:msub>
</m:math>, where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#948;</m:mi>
  <m:mi>j</m:mi>
 </m:msub>
 <m:mo>=</m:mo>
 <m:mi>r</m:mi>
 <m:mfenced separators="">
  <m:mn>1</m:mn>
  <m:mo>+</m:mo>
  <m:mfenced open="|" close="|" separators="">
   <m:msub>
    <m:mover>
     <m:mi>x</m:mi>
    <m:mo>^</m:mo></m:mover>
    <m:mi>j</m:mi>
   </m:msub>
  </m:mfenced>
 </m:mfenced>
</m:math>, with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mover>
  <m:mi>x</m:mi>
 <m:mo>^</m:mo></m:mover>
</m:math>&#160;the first point feasible with respect to the bounds and linear constraints.  If the functions are well scaled, the resulting derivative approximation should be accurate to O<m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced separators=""><m:mi>r</m:mi></m:mfenced>
</m:math>.  See <a class="litref" href="#ref079">Gill <i>et al.</i> (1981)</a> for a discussion of the accuracy in finite difference approximations.</div>
<div class="paramtext">If a difference interval is not specified by the user, a finite difference interval will be computed automatically for each variable by a procedure that requires up to six calls of <a class="argref" href="#confun">confun</a> and <a class="argref" href="#objfun">objfun</a> for each element.  This option is recommended if the function is badly scaled or the user wishes to have nag_opt_nlp (e04ucc) determine constant elements in the objective and constraint gradients (see the descriptions of <a class="argref" href="#confun">confun</a> and <a class="argref" href="#objfun">objfun</a> in Section <a class="secref" href="#parameters">5</a>).</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#949;</m:mi>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_f_diff_int" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.f_diff_int</m:mi></m:maction>
 <m:mo>&lt;</m:mo>
 <m:mn>1.0</m:mn>
</m:math>.
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_c_diff_int" id="optparam_c_diff_int"/><b>c_diff_int</b> &#8211; double&#160;</td><td class="optparam" align="center"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mtext>computed automatically</m:mtext></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: if the algorithm switches to central differences because the forward-difference approximation is not sufficiently accurate the value of <a class="optparamref" href="#optparam_c_diff_int">c_diff_int</a> is used as the difference interval for every element of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>.  The switch to central differences is indicated by <span class="mono">C</span> at the end of each line of intermediate printout produced by the major iterations (see Section <a class="secref" href="#e04uccargus1">5.1</a>).  The use of finite-differences is discussed under the option <a class="optparamref" href="#optparam_f_diff_int">options.f_diff_int</a>.</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#949;</m:mi>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_c_diff_int" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.c_diff_int</m:mi></m:maction>
 <m:mo>&lt;</m:mo>
 <m:mn>1.0</m:mn>
</m:math>.
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_max_iter" id="optparam_max_iter"/><b>max_iter</b> &#8211; Integer&#160;</td><td class="optparam" align="center"><i>i</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo>
 <m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><m:mfenced separators=""><m:mn>50</m:mn><m:mo>,</m:mo><m:mrow>
    <m:mn>3</m:mn>
     <m:mfenced separators="">
      <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
     </m:mfenced>
     <m:mo>+</m:mo>
     <m:mn>10</m:mn><m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
   </m:mrow></m:mfenced></m:mrow>
</m:math></td></tr></table><div class="paramtext"><i>On entry</i>: the maximum number of major iterations allowed before termination.</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_max_iter" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.max_iter</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>0</m:mn>
</m:math>.
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_minor_max_iter" id="optparam_minor_max_iter"/><b>minor_max_iter</b> &#8211; Integer&#160;</td><td class="optparam" align="center"><i>i</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo>
 <m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><m:mfenced separators=""><m:mn>50</m:mn><m:mo>,</m:mo><m:mrow>
    <m:mn>3</m:mn>
    <m:mfenced separators="">
     <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
    </m:mfenced>
   </m:mrow></m:mfenced></m:mrow>
</m:math></td></tr></table><div class="paramtext"><i>On entry</i>: the maximum number of iterations for finding a feasible point with respect to the bounds and linear constraints (if any).  The value also specifies the maximum number of minor iterations for the optimality phase of each QP subproblem.</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_minor_max_iter" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.minor_max_iter</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>0</m:mn>
</m:math>.
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_f_prec" id="optparam_f_prec"/><b>f_prec</b> &#8211; double&#160;</td><td class="optparam" align="center"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:msup><m:mi>&#949;</m:mi><m:mn>0.9</m:mn></m:msup></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: this parameter defines <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#949;</m:mi>
  <m:mi>r</m:mi>
 </m:msub>
</m:math>, which is intended to be a measure of the accuracy with which the problem functions <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>c</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math>&#160;can be computed.
<div class="paramtext">The value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#949;</m:mi>
  <m:mi>r</m:mi>
 </m:msub>
</m:math>&#160;should reflect the relative precision of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mn>1</m:mn>
 <m:mo>+</m:mo>
 <m:mfenced open="|" close="|" separators="">
  <m:mi>F</m:mi>
  <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
 </m:mfenced>
</m:math>; i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#949;</m:mi>
  <m:mi>r</m:mi>
 </m:msub>
</m:math>&#160;acts as a relative precision when <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="|" close="|" separators="">
  <m:mi>F</m:mi>
 </m:mfenced>
</m:math>&#160;is large, and as an absolute precision when <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="|" close="|" separators="">
  <m:mi>F</m:mi>
 </m:mfenced>
</m:math>&#160;is small.  For example, if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math>&#160;is typically of order 1000 and the first six significant digits are known to be correct, an appropriate value for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#949;</m:mi>
  <m:mi>r</m:mi>
 </m:msub>
</m:math>&#160;would be <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup>
  <m:mn>10</m:mn>
  <m:mrow><m:mo>-</m:mo><m:mn>6</m:mn></m:mrow>
 </m:msup>
</m:math>.  In contrast, if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math>&#160;is typically of order <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup>
  <m:mn>10</m:mn>
  <m:mrow><m:mo>-</m:mo><m:mn>4</m:mn></m:mrow>
 </m:msup>
</m:math>&#160;and the first six significant digits are known to be correct, an appropriate value for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#949;</m:mi>
  <m:mi>r</m:mi>
 </m:msub>
</m:math>&#160;would be <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup>
  <m:mn>10</m:mn>
  <m:mrow><m:mo>-</m:mo><m:mn>10</m:mn></m:mrow>
 </m:msup>
</m:math>.  The choice of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#949;</m:mi>
  <m:mi>r</m:mi>
 </m:msub>
</m:math>&#160;can be quite complicated for badly scaled problems; see Chapter 8 of <a class="litref" href="#ref079">Gill <i>et al.</i> (1981)</a>, for a discussion of scaling techniques.  The default value is appropriate for most simple functions that are computed with full accuracy.  However, when the accuracy of the computed function values is known to be significantly worse than full precision, the value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>&#949;</m:mi>
  <m:mi>r</m:mi>
 </m:msub>
</m:math>&#160;should be large enough so that nag_opt_nlp (e04ucc) will not attempt to distinguish between function values that differ by less than the error inherent in the calculation.</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#949;</m:mi>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_f_prec" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.f_prec</m:mi></m:maction>
 <m:mo>&lt;</m:mo>
 <m:mn>1.0</m:mn>
</m:math>.
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_optim_tol" id="optparam_optim_tol"/><b>optim_tol</b> &#8211; double&#160;</td><td class="optparam" align="center"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:msup><m:maction actiontype="link" dsi:href="#optparam_f_prec" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.f_prec</m:mi></m:maction><m:mn>0.8</m:mn></m:msup></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: specifies the accuracy to which the user wishes the final iterate to approximate a solution of the problem.  Broadly speaking, <a class="optparamref" href="#optparam_optim_tol">optim_tol</a> indicates the number of correct figures desired in the objective function at the solution.  For example, if <a class="optparamref" href="#optparam_optim_tol">optim_tol</a> is <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup>
  <m:mn>10</m:mn>
  <m:mrow><m:mo>-</m:mo><m:mn>6</m:mn></m:mrow>
 </m:msup>
</m:math>&#160;and nag_opt_nlp (e04ucc) terminates successfully, the final value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
</m:math>&#160;should have approximately six correct figures.
<div class="paramtext">nag_opt_nlp (e04ucc) will terminate successfully if the iterative sequence of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>-values is judged to have converged and the final point satisfies the first-order Kuhn&#8211;Tucker conditions (see Section <a class="secref" href="#e04uccfd1">10.1</a>).  The sequence of iterates is considered to have converged at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;if
</div>
<div class="formula-eqn"><a name="eqn16a" id="eqn16a"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:mi>&#945;</m:mi>
  <m:mfenced open="&#8214;" close="&#8214;" separators="">
   <m:mi>p</m:mi>
  </m:mfenced>
  <m:mo>&#8804;</m:mo>
  <m:msqrt>
   <m:mi>r</m:mi>
  </m:msqrt>
  <m:mfenced separators="">
   <m:mn>1</m:mn>
   <m:mo>+</m:mo>
   <m:mfenced open="&#8214;" close="&#8214;" separators="">
    <m:mi>x</m:mi>
   </m:mfenced>
  </m:mfenced>
  <m:mtext>,</m:mtext>
 </m:mrow>
</m:math></td><td class="formula-eqn2">
      (16)
     </td></tr></table></div>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>p</m:mi>
</m:math>&#160;is the search direction and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#945;</m:mi>
</m:math>&#160;the step length from (<a class="eqnref" href="#eqn3">3</a>), and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>r</m:mi>
</m:math>&#160;is the value of <a class="optparamref" href="#optparam_optim_tol">optim_tol</a>.  An iterate is considered to satisfy the first-order conditions for a minimum if
</div>
<div class="formula-eqn"><a name="eqn16b" id="eqn16b"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:mfenced open="&#8214;" close="&#8214;" separators="">
   <m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
   <m:msub>
    <m:mi>g</m:mi>
    <m:mi mathvariant="normal">FR</m:mi>
   </m:msub>
  </m:mfenced>
  <m:mo>&#8804;</m:mo>
  <m:msqrt>
   <m:mi>r</m:mi>
  </m:msqrt>
  <m:mfenced separators="">
   <m:mn>1</m:mn>
   <m:mo>+</m:mo>
   <m:mi>max</m:mi>
   <m:mfenced separators=""><m:mrow>
     <m:mn>1</m:mn>
     <m:mo>+</m:mo>
     <m:mfenced open="|" close="|" separators="">
      <m:mi>F</m:mi>
      <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
     </m:mfenced>
     </m:mrow><m:mo>,</m:mo><m:mfenced open="&#8214;" close="&#8214;" separators="">
     <m:msub>
      <m:mi>g</m:mi>
      <m:mi mathvariant="normal">FR</m:mi>
     </m:msub>
    </m:mfenced></m:mfenced>
  </m:mfenced>
 </m:mrow>
</m:math></td><td class="formula-eqn2">
      (17)
     </td></tr></table></div>
<div class="paramtext">
and
</div>
<div class="formula-eqn"><a name="eqn16c" id="eqn16c"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:mfenced open="|" close="|" separators="">
   <m:msub>
    <m:mrow><m:mi>r</m:mi><m:mi>e</m:mi><m:mi>s</m:mi></m:mrow>
    <m:mi>j</m:mi>
   </m:msub>
  </m:mfenced>
  <m:mo>&#8804;</m:mo>
  <m:mi mathvariant="italic">ftol</m:mi>
  <m:mtext>&#8203; for all &#8203;</m:mtext>
  <m:mi>j</m:mi>
  <m:mtext>,</m:mtext>
 </m:mrow>
</m:math></td><td class="formula-eqn2">
      (18)
     </td></tr></table></div>
<div class="paramtext">
where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
 <m:msub>
  <m:mi>g</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>&#160;is the projected gradient (see Section <a class="secref" href="#e04uccfd1">10.1</a>), <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>g</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>&#160;is the gradient of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math>&#160;with respect to the free variables, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mrow><m:mi>r</m:mi><m:mi>e</m:mi><m:mi>s</m:mi></m:mrow>
  <m:mi>j</m:mi>
 </m:msub>
</m:math>&#160;is the violation of the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>th active nonlinear constraint, and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="italic">ftol</m:mi>
</m:math>&#160;the value of the optional parameter <a class="optparamref" href="#optparam_nonlin_feas_tol">options.nonlin_feas_tol</a>.</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_f_prec" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.f_prec</m:mi></m:maction>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_optim_tol" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.optim_tol</m:mi></m:maction>
 <m:mo>&lt;</m:mo>
 <m:mn>1.0</m:mn>
</m:math>.
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_lin_feas_tol" id="optparam_lin_feas_tol"/><b>lin_feas_tol</b> &#8211; double&#160;</td><td class="optparam" align="center"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: defines the maximum acceptable <span class="italic">absolute</span> violations in the linear constraints at a &#8216;feasible&#8217; point; i.e., a linear constraint is considered satisfied if its violation does not exceed <a class="optparamref" href="#optparam_lin_feas_tol">lin_feas_tol</a>.
<div class="paramtext">On entry to nag_opt_nlp (e04ucc), an iterative procedure is executed in order to find a point that satisfies the linear constraints and bounds on the variables to within the tolerance specified by <a class="optparamref" href="#optparam_lin_feas_tol">lin_feas_tol</a>.  All subsequent iterates will satisfy the constraints to within the same tolerance (unless <a class="optparamref" href="#optparam_lin_feas_tol">lin_feas_tol</a> is comparable to the finite difference interval).</div>
<div class="paramtext">This tolerance should reflect the precision of the linear constraints.  For example, if the variables and the coefficients in the linear constraints are of order unity, and the latter are correct to about 6 decimal digits, it would be appropriate to specify <a class="optparamref" href="#optparam_lin_feas_tol">lin_feas_tol</a> as <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup>
  <m:mn>10</m:mn>
  <m:mrow><m:mo>-</m:mo><m:mn>6</m:mn></m:mrow>
 </m:msup>
</m:math>.</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#949;</m:mi>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_lin_feas_tol" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.lin_feas_tol</m:mi></m:maction>
 <m:mo>&lt;</m:mo>
 <m:mn>1.0</m:mn>
</m:math>.
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_nonlin_feas_tol" id="optparam_nonlin_feas_tol"/><b>nonlin_feas_tol</b> &#8211; double&#160;</td><td class="optparam" align="center"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:msup><m:mi>&#949;</m:mi><m:mn>0.33</m:mn></m:msup><m:mtext>&#8203; or &#8203;</m:mtext><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math></td></tr></table><div class="paramtext">The default is <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup>
  <m:mi>&#949;</m:mi>
  <m:mn>0.33</m:mn>
 </m:msup>
</m:math>&#160;if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_con_deriv" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.con_deriv</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_False</m:mi>
</m:math>, and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msqrt>
  <m:mi>&#949;</m:mi>
 </m:msqrt>
</m:math>&#160;otherwise.</div><div class="paramtext"><i>On entry</i>: defines the maximum acceptable violations in the nonlinear constraints at a &#8216;feasible&#8217; point; i.e., a nonlinear constraint is considered satisfied if its violation does not exceed <a class="optparamref" href="#optparam_nonlin_feas_tol">nonlin_feas_tol</a>.
<div class="paramtext">The tolerance defines the largest constraint violation that is acceptable at an optimal point.  Since nonlinear constraints are generally not satisfied until the final iterate, the value of <a class="optparamref" href="#optparam_nonlin_feas_tol">nonlin_feas_tol</a> acts as a partial termination criteria for the iterative sequence generated by nag_opt_nlp (e04ucc) (see the discussion of <a class="optparamref" href="#optparam_optim_tol">options.optim_tol</a> ).</div>
<div class="paramtext">This tolerance should reflect the precision of the nonlinear constraint functions calculated by <a class="argref" href="#confun">confun</a>.</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#949;</m:mi>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_nonlin_feas_tol" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.nonlin_feas_tol</m:mi></m:maction>
 <m:mo>&lt;</m:mo>
 <m:mn>1.0</m:mn>
</m:math>.
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_linesearch_tol" id="optparam_linesearch_tol"/><b>linesearch_tol</b> &#8211; double&#160;</td><td class="optparam" align="center"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mn>0.9</m:mn></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: controls the accuracy with which the step <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>&#945;</m:mi>
</m:math>&#160;taken during each iteration approximates a minimum of the merit function along the search direction (the smaller the value of <a class="optparamref" href="#optparam_linesearch_tol">linesearch_tol</a>, the more accurate the line search).  The default value requests an inaccurate search, and is appropriate for most problems, particularly those with any nonlinear constraints.
<div class="paramtext">If there are no nonlinear constraints, a more accurate search may be appropriate when it is desirable to reduce the number of major iterations &#8211; for example, if the objective function is cheap to evaluate, or if a substantial number of derivatives are unspecified.</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mn>0.0</m:mn>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_linesearch_tol" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.linesearch_tol</m:mi></m:maction>
 <m:mo>&lt;</m:mo>
 <m:mn>1.0</m:mn>
</m:math>.
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_step_limit" id="optparam_step_limit"/><b>step_limit</b> &#8211; double&#160;</td><td class="optparam" align="center"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mn>2.0</m:mn></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: specifies the maximum change in the variables at the first step of the line search.  In some cases, such as <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
 <m:mo>=</m:mo>
 <m:msup>
  <m:mrow><m:mi>a</m:mi><m:mi>e</m:mi></m:mrow>
  <m:mrow><m:mi>b</m:mi><m:mi>x</m:mi></m:mrow>
 </m:msup>
</m:math>&#160;or <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
 <m:mo>=</m:mo>
 <m:msup>
  <m:mrow><m:mi>a</m:mi><m:mi>x</m:mi></m:mrow>
  <m:mi>b</m:mi>
 </m:msup>
</m:math>, even a moderate change in the elements of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;can lead to floating-point overflow.  The parameter <a class="optparamref" href="#optparam_step_limit">step_limit</a> is therefore used to encourage evaluation of the problem functions at meaningful points.  Given any major iterate <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>, the first point <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow>
  <m:mi>x</m:mi>
 <m:mo>&#732;</m:mo></m:mrow>
</m:math>&#160;at which <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>c</m:mi>
</m:math>&#160;are evaluated during the line search is restricted so that

<div class="formula"><table class="formula"><tr><td class="formula"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML" display="block">
 <m:mrow>
  <m:msub>
   <m:mfenced open="&#8214;" close="&#8214;" separators="">
    <m:mrow>
     <m:mi>x</m:mi>
    <m:mo>&#732;</m:mo></m:mrow>
    <m:mo>-</m:mo>
    <m:mi>x</m:mi>
   </m:mfenced>
   <m:mn>2</m:mn>
  </m:msub>
  <m:mo>&#8804;</m:mo>
  <m:mi>r</m:mi>
  <m:mfenced separators="">
   <m:mn>1</m:mn>
   <m:mo>+</m:mo>
   <m:msub>
    <m:mfenced open="&#8214;" close="&#8214;" separators="">
     <m:mi>x</m:mi>
    </m:mfenced>
    <m:mn>2</m:mn>
   </m:msub>
  </m:mfenced>
  <m:mtext>,</m:mtext>
 </m:mrow>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>r</m:mi>
</m:math>&#160;is the value of <a class="optparamref" href="#optparam_step_limit">step_limit</a>.
<div class="paramtext">The line search may go on and evaluate <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>c</m:mi>
</m:math>&#160;at points further from <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;if this will result in a lower value of the merit function.  In this case, the character <span class="mono">L</span> is printed at the end of each line of output produced by the major iterations (see Section <a class="secref" href="#e04uccargus1">5.1</a>).  If <span class="mono">L</span> is printed for most of the iterations, <a class="optparamref" href="#optparam_step_limit">step_limit</a> should be set to a larger value.</div>
<div class="paramtext">Wherever possible, upper and lower bounds on <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;should be used to prevent evaluation of nonlinear functions at wild values.  The default value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_step_limit" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">step_limit</m:mi></m:maction><m:mo>=</m:mo><m:mn>2.0</m:mn>
</m:math>&#160;should not affect progress on well-behaved functions, but values such as 0.1 or 0.01 may be helpful when rapidly varying functions are present.  If a small value of <a class="optparamref" href="#optparam_step_limit">step_limit</a> is selected, a good starting point may be required.  An important application is to the class of nonlinear least-squares problems.</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_step_limit" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.step_limit</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0.0</m:mn>
</m:math>.
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_crash_tol" id="optparam_crash_tol"/><b>crash_tol</b> &#8211; double&#160;</td><td class="optparam" align="center"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mn>0.01</m:mn></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: <a class="optparamref" href="#optparam_crash_tol">crash_tol</a> is used during a &#8216;cold start&#8217; when nag_opt_nlp (e04ucc) selects an initial working set (<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.start</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Cold</m:mi></m:math>).  The initial working set will include (if possible) bounds or general inequality constraints that lie within <a class="optparamref" href="#optparam_crash_tol">crash_tol</a> of their bounds.  In particular, a constraint of the form <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msubsup><m:mi>a</m:mi><m:mi>j</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:mi>x</m:mi>
 <m:mo>&#8805;</m:mo>
 <m:mi>l</m:mi>
</m:math>&#160;will be included in the initial working set if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="|" close="|" separators="">
  <m:msubsup><m:mi>a</m:mi><m:mi>j</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
  <m:mrow><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>l</m:mi></m:mrow>
 </m:mfenced>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_crash_tol" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">crash_tol</m:mi></m:maction>
 <m:mo>&#215;</m:mo>
 <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>.</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mn>0.0</m:mn>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_crash_tol" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.crash_tol</m:mi></m:maction>
 <m:mo>&#8804;</m:mo>
 <m:mn>1.0</m:mn>
</m:math>.
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_inf_bound" id="optparam_inf_bound"/><b>inf_bound</b> &#8211; double&#160;</td><td class="optparam" align="center"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:msup><m:mn>10</m:mn><m:mn>20</m:mn></m:msup></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: <a class="optparamref" href="#optparam_inf_bound">inf_bound</a> defines the &#8216;infinite&#8217; bound in the definition of the problem constraints.  Any upper bound greater than or equal to <a class="optparamref" href="#optparam_inf_bound">inf_bound</a> will be regarded as plus infinity (and similarly any lower bound less than or equal to <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:mo>-</m:mo><m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">inf_bound</m:mi></m:maction></m:mrow>
</m:math>&#160;will be regarded as minus infinity).</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_bound</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0.0</m:mn>
</m:math>.
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_inf_step" id="optparam_inf_step"/><b>inf_step</b> &#8211; double&#160;</td><td class="optparam" align="center"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo>
 <m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><m:mfenced separators=""><m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_bound</m:mi></m:maction><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"><i>On entry</i>: <a class="optparamref" href="#optparam_inf_step">inf_step</a> specifies the magnitude of the change in variables that will be considered a step to an unbounded solution.  If the change in <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;during an iteration would exceed the value of <a class="optparamref" href="#optparam_inf_step">inf_step</a>, the objective function is considered to be unbounded below in the feasible region.</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_inf_step" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_step</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0.0</m:mn>
</m:math>.
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_conf" id="optparam_conf"/><b>conf</b> &#8211; double&#160;</td><td class="optparam" align="center"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: <a class="argref" href="#ncnlin">ncnlin</a> values of memory will be automatically allocated by nag_opt_nlp (e04ucc) and this is the recommended method of use of <a class="argref" href="#confun_conf">conf</a>.  However a user may supply memory from the calling program.</div>
<div class="paramtext"><i>On exit</i>: if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn>
</m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#confun_conf" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">conf</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;contains the value of the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>i</m:mi>
</m:math>th nonlinear constraint function <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>c</m:mi>
  <m:mi>i</m:mi>
 </m:msub>
</m:math>&#160;at the final iterate.
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn>
</m:math>&#160;then <a class="argref" href="#confun_conf">conf</a> will not be referenced.</div>
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_conjac" id="optparam_conjac"/><b>conjac</b> &#8211; double&#160;</td><td class="optparam" align="center"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: <a class="argref" href="#ncnlin">ncnlin</a>*<a class="argref" href="#n">n</a> values of memory will be automatically allocated by nag_opt_nlp (e04ucc) and this is the recommended method of use of <a class="argref" href="#confun_conjac">conjac</a>.  However a user may supply memory from the calling program.</div>
<div class="paramtext"><i>On exit</i>: if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn>
</m:math>, <a class="argref" href="#confun_conjac">conjac</a> contains the Jacobian matrix of the nonlinear constraint functions at the final iterate, i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#confun_conjac" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">conjac</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow>
   <m:mfenced separators=""><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced>
   <m:mo>*</m:mo>
   <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
   <m:mo>+</m:mo>
   <m:mi>j</m:mi>
   <m:mo>-</m:mo>
   <m:mn>1</m:mn>
  </m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;contains the partial derivative of the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>i</m:mi>
</m:math>th constraint function with respect to the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>th variable, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>i</m:mi>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>,</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
</m:math>; <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>,</m:mo>
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
</m:math>.  (See the discussion of the parameter <a class="argref" href="#confun_conjac">conjac</a> under <a class="argref" href="#confun">confun</a>.)
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn>
</m:math>&#160;then <a class="argref" href="#confun_conjac">conjac</a> will not be referenced.</div>
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_state" id="optparam_state"/><b>state</b> &#8211; Integer&#160;</td><td class="optparam" align="center"><i>i</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: <a class="optparamref" href="#optparam_state">state</a> need not be set if the default option of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.start</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Cold</m:mi></m:math>&#160;is used as <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
</m:math>&#160;values of memory will be automatically allocated by nag_opt_nlp (e04ucc).
<div class="paramtext">If the option <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.start</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Warm</m:mi></m:math>&#160;has been chosen, <a class="optparamref" href="#optparam_state">state</a> must point to a minimum of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
</m:math>&#160;elements of memory.  This memory will already be available if the <a class="argref" href="#options">options</a> structure has been used in a previous call to nag_opt_nlp (e04ucc) from the calling program, with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.start</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Cold</m:mi></m:math>&#160;and the same values of <a class="argref" href="#n">n</a>, <a class="argref" href="#nclin">nclin</a> and <a class="argref" href="#ncnlin">ncnlin</a>.  If a previous call has not been made, sufficient memory must be allocated by the user.</div>
<div class="paramtext">When a &#8216;warm start&#8217; is chosen <a class="optparamref" href="#optparam_state">state</a> should specify the status of the bounds and linear constraints at the start of the feasibility phase.  More precisely, the first <a class="argref" href="#n">n</a> elements of <a class="optparamref" href="#optparam_state">state</a> refer to the upper and lower bounds on the variables, the next <a class="argref" href="#nclin">nclin</a> elements refer to the general linear constraints and the following <a class="argref" href="#ncnlin">ncnlin</a> elements refer to the nonlinear constraints.  Possible values for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#optparam_state" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">state</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mi>j</m:mi><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;are as follows:
</div><div class="left-tablediv"><table class="frame-none">
  
  
  <tbody>
   <tr>
    <td class="libdoc" valign="top" align="center"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#optparam_state" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">state</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mi>j</m:mi><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math></td>
    <td class="libdoc" valign="top" align="center"><b>Meaning</b></td>
   </tr>
   <tr>
    <td class="libdoc" valign="top" align="center">
     <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mn>0</m:mn></m:math>&#160;    </td>
    <td class="libdoc" valign="top" align="left">The corresponding constraint is <span class="italic">not</span> in the initial QP working set.</td>
   </tr>
   <tr>
    <td class="libdoc" valign="top" align="center">
     <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mn>1</m:mn></m:math>&#160;    </td>
    <td class="libdoc" valign="top" align="left">This inequality constraint should be in the initial working set at its lower bound.</td>
   </tr>
   <tr>
    <td class="libdoc" valign="top" align="center">
     <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mn>2</m:mn></m:math>&#160;    </td>
    <td class="libdoc" valign="top" align="left">This inequality constraint should be in the initial working set at its upper bound.</td>
   </tr>
   <tr>
    <td class="libdoc" valign="top" align="center">
     <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mn>3</m:mn></m:math>&#160;    </td>
    <td class="libdoc" valign="top" align="left">This equality constraint should be in the initial working set.  This value must only be specified if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mi>j</m:mi><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>=</m:mo>
 <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mi>j</m:mi><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>.</td>
   </tr>
  </tbody>
 </table></div><div class="paramtext">
</div>
<div class="paramtext">The values <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow>
</m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow>
</m:math>&#160;and 4 are also acceptable but will be reset to zero by the function, as will any elements which are set to 3 when the corresponding elements of <a class="argref" href="#bl">bl</a> and <a class="argref" href="#bu">bu</a> are not equal.  If nag_opt_nlp (e04ucc) has been called previously with the same values of <a class="argref" href="#n">n</a>, <a class="argref" href="#nclin">nclin</a> and <a class="argref" href="#ncnlin">ncnlin</a>, then <a class="optparamref" href="#optparam_state">state</a> already contains satisfactory information.  (See also the description of the optional parameter <a class="optparamref" href="#optparam_start">options.start</a>.)  The function also adjusts (if necessary) the values supplied in <a class="argref" href="#x">x</a> to be consistent with the values supplied in <a class="optparamref" href="#optparam_state">state</a>.</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
  <m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow>
  <m:mo>&#8804;</m:mo>
  <m:mrow><m:maction actiontype="link" dsi:href="#optparam_state" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.state</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mi>j</m:mi><m:mo>]</m:mo></m:mrow></m:mrow>
  <m:mo>&#8804;</m:mo>
  <m:mn>4</m:mn>
 </m:math>, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mi mathvariant="italic">j</m:mi><m:mo>=</m:mo><m:mn>0</m:mn><m:mo>,</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo>
  <m:mrow><m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
  <m:mo>+</m:mo>
  <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
  <m:mo>+</m:mo>
  <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
  <m:mo>-</m:mo>
  <m:mn>1</m:mn></m:mrow>
 </m:math>.
</div>
<div class="paramtext"><i>On exit</i>: the status of the constraints in the QP working set at the point returned in <a class="argref" href="#x">x</a>.  The significance of each possible value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#optparam_state" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">state</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mi>j</m:mi><m:mo>]</m:mo></m:mrow></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"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#optparam_state" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">state</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mi>j</m:mi><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math></td>
    <td class="libdoc" valign="top" align="center"><b>Meaning</b></td>
   </tr><tr>
    <td class="libdoc" valign="top" align="center"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow>
</m:math></td>
    <td class="libdoc" valign="top" align="left">The constraint violates its lower bound by more than the appropriate feasibility tolerance (see the options <a class="optparamref" href="#optparam_lin_feas_tol">options.lin_feas_tol</a> and <a class="optparamref" href="#optparam_nonlin_feas_tol">options.nonlin_feas_tol</a>).  This value can occur only when no feasible point can be found for a QP subproblem.</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="center"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow>
</m:math></td>
    <td class="libdoc" valign="top" align="left">The constraint violates its upper bound by more than the appropriate feasibility tolerance (see the options <a class="optparamref" href="#optparam_lin_feas_tol">options.lin_feas_tol</a> and <a class="optparamref" href="#optparam_nonlin_feas_tol">options.nonlin_feas_tol</a>).  This value can occur only when no feasible point can be found for a QP subproblem.</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="center"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mphantom>
  <m:mo>-</m:mo>
 </m:mphantom>
 <m:mn>0</m:mn>
</m:math></td>
    <td class="libdoc" valign="top" align="left">The constraint is satisfied to within the feasibility tolerance, but is not in the QP working set.</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="center"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mphantom>
  <m:mo>-</m:mo>
 </m:mphantom>
 <m:mn>1</m:mn>
</m:math></td>
    <td class="libdoc" valign="top" align="left">This inequality constraint is included in the QP working set at its lower bound.</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="center"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mphantom>
  <m:mo>-</m:mo>
 </m:mphantom>
 <m:mn>2</m:mn>
</m:math></td>
    <td class="libdoc" valign="top" align="left">This inequality constraint is included in the QP working set at its upper bound.</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="center"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mphantom>
  <m:mo>-</m:mo>
 </m:mphantom>
 <m:mn>3</m:mn>
</m:math></td>
    <td class="libdoc" valign="top" align="left">This constraint is included in the working set as an equality.  This value of <a class="optparamref" href="#optparam_state">state</a> can occur only when <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mi>j</m:mi><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>=</m:mo>
 <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mi>j</m:mi><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>.</td>
   </tr>
  </tbody>
 </table></div>
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_lambda" id="optparam_lambda"/><b>lambda</b> &#8211; double&#160;</td><td class="optparam" align="center"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: <a class="optparamref" href="#optparam_lambda">lambda</a> need not be set if the default option of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.start</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Cold</m:mi></m:math>&#160;is used as <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
</m:math>&#160;values of memory will be automatically allocated by nag_opt_nlp (e04ucc).
<div class="paramtext">If the option <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.start</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Warm</m:mi></m:math>&#160;has been chosen, <a class="optparamref" href="#optparam_lambda">lambda</a> must point to a minimum of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
</m:math>&#160;elements of memory.  This memory will already be available if the <a class="argref" href="#options">options</a> structure has been used in a previous call to nag_opt_nlp (e04ucc) from the calling program, with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.start</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Cold</m:mi></m:math>&#160;and the same values of <a class="argref" href="#n">n</a>, <a class="argref" href="#nclin">nclin</a> and <a class="argref" href="#ncnlin">ncnlin</a>.  If a previous call has not been made with sufficient memory must be allocated by the user.</div>
<div class="paramtext">When a &#8216;warm start&#8217; is chosen <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#optparam_lambda" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">lambda</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;must contain a multiplier estimate for each nonlinear constraint with a sign that matches the status of the constraint specified by <a class="optparamref" href="#optparam_state">options.state</a>, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
 <m:mo>=</m:mo>
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:mn>1</m:mn>
</m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:mn>2</m:mn>
</m:math>,<m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mo>&#8230;</m:mo>
</m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
</m:math>.  The remaining elements need not be set.</div>
<div class="paramtext">Note that if the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>th constraint is defined as &#8216;inactive&#8217; by the initial value of the <a class="optparamref" href="#optparam_state">options.state</a> array (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#optparam_state" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.state</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>=</m:mo>
 <m:mn>0</m:mn>
</m:math>), <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#optparam_lambda" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">lambda</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;should be zero; if the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>th constraint is an inequality active at its lower bound (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#optparam_state" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.state</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
</m:math>), <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#optparam_lambda" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">lambda</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;should be non-negative; if the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>th constraint is an inequality active at its upper bound (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#optparam_state" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.state</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>=</m:mo>
 <m:mn>2</m:mn>
</m:math>), <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#optparam_lambda" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">lambda</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;should be non-positive.  If necessary, the function will modify <a class="optparamref" href="#optparam_lambda">lambda</a> to match these rules.</div>
</div>
<div class="paramtext"><i>On exit</i>: the values of the Lagrange multipliers from the last QP subproblem.  <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#optparam_lambda" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">lambda</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;should be non-negative if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#optparam_state" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.state</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
</m:math>&#160;and non-positive if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#optparam_state" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.state</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>=</m:mo>
 <m:mn>2</m:mn>
</m:math>.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_h" id="optparam_h"/><b>h</b> &#8211; double&#160;</td><td class="optparam" align="center"><i>r</i></td><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: <a class="optparamref" href="#optparam_h">h</a> need not be set if the default option of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.start</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Cold</m:mi></m:math>&#160;is used, as <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction></m:math>&#160;values of memory will be automatically allocated by nag_opt_nlp (e04ucc).
<div class="paramtext">If the option <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.start</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Warm</m:mi></m:math>&#160;has been chosen, <a class="optparamref" href="#optparam_h">h</a> must point to a minimum of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction></m:math>&#160;elements of memory.  This memory will already be available if the calling program has used the <a class="argref" href="#options">options</a> structure in a previous call to nag_opt_nlp (e04ucc) with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.start</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Cold</m:mi></m:math>&#160;and the same value of <a class="argref" href="#n">n</a>.  If a previous call has not been made sufficient memory must be allocated by the user.</div>
<div class="paramtext">When <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.start</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Warm</m:mi></m:math>&#160;is chosen, the memory pointed to by <a class="optparamref" href="#optparam_h">h</a> must contain the upper triangular Cholesky factor <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>R</m:mi>
</m:math>&#160;of the initial approximation of the Hessian of the Lagrangian function, with the variables in the natural order.  Elements not in the upper triangular part of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>R</m:mi>
</m:math>&#160;are assumed to be zero and need not be assigned.  If a previous call has been made, with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_hessian" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.hessian</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_True</m:mi>
</m:math>, then <a class="optparamref" href="#optparam_h">h</a> will already have been set correctly.</div>
</div>
<div class="paramtext"><i>On exit</i>: if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_hessian" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.hessian</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_False</m:mi>
</m:math>, <a class="optparamref" href="#optparam_h">h</a> contains the upper triangular Cholesky factor <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>R</m:mi>
</m:math>&#160;of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:mrow>
  <m:mi>H</m:mi>
 <m:mo>&#732;</m:mo></m:mrow>
 <m:mi>Q</m:mi>
</m:math>, an estimate of the transformed and re-ordered Hessian of the Lagrangian at <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;(see (<a class="eqnref" href="#eqn6">6</a>) in Section <a class="secref" href="#e04uccfd1">10.1</a>).
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_hessian" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.hessian</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_True</m:mi>
</m:math>, <a class="optparamref" href="#optparam_h">h</a> contains the upper triangular Cholesky factor <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>R</m:mi>
</m:math>&#160;of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>H</m:mi>
</m:math>, the approximate (untransformed) Hessian of the Lagrangian, with the variables in the natural order.</div>
</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_hessian" id="optparam_hessian"/><b>hessian</b> &#8211; Nag_Boolean&#160;</td><td class="optparam" align="center"/><td class="optparam" style="width:45%" align="right">Default <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mtext/><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_False</m:mi></m:math></td></tr></table><div class="paramtext"><i>On entry</i>: controls the contents of the optional parameter <a class="optparamref" href="#optparam_h">options.h</a> on return from nag_opt_nlp (e04ucc).  nag_opt_nlp (e04ucc) works exclusively with the <span class="italic">transformed</span> and <span class="italic">re-ordered</span> Hessian <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>H</m:mi>
  <m:mi>Q</m:mi>
 </m:msub>
</m:math>, and hence extra computation is required to form the Hessian itself. If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_hessian" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">hessian</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_False</m:mi>
</m:math>, <a class="optparamref" href="#optparam_h">options.h</a> contains the Cholesky factor of the transformed and re-ordered Hessian. If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_hessian" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">hessian</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_True</m:mi>
</m:math>, the Cholesky factor of the approximate Hessian itself is formed and stored in <a class="optparamref" href="#optparam_h">options.h</a>. This information is required by nag_opt_nlp (e04ucc) if the next call to nag_opt_nlp (e04ucc) will be made with optional parameter <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_start" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.start</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Warm</m:mi></m:math>.</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_iter" id="optparam_iter"/><b>iter</b> &#8211; Integer&#160;</td><td class="optparam" align="center"><i>i</i></td><td class="optparam" style="width:45%" align="right"/></tr></table><div class="paramtext"><i>On exit</i>: the number of major iterations which have been performed in nag_opt_nlp (e04ucc).</div><table width="100%" class="optparam"><tr><td class="optparam" style="width:45%" align="left"><a name="optparam_nf" id="optparam_nf"/><b>nf</b> &#8211; Integer&#160;</td><td class="optparam" align="center"><i>i</i></td><td class="optparam" style="width:45%" align="right"/></tr></table><div class="paramtext"><i>On exit</i>: the number of times the objective function has been evaluated (i.e., number of calls of <a class="argref" href="#objfun">objfun</a>).  The total excludes any calls made to <a class="argref" href="#objfun">objfun</a> for purposes of derivative checking.</div><h3><a name="e04uccoptparams3" id="e04uccoptparams3"/>11.3&#160;&#160;Description of Printed Output </h3><div class="paramtext">The level of printed output can be controlled by the user with the structure members <a class="optparamref" href="#optparam_list">options.list</a>, <a class="optparamref" href="#optparam_print_deriv">options.print_deriv</a>, <a class="optparamref" href="#optparam_print_level">options.print_level</a> and <a class="optparamref" href="#optparam_minor_print_level">options.minor_print_level</a> (see Section <a class="secref" href="#op-description">11.2</a>).  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#optparam_list" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.list</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_True</m:mi>
</m:math>&#160;then the parameter values to nag_opt_nlp (e04ucc) are listed, followed by the result of any derivative check if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_deriv" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.print_deriv</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<b>Nag_D_Sum</b> or <b>Nag_D_Full</b>.  The printout of results is governed by the values of <a class="optparamref" href="#optparam_print_level">options.print_level</a> and <a class="optparamref" href="#optparam_minor_print_level">options.minor_print_level</a>.  The default of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_level" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.print_level</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Soln_Iter</m:mi></m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_minor_print_level" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.minor_print_level</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_NoPrint</m:mi></m:math>&#160;provides a single line of output at each iteration and the final result.  This section describes all of the possible levels of results printout available from nag_opt_nlp (e04ucc).</div>
<div class="paramtext">If a simple derivative check, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_verify_grad" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.verify_grad</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_SimpleCheck</m:mi></m:math>, is requested then a statement indicating success or failure is given.  The largest error found in the constraint Jacobian is output together with the directional derivative, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"> <m:msup><m:mi>g</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:mi>p</m:mi>
</m:math>, of the objective gradient and its finite difference approximation, where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>p</m:mi>
</m:math>&#160;is a random vector of unit length.</div>
<div class="paramtext">When a component derivative check (see <a class="optparamref" href="#optparam_verify_grad">options.verify_grad</a> in Section <a class="secref" href="#op-description">11.2</a>) is selected the element with the largest relative error is identified for the objective gradient and the constraint Jacobian.</div>
<div class="paramtext">If the value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_deriv" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.print_deriv</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_D_Full</m:mi></m:math>&#160;then the following results are printed for each component:
</div><table style="width:90%;"><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">x[i]</span></td><td valign="top">the element of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">dx[i]</span></td><td valign="top">the optimal finite difference interval.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">g[i]</span> or <span class="mono">Jacobian value</span></td><td valign="top">the gradient/Jacobian element.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Difference approxn. </span></td><td valign="top">the finite difference approximation.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Itns</span></td><td valign="top">the number of trials performed to find a suitable difference interval.</td></tr></table><div class="paramtext">
The indicator, <span class="mono">OK</span> or <span class="mono">BAD? </span>, states whether the gradient/Jacobian element and finite difference approximation are in agreement.  If the derivatives are believed to be in error nag_opt_nlp (e04ucc) will exit with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#fail" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">fail</m:mi></m:maction><m:mi mathvariant="bold">.code</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#NE_DERIV_ERRORS" dsi:type="simple"><m:mi mathvariant="bold" mathcolor="#003399">NE_DERIV_ERRORS</m:mi></m:maction></m:math>.</div>
<div class="paramtext">When <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_level" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.print_level</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<b>Nag_Iter</b> or <b>Nag_Soln_Iter</b> the following line of output 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.
</div><table style="width:90%;"><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Maj</span></td><td valign="top">is the major iteration count.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Mnr</span></td><td valign="top">is the number of minor iterations required by the feasibility and optimality phases of the QP subproblem.  Generally, <span class="mono">Mnr</span> will be 1 in the later iterations, since theoretical analysis predicts that the correct active set will be identified near the solution (see Section <a class="secref" href="#e04uccfd">10</a>).
 <div class="paramtext">Note that <span class="mono">Mnr</span> may be greater than the optional parameter <a class="optparamref" href="#optparam_minor_max_iter">options.minor_max_iter</a> (default value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mtext/>
 <m:mo>=</m:mo>
 <m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo><m:mfenced separators=""><m:mn>50</m:mn><m:mo>,</m:mo><m:mrow>
    <m:mn>3</m:mn>
    <m:mfenced separators="">
     <m:mi>n</m:mi>
     <m:mo>+</m:mo>
     <m:msub>
      <m:mi>n</m:mi>
      <m:mi>L</m:mi>
     </m:msub>
     <m:mo>+</m:mo>
     <m:msub>
      <m:mi>n</m:mi>
      <m:mi>N</m:mi>
     </m:msub>
    </m:mfenced>
   </m:mrow></m:mfenced></m:mrow>
</m:math>; see Section <a class="secref" href="#op-description">11.2</a>) if some iterations are required for the feasibility phase.</div></td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Step</span></td><td valign="top">is the step taken along the computed search direction. On reasonably well-behaved problems, the unit step will be taken as the solution is approached.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Merit function</span></td><td valign="top">is the value of the augmented Lagrangian merit function (<a class="eqnref" href="#eqn12">12</a>) at the current iterate.  This function will decrease at each iteration unless it was necessary to increase the penalty parameters (see Section <a class="secref" href="#e04uccfd3">10.3</a>).  As the solution is approached, <span class="mono">Merit function</span> will converge to the value of the objective function at the solution.
<div class="paramtext">If the QP  subproblem does not have a feasible point (signified by <span class="mono">I</span> at the end of the current output line), the merit function is a large multiple of the constraint violations, weighted by the penalty parameters.  During a sequence of major iterations with infeasible subproblems, the sequence of <span class="mono">Merit Function</span> values will decrease monotonically until either a feasible subproblem is obtained or nag_opt_nlp (e04ucc) terminates with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#fail" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">fail</m:mi></m:maction><m:mi mathvariant="bold">.code</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:href="#NW_NONLIN_NOT_FEASIBLE" dsi:type="simple"><m:mi mathvariant="bold" mathcolor="#003399">NW_NONLIN_NOT_FEASIBLE</m:mi></m:maction>
</m:math>&#160;(no feasible point could be found for the nonlinear constraints).</div>
<div class="paramtext">If no nonlinear constraints are present (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn>
</m:math>), this entry contains <span class="mono">Objective</span>, the value of the objective function <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>F</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math>.  The objective function will decrease monotonically to its optimal value when there are no nonlinear constraints.</div></td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Violtn</span></td><td valign="top">is the Euclidean norm of the residuals of constraints that are violated or in the predicted active set (not printed if <a class="argref" href="#ncnlin">ncnlin</a> is zero).  <span class="mono">Violtn</span> will be approximately zero in the neighbourhood of a solution.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Norm Gz</span></td><td valign="top">is <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="&#8214;" close="&#8214;" separators="">
  <m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
  <m:msub>
   <m:mi>g</m:mi>
   <m:mi mathvariant="normal">FR</m:mi>
  </m:msub>
 </m:mfenced>
</m:math>, the Euclidean norm of the projected gradient (see Section <a class="secref" href="#e04uccfd1">10.1</a>).  <span class="mono">Norm</span> <span class="mono">Gz</span> will be approximately zero in the neighbourhood of a solution.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Cond Hz</span></td><td valign="top">is a lower bound on the condition number of the projected Hessian approximation <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>H</m:mi>
  <m:mi>Z</m:mi>
 </m:msub>
</m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced separators="">
  <m:msub>
   <m:mi>H</m:mi>
   <m:mi>Z</m:mi>
  </m:msub>
  <m:mo>=</m:mo>
  <m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
  <m:msub>
   <m:mi>H</m:mi>
   <m:mi mathvariant="normal">FR</m:mi>
  </m:msub>
  <m:mi>Z</m:mi>
  <m:mo>=</m:mo>
  <m:msubsup><m:mi>R</m:mi><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
  <m:msub>
   <m:mi>R</m:mi>
   <m:mi>Z</m:mi>
  </m:msub>
 </m:mfenced>
</m:math>; see (<a class="eqnref" href="#eqn6">6</a>) in Section <a class="secref" href="#e04uccfd1">10.1</a> and (<a class="eqnref" href="#eqn11">11</a>) in Section <a class="secref" href="#e04uccfd2">10.2</a>). The larger this number, the more difficult the problem.</td></tr></table><div class="paramtext">
</div>
<div class="paramtext">The line of output may be terminated by one of the following characters:
</div><table style="width:100%;"><tr><td class="libdoc" valign="top"><span class="mono">M</span></td><td valign="top">is printed if the quasi-Newton update was modified to ensure that the Hessian approximation is positive-definite (see Section <a class="secref" href="#e04uccfd4">10.4</a>).</td></tr><tr><td class="libdoc" valign="top"><span class="mono">I</span></td><td valign="top">is printed if the QP subproblem has no feasible point.</td></tr><tr><td class="libdoc" valign="top"><span class="mono">C</span></td><td valign="top">is printed if central differences were used to compute the unspecified objective and constraint gradients.  If the value of <span class="mono">Step</span> is zero, the switch to central differences was made because no lower point could be found in the line search.  (In this case, the QP subproblem is re-solved with the central difference gradient and Jacobian.)  If the value of <span class="mono">Step</span> is non-zero, central differences were computed because <span class="mono">Norm Gz</span> and <span class="mono">Violtn</span> imply that <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;is close to a Kuhn&#8211;Tucker point (see Section <a class="secref" href="#e04uccfd1">10.1</a>).</td></tr><tr><td class="libdoc" valign="top"><span class="mono">L</span></td><td valign="top">is printed if the line search has produced a relative change in <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;greater than the value defined by the optional parameter <a class="optparamref" href="#optparam_step_limit">options.step_limit</a> (default value <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mtext/><m:mo>=</m:mo><m:mn>2.0</m:mn>
</m:math>; see Section <a class="secref" href="#op-description">11.2</a>).  If this output occurs frequently during later iterations of the run, <a class="optparamref" href="#optparam_step_limit">options.step_limit</a> should be set to a larger value.</td></tr><tr><td class="libdoc" valign="top"><span class="mono">R</span></td><td valign="top">is printed if the approximate Hessian has been refactorized.  If the diagonal condition estimator of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>R</m:mi>
</m:math>&#160;indicates that the approximate Hessian is badly conditioned, the approximate Hessian is refactorized using column interchanges.  If necessary, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>R</m:mi>
</m:math>&#160;is modified so that its diagonal condition estimator is bounded.</td></tr></table><div class="paramtext">
</div>
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_level" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.print_level</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<b>Nag_Iter_Long</b>, <b>Nag_Soln_Iter_Long</b>, <b>Nag_Soln_Iter_Const</b> or <b>Nag_Soln_Iter_Full</b> the line of printout at every iteration is extended to give the following additional information.  (Note this longer line extends over more than 80 characters.)
</div><table style="width:100%;"><tr><td class="libdoc" valign="top"><span class="mono">Nfun</span></td><td valign="top">is the cumulative number of evaluations of the objective function needed for the line search.  Evaluations needed for the estimation of the gradients by finite differences are not included.  <span class="mono">Nfun</span> is printed as a guide to the amount of work required for the linesearch.</td></tr><tr><td class="libdoc" valign="top"><span class="mono">Nz</span></td><td valign="top">is the number of columns of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>Z</m:mi>
 </m:math>&#160;(see Section <a class="secref" href="#e04uccfd1">10.1</a>).  The value of <span class="mono">Nz</span> is the number of variables minus the number of constraints in the predicted active set; i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="monospace">Nz</m:mi>
 <m:mo>=</m:mo>
 <m:mi>n</m:mi>
 <m:mo>-</m:mo>
 <m:mfenced separators="">
  <m:mi mathvariant="monospace">Bnd</m:mi>
  <m:mo>+</m:mo>
  <m:mi mathvariant="monospace">Lin</m:mi>
  <m:mo>+</m:mo>
  <m:mi mathvariant="monospace">Nln</m:mi>
 </m:mfenced>
 </m:math>.</td></tr><tr><td class="libdoc" valign="top"><span class="mono">Bnd</span></td><td valign="top">is the number of simple bound constraints in the predicted active set.</td></tr><tr><td class="libdoc" valign="top"><span class="mono">Lin</span></td><td valign="top">is the number of general linear constraints in the predicted active set.</td></tr><tr><td class="libdoc" valign="top"><span class="mono">Nln</span></td><td valign="top">is the number of nonlinear constraints in the predicted active set (not printed if <a class="argref" href="#ncnlin">ncnlin</a> is zero).</td></tr><tr><td class="libdoc" valign="top"><span class="mono">Penalty</span></td><td valign="top">is the Euclidean norm of the vector of penalty parameters used in the augmented Lagrangian merit function (not printed if <a class="argref" href="#ncnlin">ncnlin</a> is zero).</td></tr><tr><td class="libdoc" valign="top"><span class="mono">Norm Gf</span></td><td valign="top">is the Euclidean norm of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>g</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
 </m:math>, the gradient of the objective function with respect to the free variables.</td></tr><tr><td class="libdoc" valign="top"><span class="mono">Cond H</span></td><td valign="top">is a lower bound on the condition number of the Hessian approximation <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>H</m:mi>
 </m:math>.</td></tr><tr><td class="libdoc" valign="top"><span class="mono">Cond T</span></td><td valign="top">is a lower bound on the condition number of the matrix of predicted active constraints.</td></tr><tr><td class="libdoc" valign="top"><span class="mono">Conv</span></td><td valign="top">is a three-letter indication of the status of the three convergence tests (<a class="eqnref" href="#eqn16a">16</a>) <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mo>-</m:mo>
 </m:math>&#160;(<a class="eqnref" href="#eqn16c">18</a>) defined in the description of the optional parameter <a class="optparamref" href="#optparam_optim_tol">options.optim_tol</a> in Section <a class="secref" href="#op-description">11.2</a>.  Each letter is <span class="mono">T</span> if the test is satisfied, and <span class="mono">F</span> otherwise.  The three tests indicate whether:
 <ol class="listalpha"><li class="listalpha"><a name="itema" id="itema"/>the sequence of iterates has converged;</li><li class="listalpha"><a name="itemb" id="itemb"/>the projected gradient (<span class="mono">Norm Gz</span>) is sufficiently small; and</li><li class="listalpha"><a name="itemc" id="itemc"/>the norm of the residuals of constraints in the predicted active set (<span class="mono">Violtn</span>) is small enough.</li></ol>
 <div class="paramtext">If any of these indicators is <span class="mono">F</span> when nag_opt_nlp (e04ucc) terminates with the error indicator <a class="ifailref" href="#errors">NE_NOERROR</a>, the user should check the solution carefully.</div></td></tr></table><div class="paramtext">
</div>
<div class="paramtext">When <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_level" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.print_level</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<b>Nag_Soln_Iter_Const</b> or <b>Nag_Soln_Iter_Full</b> more detailed results are given at each iteration.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_level" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.print_level</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Soln_Iter_Const</m:mi></m:math>&#160;these additional values are: the value of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;currently held in <a class="argref" href="#x">x</a>; the current value of the objective function; the Euclidean norm of nonlinear constraint violations; the values of the nonlinear constraints (the vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>c</m:mi>
</m:math>); and the values of the linear constraints, (the vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>A</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
 <m:mi>x</m:mi>
</m:math>).</div>
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_level" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.print_level</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_Soln_Iter_Full</m:mi></m:math>&#160;then the diagonal elements of the matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>T</m:mi>
</m:math>&#160;associated with the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:mi>T</m:mi><m:mi>Q</m:mi></m:mrow>
</m:math>&#160;factorization (<a class="eqnref" href="#eqn5">5</a>) of the QP working set and the diagonal elements of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>R</m:mi>
</m:math>, the triangular factor of the transformed and re-ordered Hessian (<a class="eqnref" href="#eqn6">6</a>) (see Section <a class="secref" href="#e04uccfd1">10.1</a>) are also output at each iteration.</div>
<div class="paramtext">When <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_level" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.print_level</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<b>Nag_Soln</b>, <b>Nag_Soln_Iter</b>, <b>Nag_Soln_Iter_Long</b>, <b>Nag_Soln_Iter_Const</b> or <b>Nag_Soln_Iter_Full</b> the final printout from nag_opt_nlp (e04ucc) includes a listing of the status of every variable and constraint.  The following describes the printout for each variable.
</div><table style="width:90%;"><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Varbl</span></td><td valign="top">gives the name (<span class="mono">V</span>) and index <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>,</m:mo>
 <m:mi>n</m:mi>
</m:math>&#160;of the variable.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">State</span></td><td valign="top">gives the state of the variable (<span class="mono">FR</span> if neither bound is in the active 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).  If <span class="mono">Value</span> lies outside the upper or lower bounds by more than the feasibility tolerances specified by the optional parameters <a class="optparamref" href="#optparam_lin_feas_tol">options.lin_feas_tol</a> and <a class="optparamref" href="#optparam_nonlin_feas_tol">options.nonlin_feas_tol</a> (see Section <a class="secref" href="#op-description">11.2</a>), <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> to give some additional information about the state of a variable.
 </div><table style="width:100%;"><tr><td class="libdoc" valign="top"><span class="mono">A</span></td><td valign="top"><span class="italic">Alternative optimum possible</span>.  The variable is active at one of its bounds, but its Lagrange Multiplier is essentially zero.  This means that if the variable were allowed to start moving away from its bound, 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 class="libdoc" valign="top"><span class="mono">D</span></td><td valign="top"><span class="italic">Degenerate</span>. The variable is free, but it is equal to (or very close to) one of its bounds.</td></tr><tr><td class="libdoc" valign="top"><span class="mono">I</span></td><td valign="top"><span class="italic">Infeasible</span>.  The variable is currently violating one of its bounds by more than <a class="optparamref" href="#optparam_lin_feas_tol">options.lin_feas_tol</a>.</td></tr></table><div class="paramtext">
 </div></td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Value</span></td><td valign="top">is the value of the variable at the final iteration.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Lower bound</span></td><td valign="top">is the lower bound specified for the variable <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>.  (<span class="mono">None</span> indicates that <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_bound</m:mi></m:maction></m:math>, where <a class="optparamref" href="#optparam_inf_bound">options.inf_bound</a> is the optional parameter.)</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Upper bound</span></td><td valign="top">is the upper bound specified for the variable <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>.  (<span class="mono">None</span> indicates that <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>&#8805;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_bound</m:mi></m:maction></m:math>, where <a class="optparamref" href="#optparam_inf_bound">options.inf_bound</a> is the optional parameter.)</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Lagr Mult</span></td><td valign="top">is the value of the Lagrange multiplier for the associated bound constraint.  This will be zero if <span class="mono">State</span> is <span class="mono">FR</span> unless <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>&#8804;</m:mo>
 <m:mrow><m:mo>-</m:mo><m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_bound</m:mi></m:maction></m:mrow>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>&#8805;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_bound</m:mi></m:maction></m:math>, in which case the entry will be blank.  If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;is optimal, the multiplier should be non-negative if <span class="mono">State</span> is <span class="mono">LL</span>, and non-positive if <span class="mono">State</span> is <span class="mono">UL</span>.</td></tr><tr><td style="width:15%" class="libdoc" valign="top"><span class="mono">Residual</span></td><td valign="top">is the difference between the variable <span class="mono">Value</span> and the nearer of its (finite) bounds <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>.  A blank entry indicates that the associated variable is not bounded (i.e., <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>&#8804;</m:mo>
 <m:mrow><m:mo>-</m:mo><m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_bound</m:mi></m:maction></m:mrow>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
 <m:mo>&#8805;</m:mo>
 <m:maction actiontype="link" dsi:href="#optparam_inf_bound" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.inf_bound</m:mi></m:maction></m:math>).</td></tr></table><div class="paramtext">
</div>
<div class="paramtext">The meaning of the printout for linear and nonlinear constraints is the same as that given above for variables, with &#8216;variable&#8217; replaced by &#8216;constraint&#8217;, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;are replaced by <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bl" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bl</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow>
   <m:mi>n</m:mi>
   <m:mo>+</m:mo>
   <m:mi>j</m:mi>
   <m:mo>-</m:mo>
   <m:mn>1</m:mn>
  </m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#bu" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">bu</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow>
   <m:mi>n</m:mi>
   <m:mo>+</m:mo>
   <m:mi>j</m:mi>
   <m:mo>-</m:mo>
   <m:mn>1</m:mn>
  </m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;respectively, and with the following changes in the heading:</div>
<table style="width:100%;"><tr><td class="libdoc" valign="top"><span class="mono">L Con</span></td><td valign="top">gives the name (<span class="mono">L</span>) and index <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>,</m:mo>
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
</m:math>&#160;of the linear constraint.</td></tr><tr><td class="libdoc" valign="top"><span class="mono">N Con</span></td><td valign="top">gives the name (<span class="mono">N</span>) and index <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced separators="">
  <m:msub>
   <m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mi>n</m:mi></m:mrow>
   <m:mi>L</m:mi>
  </m:msub>
 </m:mfenced>
</m:math>, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
 <m:mo>=</m:mo>
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
 <m:mo>+</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
 <m:mo>+</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>,</m:mo>
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>L</m:mi>
 </m:msub>
 <m:mo>+</m:mo>
 <m:msub>
  <m:mi>n</m:mi>
  <m:mi>N</m:mi>
 </m:msub>
</m:math>&#160;of the nonlinear constraint.</td></tr></table>
<div class="paramtext">The <span class="mono">I</span> key in the <span class="mono">State</span> column is printed for general linear constraints which currently violate one of their bounds by more than <a class="optparamref" href="#optparam_lin_feas_tol">options.lin_feas_tol</a> and for nonlinear constraints which violate one of their bounds by more than <a class="optparamref" href="#optparam_nonlin_feas_tol">options.nonlin_feas_tol</a>.</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">Residual</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>
<div class="paramtext">For the output governed by <a class="optparamref" href="#optparam_minor_print_level">options.minor_print_level</a>, the user is referred to the documentation for <a class="rtnref" href="../E04/e04ncc.xml">nag_opt_lin_lsq (e04ncc)</a>.  This option is equivalent to <a class="optparamref" href="../E04/e04ncc.xml#optparam_print_level">options.print_level</a>.</div>
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_level" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.print_level</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="bold">Nag_NoPrint</m:mi></m:math>&#160;then printout will be suppressed; the user can print the final solution when nag_opt_nlp (e04ucc) returns to the calling program.</div><h4><a name="printed-output" id="printed-output"/>11.3.1&#160;&#160;Output of results via a user-defined printing function</h4><div class="paramtext">The user may also specify their own print function for output of iteration results and the final solution by use of the <a class="optparamref" href="#optparam_print_fun">options.print_fun</a> function pointer, which has prototype</div>
<div class="paramtext">
</div><pre class="verbatim">
void (*print_fun)(const Nag_Search_State *st, Nag_Comm *comm);
</pre><div class="paramtext">
</div>
<div class="paramtext">This section may be skipped by a user who only wishes to use the default printing facilities.</div>
<div class="paramtext">When a user-defined function is assigned to <a class="optparamref" href="#optparam_print_fun">options.print_fun</a> this will be called in preference to the internal print function of nag_opt_nlp (e04ucc).  Calls to the user-defined function are again controlled by means of the <a class="optparamref" href="#optparam_print_level">options.print_level</a>, <a class="optparamref" href="#optparam_minor_print_level">options.minor_print_level</a> and <a class="optparamref" href="#optparam_print_deriv">options.print_deriv</a> members.  Information is provided through <b>st</b> and <a class="argref" href="#comm">comm</a>, the two structure arguments to <a class="optparamref" href="#optparam_print_fun">options.print_fun</a>.</div>
<div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_comm_it_maj_prt"><m:mi mathcolor="#FF00FF" mathvariant="bold">it_maj_prt</m:mi></m:maction>
 <m:mo>=</m:mo>
 <m:mi mathvariant="bold">Nag_True</m:mi></m:math>&#160;then results from the last major iteration of nag_opt_nlp (e04ucc) are provided through <b>st</b>.  Note that <a class="optparamref" href="#optparam_print_fun">options.print_fun</a> will be called with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_comm_it_maj_prt"><m:mi mathcolor="#FF00FF" mathvariant="bold">it_maj_prt</m:mi></m:maction>
 <m:mo>=</m:mo>
 <m:mi mathvariant="bold">Nag_True</m:mi></m:math>&#160;only if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_level" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.print_level</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<b>Nag_Iter</b>, <b>Nag_Soln_Iter</b>, <b>Nag_Soln_Iter_Long</b>, <b>Nag_Soln_Iter_Const</b> or <b>Nag_Soln_Iter_Full</b>.  The following members of <b>st</b> are set:</div><dl>
<dt class="memberhead"><a name="printed-output_st1_n" id="printed-output_st1_n"/><b>n</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The number of variables.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_nclin" id="printed-output_st1_nclin"/><b>nclin</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The number of linear constraints.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_ncnlin" id="printed-output_st1_ncnlin"/><b>ncnlin</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The number of nonlinear constraints.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_nactiv" id="printed-output_st1_nactiv"/><b>nactiv</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The total number of active elements in the current set.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_iter" id="printed-output_st1_iter"/><b>iter</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The major iteration count.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_minor_iter" id="printed-output_st1_minor_iter"/><b>minor_iter</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The minor iteration count for the feasibility and the optimality phases of the QP subproblem.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_step" id="printed-output_st1_step"/><b>step</b> &#8211; double&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The step taken along the computed search direction.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_nfun" id="printed-output_st1_nfun"/><b>nfun</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The cumulative number of objective function evaluations needed for the line search.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_merit" id="printed-output_st1_merit"/><b>merit</b> &#8211; double&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The value of the augmented Lagrangian merit function at the current iterate.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_objf" id="printed-output_st1_objf"/><b>objf</b> &#8211; double&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The current value of the objective function.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_norm_nlnviol" id="printed-output_st1_norm_nlnviol"/><b>norm_nlnviol</b> &#8211; double&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The Euclidean norm of nonlinear constraint violations (only available if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
 <m:mo>&gt;</m:mo>
 <m:mn>0</m:mn>
</m:math>).</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_violtn" id="printed-output_st1_violtn"/><b>violtn</b> &#8211; double&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The Euclidean norm of the residuals of constraints that are violated or in the predicted active set (only available if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
 <m:mo>&gt;</m:mo>
 <m:mn>0</m:mn>
</m:math>).</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_norm_gz" id="printed-output_st1_norm_gz"/><b>norm_gz</b> &#8211; double&#160;<span class="pclass"/></dt><dd>
<div class="membertext"><m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced open="&#8214;" close="&#8214;" separators="">
  <m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
  <m:msub>
   <m:mi>g</m:mi>
   <m:mi mathvariant="normal">FR</m:mi>
  </m:msub>
 </m:mfenced>
</m:math>, the Euclidean norm of the projected gradient.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_nz" id="printed-output_st1_nz"/><b>nz</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The number of columns of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>Z</m:mi>
</m:math>&#160;(see Section <a class="secref" href="#e04uccfd1">10.1</a>).</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_bnd" id="printed-output_st1_bnd"/><b>bnd</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The number of simple bound constraints in the predicted active set.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_lin" id="printed-output_st1_lin"/><b>lin</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The number of general linear constraints in the predicted active set.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_nln" id="printed-output_st1_nln"/><b>nln</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The number of nonlinear constraints in the predicted active set (only available if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
 <m:mo>&gt;</m:mo>
 <m:mn>0</m:mn>
</m:math>).</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_penalty" id="printed-output_st1_penalty"/><b>penalty</b> &#8211; double&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The Euclidean norm of the vector of penalty parameters used in the augmented Lagrangian merit function (only available if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
 <m:mo>&gt;</m:mo>
 <m:mn>0</m:mn>
</m:math>).</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_norm_gf" id="printed-output_st1_norm_gf"/><b>norm_gf</b> &#8211; double&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The Euclidean norm of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>g</m:mi>
  <m:mi mathvariant="normal">FR</m:mi>
 </m:msub>
</m:math>, the gradient of the objective function with respect to the free variables.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_cond_h" id="printed-output_st1_cond_h"/><b>cond_h</b> &#8211; double&#160;<span class="pclass"/></dt><dd>
<div class="membertext">A lower bound on the condition number of the Hessian approximation <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>H</m:mi>
</m:math>.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_cond_hz" id="printed-output_st1_cond_hz"/><b>cond_hz</b> &#8211; double&#160;<span class="pclass"/></dt><dd>
<div class="membertext">A lower bound on the condition number of the projected Hessian approximation <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>H</m:mi>
  <m:mi>Z</m:mi>
 </m:msub>
</m:math>.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_cond_t" id="printed-output_st1_cond_t"/><b>cond_t</b> &#8211; double&#160;<span class="pclass"/></dt><dd>
<div class="membertext">A lower bound on the condition number of the matrix of predicted active constraints.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_iter_conv" id="printed-output_st1_iter_conv"/><b>iter_conv</b> &#8211; Nag_Boolean&#160;<span class="pclass"/></dt><dd>
<div class="membertext"><b>Nag_True</b> if the sequence of iterates has converged, i.e., convergence condition (<a class="eqnref" href="#eqn16a">16</a>) (see description of <a class="optparamref" href="#optparam_optim_tol">options.optim_tol</a> Section <a class="secref" href="#op-description">11.2</a>) is satisfied.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_norm_gz_small" id="printed-output_st1_norm_gz_small"/><b>norm_gz_small</b> &#8211; Nag_Boolean&#160;<span class="pclass"/></dt><dd>
<div class="membertext"><b>Nag_True</b> if the projected gradient is sufficiently small, i.e., convergence condition (<a class="eqnref" href="#eqn16b">17</a>) (see description of <a class="optparamref" href="#optparam_optim_tol">options.optim_tol</a> Section <a class="secref" href="#op-description">11.2</a>) is satisfied.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_violtn_small" id="printed-output_st1_violtn_small"/><b>violtn_small</b> &#8211; Nag_Boolean&#160;<span class="pclass"/></dt><dd>
<div class="membertext"><b>Nag_True</b> if the violations of the nonlinear constraints are sufficiently small, i.e., convergence condition (<a class="eqnref" href="#eqn16c">18</a>) (see description of <a class="optparamref" href="#optparam_optim_tol">options.optim_tol</a> Section <a class="secref" href="#op-description">11.2</a>) is satisfied.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_update_modified" id="printed-output_st1_update_modified"/><b>update_modified</b> &#8211; Nag_Boolean&#160;<span class="pclass"/></dt><dd>
<div class="membertext"><b>Nag_True</b> if the quasi-Newton update was modified to ensure that the Hessian is positive-definite.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_qp_not_feasible" id="printed-output_st1_qp_not_feasible"/><b>qp_not_feasible</b> &#8211; Nag_Boolean&#160;<span class="pclass"/></dt><dd>
<div class="membertext"><b>Nag_True</b> if the QP subproblem has no feasible point.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_c_diff" id="printed-output_st1_c_diff"/><b>c_diff</b> &#8211; Nag_Boolean&#160;<span class="pclass"/></dt><dd>
<div class="membertext"><b>Nag_True</b> if central differences were used to compute the unspecified objective and constraint gradients.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_step_limit_exceeded" id="printed-output_st1_step_limit_exceeded"/><b>step_limit_exceeded</b> &#8211; Nag_Boolean&#160;<span class="pclass"/></dt><dd>
<div class="membertext"><b>Nag_True</b> if the line search produced a relative change in <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>&#160;greater than the value defined by the optional parameter <a class="optparamref" href="#optparam_step_limit">options.step_limit</a>.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_refactor" id="printed-output_st1_refactor"/><b>refactor</b> &#8211; Nag_Boolean&#160;<span class="pclass"/></dt><dd>
<div class="membertext"><b>Nag_True</b> if the approximate Hessian has been refactorized.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_x" id="printed-output_st1_x"/><b>x</b> &#8211; double&#160;*<span class="pclass"/></dt><dd>
<div class="membertext">Contains the components <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#x" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">x</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;of the current point <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>,</m:mo>
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
</m:math>.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_state" id="printed-output_st1_state"/><b>state</b> &#8211; Integer&#160;*<span class="pclass"/></dt><dd>
<div class="membertext">Contains the status of the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
</m:math>&#160;variables, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
</m:math>&#160;linear, and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
</m:math>&#160;nonlinear constraints (if any).  See Section <a class="secref" href="#op-description">11.2</a> for a description of the possible status values.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_ax" id="printed-output_st1_ax"/><b>ax</b> &#8211; double&#160;*<span class="pclass"/></dt><dd>
<div class="membertext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
 <m:mo>&gt;</m:mo>
 <m:mn>0</m:mn>
</m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st1_ax"><m:mi mathcolor="#FF00FF" mathvariant="bold">ax</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;contains the current value of the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>th linear constraint, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>,</m:mo>
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
</m:math>.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_cx" id="printed-output_st1_cx"/><b>cx</b> &#8211; double&#160;*<span class="pclass"/></dt><dd>
<div class="membertext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
 <m:mo>&gt;</m:mo>
 <m:mn>0</m:mn>
</m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st1_cx"><m:mi mathcolor="#FF00FF" mathvariant="bold">cx</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;contains the current value of nonlinear constraint <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>c</m:mi>
  <m:mi>j</m:mi>
 </m:msub>
</m:math>, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
 <m:mo>=</m:mo>
 <m: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 mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
</m:math>.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_diagt" id="printed-output_st1_diagt"/><b>diagt</b> &#8211; double&#160;*<span class="pclass"/></dt><dd>
<div class="membertext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st1_nactiv"><m:mi mathcolor="#FF00FF" mathvariant="bold">nactiv</m:mi></m:maction>
 <m:mo>&gt;</m:mo>
 <m:mn>0</m:mn>
</m:math>, the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st1_nactiv"><m:mi mathcolor="#FF00FF" mathvariant="bold">nactiv</m:mi></m:maction>
</m:math>&#160;elements of the diagonal of the matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>T</m:mi>
</m:math>.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st1_diagr" id="printed-output_st1_diagr"/><b>diagr</b> &#8211; double&#160;*<span class="pclass"/></dt><dd>
<div class="membertext">Contains the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
</m:math>&#160;elements of the diagonal of the upper triangular matrix <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>R</m:mi>
</m:math>.</div>
</dd></dl><div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_comm_sol_sqp_prt"><m:mi mathcolor="#FF00FF" mathvariant="bold">sol_sqp_prt</m:mi></m:maction>
 <m:mo>=</m:mo>
 <m:mi mathvariant="bold">Nag_True</m:mi></m:math>&#160;then the final result from nag_opt_nlp (e04ucc) is provided through <b>st</b>.  Note that <a class="optparamref" href="#optparam_print_fun">options.print_fun</a> will be called with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_comm_sol_sqp_prt"><m:mi mathcolor="#FF00FF" mathvariant="bold">sol_sqp_prt</m:mi></m:maction>
 <m:mo>=</m:mo>
 <m:mi mathvariant="bold">Nag_True</m:mi></m:math>&#160;only if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_level" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.print_level</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<b>Nag_Soln</b>, <b>Nag_Soln_Iter</b>, <b>Nag_Soln_Iter_Long</b>, <b>Nag_Soln_Iter_Const</b> or <b>Nag_Soln_Iter_Full</b>.  The following members of <b>st</b> are set:</div><dl>
<dt class="memberhead"><a name="printed-output_st2_iter" id="printed-output_st2_iter"/><b>iter</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The number of iterations performed.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st2_n" id="printed-output_st2_n"/><b>n</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The number of variables.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st2_nclin" id="printed-output_st2_nclin"/><b>nclin</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The number of linear constraints.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st2_ncnlin" id="printed-output_st2_ncnlin"/><b>ncnlin</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The number of nonlinear constraints.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st2_x" id="printed-output_st2_x"/><b>x</b> &#8211; double&#160;*<span class="pclass"/></dt><dd>
<div class="membertext">Contains the components <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#x" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">x</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;of the final point <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>x</m:mi>
</m:math>, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>,</m:mo>
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
</m:math>.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st2_state" id="printed-output_st2_state"/><b>state</b> &#8211; Integer&#160;*<span class="pclass"/></dt><dd>
<div class="membertext">Contains the status of the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
</m:math>&#160;variables, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
</m:math>&#160;linear, and <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
</m:math>&#160;nonlinear constraints (if any).  See Section <a class="secref" href="#op-description">11.2</a> for a description of the possible status values.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st2_ax" id="printed-output_st2_ax"/><b>ax</b> &#8211; double&#160;*<span class="pclass"/></dt><dd>
<div class="membertext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
 <m:mo>&gt;</m:mo>
 <m:mn>0</m:mn>
</m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st1_ax"><m:mi mathcolor="#FF00FF" mathvariant="bold">ax</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;contains the final value of the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
</m:math>th linear constraint, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>,</m:mo>
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
</m:math>.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st2_cx" id="printed-output_st2_cx"/><b>cx</b> &#8211; double&#160;*<span class="pclass"/></dt><dd>
<div class="membertext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
 <m:mo>&gt;</m:mo>
 <m:mn>0</m:mn>
</m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st1_cx"><m:mi mathcolor="#FF00FF" mathvariant="bold">cx</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;contains the final value of nonlinear constraint <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>c</m:mi>
  <m:mi>j</m:mi>
 </m:msub>
</m:math>, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
 <m:mo>=</m:mo>
 <m: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 mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
</m:math>.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st2_bl" id="printed-output_st2_bl"/><b>bl</b> &#8211; double&#160;*<span class="pclass"/></dt><dd>
<div class="membertext">Contains the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
</m:math>&#160;lower bounds on the variables.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st2_bu" id="printed-output_st2_bu"/><b>bu</b> &#8211; double&#160;*<span class="pclass"/></dt><dd>
<div class="membertext">Contains the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
</m:math>&#160;upper bounds on the variables.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st2_lambda" id="printed-output_st2_lambda"/><b>lambda</b> &#8211; double&#160;*<span class="pclass"/></dt><dd>
<div class="membertext">Contains the <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#nclin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">nclin</m:mi></m:maction>
 <m:mo>+</m:mo>
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
</m:math>&#160;final values of the Lagrange multipliers.</div>
</dd></dl><div class="paramtext">If <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_comm_g_prt"><m:mi mathcolor="#FF00FF" mathvariant="bold">g_prt</m:mi></m:maction>
 <m:mo>=</m:mo>
 <m:mi mathvariant="bold">Nag_True</m:mi></m:math>&#160;then the results from derivative checking are provided through <b>st</b>.  Note that <a class="optparamref" href="#optparam_print_fun">options.print_fun</a> will be called with <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:href="#comm" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">comm</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
<m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_comm_g_prt"><m:mi mathcolor="#FF00FF" mathvariant="bold">g_prt</m:mi></m:maction></m:math>&#160;only if <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:maction actiontype="link" dsi:href="#optparam_print_deriv" dsi:type="simple"><m:mi mathcolor="#800080" mathvariant="bold">options.print_deriv</m:mi></m:maction></m:math>&#160;<m:math xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>=</m:mo></m:math>&#160;<b>Nag_D_Sum</b> or <b>Nag_D_Full</b>.  The following members of <b>st</b> are set:</div><dl>
<dt class="memberhead"><a name="printed-output_st3_n" id="printed-output_st3_n"/><b>n</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The number of variables.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st3_ncnlin" id="printed-output_st3_ncnlin"/><b>ncnlin</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The number of nonlinear constraints.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st3_x" id="printed-output_st3_x"/><b>x</b> &#8211; double&#160;*<span class="pclass"/></dt><dd>
<div class="membertext">Contains the components <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#x" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">x</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;of the initial point <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>x</m:mi>
  <m:mn>0</m:mn>
 </m:msub>
</m:math>, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
 <m:mo>=</m:mo>
 <m: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 mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
</m:math>.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st3_g" id="printed-output_st3_g"/><b>g</b> &#8211; double&#160;*<span class="pclass"/></dt><dd>
<div class="membertext">Contains the components <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#g" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">g</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;of the gradient vector <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>g</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
 <m:mo>=</m:mo>
 <m:msup><m:mfenced separators=""><m:mfrac other="display">
    <m:mrow><m:mo>&#8706;</m:mo><m:mi>F</m:mi></m:mrow>
    <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub></m:mrow>
   </m:mfrac><m:mo>,</m:mo><m:mfrac other="display">
    <m:mrow><m:mo>&#8706;</m:mo><m:mi>F</m:mi></m:mrow>
    <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub></m:mrow>
   </m:mfrac><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mfrac other="display">
    <m:mrow><m:mo>&#8706;</m:mo><m:mi>F</m:mi></m:mrow>
    <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mi>n</m:mi></m:msub></m:mrow>
   </m:mfrac></m:mfenced><m:mi mathvariant="normal">T</m:mi></m:msup>
</m:math>&#160;at the initial point <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>x</m:mi>
  <m:mn>0</m:mn>
 </m:msub>
</m:math>, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
 <m:mo>=</m:mo>
 <m: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 mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
</m:math>.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st3_conjac" id="printed-output_st3_conjac"/><b>conjac</b> &#8211; double&#160;*<span class="pclass"/></dt><dd>
<div class="membertext">Contains the elements of the Jacobian matrix of nonlinear constraints at the initial point <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:msub>
  <m:mi>x</m:mi>
  <m:mn>0</m:mn>
 </m:msub>
</m:math>&#160;(<m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>f</m:mi><m:mi>i</m:mi></m:msub></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mi>j</m:mi></m:msub></m:mrow>
 </m:mfrac>
</m:math>&#160;is held at location <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mrow><m:maction actiontype="link" dsi:href="#confun_conjac" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">conjac</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow>
   <m:mfenced separators=""><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced>
   <m:mo>&#215;</m:mo>
   <m:mi mathvariant="bold">st</m:mi>
   <m:mo>&#8594;</m:mo>
   <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
   <m:mo>+</m:mo>
   <m:mi>j</m:mi>
   <m:mo>-</m:mo>
   <m:mn>1</m:mn>
  </m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>i</m:mi>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>,</m:mo>
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
</m:math>, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>,</m:mo>
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
</m:math>).</div>
</dd></dl><div class="paramtext">In this case details of the derivative check performed by nag_opt_nlp (e04ucc) are held in the following substructure of <b>st</b>:</div><dl>
<dt class="memberhead"><a name="printed-output_st4_gprint" id="printed-output_st4_gprint"/><b>gprint</b> &#8211; Nag_GPrintSt&#160;<span class="pclass"/></dt><dd>
<div class="membertext">Which in turn contains three substructures <a class="memberref" href="#printed-output_st4_gprint_g_chk">g_chk</a>, <a class="memberref" href="#printed-output_st4_gprint_f_sim">f_sim</a>, <a class="memberref" href="#printed-output_st4_gprint_c_sim">c_sim</a> and two pointers to arrays of substructures, <a class="memberref" href="#printed-output_st4_gprint_f_comp">f_comp</a> and <a class="memberref" href="#printed-output_st4_gprint_c_comp">c_comp</a>.</div><dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_g_chk" id="printed-output_st4_gprint_g_chk"/><b>g_chk</b> &#8211; Nag_Grad_Chk_St&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The substructure <a class="memberref" href="#printed-output_st4_gprint_g_chk">g_chk</a> contains the members:</div><dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_g_chk_type" id="printed-output_st4_gprint_g_chk_type"/><b>type</b> &#8211; Nag_GradChk&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The type of derivative check performed by nag_opt_nlp (e04ucc).  This will be the same value as in <a class="optparamref" href="#optparam_verify_grad">options.verify_grad</a>.</div>
</dd></dl><dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_g_chk_g_error" id="printed-output_st4_gprint_g_chk_g_error"/><b>g_error</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">This member will be equal to one of the error codes <a class="ifailref" href="#errors">NE_NOERROR</a> or <a class="ifailref" href="#NE_DERIV_ERRORS">NE_DERIV_ERRORS</a> according to whether the derivatives were found to be correct or not.</div>
</dd></dl><dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_g_chk_obj_start" id="printed-output_st4_gprint_g_chk_obj_start"/><b>obj_start</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">Specifies the gradient element at which any component check started.  This value will be equal to <a class="optparamref" href="#optparam_obj_check_start">options.obj_check_start</a>.</div>
</dd></dl><dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_g_chk_obj_stop" id="printed-output_st4_gprint_g_chk_obj_stop"/><b>obj_stop</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">Specifies the gradient element at which any component check ended.  This value specifies the element at which any component check of the constraint gradient ended.  This value will be equal to <a class="optparamref" href="#optparam_obj_check_stop">options.obj_check_stop</a>.</div>
</dd></dl><dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_g_chk_con_start" id="printed-output_st4_gprint_g_chk_con_start"/><b>con_start</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">Specifies the element at which any component check of the constraint gradient started.  This value will be equal to <a class="optparamref" href="#optparam_con_check_start">options.con_check_start</a>.</div>
</dd></dl><dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_g_chk_con_stop" id="printed-output_st4_gprint_g_chk_con_stop"/><b>con_stop</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">Specifies the element at which any component check of the constraint gradient ended.  This value will be equal to <a class="optparamref" href="#optparam_con_check_stop">options.con_check_stop</a>.</div>
</dd></dl></dd></dl><dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_f_sim" id="printed-output_st4_gprint_f_sim"/><b>f_sim</b> &#8211; Nag_SimSt&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The result of a simple derivative check of the objective gradient, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st4_gprint"><m:mi mathcolor="#FF00FF" mathvariant="bold">gprint</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st4_gprint_g_chk"><m:mi mathcolor="#FF00FF" mathvariant="bold">g_chk</m:mi></m:maction>
 <m:mo>.</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st4_gprint_g_chk_type"><m:mi mathcolor="#FF00FF" mathvariant="bold">type</m:mi></m:maction>
 <m:mo>=</m:mo>
 <m:mi mathvariant="bold">Nag_SimpleCheck</m:mi></m:math>, will be held in this substructure in members:</div><dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_fsim_correct" id="printed-output_st4_gprint_fsim_correct"/><b>correct</b> &#8211; Nag_Boolean&#160;<span class="pclass"/></dt><dd>
<div class="membertext">If <b>Nag_True</b> then the objective gradient is consistent with the finite difference approximation according to a simple check.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_fsim_dir_deriv" id="printed-output_st4_gprint_fsim_dir_deriv"/><b>dir_deriv</b> &#8211; double&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The directional derivative <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"> <m:msup><m:mi>g</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:mi>p</m:mi>
</m:math>&#160;where <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>p</m:mi>
</m:math>&#160;is a random vector of unit length with elements of approximately equal magnitude.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_fsim_fd_approx" id="printed-output_st4_gprint_fsim_fd_approx"/><b>fd_approx</b> &#8211; double&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The finite difference approximation, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mfenced separators="">
  <m:mi>F</m:mi>
  <m:mfenced separators="">
   <m:mi>x</m:mi>
   <m:mo>+</m:mo>
   <m:mrow><m:mi>h</m:mi><m:mi>p</m:mi></m:mrow>
  </m:mfenced>
  <m:mo>-</m:mo>
  <m:mi>F</m:mi>
  <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
 </m:mfenced>
 <m:mo>/</m:mo>
 <m:mi>h</m:mi>
</m:math>, to the directional derivative.</div>
</dd></dl></dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_c_sim" id="printed-output_st4_gprint_c_sim"/><b>c_sim</b> &#8211; Nag_SimSt&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The result of a simple derivative check of the constraint Jacobian, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st4_gprint"><m:mi mathcolor="#FF00FF" mathvariant="bold">gprint</m:mi></m:maction>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st4_gprint_g_chk"><m:mi mathcolor="#FF00FF" mathvariant="bold">g_chk</m:mi></m:maction>
 <m:mo>.</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st4_gprint_g_chk_type"><m:mi mathcolor="#FF00FF" mathvariant="bold">type</m:mi></m:maction>
 <m:mo>=</m:mo>
 <m:mi mathvariant="bold">Nag_SimpleCheck</m:mi></m:math>, will be held in this substructure in members:</div><dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_c_sim_n_elements" id="printed-output_st4_gprint_c_sim_n_elements"/><b>n_elements</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The number of columns of the constraint Jacobian for which a simple check has been carried out, i.e., those columns which do not contain unknown elements.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_c_sim_correct" id="printed-output_st4_gprint_c_sim_correct"/><b>correct</b> &#8211; Nag_Boolean&#160;<span class="pclass"/></dt><dd>
<div class="membertext">If <b>Nag_True</b> then the Jacobian is consistent with the finite difference approximation according to a simple check.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_c_sim_max_error" id="printed-output_st4_gprint_c_sim_max_error"/><b>max_error</b> &#8211; double&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The maximum error found between the norm of a constraint gradient and its finite difference approximation.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_c_sim_max_constraint" id="printed-output_st4_gprint_c_sim_max_constraint"/><b>max_constraint</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The constraint gradient which has the maximum error between its norm and its finite difference approximation.</div>
</dd></dl></dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_f_comp" id="printed-output_st4_gprint_f_comp"/><b>f_comp</b> &#8211; Nag_CompSt&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The results of a requested component derivative check of the objective gradient, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st4_gprint"><m:mi mathcolor="#FF00FF" mathvariant="bold">gprint</m:mi></m:maction>
 <m:mo>.</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st4_gprint_g_chk"><m:mi mathcolor="#FF00FF" mathvariant="bold">g_chk</m:mi></m:maction>
 <m:mo>.</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st4_gprint_g_chk_type"><m:mi mathcolor="#FF00FF" mathvariant="bold">type</m:mi></m:maction>
 <m:mo>=</m:mo>
 <m:mi mathvariant="bold">Nag_CheckObj</m:mi><m:mtext>&#8203; or &#8203;</m:mtext><m:mi mathvariant="bold">Nag_CheckObjCon</m:mi></m:math>, will be held in the array of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
</m:math>&#160;substructures of type <b>Nag_CompSt</b> pointed to by <a class="memberref" href="#printed-output_st4_gprint_f_comp">f_comp</a>.  The procedure for the derivative check is based on finding an interval that produces an acceptable estimate of the second derivative, and then using that estimate to compute an interval that should produce a reasonable forward-difference approximation.  The gradient element is then compared with the difference approximation.  (The method of finite difference interval estimation is based on <a class="litref" href="#ref442">Gill <i>et al.</i> (1983a)</a>.)</div><dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_f_comp_correct" id="printed-output_st4_gprint_f_comp_correct"/><b>correct</b> &#8211; Nag_Boolean&#160;<span class="pclass"/></dt><dd>
<div class="membertext">If <b>Nag_True</b> then this gradient element is consistent with its finite difference approximation.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_f_comp_hopt" id="printed-output_st4_gprint_f_comp_hopt"/><b>hopt</b> &#8211; double&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The optimal finite difference interval.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_f_comp_gdiff" id="printed-output_st4_gprint_f_comp_gdiff"/><b>gdiff</b> &#8211; double&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The finite difference approximation for this gradient component.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_f_comp_iter" id="printed-output_st4_gprint_f_comp_iter"/><b>iter</b> &#8211; Integer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The number of trials performed to find a suitable difference interval.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_f_comp_comment" id="printed-output_st4_gprint_f_comp_comment"/><b>comment</b> &#8211; char&#160;<span class="pclass"/></dt><dd>
<div class="membertext">A character string which describes the possible nature of the reason for which an estimation of the finite difference interval failed to produce a satisfactory relative condition error of the second-order difference.  Possible strings are: <span class="mono">"Constant?"</span>, <span class="mono">"Linear or odd?"</span>, <span class="mono">"Too nonlinear?"</span> and <span class="mono">"Small derivative?"</span>.</div>
</dd></dl></dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_st4_gprint_c_comp" id="printed-output_st4_gprint_c_comp"/><b>c_comp</b> &#8211; Nag_CompSt&#160;<span class="pclass"/></dt><dd>
<div class="membertext">The results of a requested component derivative check of the Jacobian of nonlinear constraint functions, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st4_gprint"><m:mi mathcolor="#FF00FF" mathvariant="bold">gprint</m:mi></m:maction>
 <m:mo>.</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st4_gprint_g_chk"><m:mi mathcolor="#FF00FF" mathvariant="bold">g_chk</m:mi></m:maction>
 <m:mo>.</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st4_gprint_g_chk_type"><m:mi mathcolor="#FF00FF" mathvariant="bold">type</m:mi></m:maction>
 <m:mo>=</m:mo>
 <m:mi mathvariant="bold">Nag_CheckCon</m:mi><m:mtext>&#8203; or &#8203;</m:mtext><m:mi mathvariant="bold">Nag_CheckObjCon</m:mi></m:math>, will be held in the array of <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
 <m:mo>&#215;</m:mo>
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
</m:math>&#160;substructures of type <b>Nag_CompSt</b> pointed to by <a class="memberref" href="#printed-output_st4_gprint_c_comp">c_comp</a>.  The element <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st4_gprint"><m:mi mathcolor="#FF00FF" mathvariant="bold">gprint</m:mi></m:maction>
 <m:mo>.</m:mo>
 <m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#printed-output_st4_gprint_f_comp"><m:mi mathcolor="#FF00FF" mathvariant="bold">f_comp</m:mi></m:maction><m:mrow><m:mo>[</m:mo><m:mrow>
   <m:mfenced separators=""><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced>
   <m:mo>&#215;</m:mo>
   <m:mi mathvariant="bold">st</m:mi>
   <m:mo>&#8594;</m:mo>
   <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
   <m:mo>+</m:mo>
   <m:mi>j</m:mi>
   <m:mo>-</m:mo>
   <m:mn>1</m:mn>
  </m:mrow><m:mo>]</m:mo></m:mrow></m:mrow>
</m:math>&#160;will hold the details of the component derivative check for Jacobian element <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi>
</m:math>, for <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>i</m:mi>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>,</m:mo>
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#ncnlin" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">ncnlin</m:mi></m:maction>
</m:math>; <m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
 <m:mi>j</m:mi>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>,</m:mo>
 <m:mi mathvariant="bold">st</m:mi>
 <m:mo>&#8594;</m:mo>
 <m:maction actiontype="link" dsi:href="#n" dsi:type="simple"><m:mi mathcolor="#EE0000" mathvariant="bold">n</m:mi></m:maction>
</m:math>.  The procedure for the derivative check is based on finding an interval that produces an acceptable estimate of the second derivative, and then using that estimate to compute an interval that should produce a reasonable forward-difference approximation.  The Jacobian element is then compared with the difference approximation.  (The method of finite difference interval estimation is based on <a class="litref" href="#ref442">Gill <i>et al.</i> (1983a)</a>.)</div><div class="membertext">The members of <a class="memberref" href="#printed-output_st4_gprint_c_comp">c_comp</a> are as for <a class="memberref" href="#printed-output_st4_gprint_f_comp">f_comp</a> where <a class="memberref" href="#printed-output_st4_gprint_f_comp_gdiff">gdiff</a> gives the difference approximation for the Jacobian element.</div>
</dd></dl></dd></dl><div class="paramtext">The relevant members of the structure <a class="argref" href="#comm">comm</a> are:</div><dl><dt class="memberhead"><a name="printed-output_comm_g_prt" id="printed-output_comm_g_prt"/><b>g_prt</b> &#8211; Nag_Boolean&#160;<span class="pclass"/></dt><dd>
<div class="membertext">Will be <b>Nag_True</b> only when the print function is called with the result of the derivative check of <a class="argref" href="#objfun">objfun</a> and <a class="argref" href="#confun">confun</a>.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_comm_it_maj_prt" id="printed-output_comm_it_maj_prt"/><b>it_maj_prt</b> &#8211; Nag_Boolean&#160;<span class="pclass"/></dt><dd>
<div class="membertext">Will be <b>Nag_True</b> when the print function is called with information about the current major iteration.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_comm_sol_sqp_prt" id="printed-output_comm_sol_sqp_prt"/><b>sol_sqp_prt</b> &#8211; Nag_Boolean&#160;<span class="pclass"/></dt><dd>
<div class="membertext">Will be <b>Nag_True</b> when the print function is called with the details of the final solution.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_comm_it_prt" id="printed-output_comm_it_prt"/><b>it_prt</b> &#8211; Nag_Boolean&#160;<span class="pclass"/></dt><dd>
<div class="membertext">Will be <b>Nag_True</b> when the print function is called with information about the current minor iteration (i.e., an iteration of the current QP subproblem).  See the documentation for <a class="rtnref" href="../E04/e04ncc.xml">nag_opt_lin_lsq (e04ncc)</a> for details of which members of <b>st</b> are set.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_comm_new_lm" id="printed-output_comm_new_lm"/><b>new_lm</b> &#8211; Nag_Boolean&#160;<span class="pclass"/></dt><dd>
<div class="membertext">Will be <b>Nag_True</b> when the Lagrange multipliers have been updated in a QP subproblem.  See the documentation for <a class="rtnref" href="../E04/e04ncc.xml">nag_opt_lin_lsq (e04ncc)</a> for details of which members of <b>st</b> are set.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_comm_sol_prt" id="printed-output_comm_sol_prt"/><b>sol_prt</b> &#8211; Nag_Boolean&#160;<span class="pclass"/></dt><dd>
<div class="membertext">Will be <b>Nag_True</b> when the print function is called with the details of the solution of a QP subproblem, i.e., the solution at the end of a major iteration.  See the documentation for <a class="rtnref" href="../E04/e04ncc.xml">nag_opt_lin_lsq (e04ncc)</a> for details of which members of <b>st</b> are set.</div>
</dd></dl>
<dl>
<dt class="memberhead"><a name="printed-output_comm_user" id="printed-output_comm_user"/><b>user</b> &#8211; double&#160;*<span class="pclass"/></dt>
<dt class="multi-memberhead"><a name="printed-output_comm_iuser" id="printed-output_comm_iuser"/><b>iuser</b> &#8211; Integer&#160;*<span class="pclass"/></dt>
<dt class="multi-memberhead"><a name="printed-output_comm_p" id="printed-output_comm_p"/><b>p</b> &#8211; Pointer&#160;<span class="pclass"/></dt><dd>
<div class="membertext">Pointers for communication of user information.  If used they must be allocated memory by the user either before entry to nag_opt_nlp (e04ucc) or during a call to <a class="argref" href="#objfun">objfun</a>, <a class="argref" href="#confun">confun</a> or <a class="optparamref" href="#optparam_print_fun">options.print_fun</a>.  The type Pointer will be <span class="mono">void *</span> with a C compiler that defines <span class="mono">void *</span> and <span class="mono">char *</span> otherwise.</div>
</dd></dl><h2><a name="example2" id="example2"/>12&#160;&#160;Example 2 (EX2)</h2><div class="paramtext">Example 2 (EX2) solves the same problem as Example 1 (EX1), described in Section <a class="secref" href="#example">9</a>, but shows the use of certain optional parameters.  ex2 shows option values being assigned directly within the program text and by reading values from a data file. The <a class="argref" href="#options">options</a> structure is declared and initialized by <a class="rtnref" href="../E04/e04xxc.xml">nag_opt_init (e04xxc)</a>.  Two options are read from the data file by use of <a class="rtnref" href="../E04/e04xyc.xml">nag_opt_read (e04xyc)</a>.  nag_opt_nlp (e04ucc) is then called to solve the problem using the function <span class="mono">objfun1</span> and <span class="mono">confun1</span> with elements of the objective gradient not being set at all and only some of the elements of the constraint Jacobian being provided.  The memory freeing function <a class="rtnref" href="../E04/e04xzc.xml">nag_opt_free (e04xzc)</a> is used to free the memory assigned to the pointers in the options structure.  Users should <b>not</b> use the standard C function <span class="mono">free()</span> for this purpose.</div>
<div class="paramtext">See Section <a class="secref" href="#example">9</a> for the example program.</div><hr/><div><a href="../../pdf/E04/e04ucc.pdf">e04ucc (pdf version)</a></div><div><a href="e04_conts.xml">Chapter Contents</a></div><div><a href="e04_intro.xml">Chapter Introduction</a></div>
<div><a href="../mark8.xml">NAG C Library Manual</a></div>
<div><hr/>
  &#169; The Numerical Algorithms Group Ltd, Oxford, UK. 2005
  </div></body></html>