⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 geometric.htm

📁 国外专家做的求解LMI鲁棒控制的工具箱,可以相对高效的解决LMI问题
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>YALMIP Example : Geometric programming</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<meta content="Microsoft FrontPage 6.0" name="GENERATOR">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link href="yalmip.css" type="text/css" rel="stylesheet">
<base target="_self">
</head>

<body leftMargin="0" topMargin="0">

<div align="left">
  <table border="0" cellpadding="4" cellspacing="3" style="border-collapse: collapse" bordercolor="#000000" width="100%" align="left" height="100%">
    <tr>
      <td width="100%" align="left" height="100%" valign="top">
      <h2>Geometric programming</h2>
      <hr noShade SIZE="1">
      <p>
    <img border="0" src="exclamationmark.jpg" align="left" width="16" height="16">This 
      example requires <a href="solvers.htm#mosek">MOSEK</a> (or
    <a href="solvers.htm#fmincon">fmincon</a>, see below). <br>
      <br>
      Nonlinear terms can be defined also with negative and non-integer powers. 
      This can be used to define geometric optimization problems.<br>
    <img border="0" src="gemoetric.gif" width="144" height="102" hspace="77" vspace="10"></p>
      <p>The solver <a href="solvers.htm#mosek">MOSEK</a> is capable of 
      solving a sub-class of geometric problems where <b>c<font face="Times New Roman">&#8805;0</font></b> 
      with the additional constraint <b>t<font face="Times New Roman">&#8805;0, </font>
      </b>so called posynomial geometric programming. The following example is 
      taken from the <a href="solvers.htm#mosek">MOSEK</a> manual. (note, 
      the positivity constraint on <b><font face="Times New Roman">t </font></b>
      will be added automatically)</p>
      <table cellPadding="10" width="100%">
        <tr>
          <td class="xmpcode">
          <pre>t1 = sdpvar(1,1);
t2 = sdpvar(1,1);
t3 = sdpvar(1,1);
obj = (40*t1^-1*t2^-0.5*t3^-1)+(20*t1*t3)+(40*t1*t2*t3);
F = set((1/3)*t1^-2*t2^-2+(4/3)*t2^0.5*t3^-1 &lt; 1);
solvesdp(F,obj);</pre>
          </td>
        </tr>
      </table>
      <p>If the geometric program violates the posynomial assumption, an error 
      will be issued.</p>
      <table cellPadding="10" width="100%">
        <tr>
          <td class="xmpcode">
          <pre>solvesdp(F + set(t1-t2 &lt; 1),obj)
Warning: Solver not applicable
<font color="#000000"> ans = 
  yalmiptime: 0.0600
  solvertime: 0
  info: 'Solver not applicable'
  problem: -4</font></pre>
          </td>
        </tr>
      </table>
      <p>YALMIP will automatically convert some simple violations of the 
      posynomial assumptions, such as lower bounds on monomial terms and 
      maximization of negative monomials. The following small program maximizes 
      the volume of an open box, under constraints on the floor and wall area, 
      and constraints on the relation between the height, width and depth 
      (example from
           <a href="readmore.htm#BOYDETAL2">[S. Boyd, S. Kim, L. Vandenberghe, A. Hassibi]</a> 
           ).</p>
      <table cellPadding="10" width="100%">
        <tr>
          <td class="xmpcode">
          <pre>sdpvar h w d

Awall  = 1;
Afloor = 1;

F = set(0.5 &lt; h/w &lt; 2) + set(0.5 &lt; d/w &lt; 2);
F = F + set(2*(h*w+h*d) &lt; Awall) + set(w*d &lt; Afloor);

solvesdp(F,-(h*w*d))</pre>
          </td>
        </tr>
      </table>
      <p>The posynomial geometric programming problem is not convex in its 
      standard formulation. Hence, if a general nonlinear solver is applied to 
      the problem, it will typically fail. However, by performing a suitable 
      logarithmic variable transformation, the problem is rendered convex. 
      YALMIP has built-in support for performing this variable change, and solve 
      the problem using the nonlinear solver fmincon. To invoke this module in 
      YALMIP, use the solver 
      tag <code>'fmincon-geometric'.</code>Note that this feature mainly is intended for the 
    <a href="solvers.htm#fmincon">fmincon</a> solver in the MathWorks Optimization Toolbox. 
		It may work in the
    <a href="solvers.htm#fmincon">fmincon</a> solver in
		<a target="_blank" href="http://tomlab.biz">TOMLAB</a>, but this has not 
		been tested to any larger extent.</p>
      <table cellPadding="10" width="100%">
        <tr>
          <td class="xmpcode">
          <pre>t1 = sdpvar(1,1);
t2 = sdpvar(1,1);
t3 = sdpvar(1,1);
obj = (40*t1^-1*t2^-0.5*t3^-1)+(20*t1*t3)+(40*t1*t2*t3);
F = set((1/3)*t1^-2*t2^-2+(4/3)*t2^0.5*t3^-1 &lt; 1);
solvesdp(F,obj,sdpsettings('solver','fmincon-geometric'));</pre>
          </td>
        </tr>
      </table>
      <h3>Generalized geometric programming</h3>
      <p>Some geometric programs, although not given in standard form, can still 
      be solved using a standard geometric programming solver after some some 
      additional variables and constraints have been introduced. YALMIP has 
      built-in support for some of these conversion.
      </p>
      <p>To begin with, nonlinear operators can be used also in geometric 
      programs, as in any other optimization problems (as long as YALMIP is 
      capable of proving convexity, see the <a href="extoperators.htm">nonlinear 
      operator examples</a>)</p>
      <table cellPadding="10" width="100%">
        <tr>
          <td class="xmpcode">
          <pre>t1 = sdpvar(1,1);
t2 = sdpvar(1,1);
t3 = sdpvar(1,1);
obj = (40*t1^-1*t2^-0.5*t3^-1)+(20*t1*t3)+(40*t1*t2*t3);

F = set(max((1/3)*t1^-2*t2^-2+(4/3)*t2^0.5*t3^-1,0.25*t1*t2) &lt; min(t1,t2));
solvesdp(F,obj);</pre>
          </td>
        </tr>
      </table>
      <p>Powers of posynomials are allowed in generalized geometric 
      programs. YALMIP will automatically take care of this and convert the 
      problems to a standard geometric programs. Note that the power has to be 
      positive if used on the left-hand side of a &lt;, and negative otherwise.</p>
      <table cellPadding="10" width="100%">
        <tr>
          <td class="xmpcode">
          <pre>t1 = sdpvar(1,1);
t2 = sdpvar(1,1);
t3 = sdpvar(1,1);
obj = (40*t1^-1*t2^-0.5*t3^-1)+(20*t1*t3)+(40*t1*t2*t3);

F = set(max((1/3)*t1^-2*t2^-2+(4/3)*t2^0.5*t3^-1,0.25*t1*t2) &lt; min((t1+0.5*t2)^-1,t2));
F = F + set((2*t1+3*t2^-1)^0.5 &lt; 2);

solvesdp(F,obj);</pre>
          </td>
        </tr>
      </table>
      <p>To understand how a generalized geometric program can be converted to a 
      standard geometric program. the reader is referred to
           <a href="readmore.htm#BOYDETAL2">[S. Boyd, S. Kim, L. Vandenberghe, A. Hassibi]</a> 
           </td>
    </tr>
  </table>
</div>

</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -