summaryrefslogtreecommitdiff
path: root/help/en_US/scilab_en_US_help/qpipopt.html
diff options
context:
space:
mode:
Diffstat (limited to 'help/en_US/scilab_en_US_help/qpipopt.html')
-rw-r--r--help/en_US/scilab_en_US_help/qpipopt.html49
1 files changed, 23 insertions, 26 deletions
diff --git a/help/en_US/scilab_en_US_help/qpipopt.html b/help/en_US/scilab_en_US_help/qpipopt.html
index 46b56c7..fba4521 100644
--- a/help/en_US/scilab_en_US_help/qpipopt.html
+++ b/help/en_US/scilab_en_US_help/qpipopt.html
@@ -20,7 +20,7 @@
</td>
<td width="30%" class="next">
- <span class="next"><a href="symphony.html">symphony &gt;&gt;</a></span>
+ <span class="next"><a href="qpipopt_mat.html">qpipopt_mat &gt;&gt;</a></span>
</td>
</tr></table>
@@ -46,7 +46,7 @@
<dt><span class="term">nbCon :</span>
<dd><p class="para">a 1 x 1 matrix of doubles, number of constraints</p></dd></dt>
<dt><span class="term">Q :</span>
- <dd><p class="para">a n x n matrix of doubles, where n is number of variables, represents coefficients of quadratic in the quadratic problem.</p></dd></dt>
+ <dd><p class="para">a n x n symmetric matrix of doubles, where n is number of variables, represents coefficients of quadratic in the quadratic problem.</p></dd></dt>
<dt><span class="term">p :</span>
<dd><p class="para">a 1 x n matrix of doubles, where n is number of variables, represents coefficients of linear in the quadratic problem</p></dd></dt>
<dt><span class="term">LB :</span>
@@ -79,41 +79,38 @@ find the minimum of f(x) such that</p>
<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">//Find x in R^6 such that:</span>
-
<span class="scilabid">conMatrix</span><span class="scilaboperator">=</span> <span class="scilabopenclose">[</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">0</span><span class="scilabdefault">,</span><span class="scilabnumber">3</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">0</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">4</span><span class="scilabdefault">,</span><span class="scilabnumber">5</span><span class="scilabdefault">,</span><span class="scilabnumber">6</span><span class="scilabdefault">;</span>
<span class="scilabnumber">2</span><span class="scilabdefault">,</span><span class="scilabnumber">5</span><span class="scilabdefault">,</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">0</span>
<span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</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">1</span><span class="scilabdefault">,</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">2</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">0</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
-<span class="scilabid">conLB</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabnumber">1</span> <span class="scilabnumber">2</span> <span class="scilabnumber">3</span> <span class="scilaboperator">-</span><span class="scilabconstants">%inf</span> <span class="scilaboperator">-</span><span class="scilabconstants">%inf</span><span class="scilabopenclose">]</span><span class="scilaboperator">&#0039;</span><span class="scilabdefault">;</span>
-<span class="scilabid">conUB</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1</span> <span class="scilabnumber">2</span> <span class="scilabnumber">3</span> <span class="scilaboperator">-</span><span class="scilabnumber">1</span> <span class="scilabnumber">2.5</span><span class="scilabopenclose">]</span><span class="scilaboperator">&#0039;</span><span class="scilabdefault">;</span>
-<span class="scilabcomment">//with x between ci and cs:</span>
-<span class="scilabid">lb</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilaboperator">-</span><span class="scilabnumber">1000</span> <span class="scilaboperator">-</span><span class="scilabnumber">10000</span> <span class="scilabnumber">0</span> <span class="scilaboperator">-</span><span class="scilabnumber">1000</span> <span class="scilaboperator">-</span><span class="scilabnumber">1000</span> <span class="scilaboperator">-</span><span class="scilabnumber">1000</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
-<span class="scilabid">ub</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabnumber">10000</span> <span class="scilabnumber">100</span> <span class="scilabnumber">1.5</span> <span class="scilabnumber">100</span> <span class="scilabnumber">100</span> <span class="scilabnumber">1000</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
+<span class="scilabid">conLB</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabnumber">1</span><span class="scilabdefault">;</span><span class="scilabnumber">2</span><span class="scilabdefault">;</span><span class="scilabnumber">3</span><span class="scilabdefault">;</span><span class="scilaboperator">-</span><span class="scilabconstants">%inf</span><span class="scilabdefault">;</span><span class="scilaboperator">-</span><span class="scilabconstants">%inf</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
+<span class="scilabid">conUB</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1</span><span class="scilabdefault">;</span><span class="scilabnumber">2</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">2.5</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
+<span class="scilabid">lb</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilaboperator">-</span><span class="scilabnumber">1000</span><span class="scilabdefault">;</span><span class="scilaboperator">-</span><span class="scilabnumber">10000</span><span class="scilabdefault">;</span> <span class="scilabnumber">0</span><span class="scilabdefault">;</span> <span class="scilaboperator">-</span><span class="scilabnumber">1000</span><span class="scilabdefault">;</span> <span class="scilaboperator">-</span><span class="scilabnumber">1000</span><span class="scilabdefault">;</span> <span class="scilaboperator">-</span><span class="scilabnumber">1000</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
+<span class="scilabid">ub</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabnumber">10000</span><span class="scilabdefault">;</span> <span class="scilabnumber">100</span><span class="scilabdefault">;</span> <span class="scilabnumber">1.5</span><span class="scilabdefault">;</span> <span class="scilabnumber">100</span><span class="scilabdefault">;</span> <span class="scilabnumber">100</span><span class="scilabdefault">;</span> <span class="scilabnumber">1000</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabcomment">//and minimize 0.5*x</span><span class="scilabcomment">&#0039;</span><span class="scilabcomment">*Q*x + p</span><span class="scilabcomment">&#0039;</span><span class="scilabcomment">*x with</span>
-<span class="scilabid">p</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabnumber">1</span><span class="scilabdefault">;</span><span class="scilabnumber">2</span><span class="scilabdefault">;</span><span class="scilabnumber">3</span><span class="scilabdefault">;</span><span class="scilabnumber">4</span><span class="scilabdefault">;</span><span class="scilabnumber">5</span><span class="scilabdefault">;</span><span class="scilabnumber">6</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span> <span class="scilabid">Q</span><span class="scilaboperator">=</span><a class="scilabcommand" href="scilab://eye">eye</a><span class="scilabopenclose">(</span><span class="scilabnumber">6</span><span class="scilabdefault">,</span><span class="scilabnumber">6</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span>
+<span class="scilabid">p</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabnumber">1</span><span class="scilabdefault">;</span> <span class="scilabnumber">2</span><span class="scilabdefault">;</span> <span class="scilabnumber">3</span><span class="scilabdefault">;</span> <span class="scilabnumber">4</span><span class="scilabdefault">;</span> <span class="scilabnumber">5</span><span class="scilabdefault">;</span> <span class="scilabnumber">6</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span> <span class="scilabid">Q</span><span class="scilaboperator">=</span><a class="scilabcommand" href="scilab://eye">eye</a><span class="scilabopenclose">(</span><span class="scilabnumber">6</span><span class="scilabdefault">,</span><span class="scilabnumber">6</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span>
<span class="scilabid">nbVar</span> <span class="scilaboperator">=</span> <span class="scilabnumber">6</span><span class="scilabdefault">;</span>
<span class="scilabid">nbCon</span> <span class="scilaboperator">=</span> <span class="scilabnumber">5</span><span class="scilabdefault">;</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">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">qpipopt</span><span class="scilabopenclose">(</span><span class="scilabid">nbVar</span><span class="scilabdefault">,</span><span class="scilabid">nbCon</span><span class="scilabdefault">,</span><span class="scilabid">Q</span><span class="scilabdefault">,</span><span class="scilabid">p</span><span class="scilabdefault">,</span><span class="scilabid">lb</span><span class="scilabdefault">,</span><span class="scilabid">ub</span><span class="scilabdefault">,</span><span class="scilabid">conMatrix</span><span class="scilabdefault">,</span><span class="scilabid">conLB</span><span class="scilabdefault">,</span><span class="scilabid">conUB</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">Examples</h3>
- <div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabcomment">//min. -8*x1 -16*x2 + x1^2 + 4* x2^2</span>
-<span class="scilabcomment">// such that</span>
-<span class="scilabcomment">// x1 + x2 </span><span class="scilabcomment">&#0060;</span><span class="scilabcomment">= 5,</span>
-<span class="scilabcomment">// x1 </span><span class="scilabcomment">&#0060;</span><span class="scilabcomment">= 3,</span>
-<span class="scilabcomment">// x1 </span><span class="scilabcomment">&#0062;</span><span class="scilabcomment">= 0,</span>
-<span class="scilabcomment">// x2 </span><span class="scilabcomment">&#0062;</span><span class="scilabcomment">= 0</span>
-<span class="scilabid">conMatrix</span><span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1</span> <span class="scilabnumber">1</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
-<span class="scilabid">conLB</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilaboperator">-</span><span class="scilabconstants">%inf</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
-<span class="scilabid">conUB</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">5</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
-<span class="scilabcomment">//with x between ci and cs:</span>
-<span class="scilabid">lb</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">0</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
-<span class="scilabid">ub</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilabconstants">%inf</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
-<span class="scilabcomment">//and minimize 0.5*x</span><span class="scilabcomment">&#0039;</span><span class="scilabcomment">*Q*x + p</span><span class="scilabcomment">&#0039;</span><span class="scilabcomment">*x with</span>
-<span class="scilabid">p</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilaboperator">-</span><span class="scilabnumber">8</span><span class="scilabdefault">,</span><span class="scilaboperator">-</span><span class="scilabnumber">16</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
-<span class="scilabid">Q</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">0</span><span class="scilabdefault">;</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">4</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
+ <div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabcomment">//Find the value of x that minimize following function</span>
+<span class="scilabcomment">// f(x) = 0.5*x1^2 + x2^2 - x1*x2 - 2*x1 - 6*x2</span>
+<span class="scilabcomment">// Subject to:</span>
+<span class="scilabcomment">// x1 + x2 ≤ 2</span>
+<span class="scilabcomment">// –x1 + 2x2 ≤ 2</span>
+<span class="scilabcomment">// 2x1 + x2 ≤ 3</span>
+<span class="scilabcomment">// 0 ≤ x1, 0 ≤ x2.</span>
+<span class="scilabid">Q</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1</span> <span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">;</span> <span class="scilaboperator">-</span><span class="scilabnumber">1</span> <span class="scilabnumber">2</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
+<span class="scilabid">p</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilaboperator">-</span><span class="scilabnumber">2</span><span class="scilabdefault">;</span> <span class="scilaboperator">-</span><span class="scilabnumber">6</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
+<span class="scilabid">conMatrix</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1</span> <span class="scilabnumber">1</span><span class="scilabdefault">;</span> <span class="scilaboperator">-</span><span class="scilabnumber">1</span> <span class="scilabnumber">2</span><span class="scilabdefault">;</span> <span class="scilabnumber">2</span> <span class="scilabnumber">1</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
+<span class="scilabid">conUB</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">2</span><span class="scilabdefault">;</span> <span class="scilabnumber">2</span><span class="scilabdefault">;</span> <span class="scilabnumber">3</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
+<span class="scilabid">conLB</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilaboperator">-</span><span class="scilabconstants">%inf</span><span class="scilabdefault">;</span> <span class="scilaboperator">-</span><span class="scilabconstants">%inf</span><span class="scilabdefault">;</span> <span class="scilaboperator">-</span><span class="scilabconstants">%inf</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
+<span class="scilabid">lb</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">0</span><span class="scilabdefault">;</span> <span class="scilabnumber">0</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
+<span class="scilabid">ub</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabconstants">%inf</span><span class="scilabdefault">;</span> <span class="scilabconstants">%inf</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabid">nbVar</span> <span class="scilaboperator">=</span> <span class="scilabnumber">2</span><span class="scilabdefault">;</span>
-<span class="scilabid">nbCon</span> <span class="scilaboperator">=</span> <span class="scilabnumber">1</span><span class="scilabdefault">;</span>
+<span class="scilabid">nbCon</span> <span class="scilaboperator">=</span> <span class="scilabnumber">3</span><span class="scilabdefault">;</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">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">qpipopt</span><span class="scilabopenclose">(</span><span class="scilabid">nbVar</span><span class="scilabdefault">,</span><span class="scilabid">nbCon</span><span class="scilabdefault">,</span><span class="scilabid">Q</span><span class="scilabdefault">,</span><span class="scilabid">p</span><span class="scilabdefault">,</span><span class="scilabid">lb</span><span class="scilabdefault">,</span><span class="scilabid">ub</span><span class="scilabdefault">,</span><span class="scilabid">conMatrix</span><span class="scilabdefault">,</span><span class="scilabid">conLB</span><span class="scilabdefault">,</span><span class="scilabid">conUB</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>
@@ -133,7 +130,7 @@ find the minimum of f(x) such that</p>
</td>
<td width="30%" class="next">
- <span class="next"><a href="symphony.html">symphony &gt;&gt;</a></span>
+ <span class="next"><a href="qpipopt_mat.html">qpipopt_mat &gt;&gt;</a></span>
</td>
</tr></table>