diff options
Diffstat (limited to 'help')
17 files changed, 266 insertions, 17 deletions
diff --git a/help/en_US/master_help.xml b/help/en_US/master_help.xml index 0e162f7..cf1946c 100644 --- a/help/en_US/master_help.xml +++ b/help/en_US/master_help.xml @@ -4,6 +4,7 @@ <!ENTITY a745e19a6383796e6f5680cdcc44cfcce SYSTEM "/home/harpreet/symphony_work/symphony/help/en_US/fgoalattain.xml"> <!ENTITY a2b24cb19de46f878f11e6be9eb411170 SYSTEM "/home/harpreet/symphony_work/symphony/help/en_US/fminbnd.xml"> <!ENTITY a52664d077cac340a0384efe1ac107088 SYSTEM "/home/harpreet/symphony_work/symphony/help/en_US/fmincon.xml"> +<!ENTITY a0184dce5b9269d9795f0858d46c1c6f0 SYSTEM "/home/harpreet/symphony_work/symphony/help/en_US/fminimax.xml"> <!ENTITY a14f1077f437dbe35eb1cac51fed7a9fc SYSTEM "/home/harpreet/symphony_work/symphony/help/en_US/fminunc.xml"> <!ENTITY aa809ed678033fc05c9b60a71de55b2ce SYSTEM "/home/harpreet/symphony_work/symphony/help/en_US/linprog.xml"> <!ENTITY a3d4ec65684b561d91f7a255acd23f51c SYSTEM "/home/harpreet/symphony_work/symphony/help/en_US/lsqlin.xml"> @@ -89,6 +90,7 @@ &a745e19a6383796e6f5680cdcc44cfcce; &a2b24cb19de46f878f11e6be9eb411170; &a52664d077cac340a0384efe1ac107088; +&a0184dce5b9269d9795f0858d46c1c6f0; &a14f1077f437dbe35eb1cac51fed7a9fc; &aa809ed678033fc05c9b60a71de55b2ce; &a3d4ec65684b561d91f7a255acd23f51c; diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS Binary files differindex 5ece28b..4ae0096 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB Binary files differindex 5ba83c4..5ea5806 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS b/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS Binary files differindex bfdb148..deb246c 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS b/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS Binary files differindex c20654a..88014cd 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA b/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA index 0648b6b..8dc6ddf 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA @@ -1,2 +1,2 @@ JavaSearch 1.0 -TMAP bs=2048 rt=1 fl=-1 id1=1494 id2=1 +TMAP bs=2048 rt=1 fl=-1 id1=1535 id2=1 diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP b/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP Binary files differindex af633ee..d8580ce 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP diff --git a/help/en_US/scilab_en_US_help/_LaTeX_fminimax.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_fminimax.xml_1.png Binary files differnew file mode 100644 index 0000000..cc11a01 --- /dev/null +++ b/help/en_US/scilab_en_US_help/_LaTeX_fminimax.xml_1.png diff --git a/help/en_US/scilab_en_US_help/_LaTeX_fminimax.xml_2.png b/help/en_US/scilab_en_US_help/_LaTeX_fminimax.xml_2.png Binary files differnew file mode 100644 index 0000000..6a9edc4 --- /dev/null +++ b/help/en_US/scilab_en_US_help/_LaTeX_fminimax.xml_2.png diff --git a/help/en_US/scilab_en_US_help/fgoalattain.html b/help/en_US/scilab_en_US_help/fgoalattain.html index a9aa43d..0f7fdc9 100644 --- a/help/en_US/scilab_en_US_help/fgoalattain.html +++ b/help/en_US/scilab_en_US_help/fgoalattain.html @@ -145,7 +145,7 @@ It has type "struct" and contains the following fields. <p class="para"></p></div> <div class="refsection"><h3 class="title">Examples</h3> - <div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabfkeyword">function</span> <span class="scilabinputoutputargs">f1</span><span class="scilaboperator">=</span><span class="scilabfunctionid">gattainObjfun</span><span class="scilabopenclose">(</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">)</span> + <div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabfkeyword">function</span> <span class="scilabinputoutputargs">f1</span><span class="scilaboperator">=</span><span class="scilabfunctionid">fun</span><span class="scilabopenclose">(</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">)</span> <span class="scilabinputoutputargs">f1</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">=</span><span class="scilabnumber">2</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">+</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">-</span><span class="scilabnumber">48</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">-</span><span class="scilabnumber">40</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">+</span><span class="scilabnumber">304</span> <span class="scilabinputoutputargs">f1</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">=</span><span class="scilaboperator">-</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">-</span><span class="scilabnumber">3</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilabinputoutputargs">f1</span><span class="scilabopenclose">(</span><span class="scilabnumber">3</span><span class="scilabopenclose">)</span><span class="scilaboperator">=</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">+</span><span class="scilabnumber">3</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">-</span><span class="scilabnumber">18</span> @@ -156,17 +156,11 @@ It has type "struct" and contains the following fields. <span class="scilabid">goal</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilaboperator">-</span><span class="scilabnumber">5</span><span class="scilabdefault">,</span><span class="scilaboperator">-</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilaboperator">-</span><span class="scilabnumber">2</span><span class="scilabdefault">,</span><span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilaboperator">-</span><span class="scilabnumber">4</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span> <span class="scilabid">weight</span><span class="scilaboperator">=</span><a class="scilabcommand" href="scilab://abs">abs</a><span class="scilabopenclose">(</span><span class="scilabid">goal</span><span class="scilabopenclose">)</span> -<span class="scilabid">gval</span> <span class="scilaboperator">=</span> -<span class="scilabopenclose">[</span><span class="scilaboperator">-</span> <span class="scilabnumber">0.0000011</span> -<span class="scilaboperator">-</span> <span class="scilabnumber">63.999998</span> -<span class="scilaboperator">-</span> <span class="scilabnumber">2.0000002</span> -<span class="scilaboperator">-</span> <span class="scilabnumber">8.</span> -<span class="scilabnumber">3.485D-08</span><span class="scilabopenclose">]</span> -<span class="scilabid">z</span> <span class="scilaboperator">=</span> -<span class="scilabopenclose">[</span><span class="scilabnumber">4.</span> <span class="scilabnumber">3.99</span><span class="scilabopenclose">]</span> - -<span class="scilabid">Run</span> <span class="scilabid">fgoalattain</span> -<span class="scilabopenclose">[</span><span class="scilabid">x</span><span class="scilabdefault">,</span><span class="scilabid">fval</span><span class="scilabdefault">,</span><span class="scilabid">attainfactor</span><span class="scilabdefault">,</span><span class="scilabid">exitflag</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabdefault">,</span><span class="scilabid">lambda</span><span class="scilabopenclose">]</span><span class="scilaboperator">=</span><span class="scilabid">fgoalattain</span><span class="scilabopenclose">(</span><span class="scilabfunctionid">gattainObjfun</span><span class="scilabdefault">,</span><span class="scilabid">x0</span><span class="scilabdefault">,</span><span class="scilabid">goal</span><span class="scilabdefault">,</span><span class="scilabid">weight</span><span class="scilabopenclose">)</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div> +<span class="scilabcomment">//xopt = [-0.0000011 -63.999998 -2.0000002 -8 3.485D-08]</span> +<span class="scilabcomment">//fval = [4 3.99]</span> + +<span class="scilabcomment">//Run fgoalattain</span> +<span class="scilabopenclose">[</span><span class="scilabid">xopt</span><span class="scilabdefault">,</span><span class="scilabid">fval</span><span class="scilabdefault">,</span><span class="scilabid">attainfactor</span><span class="scilabdefault">,</span><span class="scilabid">exitflag</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabdefault">,</span><span class="scilabid">lambda</span><span class="scilabopenclose">]</span><span class="scilaboperator">=</span><span class="scilabid">fgoalattain</span><span class="scilabopenclose">(</span><span class="scilabfunctionid">fun</span><span class="scilabdefault">,</span><span class="scilabid">x0</span><span class="scilabdefault">,</span><span class="scilabid">goal</span><span class="scilabdefault">,</span><span class="scilabid">weight</span><span class="scilabopenclose">)</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div> <div class="refsection"><h3 class="title">Authors</h3> <ul class="itemizedlist"><li class="member">Prajwala TM, Sheetal Shalini , 2015</li></ul></div> diff --git a/help/en_US/scilab_en_US_help/fmincon.html b/help/en_US/scilab_en_US_help/fmincon.html index 242c58b..b2b5ca4 100644 --- a/help/en_US/scilab_en_US_help/fmincon.html +++ b/help/en_US/scilab_en_US_help/fmincon.html @@ -20,7 +20,7 @@ </td> <td width="30%" class="next"> - <span class="next"><a href="fminunc.html">fminunc >></a></span> + <span class="next"><a href="fminimax.html">fminimax >></a></span> </td> </tr></table> @@ -292,7 +292,7 @@ It has type "struct" and contains the following fields. </td> <td width="30%" class="next"> - <span class="next"><a href="fminunc.html">fminunc >></a></span> + <span class="next"><a href="fminimax.html">fminimax >></a></span> </td> </tr></table> diff --git a/help/en_US/scilab_en_US_help/fminimax.html b/help/en_US/scilab_en_US_help/fminimax.html new file mode 100644 index 0000000..2d086ff --- /dev/null +++ b/help/en_US/scilab_en_US_help/fminimax.html @@ -0,0 +1,239 @@ +<html><head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <title>fminimax</title> + <style type="text/css" media="all"> + @import url("scilab_code.css"); + @import url("xml_code.css"); + @import url("c_code.css"); + @import url("style.css"); + </style> + </head> + <body> + <div class="manualnavbar"> + <table width="100%"><tr> + <td width="30%"> + <span class="previous"><a href="fmincon.html"><< fmincon</a></span> + + </td> + <td width="40%" class="center"> + <span class="top"><a href="section_19f4f1e5726c01d683e8b82be0a7e910.html">Symphony Toolbox</a></span> + + </td> + <td width="30%" class="next"> + <span class="next"><a href="fminunc.html">fminunc >></a></span> + + </td> + </tr></table> + <hr /> + </div> + + + + <span class="path"><a href="index.html">Symphony Toolbox</a> >> <a href="section_19f4f1e5726c01d683e8b82be0a7e910.html">Symphony Toolbox</a> > fminimax</span> + + <br /><br /> + <div class="refnamediv"><h1 class="refname">fminimax</h1> + <p class="refpurpose">Solves minimax constraint problem</p></div> + + +<div class="refsynopsisdiv"><h3 class="title">Calling Sequence</h3> + <div class="synopsis"><pre><span class="default">x</span><span class="default"> = </span><span class="functionid">fminimax</span><span class="default">(</span><span class="default">fun</span><span class="default">,</span><span class="default">x0</span><span class="default">)</span> +<span class="default">x</span><span class="default"> = </span><span class="functionid">fminimax</span><span class="default">(</span><span class="default">fun</span><span class="default">,</span><span class="default">x0</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">)</span> +<span class="default">x</span><span class="default"> = </span><span class="functionid">fminimax</span><span class="default">(</span><span class="default">fun</span><span class="default">,</span><span class="default">x0</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">)</span> +<span class="default">x</span><span class="default"> = </span><span class="functionid">fminimax</span><span class="default">(</span><span class="default">fun</span><span class="default">,</span><span class="default">x0</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">)</span> +<span class="default">x</span><span class="default"> = </span><span class="functionid">fminimax</span><span class="default">(</span><span class="default">fun</span><span class="default">,</span><span class="default">x0</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">,</span><span class="default">nonlinfun</span><span class="default">)</span> +<span class="default">x</span><span class="default"> = </span><span class="functionid">fminimax</span><span class="default">(</span><span class="default">fun</span><span class="default">,</span><span class="default">x0</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">,</span><span class="default">nonlinfun</span><span class="default">,</span><span class="default">options</span><span class="default">)</span> +<span class="default">[</span><span class="default">x</span><span class="default">, </span><span class="default">fval</span><span class="default">] = </span><span class="default">fmincon</span><span class="default">(.....)</span> +<span class="default">[</span><span class="default">x</span><span class="default">, </span><span class="default">fval</span><span class="default">, </span><span class="default">maxfval</span><span class="default">]= </span><span class="default">fmincon</span><span class="default">(.....)</span> +<span class="default">[</span><span class="default">x</span><span class="default">, </span><span class="default">fval</span><span class="default">, </span><span class="default">maxfval</span><span class="default">, </span><span class="default">exitflag</span><span class="default">]= </span><span class="default">fmincon</span><span class="default">(.....)</span> +<span class="default">[</span><span class="default">x</span><span class="default">, </span><span class="default">fval</span><span class="default">, </span><span class="default">maxfval</span><span class="default">, </span><span class="default">exitflag</span><span class="default">, </span><span class="default">output</span><span class="default">]= </span><span class="default">fmincon</span><span class="default">(.....)</span> +<span class="default">[</span><span class="default">x</span><span class="default">, </span><span class="default">fval</span><span class="default">, </span><span class="default">maxfval</span><span class="default">, </span><span class="default">exitflag</span><span class="default">, </span><span class="default">output</span><span class="default">, </span><span class="default">lambda</span><span class="default">]= </span><span class="default">fmincon</span><span class="default">(.....)</span></pre></div></div> + +<div class="refsection"><h3 class="title">Parameters</h3> + <dl><dt><span class="term">fun:</span> + <dd><p class="para">The function to be minimized. fun is a function that accepts a vector x and returns a vector F, the objective functions evaluated at x.</p></dd></dt> + <dt><span class="term">x0:</span> + <dd><p class="para">a nx1 or 1xn matrix of doubles, where n is the number of variables, the initial guess for the optimization algorithm</p></dd></dt> + <dt><span class="term">A:</span> + <dd><p class="para">a nil x n matrix of doubles, where n is the number of variables and nil is the number of linear inequalities. If A==[] and b==[], it is assumed that there is no linear inequality constraints. If (A==[] & b<>[]), fminimax generates an error (the same happens if (A<>[] & b==[]))</p></dd></dt> + <dt><span class="term">b:</span> + <dd><p class="para">a nil x 1 matrix of doubles, where nil is the number of linear inequalities</p></dd></dt> + <dt><span class="term">Aeq:</span> + <dd><p class="para">a nel x n matrix of doubles, where n is the number of variables and nel is the number of linear equalities. If Aeq==[] and beq==[], it is assumed that there is no linear equality constraints. If (Aeq==[] & beq<>[]), fminimax generates an error (the same happens if (Aeq<>[] & beq==[]))</p></dd></dt> + <dt><span class="term">beq:</span> + <dd><p class="para">a nel x 1 matrix of doubles, where nel is the number of linear equalities</p></dd></dt> + <dt><span class="term">lb:</span> + <dd><p class="para">a nx1 or 1xn matrix of doubles, where n is the number of variables. The lower bound for x. If lb==[], then the lower bound is automatically set to -inf</p></dd></dt> + <dt><span class="term">ub:</span> + <dd><p class="para">a nx1 or 1xn matrix of doubles, where n is the number of variables. The upper bound for x. If ub==[], then the upper bound is automatically set to +inf</p></dd></dt> + <dt><span class="term">nonlinfun:</span> + <dd><p class="para">function that computes the nonlinear inequality constraints c(x) <= 0 and nonlinear equality constraints ceq(x) = 0.</p></dd></dt> + <dt><span class="term">x:</span> + <dd><p class="para">a nx1 matrix of doubles, the computed solution of the optimization problem</p></dd></dt> + <dt><span class="term">fval:</span> + <dd><p class="para">a vector of doubles, the value of fun at x</p></dd></dt> + <dt><span class="term">maxfval:</span> + <dd><p class="para">a 1x1 matrix of doubles, the maximum value in vector fval</p></dd></dt> + <dt><span class="term">exitflag:</span> + <dd><p class="para">a 1x1 matrix of floating point integers, the exit status</p></dd></dt> + <dt><span class="term">output:</span> + <dd><p class="para">a struct, the details of the optimization process</p></dd></dt> + <dt><span class="term">lambda:</span> + <dd><p class="para">a struct, the Lagrange multipliers at optimum</p></dd></dt> + <dt><span class="term">options:</span> + <dd><p class="para">a list, containing the option for user to specify. See below for details.</p></dd></dt></dl></div> + +<div class="refsection"><h3 class="title">Description</h3> + <p class="para">fminimax minimizes the worst-case (largest) value of a set of multivariable functions, starting at an initial estimate. This is generally referred to as the minimax problem.</p> + <p class="para"><span><img src='./_LaTeX_fminimax.xml_1.png' style='position:relative;top:51px;width:427px;height:110px'/></span></p> + <p class="para">Currently, fminimax calls fmincon which uses the ip-opt algorithm.</p> + <p class="para">max-min problems can also be solved with fminimax, using the identity</p> + <p class="para"><span><img src='./_LaTeX_fminimax.xml_2.png' style='position:relative;top:6px;width:281px;height:20px'/></span></p> + <p class="para">The options allows the user to set various parameters of the Optimization problem. +It should be defined as type "list" and contains the following fields. +<ul class="itemizedlist"><li>Syntax : options= list("MaxIter", [---], "CpuTime", [---], "GradObj", ---, "GradCon", ---);</li> +<li>MaxIter : a Scalar, containing the Maximum Number of Iteration that the solver should take.</li> +<li>CpuTime : a Scalar, containing the Maximum amount of CPU Time that the solver should take.</li> +<li>GradObj : a function, representing the gradient function of the Objective in Vector Form.</li> +<li>GradCon : a function, representing the gradient of the Non-Linear Constraints (both Equality and Inequality) of the problem. It is declared in such a way that gradient of non-linear inequality constraints are defined first as a separate Matrix (cg of size m2 X n or as an empty), followed by gradient of non-linear equality constraints as a separate Matrix (ceqg of size m2 X n or as an empty) where m2 & m3 are number of non-linear inequality and equality constraints respectively.</li> +<li>Default Values : options = list("MaxIter", [3000], "CpuTime", [600]);</li></ul></p> + <p class="para">The objective function must have header : +<div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabid">F</span> <span class="scilaboperator">=</span> <span class="scilabid">fun</span><span class="scilabopenclose">(</span><span class="scilabid">x</span><span class="scilabopenclose">)</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div> +where x is a n x 1 matrix of doubles and F is a m x 1 matrix of doubles where m is the total number of objective functions inside F. +On input, the variable x contains the current point and, on output, the variable F must contain the objective function values.</p> + <p class="para">By default, the gradient options for fminimax are turned off and and fmincon does the gradient opproximation of minmaxObjfun. In case the GradObj option is off and GradConstr option is on, fminimax approximates minmaxObjfun gradient using numderivative toolbox.</p> + <p class="para">If we can provide exact gradients, we should do so since it improves the convergence speed of the optimization algorithm.</p> + <p class="para">Furthermore, we must enable the "GradObj" option with the statement : +<div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabid">minimaxOptions</span> <span class="scilaboperator">=</span> <a class="scilabcommand" href="scilab://list">list</a><span class="scilabopenclose">(</span><span class="scilabstring">"</span><span class="scilabstring">GradObj</span><span class="scilabstring">"</span><span class="scilabdefault">,</span><span class="scilabid">fGrad</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div> +This will let fminimax know that the exact gradient of the objective function is known, so that it can change the calling sequence to the objective function. Note that, fGrad should be mentioned in the form of N x n where n is the number of variables, N is the number of functions in objective function.</p> + <p class="para">The constraint function must have header : +<div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabopenclose">[</span><span class="scilabid">c</span><span class="scilabdefault">,</span> <span class="scilabid">ceq</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">confun</span><span class="scilabopenclose">(</span><span class="scilabid">x</span><span class="scilabopenclose">)</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div> +where x is a n x 1 matrix of dominmaxUbles, c is a 1 x nni matrix of doubles and ceq is a 1 x nne matrix of doubles (nni : number of nonlinear inequality constraints, nne : number of nonlinear equality constraints). +On input, the variable x contains the current point and, on output, the variable c must contain the nonlinear inequality constraints and ceq must contain the nonlinear equality constraints.</p> + <p class="para">By default, the gradient options for fminimax are turned off and and fmincon does the gradient opproximation of confun. In case the GradObj option is on and GradCons option is off, fminimax approximates confun gradient using numderivative toolbox.</p> + <p class="para">If we can provide exact gradients, we should do so since it improves the convergence speed of the optimization algorithm.</p> + <p class="para">Furthermore, we must enable the "GradCon" option with the statement : +<div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabid">minimaxOptions</span> <span class="scilaboperator">=</span> <a class="scilabcommand" href="scilab://list">list</a><span class="scilabopenclose">(</span><span class="scilabstring">"</span><span class="scilabstring">GradCon</span><span class="scilabstring">"</span><span class="scilabdefault">,</span><span class="scilabid">confunGrad</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div> +This will let fminimax know that the exact gradient of the objective function is known, so that it can change the calling sequence to the objective function.</p> + <p class="para">The constraint derivative function must have header : +<div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabopenclose">[</span><span class="scilabid">dc</span><span class="scilabdefault">,</span><span class="scilabid">dceq</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">confungrad</span><span class="scilabopenclose">(</span><span class="scilabid">x</span><span class="scilabopenclose">)</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div> +where dc is a nni x n matrix of doubles and dceq is a nne x n matrix of doubles.</p> + <p class="para">The exitflag allows to know the status of the optimization which is given back by Ipopt. +<ul class="itemizedlist"><li>exitflag=0 : Optimal Solution Found</li> +<li>exitflag=1 : Maximum Number of Iterations Exceeded. Output may not be optimal.</li> +<li>exitflag=2 : Maximum amount of CPU Time exceeded. Output may not be optimal.</li> +<li>exitflag=3 : Stop at Tiny Step.</li> +<li>exitflag=4 : Solved To Acceptable Level.</li> +<li>exitflag=5 : Converged to a point of local infeasibility.</li></ul></p> + <p class="para">For more details on exitflag see the ipopt documentation, go to http://www.coin-or.org/Ipopt/documentation/</p> + <p class="para">The output data structure contains detailed informations about the optimization process. +It has type "struct" and contains the following fields. +<ul class="itemizedlist"><li>output.Iterations: The number of iterations performed during the search</li> +<li>output.Cpu_Time: The total cpu-time spend during the search</li> +<li>output.Objective_Evaluation: The number of Objective Evaluations performed during the search</li> +<li>output.Dual_Infeasibility: The Dual Infeasiblity of the final soution</li></ul></p> + <p class="para">The lambda data structure contains the Lagrange multipliers at the end +of optimization. In the current version the values are returned only when the the solution is optimal. +It has type "struct" and contains the following fields. +<ul class="itemizedlist"><li>lambda.lower: The Lagrange multipliers for the lower bound constraints.</li> +<li>lambda.upper: The Lagrange multipliers for the upper bound constraints.</li> +<li>lambda.eqlin: The Lagrange multipliers for the linear equality constraints.</li> +<li>lambda.ineqlin: The Lagrange multipliers for the linear inequality constraints.</li> +<li>lambda.eqnonlin: The Lagrange multipliers for the non-linear equality constraints.</li> +<li>lambda.ineqnonlin: The Lagrange multipliers for the non-linear inequality constraints.</li></ul></p> + <p class="para"></p></div> + +<div class="refsection"><h3 class="title">Examples</h3> + <div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabcomment">// A basic case :</span> +<span class="scilabcomment">// we provide only the objective function and the nonlinear constraint</span> +<span class="scilabcomment">// function</span> +<span class="scilabfkeyword">function</span> <span class="scilabinputoutputargs">f</span><span class="scilaboperator">=</span><span class="scilabfunctionid">myfun</span><span class="scilabopenclose">(</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">)</span> +<span class="scilabinputoutputargs">f</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">=</span> <span class="scilabnumber">2</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">^</span><span class="scilabnumber">2</span> <span class="scilaboperator">+</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">^</span><span class="scilabnumber">2</span> <span class="scilaboperator">-</span> <span class="scilabnumber">48</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span> <span class="scilabnumber">40</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilaboperator">+</span> <span class="scilabnumber">304</span><span class="scilabdefault">;</span> <span class="scilabcomment">//Objectives</span> +<span class="scilabinputoutputargs">f</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">=</span> <span class="scilaboperator">-</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">^</span><span class="scilabnumber">2</span> <span class="scilaboperator">-</span> <span class="scilabnumber">3</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">^</span><span class="scilabnumber">2</span><span class="scilabdefault">;</span> +<span class="scilabinputoutputargs">f</span><span class="scilabopenclose">(</span><span class="scilabnumber">3</span><span class="scilabopenclose">)</span><span class="scilaboperator">=</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span> <span class="scilaboperator">+</span> <span class="scilabnumber">3</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span><span class="scilabnumber">18</span><span class="scilabdefault">;</span> +<span class="scilabinputoutputargs">f</span><span class="scilabopenclose">(</span><span class="scilabnumber">4</span><span class="scilabopenclose">)</span><span class="scilaboperator">=</span> <span class="scilaboperator">-</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span> +<span class="scilabinputoutputargs">f</span><span class="scilabopenclose">(</span><span class="scilabnumber">5</span><span class="scilabopenclose">)</span><span class="scilaboperator">=</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span> <span class="scilaboperator">+</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span> <span class="scilabnumber">8</span><span class="scilabdefault">;</span> +<span class="scilabfkeyword">endfunction</span> +<span class="scilabcomment">// The initial guess</span> +<span class="scilabid">x0</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">0.1</span><span class="scilabdefault">,</span><span class="scilabnumber">0.1</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span> +<span class="scilabcomment">// The expected solution : only 4 digits are guaranteed</span> +<span class="scilabcomment">//xopt = [4 4]</span> +<span class="scilabcomment">//fopt = [0 -64 -2 -8 0]</span> +<span class="scilabid">maxfopt</span> <span class="scilaboperator">=</span> <span class="scilabnumber">0</span> +<span class="scilabcomment">// Run fminimax</span> +<span class="scilabopenclose">[</span><span class="scilabid">xopt</span><span class="scilabdefault">,</span><span class="scilabid">fopt</span><span class="scilabdefault">,</span><span class="scilabid">maxfval</span><span class="scilabdefault">,</span><span class="scilabid">exitflag</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabdefault">,</span><span class="scilabid">lambda</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">fminimax</span><span class="scilabopenclose">(</span><span class="scilabfunctionid">myfun</span><span class="scilabdefault">,</span> <span class="scilabid">x0</span><span class="scilabopenclose">)</span> +<span class="scilabcomment">// Press ENTER to continue</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div> + +<div class="refsection"><h3 class="title">Examples</h3> + <div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabcomment">// A case where we provide the gradient of the objective</span> +<span class="scilabcomment">// functions and the Jacobian matrix of the constraints.</span> +<span class="scilabcomment">// The objective function and its gradient</span> +<span class="scilabfkeyword">function</span> <span class="scilabinputoutputargs">f</span><span class="scilaboperator">=</span><span class="scilabfunctionid">myfun</span><span class="scilabopenclose">(</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">)</span> +<span class="scilabinputoutputargs">f</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">=</span> <span class="scilabnumber">2</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">^</span><span class="scilabnumber">2</span> <span class="scilaboperator">+</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">^</span><span class="scilabnumber">2</span> <span class="scilaboperator">-</span> <span class="scilabnumber">48</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span> <span class="scilabnumber">40</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilaboperator">+</span> <span class="scilabnumber">304</span><span class="scilabdefault">;</span> +<span class="scilabinputoutputargs">f</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">=</span> <span class="scilaboperator">-</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">^</span><span class="scilabnumber">2</span> <span class="scilaboperator">-</span> <span class="scilabnumber">3</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">^</span><span class="scilabnumber">2</span><span class="scilabdefault">;</span> +<span class="scilabinputoutputargs">f</span><span class="scilabopenclose">(</span><span class="scilabnumber">3</span><span class="scilabopenclose">)</span><span class="scilaboperator">=</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span> <span class="scilaboperator">+</span> <span class="scilabnumber">3</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span><span class="scilabnumber">18</span><span class="scilabdefault">;</span> +<span class="scilabinputoutputargs">f</span><span class="scilabopenclose">(</span><span class="scilabnumber">4</span><span class="scilabopenclose">)</span><span class="scilaboperator">=</span> <span class="scilaboperator">-</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span> +<span class="scilabinputoutputargs">f</span><span class="scilabopenclose">(</span><span class="scilabnumber">5</span><span class="scilabopenclose">)</span><span class="scilaboperator">=</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span> <span class="scilaboperator">+</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span> <span class="scilabnumber">8</span><span class="scilabdefault">;</span> +<span class="scilabfkeyword">endfunction</span> +<span class="scilabcomment">// Defining gradient of myfun</span> +<span class="scilabfkeyword">function</span> <span class="scilabinputoutputargs">G</span><span class="scilaboperator">=</span><span class="scilabfunctionid">myfungrad</span><span class="scilabopenclose">(</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">)</span> +<span class="scilabinputoutputargs">G</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span> <span class="scilabnumber">4</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span> <span class="scilabnumber">48</span><span class="scilabdefault">,</span> <span class="scilaboperator">-</span><span class="scilabnumber">2</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilabdefault">,</span> <span class="scilabnumber">1</span><span class="scilabdefault">,</span> <span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span> <span class="scilabnumber">1</span><span class="scilabdefault">;</span> +<span class="scilabnumber">2</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span> <span class="scilabnumber">40</span><span class="scilabdefault">,</span> <span class="scilaboperator">-</span><span class="scilabnumber">6</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilabdefault">,</span> <span class="scilabnumber">3</span><span class="scilabdefault">,</span> <span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span> <span class="scilabnumber">1</span><span class="scilabdefault">;</span> <span class="scilabopenclose">]</span><span class="scilaboperator">'</span> +<span class="scilabfkeyword">endfunction</span> +<span class="scilabcomment">// The nonlinear constraints and the Jacobian</span> +<span class="scilabcomment">// matrix of the constraints</span> +<span class="scilabfkeyword">function</span> <span class="scilabopenclose">[</span><span class="scilabinputoutputargs">c</span><span class="scilabdefault">, </span><span class="scilabinputoutputargs">ceq</span><span class="scilabopenclose">]</span><span class="scilaboperator">=</span><span class="scilabfunctionid">confun</span><span class="scilabopenclose">(</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">)</span> +<span class="scilabcomment">// Inequality constraints</span> +<span class="scilabinputoutputargs">c</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1.5</span> <span class="scilaboperator">+</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilabdefault">,</span> <span class="scilaboperator">-</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span> <span class="scilabnumber">10</span><span class="scilabopenclose">]</span> +<span class="scilabcomment">// No nonlinear equality constraints</span> +<span class="scilabinputoutputargs">ceq</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span> +<span class="scilabfkeyword">endfunction</span> +<span class="scilabcomment">// Defining gradient of confungrad</span> +<span class="scilabfkeyword">function</span> <span class="scilabopenclose">[</span><span class="scilabinputoutputargs">DC</span><span class="scilabdefault">, </span><span class="scilabinputoutputargs">DCeq</span><span class="scilabopenclose">]</span><span class="scilaboperator">=</span><span class="scilabfunctionid">cgrad</span><span class="scilabopenclose">(</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">)</span> +<span class="scilabcomment">// DC(:,i) = gradient of the i-th constraint</span> +<span class="scilabcomment">// DC = [</span> +<span class="scilabcomment">// Dc1/Dx1 Dc1/Dx2</span> +<span class="scilabcomment">// Dc2/Dx1 Dc2/Dx2</span> +<span class="scilabcomment">// ]</span> +<span class="scilabinputoutputargs">DC</span><span class="scilaboperator">=</span> <span class="scilabopenclose">[</span> +<span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span> <span class="scilaboperator">-</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> +<span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span> <span class="scilaboperator">-</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span> +<span class="scilabopenclose">]</span><span class="scilaboperator">'</span> +<span class="scilabinputoutputargs">DCeq</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilaboperator">'</span> +<span class="scilabfkeyword">endfunction</span> +<span class="scilabcomment">// Test with both gradient of objective and gradient of constraints</span> +<span class="scilabid">minimaxOptions</span> <span class="scilaboperator">=</span> <a class="scilabcommand" href="scilab://list">list</a><span class="scilabopenclose">(</span><span class="scilabstring">"</span><span class="scilabstring">GradObj</span><span class="scilabstring">"</span><span class="scilabdefault">,</span><span class="scilabfunctionid">myfungrad</span><span class="scilabdefault">,</span><span class="scilabstring">"</span><span class="scilabstring">GradCon</span><span class="scilabstring">"</span><span class="scilabdefault">,</span><span class="scilabfunctionid">cgrad</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span> +<span class="scilabcomment">// The initial guess</span> +<span class="scilabid">x0</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">10</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span> +<span class="scilabcomment">// The expected solution : only 4 digits are guaranteed</span> +<span class="scilabcomment">//xopt = [0.92791 7.93551]</span> +<span class="scilabcomment">//fopt = [6.73443 -189.778 6.73443 -8.86342 0.86342]</span> +<span class="scilabid">maxfopt</span> <span class="scilaboperator">=</span> <span class="scilabnumber">6.73443</span> +<span class="scilabcomment">// Run fminimax</span> +<span class="scilabopenclose">[</span><span class="scilabid">xopt</span><span class="scilabdefault">,</span><span class="scilabid">fopt</span><span class="scilabdefault">,</span><span class="scilabid">maxfval</span><span class="scilabdefault">,</span><span class="scilabid">exitflag</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">fminimax</span><span class="scilabopenclose">(</span><span class="scilabfunctionid">myfun</span><span class="scilabdefault">,</span><span class="scilabid">x0</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span> <span class="scilabfunctionid">confun</span><span class="scilabdefault">,</span> <span class="scilabid">minimaxOptions</span><span class="scilabopenclose">)</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div> + +<div class="refsection"><h3 class="title">Authors</h3> + <ul class="itemizedlist"><li class="member">Animesh Baranawal</li></ul></div> + <br /> + + <div class="manualnavbar"> + <table width="100%"> + <tr><td colspan="3" class="next"><a href="http://bugzilla.scilab.org/enter_bug.cgi?product=Scilab%20software&component=Documentation%20pages" class="ulink">Report an issue</a></td></tr> +<tr> + <td width="30%"> + <span class="previous"><a href="fmincon.html"><< fmincon</a></span> + + </td> + <td width="40%" class="center"> + <span class="top"><a href="section_19f4f1e5726c01d683e8b82be0a7e910.html">Symphony Toolbox</a></span> + + </td> + <td width="30%" class="next"> + <span class="next"><a href="fminunc.html">fminunc >></a></span> + + </td> + </tr></table> + <hr /> + </div> + </body> +</html> diff --git a/help/en_US/scilab_en_US_help/fminunc.html b/help/en_US/scilab_en_US_help/fminunc.html index 97ffdbf..7271567 100644 --- a/help/en_US/scilab_en_US_help/fminunc.html +++ b/help/en_US/scilab_en_US_help/fminunc.html @@ -12,7 +12,7 @@ <div class="manualnavbar"> <table width="100%"><tr> <td width="30%"> - <span class="previous"><a href="fmincon.html"><< fmincon</a></span> + <span class="previous"><a href="fminimax.html"><< fminimax</a></span> </td> <td width="40%" class="center"> @@ -160,7 +160,7 @@ It has type "struct" and contains the following fields. <tr><td colspan="3" class="next"><a href="http://bugzilla.scilab.org/enter_bug.cgi?product=Scilab%20software&component=Documentation%20pages" class="ulink">Report an issue</a></td></tr> <tr> <td width="30%"> - <span class="previous"><a href="fmincon.html"><< fmincon</a></span> + <span class="previous"><a href="fminimax.html"><< fminimax</a></span> </td> <td width="40%" class="center"> diff --git a/help/en_US/scilab_en_US_help/index.html b/help/en_US/scilab_en_US_help/index.html index fc07de0..07b853a 100644 --- a/help/en_US/scilab_en_US_help/index.html +++ b/help/en_US/scilab_en_US_help/index.html @@ -50,6 +50,12 @@ +<li><a href="fminimax.html" class="refentry">fminimax</a> — <span class="refentry-description">Solves minimax constraint problem</span></li> + + + + + <li><a href="fminunc.html" class="refentry">fminunc</a> — <span class="refentry-description">Solves a multi-variable unconstrainted optimization problem</span></li> diff --git a/help/en_US/scilab_en_US_help/jhelpmap.jhm b/help/en_US/scilab_en_US_help/jhelpmap.jhm index be43c6e..f46a5e3 100644 --- a/help/en_US/scilab_en_US_help/jhelpmap.jhm +++ b/help/en_US/scilab_en_US_help/jhelpmap.jhm @@ -6,6 +6,7 @@ <mapID target="fgoalattain" url="fgoalattain.html"/> <mapID target="fminbnd" url="fminbnd.html"/> <mapID target="fmincon" url="fmincon.html"/> +<mapID target="fminimax" url="fminimax.html"/> <mapID target="fminunc" url="fminunc.html"/> <mapID target="linprog" url="linprog.html"/> <mapID target="lsqlin" url="lsqlin.html"/> diff --git a/help/en_US/scilab_en_US_help/jhelptoc.xml b/help/en_US/scilab_en_US_help/jhelptoc.xml index 500c6b0..4422b0b 100644 --- a/help/en_US/scilab_en_US_help/jhelptoc.xml +++ b/help/en_US/scilab_en_US_help/jhelptoc.xml @@ -6,6 +6,7 @@ <tocitem target="fgoalattain" text="fgoalattain"/> <tocitem target="fminbnd" text="fminbnd"/> <tocitem target="fmincon" text="fmincon"/> +<tocitem target="fminimax" text="fminimax"/> <tocitem target="fminunc" text="fminunc"/> <tocitem target="linprog" text="linprog"/> <tocitem target="lsqlin" text="lsqlin"/> diff --git a/help/en_US/scilab_en_US_help/section_19f4f1e5726c01d683e8b82be0a7e910.html b/help/en_US/scilab_en_US_help/section_19f4f1e5726c01d683e8b82be0a7e910.html index a03f091..93c9617 100644 --- a/help/en_US/scilab_en_US_help/section_19f4f1e5726c01d683e8b82be0a7e910.html +++ b/help/en_US/scilab_en_US_help/section_19f4f1e5726c01d683e8b82be0a7e910.html @@ -49,6 +49,12 @@ +<li><a href="fminimax.html" class="refentry">fminimax</a> — <span class="refentry-description">Solves minimax constraint problem</span></li> + + + + + <li><a href="fminunc.html" class="refentry">fminunc</a> — <span class="refentry-description">Solves a multi-variable unconstrainted optimization problem</span></li> |