📄 ellipsoidal.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>YALMIP Example : Determinant maximization</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>Ellipsoidal calculus </h2>
<hr noshade size="1">
<p>Let us solve a determinant maximization problem. Given two ellipsoids
</p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p><span style="font-style: normal"><strong>E<sub>1</sub> = {x | x<sup>T</sup>P<sub>1</sub>x</strong></span><strong>≤</strong><strong><span style="font-style: normal">1}</span></strong></p>
<p><span style="font-style: normal"><strong>E<sub>2</sub> = {x | x<sup>T</sup>P<sub>2</sub>x</strong></span><strong>≤</strong><span style="font-style: normal"><strong>1}</strong></span></p>
</blockquote>
<p>Find the ellipsoid <strong>E = {x | x</strong><span style="font-style: normal"><strong><sup>T</sup></strong></span><strong>Px≤1}</strong>
with smallest possible volume that contain the union of <strong>E<sub>1</sub></strong>
and <strong>E<sub>2</sub></strong>. By using the fact that the volume of the
ellipsoid is proportional to <strong>-det P </strong>and applying the S-procedure,
it can be shown that this problem can be written as</p>
<p><img border="0" src="ellips5.gif" hspace="45"></p>
<p>The objective function <b>-det P</b> (which is minimized) is not
convex, but monotonic transformations can render this problem convex. One
alternative is the logarithmic transform, leading to minimization of <b>-log
det P</b> instead. This operator was used in previous version of YALMIP,
but is not recommended any more. </p>
<p>Instead, YALMIP uses <b>-(det P)<sup>1/m</sup></b> where <b>m</b> is the
smallest power of 2 larger than or equal to the dimension of <b>P</b> (hence,
for matrices with dimension equal to a power of two, the function gives
the geometric mean of the eigenvalues of <b>P</b>). The function <b>(det
P)<sup>1/m</sup></b>, called <b>geomean2</b> in YALMIP, can be modeled using semidefinite and second order
cones, hence any SDP solver can be used for solving determinant
maximization problems. See <a href="readmore.htm#NESNEM94">[Nesterov and
Nemirovskii]</a> for details.</p>
<table cellpadding="10" width="100%">
<tr>
<td class="xmpcode"><font face="Courier New" color="#0000c0">n = 2;<br>
P1 = randn(2);P1 = P1*P1'; % Generate random ellipsoid<br>
P2 = randn(2);P2 = P2*P2'; % Generate random ellipsoid<br>
t = sdpvar(2,1);<br>
P = sdpvar(n,n);<br>
F = set(1 > t > 0);<br>
F = F + set(t(1)*P1-P > 0);<br>
F = F + set(t(2)*P2-P > 0);<br>
sol = solvesdp(F,-geomean2(P));<br>
ellipplot(double(P));hold on;<br>
ellipplot(double(P1));<br>
ellipplot(double(P2));</font></td>
</tr>
</table>
<p>If you have
the dedicated solver
<a href="solvers.htm#maxdet">MAXDET</a> installed and want to use it, you must use the dedicated command
<a href="reference.htm#logdet">logdet</a> for the objective and explicitly select
<a href="solvers.htm#maxdet">MAXDET</a>. This command can not be used
in any other construction than in the objective function, compared to the <b>geomean2</b> operator that can be used as any other variable in YALMIP, since it
a so called <a href="extoperators.htm">extended operator</a>. </p>
<table cellpadding="10" width="100%">
<tr>
<td class="xmpcode"><font face="Courier New" color="#0000c0">solvesdp(F,-logdet(P),sdpsettings('solver','maxdet'));<br>
ellipplot(double(P));hold on;<br>
ellipplot(double(P1));<br>
ellipplot(double(P2));</font></td>
</tr>
</table>
<p>
<img border="0" src="demoicon.gif" width="16" height="16"> Note that
if you use the
<a href="reference.htm#logdet">logdet</a> command, if
<a href="solvers.htm#maxdet">MAXDET</a> not is
explicitly selected, YALMIP will use <b>-(det P)<sup>1/m</sup></b> as objective
function instead.
This will not cause any problems if your objective function is a simple
<a href="reference.htm#logdet">logdet</a> expression (since the two functions
are monotonically related). However, if you have a mixed objective
function such as <b>tr(P)-logdet(P)</b>, the conversion will change your
optimal solution. Hence, if you really want to optimize the mixed
expression, you must explicitly select
<a href="solvers.htm#maxdet">MAXDET</a>. Otherwise, YALMIP will change
your objective to <b>tr(P)-(det P)<sup>1/m</sup></b></td>
</tr>
</table>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -