<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 25, 2012 at 9:17 PM, Wendel Melo <span dir="ltr">&lt;<a href="mailto:wendelalexandre@gmail.com" target="_blank">wendelalexandre@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi experts<br><br><br>I have a simple SDP problem to solve. Let Q be a constant symmetric matrix and R the decision variable. My model is:<br>
<br>min tr(R)<br>subject to:<br><br>Q + R is positive semidefinite<br>R is positive semidefinte<br>
<br><br>But, reading the CSDP manual, i saw the CSDP form is:<br><br>min tr(CR)<br>subject to:<br><br>A(X) = a<br>X is positive semidefinite<br></blockquote><div><br></div><div>That should be &quot;tr(CX)&quot; subject to &quot;A(X)=a.&quot;  Note that in the MATLAB interface to CSDP (which is built for compatibility with SeDuMi), we solve problems with the minimization objective. </div>
<div><br></div><div>This is different in the C interface to CSDP, where we solve problems of the form:</div><div> </div><div>max tr(CX)</div><div>A(X)=b</div><div>X is positive semidefinite.  </div><div><br></div><div>Switching between max and min is trivial (just change the sign of C) and the MATLAB interface does the work for you.  </div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br>Is there a way of writting my model in the CSDP form?<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br></blockquote></div><br></div><div class="gmail_extra">Yes there is.  The idea is to make the X matrix a block diagonal matrix of the form:</div><div class="gmail_extra"> </div><div class="gmail_extra">X=[X11 0; 0 X22]</div>
<div class="gmail_extra"> </div><div class="gmail_extra">where</div><div class="gmail_extra"> </div><div class="gmail_extra">X11=R</div><div class="gmail_extra">X22=R+Q</div><div class="gmail_extra"> </div><div class="gmail_extra">
Then the problem becomes</div><div class="gmail_extra"> </div><div class="gmail_extra">min tr(CX)</div><div class="gmail_extra">X22-X11=Q</div><div class="gmail_extra">X is positive semidefinite</div><div class="gmail_extra">
<br></div><div class="gmail_extra">where</div><div class="gmail_extra"> </div><div class="gmail_extra">C=[I 0; 0 0]</div><div class="gmail_extra"> </div><div class="gmail_extra">This requires linear equality n*(n+1)/2 constraints (one for each element in the upper triangle of R+Q.)  </div>
<div class="gmail_extra"><br></div><div class="gmail_extra">I&#39;ve attached a MATLAB code and sample output showing how this can be done using the MATLAB interface to CSDP.  </div><div class="gmail_extra"><br></div></div>