http://tomwiki.com/index.php?title=PENOPT&feed=atom&action=historyPENOPT - Revision history2024-03-29T14:33:02ZRevision history for this page on the wikiMediaWiki 1.39.1http://tomwiki.com/index.php?title=PENOPT&diff=2587&oldid=prevElias at 21:00, 19 January 20122012-01-19T21:00:51Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 17:00, 19 January 2012</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l31">Line 31:</td>
<td colspan="2" class="diff-lineno">Line 31:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Using the Matlab Interface==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Using the Matlab Interface==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The main routines in the two-layer design of the interface are shown in <del style="font-weight: bold; text-decoration: none;"><xr id="tab</del>:<del style="font-weight: bold; text-decoration: none;">interfaceRoutines" /></del>. Page and section references are given to detailed descriptions on how to use the routines.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The main routines in the two-layer design of the interface are shown in <ins style="font-weight: bold; text-decoration: none;">[[#Table</ins>: <ins style="font-weight: bold; text-decoration: none;">The interface routines.]]</ins>. Page and section references are given to detailed descriptions on how to use the routines.</div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">====Table: The interface routines.====</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"><figtable id="tab:interfaceRoutines"></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{|class="wikitable"</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{|class="wikitable"</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">|+<caption>The interface routines.</caption></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">|-valign="top"</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>!Function||Description</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>!Function||Description</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-valign="top"</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-valign="top"</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l47">Line 47:</td>
<td colspan="2" class="diff-lineno">Line 46:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|[[#penfeas_sdp|penfeas_sdp]]||The layer two TOMLAB interface routine that calls ''pen.m''. Converts the input ''P rob ''format before calling ''pensdp.dll ''and converts back to the output ''Result ''structure.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|[[#penfeas_sdp|penfeas_sdp]]||The layer two TOMLAB interface routine that calls ''pen.m''. Converts the input ''P rob ''format before calling ''pensdp.dll ''and converts back to the output ''Result ''structure.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></figtable></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The PENOPT control parameters are possible to set from Matlab.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The PENOPT control parameters are possible to set from Matlab.</div></td></tr>
</table>Eliashttp://tomwiki.com/index.php?title=PENOPT&diff=2405&oldid=prevElias at 10:53, 15 December 20112011-12-15T10:53:57Z<p></p>
<a href="http://tomwiki.com/index.php?title=PENOPT&diff=2405&oldid=1157">Show changes</a>Eliashttp://tomwiki.com/index.php?title=PENOPT&diff=1157&oldid=prevElias: Created page with "==Introduction== ===Overview=== Welcome to the TOMLAB /PENOPT User's Guide. TOMLAB /PENOPT includes either PENSDP or PENBMI (depends on the license) and interfaces between The ..."2011-10-13T12:55:05Z<p>Created page with "==Introduction== ===Overview=== Welcome to the TOMLAB /PENOPT User's Guide. TOMLAB /PENOPT includes either PENSDP or PENBMI (depends on the license) and interfaces between The ..."</p>
<p><b>New page</b></p><div>==Introduction==<br />
<br />
===Overview===<br />
<br />
Welcome to the TOMLAB /PENOPT User's Guide. TOMLAB /PENOPT includes either PENSDP or PENBMI (depends on the license) and interfaces between The MathWorks' MATLAB and the solver packages from PENOPT GbR. The package includes one of the following solvers:<br />
<br />
PENBMI - For large, sparse semidefinite programming problems with linear and bilinear matrix inequality constraints.<br />
<br />
PENSDP - For large, sparse linear semidefinite programming problems with linear constraints. It also solves feasibility problems for systems of linear matrix inequalities.<br />
<br />
Please visit [http://tomopt.com/tomlab/products/pensdp/ http://tomopt.com/tomlab/products/pensdp/], [http://tomopt.com/tomlab/products/penbmi/ http://tomopt.com/tomlab/products/penbmi/] and [http://www.penopt.com/ http://www.penopt.com] for more information.<br />
<br />
For PENBMI two different input formats may be used for the problem formulation: The PENBMI Structural Format, an extension of the PENSDP format for linear problems, and the TOMLAB format for semidefinite prob- lems. Apart from solving the BMI problem, the user can check feasibility of the system of linear and bilinear matrix inequalities.<br />
<br />
For PENSDP three different input formats may be used for problem formulation: The standard sparse SDPA format used in SDPLIB, the PENSDP Structural Format, and the TOMLAB format for semidefinite problems.<br />
<br />
Problems defined in SeDuMi Matlab format may easily be converted to SDPA format and solved by TOMLAB /PENSDP. The conversion routine, called writesdp, was written by Brian Borcher.<br />
<br />
Apart from solving the SDP problem, the user can check feasibility of the system of linear matrix inequalities. The interface between TOMLAB /PENOPT, Matlab and TOMLAB consists of two layers. The first layer gives direct access from Matlab to PENOPT, via calling a Matlab function that calls a pre-compiled MEX file (DLL under Windows, shared library in UNIX) that defines and solves the problem in PENOPT. The second layer is a Matlab function that takes the input in the TOMLAB format, and calls the first layer function. On return the function creates the output in the TOMLAB format.<br />
<br />
===Contents of this Manual===<br />
<br />
*[[#Using the Matlab Interface]] gives the basic information needed to run the Matlab interface.<br />
<br />
*[[#PENOPT Solver Reference]] provides all the solver references for PENBMI and PENSDP.<br />
<br />
===Prerequisites===<br />
<br />
In this manual we assume that the user is familiar with semidefinite programming, TOMLAB and the Matlab language.<br />
<br />
==Using the Matlab Interface==<br />
<br />
The main routines in the two-layer design of the interface are shown in <xr id="tab:interfaceRoutines" />. Page and section references are given to detailed descriptions on how to use the routines.<br />
<br />
<figtable id="tab:interfaceRoutines"><br />
{|class="wikitable"<br />
|+<caption>The interface routines.</caption><br />
|-valign="top"<br />
!Function||Description<br />
|-valign="top"<br />
|[[#penbmiTL|penbmiTL]]||The layer two interface routine called by the TOMLAB driver routine ''tomRun''. This routine then calls ''penbmi.m'', which in turn calls ''penbmi.dll''.<br />
|-valign="top"<br />
|[[#penfeas_bmi|penfeas_bmi]]||The layer two TOMLAB interface routine that calls ''pen.m''. Converts the input ''P rob ''format before calling ''penbmiQ.dll ''and converts back to the output ''Result ''structure.<br />
|-valign="top"<br />
|[[#pensdpTL|pensdpTL]]||The layer two interface routine called by the TOMLAB driver routine ''tomRun''. This routine then calls ''pensdp.m'', which in turn calls ''pensdp.dll''.<br />
|-valign="top"<br />
|[[#penfeas_sdp|penfeas_sdp]]||The layer two TOMLAB interface routine that calls ''pen.m''. Converts the input ''P rob ''format before calling ''pensdp.dll ''and converts back to the output ''Result ''structure.<br />
|}<br />
</figtable><br />
<br />
The PENOPT control parameters are possible to set from Matlab.<br />
<br />
They can be set as inputs to the interface routine ''penbmiTL'' for example and the others. The user sets fields in a structure called ''Prob.PENOPT''. The following example shows how to set the maximum number of overall iterations.<br />
<br />
<pre><br />
Prob.PENOPT.ioptions(2) = 200; % Setting maximum number of iterations<br />
</pre><br />
<br />
==PENOPT Solver Reference==<br />
<br />
The PENOPT solvers are a set of solvers that were developed by the PENOPT GbR. Table 2 lists the solvers included in TOMLAB /PENOPT. The solvers are called using a set of MEX-file interfaces developed as part of TOMLAB. All functionality of the PENOPT solvers are available and changeable in the TOMLAB framework in Matlab.<br />
<br />
Detailed descriptions of the TOMLAB /PENOPT solvers are given in the following sections. Also see the M-file help for each solver.<br />
<br />
Additional solvers reference guides for the TOMLAB /PENOPT solvers are available for download from the TOM- LAB home page [http://tomopt.com/ http://tomopt.com]. Extensive TOMLAB m-file help is also available, for example ''help penbmiTL ''in Matlab will display the features of the PENBMI solver using the TOMLAB format.<br />
<br />
TOMLAB /PENOPT solves<br />
<br />
The linear semi-definite programming problem with linear<br />
matrix inequalities is defined as<br />
<br />
<math><br />
\begin{array}{rccccl}<br />
\min\limits_{x} & \multicolumn{5}{l}{f(x) = {c^T}x} \\<br />
& \\<br />
s/t & x_{L} & \leq & x & \leq & x_{U} \\<br />
& b_{L} & \leq & Ax & \leq & b_{U} \\<br />
& \multicolumn{5}{r}{Q^{i}_0 + \Sum{k=1}{n} Q^{i}_{k}x_{k} \preccurlyeq 0,\qquad i=1,\ldots,m.} \\<br />
\end{array}<br />
</math><br />
<br />
where <math>c, x, x_L, x_U \in \MATHSET{R}^n</math>, <math>A \in \MATHSET{R}^{m_l \times n}</math>, <math>b_L,b_U \in \MATHSET{R}^{m_l}</math> and <math>Q^{i}_{k}</math> are symmetric matrices of similar dimensions in each constraint <math>i</math>. If there are several LMI constraints, each may have it's own dimension.<br />
<br />
The '''linear semi-definite programming problem with linear matrix inequalities''' ('''sdp''') is defined as are symmetric matrices of similar dimensions in each constraint ''i''. If there are several LMI constraints, each may have it's own dimension.<br />
<br />
The '''linear semi-definite programming problem with bilinear matrix inequalities''' ('''bmi''') is defined similarly to but with the matrix following inequality constraints<br />
<br />
<math><br />
Q^{i}_0 + \Sum{k=1}{n} Q^{i}_{k}x_{k} + \Sum{k=1}{n}\Sum{l=1}{n} x_{k}x_{l}K^{i}_{kl} \preccurlyeq 0 \\<br />
</math><br />
<br />
The MEX solvers ''pensdp'' and ''penbmi'' treat '''sdp''' and '''bmi''' problems, respectively. These are available in the TOMLAB /PENSDP and TOMLAB /PENBMI toolboxes.<br />
<br />
The MEX-file solver ''pensdp'' available in the TOMLAB /PENSDP toolbox implements a penalty method aimed at large-scale dense and sparse '''sdp''' problems. The interface to the solver allows for data input in the sparse SDPA input format as well as a TOMLAB specific format.<br />
<br />
The MEX-file solver ''penbmi ''available in the TOMLAB /PENBMI toolbox is similar to ''pensdp'', with added support for the bilinear matrix inequalities.<br />
<br />
The add-on toolbox TOMLAB /PENOPT solves linear semi-definite programming problems with linear and bilinear matrix inequalities. The solvers are listed in Table 2. They are written in a combination of Matlab and C code.<br />
<br />
{|class="wikitable"<br />
|+<caption>Solvers in TOMLAB /PENOPT</caption><br />
!Function||Description<br />
|-valign="top"<br />
|''penbmi''||Sparse and dense linear semi-definite programming using a penalty algorithm.<br />
|-valign="top"<br />
|''penfeas_sdp''||Feasibility check of systems of linear matrix inequalities, using ''pensdp''.<br />
|-valign="top"<br />
|''pensdp''||Sparse and dense linear semi-definite programming using a penalty algorithm.<br />
|-valign="top"<br />
|''penfeas_sdp''||Feasibility check of systems of linear matrix inequalities, using ''pensdp''.<br />
|}<br />
<br />
==PENBMI==<br />
<br />
TOMLAB /PENBMI was developed in co-operation with PENOPT GbR. The following pages describe the solvers and the feasibility checks.<br />
<br />
===penfeas_bmi===<br />
<br />
====Purpose====<br />
<br />
''penfeas_bmi'' checks the feasibility of a system of bilinear matrix inequalities (BMI):<br />
<br />
<math><br />
A^{0}_i +<br />
\Sum{k=1}{n} A^{(i)}_k x_k +<br />
\Sum{k=1}{n}\Sum{l=1}{n} x_{k} x_{l} K^{(i)}_{kl}<br />
\preccurlyeq 0, \qquad k=1,2,\ldots,m<br />
</math><br />
<br />
with symmetric matrices <math>A_{k}^{i}, K_{kl}^{i} \in \RR^{d_l \times d_l},\,k,l=1,\ldots,n,\,i=1,\ldots,m</math><br />
<br />
====Calling Syntax====<br />
<br />
<pre><br />
[ifeas, feas, xfeas] = penfeas bmi(p, x_0, options)<br />
</pre><br />
<br />
====Description of Inputs====<br />
<br />
{|class="wikitable"<br />
!Input||Description<br />
|-valign="top"<br />
|''p''||PENBMI format structure, e.g. from ''sdpa2pen''.<br />
|-valign="top"<br />
|''x_0''||Inital guess of the feasible point. Default = 0.<br />
|-valign="top"<br />
|''options''||Optional 3 ''×'' 1 vector. May be omitted, in which case the defaults below are used.<br />
<br />
{|class="wikitable"<br />
|''options(1)''||Output level of PENBMI solver. Default = 0.<br />
|-valign="top"<br />
|''options(2)''||Upper bound on <math>\|x\|_{\infty}</math>. Default = 1000.<br />
<br />
If ''< ''0, no box bounds are applied.<br />
|-valign="top"<br />
|''options(3)''||Weighting parameter in the objective function. Default 10<sup>-4</sup> .<br />
|}<br />
|}<br />
<br />
====Description of Outputs====<br />
<br />
{|class="wikitable"<br />
!Output||Description<br />
|-valign="top"<br />
|''ifeas''||Feasibility of the system:<br />
<br />
{|class="wikitable"<br />
|-valign="top"<br />
|0||System is strictly feasible<br />
|-valign="top"<br />
|1||System is feasible but not necessarily strictly feasible<br />
|-valign="top"<br />
|-1||System is probably infeasible<br />
|}<br />
<br />
|-valign="top"<br />
|''feas''||Value of the minimized maximal eigenvalue of BMI.<br />
|-valign="top"<br />
|''xfeas''||Feasible point<br />
|}<br />
<br />
====Algorithm====<br />
<br />
The feasibility of the system of BMI's is checked by solving the following '''bmi''' problem:<br />
<br />
<math><br />
\begin{array}{ccccccl}<br />
\min_limits_{x\in\RR^{n},\lambda\in\RR} &<br />
\multicolumn{6}{l}{f(x,\lambda) = \lambda + w \|x\|_2^2} \\<br />
\end{array}<br />
</math><br />
<br />
<math><br />
\begin{array}{ccccccl}<br />
\mbox{s.t.} & - \xbound & \leq & x & \leq & \xbound \\<br />
& \multicolumn{5}{l}{A_0^i + \Sum{k=1}{n} A_{k}^{i} x_{k}<br />
\preccurlyeq \lambda I_{n \times n},} & i=1,\ldots,m \\<br />
\end{array}<br />
</math><br />
<br />
where ''x''<sub>bound</sub>is taken from input argument ''options(2)'', or <math>\infty</math> if ''options(2) < ''0.<br />
<br />
When <math>\lambda < 0</math>, the system is strictly feasible; when <math>\lambda=0</math>, the system is feasible but has no interior point. When <math>\lambda>0</math> for any ''x<sub>bound</sub>'', the system may be infeasible.<br />
<br />
As the semidefinite problem solved is nonconvex and ''penbmiQ ''is a local method, it cannot be guaranteed that the solution <math>\lambda</math> is a global minimum. Consequently, the (local) optimum <math>\lambda_{toc}</math> found by ''penbmiQ ''may be a positive number (indicating infeasibility), although the system is feasible (i.e., the global optimum <math>\lambda_{glob} < 0</math>). In such a case, the user may try various initial points ''x ''_0, and also different weighting parameter ''w ''(''option(3)'').<br />
<br />
In practice, the conditions on feasibility are as follows: <math>\lambda < -10^{-6}</math> means strict feasibility, <math>|\lambda|<10^{-6}</math> means feasibility (not strict) and <math>\lambda > 10^{-6}</math> indicates infeasibility. The user can decide by the actual value of the output parameter ''feas ''(including the optimal <math>\lambda</math>).<br />
<br />
For the case when the BMI system is unbounded, we have to add artificial bounds on ''x'', otherwise PENBMI might diverge. Of course, it may happen that the feasible point lies outside these bounds. In this case ''penfeas_bmi'' claims infeasibility, although the system is actually feasible. When in doubts, the user may try to gradually increase ''x''<sub>bound</sub> (parameter ''options(2)'').<br />
<br />
On the other hand, for very ill-conditioned and unbounded systems, the default bound 1000 may be too large and PENBMI may not converge. In this case, the user is advised either to increase the weighting parameter ''w ''(to 0''.''01 and bigger) or to decrease the bound (parameter ''options(2)'') to a smaller number (100-1).<br />
<br />
====M-files Used====<br />
<br />
''pen.m''<br />
<br />
====MEX-files Used====<br />
<br />
''penbmiQ''<br />
<br />
====See Also====<br />
<br />
''penfeas sdp.m''<br />
<br />
===penbmiTL===<br />
<br />
====Purpose====<br />
<br />
Solve (linear) semi-definite programming problems.<br />
<br />
''penbmiTL ''solves problems of the form<br />
<br />
<math><br />
\begin{array}{ccccccl}<br />
\min\limits_{x} & \multicolumn{5}{l}{f(x) = c^{T} x} & \\<br />
s/t & x_L & \leq & x & \leq & x_U & \\<br />
{} & b_L & \leq & Ax & \leq & b_U & \\<br />
\multicolumn{7}{l}<br />
{<br />
Q^{(0)}_i +<br />
\Sum{k=1}{n} Q^{(i)}_k x_k +<br />
\Sum{k=1}{n}\Sum{l=1}{n} x_{k} x_{l} K^{(i)}_{kl}<br />
\preceq 0, \qquad k=1,2,\ldots,m<br />
}<br />
\end{array}<br />
</math><br />
<br />
where <math>x,x_L,x_U \in \Rdim{n},\, A \in \Rdim{m_l \times n},\, b_L,b_U<br />
\in \Rdim{m_l}</math> and <math>Q^{(i)}_k</math> are sparse or dense symmetric<br />
matrices. The matrix sizes may vary between different matrix<br />
inequalities but must be the same in each particular constraint.<br />
<br />
====Calling Syntax====<br />
<br />
<pre><br />
Result = tomRun('penbmi',Prob,...)<br />
</pre><br />
<br />
====Description of Inputs====<br />
<br />
''Prob'' Problem description structure. The following fields are used:<br />
<br />
{|class="wikitable"<br />
!Input||Description<br />
|-valign="top"<br />
|''QP.c''||Vector with coefficients for linear objective function.<br />
|-valign="top"<br />
|''A''||Linear constraints matrix.<br />
|-valign="top"<br />
|''b_L''||Lower bound for linear constraints.<br />
|-valign="top"<br />
|''b_U''||Upper bound for linear constraints.<br />
|-valign="top"<br />
|''x_L''||Lower bound on variables.<br />
|-valign="top"<br />
|''x_U''||Upper bound on variables.<br />
|-valign="top"<br />
|''x_0''||Starting point.<br />
|-valign="top"<br />
|''PENOPT''||Structure with special fields for SDP parameters. Fields used are:<br />
|-valign="top"<br />
|''LMI''||Structure array with matrices for the linear terms of the matrix inequalities.<br />
<br />
See ''Examples ''on page 17 for a discussion of how to set this correctly.<br />
|-valign="top"<br />
|''ioptions''||8 ''× ''1 vector with options, defaults in (). Any element set to a value less than zero will be replaced by a default value, in some cases fetched from standard Tomlab parameters.<br />
{|class="wikitable"<br />
|''ioptions(1)''||0/1: use default/user defined values for options.<br />
|-valign="top"<br />
|''ioptions(2)''||Maximum number of iterations for overall algorithm (50). If not given, ''Prob.optParam.MaxIter'' is used.<br />
|-valign="top"<br />
|''ioptions(3)''||Maximum number of iterations in unconstrained optimization (100). If not given, ''Prob.optParam.MinorIter ''is used.<br />
|-valign="top"<br />
|''ioptions(4)''||Output level: 0/(1)/2/3 = silent / summary / brief / full.<br />
|-valign="top"<br />
|''ioptions(5)''||(0)/1: Check density of Hessian / Assume dense.<br />
|-valign="top"<br />
|''ioptions(6)''||(0)/1: (Do not) use linesearch in unconstrained minimization. <br />
|-valign="top"<br />
|''ioptions(7)''||(0)/1: (Do not) write solution vector to output file. <br />
|-valign="top"<br />
|''ioptions(8)''||(0)/1: (Do not) write computed multipliers to output file.<br />
|}<br />
|-valign="top"<br />
|''foptions''||1 ''× ''7 vector with options, defaults in ().<br />
<br />
{|class="wikitablew"<br />
|''foptions(1) ''||Scaling factor linear constraints; must be positive. (1.0).<br />
|-valign="top"<br />
|foptions(2)||Restriction for multiplier update; linear constraints (0.7). <br />
|-valign="top"<br />
|foptions(3)||Restriction for multiplier update; matrix constraints (0.1).<br />
|-valign="top"<br />
|''foptions(4)''||Stopping criterium for overall algorithm (10<sup>-7</sup>). Tomlab equivalent: ''Prob.optParam.eps_f''.<br />
|-valign="top"<br />
|''foptions(5)''||Lower bound for the penalty parameters (10''-''6 ).||<br />
|-valign="top"<br />
|''foptions(6)''||Lower bound for the multipliers (10<sup>-14</sup>).<br />
|-valign="top"<br />
|''foptions(7)''||Stopping criterium for unconstrained minimization (10<sup>-2</sup>).<br />
|}<br />
|}<br />
<br />
====Description of Outputs====<br />
<br />
''Result ''Structure with result from optimization. The following fields are changed:<br />
<br />
{|class="wikitable"<br />
!Output||Description<br />
|-valign="top"<br />
|''x_k''||Optimal point.<br />
|-valign="top"<br />
|''f_k ''||Function value at optimum.<br />
|-valign="top"<br />
|''g_k ''||Gradient value at optimum, ''c''.<br />
|-valign="top"<br />
|''v_k ''||Lagrange multipliers.<br />
|-valign="top"<br />
|''x_0 ''||Starting point.<br />
|-valign="top"<br />
|''f_0 ''||Function value at start.<br />
|-valign="top"<br />
|''xState ''||State of each variable, described in the TOMLAB User's Guide.<br />
|-valign="top"<br />
|''Iter ''||Number of iterations.<br />
|-valign="top"<br />
|''ExitFlag ''||0: OK.<br />
<br />
1: Maximal number of iterations reached.<br />
<br />
2: Unbounded feasible region.<br />
<br />
3: Rank problems. Can not find any solution point.<br />
<br />
4: Illegal ''x 0''.<br />
<br />
5: No feasible point ''x 0 ''found.<br />
|-valign="top"<br />
|''Inform''||If ''ExitF lag > ''0, ''I nf orm ''= ''ExitF lag''.<br />
|-valign="top"<br />
|''QP.B''||Optimal active set. See input variable ''QP.B''.<br />
|-valign="top"<br />
|''Solver''||Solver used.<br />
|-valign="top"<br />
|''SolverAlgorithm''||Solver algorithm used.<br />
|-valign="top"<br />
|''FuncEv''||Number of function evaluations. Equal to ''Iter''. ''ConstrEv ''Number of constraint evaluations. Equal to ''Iter''. ''Prob ''Problem structure used.<br />
|}<br />
<br />
====Description====<br />
<br />
''pensdp'' implements a penalty algorithm based on the PBM method of Ben-Tal and Zibulevsky. It is possible to give input data in three different formats:<br />
<br />
*Standard sparse SPDA format<br />
*PENSDP Structural format<br />
*Tomlab Quick format<br />
<br />
In all three cases, problem setup is done via ''sdpAssign''.<br />
<br />
====See Also====<br />
<br />
''sdpAssign.m'', ''sdpa2pen.m'', ''sdpDemo.m'', ''tomlab/docs/penbmi.pdf''<br />
<br />
====Warnings====<br />
<br />
Currently ''penbmi ''does not work well solving problems of '''sdp '''type.<br />
<br />
====Examples====<br />
<br />
Setting the LMI constraints is best described by an example. Assume 3 variables ''x ''= (''x''<sub>1</sub>, ''x''<sub>2</sub> , ''x''<sub>3</sub>) and 2 linear matrix inequalities of sizes 3 ''× ''3 and 2 ''× ''2 respectively, here given on block-diagonal form:<br />
<br />
<math><br />
\left(<br />
\begin{array}{c|c}<br />
\begin{array}{ccc} 0 \\ & 0 \\ && 0\end{array}<br />
\\ \hline<br />
& \begin{array}{cc} 0 \\ & 1 \end{array}<br />
\end{array}<br />
\right) +<br />
\left(<br />
\begin{array}{c|c}<br />
\begin{array}{ccc} 2 & -1 & 0 \\ & 2 & 0 \\ && 2\end{array}<br />
\\ \hline & \begin{array}{cc} 1 \\ & -1 \end{array}<br />
\end{array}<br />
\right)x_1<br />
\\ +<br />
\left(<br />
\begin{array}{c|c}<br />
\begin{array}{ccc} 0 \\ & 0 \\ && 0\end{array}<br />
\\ \hline & \begin{array}{cc} 3 \\ & -3 \end{array}<br />
\end{array}<br />
\right)x_2 +<br />
\left(<br />
\begin{array}{c|c}<br />
\begin{array}{ccc} 2 & 0 &-1 \\ & 2 & 0 \\ && 2\end{array}<br />
\\ \hline & \begin{array}{cc} 0 \\ & 0 \end{array}<br />
\end{array}<br />
\right)x_3 \preceq 0<br />
</math><br />
<br />
The ''LMI'' structure could then be initialized with the following commands:<br />
<br />
<pre><br />
% Constraint 1<br />
>> LMI(1,1).Q0 = [];<br />
>> LMI(1,1).Q = [2 -1 0 ; ...<br />
0 2 0 ; ...<br />
0 0 2];<br />
>> LMI(1,2).Q = [];<br />
>> LMI(1,3).Q = [2 0 -1 ; ...<br />
0 2 0 ; ...<br />
0 0 2];<br />
<br />
% Constraint 2, diagonal matrices only<br />
>> LMI(2,1).Q0 = diag( [0, 1] );<br />
>> LMI(2,1).Q = diag( [1,-1] );<br />
>> LMI(2,2).Q = diag( [3,-3] );<br />
>> LMI(2,3).Q = [ ];<br />
<br />
% Use LMI in call to sdpAssign:<br />
>> Prob=sdpAssign(c,LMI,...)<br />
<br />
% ... or set directly into Prob.PENSDP.LMI field:<br />
>> Prob.PENSDP.LMI = LMI;<br />
</pre><br />
<br />
Some points of interest:<br />
<br />
*The ''LMI'' structure must be of correct size. This is important if a LMI constraint has zero matrices for the highest numbered variables. If the above example had zero coefficient matrices for ''x''3 , the user would have to set LMI(1,3).Q = [] explicitly, so that the ''LMI ''structure array is really 2 ''× ''3. (LMI(2,3).Q would automatically become empty in this case, unless set otherwise by the user).<br />
<br />
*MATLAB sparse format is allowed and encouraged.<br />
<br />
*Only the upper triangular part of each matrix is used (symmetry is assumed).<br />
<br />
Input in Sparse SDPA Format is handled by the conversion routine ''sdpa2pen''. For example, the problem defined in ''tomlab/examples/arch0.dat-s ''can be solved using the following statements:<br />
<br />
<pre><br />
>> p = sdpa2pen('arch0.dat-s')<br />
p =<br />
vars: 174<br />
fobj: [1x174 double]<br />
constr: 174<br />
ci: [1x174 double]<br />
bi_dim: [1x174 double]<br />
bi_idx: [1x174 double]<br />
bi_val: [1x174 double]<br />
mconstr: 1<br />
ai_dim: 175<br />
ai_row: [1x2874 double]<br />
ai_col: [1x2874 double]<br />
ai_val: [1x2874 double]<br />
msizes: 161<br />
ai_idx: [175x1 double]<br />
ai_nzs: [175x1 double]<br />
x0: [1x174 double]<br />
ioptions: 0<br />
foptions: []<br />
<br />
>> Prob = sdpAssign(p); % Can call sdpAssign with only 'p' structure<br />
>> Result = tomRun('pensdp',Prob); % Call tomRun to solve problem<br />
</pre><br />
<br />
==PENSDP==<br />
<br />
TOMLAB /PENSDP was developed in co-operation with PENOPT GbR. The following pages describe the solvers and the feasibility checks.<br />
<br />
===penfeas_sdp===<br />
<br />
====Purpose====<br />
<br />
''penfeas_sdp ''checks the feasibility of a system of linear matrix inequalities (LMI):<br />
<br />
<math><br />
A_0^i + \Sum{k=1}{n} A_{k}^{i} x_{k} \preccurlyeq 0, \qquad i=1,\ldots,m<br />
</math><br />
<br />
with symmetric matrices <br />
<br />
<math><br />
A_{k}^{i} \in \RR^{d_l \times d_l}, \, k=1,\ldots,n, i=1,\ldots,m<br />
</math><br />
<br />
and<br />
<br />
<math><br />
x \in \RR^{n}<br />
</math><br />
<br />
====Calling Syntax====<br />
<br />
<pre><br />
[ifeas, feas, xfeas] = penfeas sdp(p, options)<br />
</pre><br />
<br />
====Description of Inputs====<br />
<br />
{|class="wikitable"<br />
!Input||Description<br />
|-valign="top"<br />
|''p''||PENSDP format structure, e.g. from ''sdpa2pen''.<br />
|-valign="top"<br />
|''options''||Optional 2 ''× ''1 vector. May be omitted, in which case the defaults below are used.<br />
|-valign="top"<br />
|''options(1)''||Output level of PENSDP solver. Default = 0.<br />
|-valign="top"<br />
|''options(2)''||Upper bound on ''x 8 ''. Default = 1000.<br />
<br />
If ''< ''0, no box bounds are applied.<br />
|}<br />
<br />
====Description of Outputs====<br />
<br />
{|class="wikitable"<br />
!Output||Description<br />
|-valign="top"<br />
|''ifeas''||Feasibility of the system:<br />
|-valign="top"<br />
|0||System is strictly feasible<br />
|-valign="top"<br />
|1||System is feasible but not necessarily strictly feasible<br />
|-valign="top"<br />
|-1||System is probably infeasible<br />
|-valign="top"<br />
|''feas''||Value of the minimized maximal eigenvalue of LMI.<br />
|-valign="top"<br />
|''xfeas''||Feasible point<br />
|}<br />
<br />
====Algorithm====<br />
<br />
The feasibility of the system of LMI's is checked by solving the following '''sdp '''problem:<br />
<br />
<math><br />
\begin{array}{ccccccl}<br />
\min\limits_{x\in\RR^{n},\lambda\in\RR} &<br />
\multicolumn{6}{l}{f(x,\lambda) = \lambda} \\<br />
\end{array}<br />
</math><br />
<br />
<math><br />
\begin{array}{ccccccl}<br />
\mbox{s.t.} & - \xbound & \leq & x & \leq & \xbound \\<br />
& \multicolumn{5}{l}{A_0^i + \Sum{k=1}{n} A_{k}^{i} x_{k}<br />
\preccurlyeq \lambda I_{n \times n},} & i=1,\ldots,m \\<br />
\end{array}<br />
</math><br />
<br />
where ''xbound'' is taken from input argument ''options(2)'', or <math>\infty if \VAR{options(2)} <0</math>.<br />
<br />
When <math>\lambda < 0</math>, the system is strictly feasible; when ''? ''= 0, the system is feasible but has no interior point. <br />
<br />
When <math>\lambda=0</math> for any <math>x_{bound}</math>, the system is infeasible.<br />
<br />
In practice, the conditions on feasibility are as follows: <br />
<math>\lambda < -10^{-6}</math> means strict feasibility, <br />
<math>|\lambda|<10^{-6}</math> means feasibility (not strict) and <br />
<math>\lambda > 10^{-6}</math> indicates infeasibility. <br />
<br />
The user can decide by the actual value of the output parameter ''feas ''(including the optimal <math>\lambda</math>).<br />
<br />
For the case when the LMI system is unbounded, we have to add artificial bounds on ''x'', otherwise PENSDP might diverge. Of course, it may happen that the feasible point lies outside these bounds. In this case ''penfeas sdp ''claims infeasibility, although the system is actually feasible. When in doubts, the user may try to gradually increase ''x''bound (parameter ''options(2)''). On the other hand, for very ill-conditioned and unbounded systems, the default bound 1000 may be too large and PENSDP may not converge. In this case, the user is advised to decrease parameter ''options(2) ''to a smaller number (100-1).<br />
<br />
====M-files Used====<br />
<br />
''pen.m''<br />
<br />
====MEX-files Used====<br />
<br />
''pensdp''<br />
<br />
====See Also====<br />
<br />
''penfeas bmi.m''<br />
<br />
===pensdpTL===<br />
<br />
====Purpose====<br />
<br />
Solve (linear) semi-definite programming problems.<br />
<br />
''pensdpTL ''solves problems of the form<br />
<br />
<math><br />
\begin{array}{ccccccl}<br />
\min\limits_{x} & \multicolumn{5}{l}{f(x) = c^{T} x} & \\<br />
\\<br />
s/t & x_L & \leq & x & \leq & x_U & \\<br />
{} & b_L & \leq & Ax & \leq & b_U & \\<br />
\\<br />
& \multicolumn{3}{l}{Q^{(0)}_i + \sum_{k=1}^{n} Q^{(i)}_k x_k}<br />
& \preceq & 0, & k=1,2,\ldots,m_{LMI} \\<br />
\end{array}<br />
</math><br />
<br />
where <math>x,x_L,x_U \in \Rdim{n},\, A \in \Rdim{m_l \times n},\, b_L,b_U<br />
\in \Rdim{m_l}</math> and <math>Q^{(i)}_k</math> are sparse or dense symmetric matrices. The matrix sizes may vary between different linear matrix inequalities (''LMI'') but must be the same in each particular constraint.<br />
<br />
====Calling Syntax====<br />
<br />
<pre><br />
Result = tomRun('pensdp',Prob,...)<br />
</pre><br />
<br />
====Description of Inputs====<br />
<br />
''Prob ''Problem description structure. The following fields are used:<br />
<br />
{|class="wikitable"<br />
!Input||Description<br />
|-valign="top"<br />
|''QP.c''||Vector with coefficients for linear objective function.<br />
|-valign="top"<br />
|''A ''||Linear constraints matrix.<br />
|-valign="top"<br />
|''b_L ''||Lower bound for linear constraints.<br />
|-valign="top"<br />
|''b_U ''||Upper bound for linear constraints.<br />
|-valign="top"<br />
|''x_L ''||Lower bound on variables.<br />
|-valign="top"<br />
|''x_U ''||Upper bound on variables.<br />
|-valign="top"<br />
|''x_0 ''||Starting point.<br />
|-valign="top"<br />
|''PriLevOpt ''||Print level in ''pensdpTL ''and MEX interface. The print level in the solver is controlled by ''PENOPT.ioptions(4)''.<br />
|-valign="top"<br />
|''PENOPT ''||Structure with special fields for SDP parameters. Fields used are:<br />
|-valign="top"<br />
|''LMI ''||Structure array with matrices for the linear matrix inequalities. See ''Examples'' on page 17 for a discussion of how to set this correctly.<br />
|-valign="top"<br />
|''ioptions ''||8 ''× ''1 vector with options, defaults in (). Any element set to a value less than zero will be replaced by a default value, in some cases fetched from standard Tomlab parameters.<br />
<br />
{|class="wikitable"<br />
|''ioptions(1) ''||0/1: use default/user defined values for options.<br />
|-valign="top"<br />
|''ioptions(2) ''||Maximum number of iterations for overall algorithm (50). If not given,<br />
<br />
''Prob.optParam.MaxIter ''is1u5sed.<br />
|-valign="top"<br />
|''ioptions(3)''||Maximum number of iterations in unconstrained optimization (100). If not given, ''Prob.optParam.MinorIter ''is used.<br />
|-valign="top"<br />
|''ioptions(4)''||Output level: 0/(1)/2/3 = silent/summary/brief/full. Tomlab parameter: ''Prob.PriLevOpt''.<br />
|-valign="top"<br />
|''ioptions(5)''||(0)/1: Check density of Hessian / Assume dense.<br />
|-valign="top"<br />
|''ioptions(6)''||(0)/1: (Do not) use linesearch in unconstrained minimization. ''ioptions(7) ''(0)/1: (Do not) write solution vector to output file. ''ioptions(8) ''(0)/1: (Do not) write computed multipliers to output file.<br />
|}<br />
<br />
|-valign="top"<br />
|''foptions''||7 ''× ''1 vector with optimization parameters, defaults in ():<br />
<br />
{|class="wikitable"<br />
|''foptions(1)''||Scaling factor linear constraints; must be positive. (1.0).<br />
|-valign="top"<br />
|''foptions(2)''||Restriction for multiplier update; linear constraints (0.7).<br />
|-valign="top"<br />
|''foptions(3)''||Restriction for multiplier update; matrix constraints (0.1).<br />
|-valign="top"<br />
|''foptions(4)''||Stopping criterium for overall algorithm (10<sup>-7</sup>). Tomlab equivalent: ''Prob.optParam.eps_f''.<br />
|-valign="top"<br />
|''foptions(5)''||Lower bound for the penalty parameters (10<sup>-6</sup>).<br />
|-valign="top"<br />
|''foptions(6)''||Lower bound for the multipliers (10<sup>-14</sup>).<br />
|-valign="top"<br />
|''foptions(7)''||Stopping criterium for unconstrained minimization (10<sup>-2</sup>).<br />
|}<br />
<br />
|}<br />
<br />
====Description of Outputs====<br />
<br />
''Result ''Structure with result from optimization. The following fields are changed:<br />
<br />
{|class="wikitable"<br />
!Output||Description<br />
|-valign="top"<br />
|''x_k''||Optimal point.<br />
|-valign="top"<br />
|''f_k''||Function value at optimum.<br />
|-valign="top"<br />
|''g_k''||Gradient value at optimum, ''c''.<br />
|-valign="top"<br />
|''v_k''||Lagrange multipliers.<br />
|-valign="top"<br />
|''x_0''||Starting point.<br />
|-valign="top"<br />
|''f_0''||Function value at start.<br />
|-valign="top"<br />
|''xState''||State of each variable, described in the TOMLAB User's Guide.<br />
|-valign="top"<br />
|''Iter''||Number of iterations.<br />
|-valign="top"<br />
|''ExitFlag''||0: OK.<br />
<br />
1: Maximal number of iterations reached.<br />
<br />
2: Unbounded feasible region.<br />
<br />
3: Rank problems. Can not find any solution point.<br />
<br />
4: Illegal ''x 0''.<br />
<br />
5: No feasible point ''x 0 ''found.<br />
|-valign="top"<br />
|''Inform''||If ''ExitF lag > ''0, ''I nf orm ''= ''ExitF lag''.<br />
|-valign="top"<br />
|''QP.B''||Optimal active set. See input variable ''QP.B''.<br />
|-valign="top"<br />
|''Solver''||Solver used.<br />
|-valign="top"<br />
|''SolverAlgorithm''||Solver algorithm used.<br />
|-valign="top"<br />
|''FuncEv''||Number of function evaluations. Equal to ''Iter''. ''ConstrEv ''Number of constraint evaluations. Equal to ''Iter''. ''Prob ''Problem structure used.<br />
|}<br />
<br />
====Description====<br />
<br />
''pensdp ''implements a penalty algorithm based on the PBM method of Ben-Tal and Zibulevsky. It is possible to give input data in three different formats:<br />
<br />
*Standard sparse SPDA format<br />
*PENSDP Structural format<br />
*Tomlab Quick format<br />
<br />
In all three cases, problem setup is done via ''sdpAssign''.<br />
<br />
====See Also====<br />
<br />
''sdpAssign.m'', ''sdpa2pen.m'', ''sdpDemo.m'', ''tomlab/docs/pensdp.pdf'', ''penfeas sdp.m''<br />
<br />
====Examples====<br />
<br />
Setting the LMI constraints is best described by an example. Assume 3 variables <math>x=(x_1,x_2,x_3)</math> and 2 linear matrix inequalities of sizes 3 ''× ''3 and 2 ''× ''2 respectively, here given on block-diagonal form:<br />
<br />
<math><br />
\left(<br />
\begin{array}{c|c}<br />
\begin{array}{ccc} 0 \\ & 0 \\ && 0\end{array}<br />
\\ \hline<br />
& \begin{array}{cc} 0 \\ & 1 \end{array}<br />
\end{array}<br />
\right) +<br />
\left(<br />
\begin{array}{c|c}<br />
\begin{array}{ccc} 2 & -1 & 0 \\ & 2 & 0 \\ && 2\end{array}<br />
\\ \hline & \begin{array}{cc} 1 \\ & -1 \end{array}<br />
\end{array}<br />
\right)x_1<br />
\\ +<br />
\left(<br />
\begin{array}{c|c}<br />
\begin{array}{ccc} 0 \\ & 0 \\ && 0\end{array}<br />
\\ \hline & \begin{array}{cc} 3 \\ & -3 \end{array}<br />
\end{array}<br />
\right)x_2 +<br />
\left(<br />
\begin{array}{c|c}<br />
\begin{array}{ccc} 2 & 0 &-1 \\ & 2 & 0 \\ && 2\end{array}<br />
\\ \hline & \begin{array}{cc} 0 \\ & 0 \end{array}<br />
\end{array}<br />
\right)x_3 \preceq 0<br />
</math><br />
<br />
The ''LMI'' structure should then be initialized with the following commands:<br />
<br />
<pre><br />
% Constraint 1<br />
>> LMI(1,1).Q0 = [];<br />
>> LMI(1,1).Q = [2 -1 0 ; ...<br />
0 2 0 ; ...<br />
0 0 2];<br />
>> LMI(1,2).Q = [];<br />
>> LMI(1,3).Q = [2 0 -1 ; ...<br />
0 2 0 ; ...<br />
0 0 2];<br />
<br />
% Constraint 2, diagonal matrices only<br />
>> LMI(2,1).Q0 = diag( [0, 1] );<br />
>> LMI(2,1).Q = diag( [1,-1] );<br />
>> LMI(2,2).Q = diag( [3,-3] );<br />
>> LMI(2,3).Q = [ ];<br />
<br />
% Use LMI in call to sdpAssign:<br />
>> Prob=sdpAssign(c,LMI,...)<br />
<br />
% ... or set directly into Prob.PENSDP.LMI field:<br />
>> Prob.PENSDP.LMI = LMI;<br />
</pre><br />
<br />
Some points of interest:<br />
<br />
*The ''LMI'' structure must be of correct size. This is important if a LMI constraint has zero matrices for the highest numbered variables. If the above example had zero coefficient matrices for ''x''3 , the user would have to set LMI(1,3).Q = [] explicitly, so that the ''LMI ''structure array is really 2 ''× ''3. (LMI(2,3).Q would automatically become empty in this case, unless set otherwise by the user).<br />
*MATLAB sparse format is allowed and encouraged.<br />
*Only the upper triangular part of each matrix is used (symmetry is assumed).<br />
<br />
Input in Sparse SDPA Format is handled by the conversion routine ''sdpa2pen''. For example, the problem defined in ''tomlab/examples/arch0.dat-s ''can be solved using the following statements:<br />
<pre><br />
>> p = sdpa2pen('arch0.dat-s')<br />
p =<br />
vars: 174<br />
fobj: [1x174 double]<br />
constr: 174<br />
ci: [1x174 double]<br />
bi_dim: [1x174 double]<br />
bi_idx: [1x174 double]<br />
bi_val: [1x174 double]<br />
mconstr: 1<br />
ai_dim: 175<br />
ai_row: [1x2874 double]<br />
ai_col: [1x2874 double]<br />
ai_val: [1x2874 double]<br />
msizes: 161<br />
ai_idx: [175x1 double]<br />
ai_nzs: [175x1 double]<br />
x0: [1x174 double]<br />
ioptions: 0<br />
foptions: []<br />
<br />
>> Prob=sdpAssign(p); % Can call sdpAssign with only 'p' structure<br />
>> Result=tomRun('pensdp',Prob); % Call tomRun to solve problem<br />
</pre></div>Elias