SDPpack's interface to ASCII data is provided via the two routines export.m and import.m. The calling sequence for export.m is
where fname is the name of the file (string) to
which the data must be exported. The data will be stored in one of the
formats described in Appendix A. If is sparse, then the
format in Table 3 is used, otherwise that in
Table 2 is used. If the data was successfully
exported, export.m returns 0, otherwise 1. The calling
sequence for import.m is
where fname is the name of a file (string) containing an SDP in one of the two formats described in Appendix A.
The three routines plotgap.m, plotfeas.m and plotobj.m plot the gap, the primal and dual infeasibilities, and the primal and dual objectives respectively, as a function of the iteration count. Several other miscellaneous features are available via the auxiliary routines described below. More information is available by typing help routine_name from within Matlab.
lam = blkeig(X,blk)
For example, (strict) complementarity is easily checked by typing
where and
are the computed solutions of an SDP.
(The sorting operation does not preserve the block structure.)
[cndprimal,D] = primalcond(A,blk,X,eigtol)
where eigtol is a tolerance used in computing the
rank of . A large value of cndprimal is a strong
indication that the problem is primal degenerate [4] (type
help primalcond for the definition).
[cnddual, B] = dualcond(A,blk,Z,eigtol)
where eigtol is a tolerance used in computing the
rank of . A large value of cnddual is a strong
indication that the problem is dual degenerate [4] (type
help dualcond for the definition).
If (
) passed to primalcond.m (dualcond.m)
is the solution of an SDP solved with the default parameter values in
setpars.m, and if
, then a value
exceeding, say
, for cndprimal (cnddual)
is indicative of primal (dual) degeneracy. Primal (dual) degeneracy
implies the nonuniqueness of dual (primal) solutions. The converse is
true if strict complementarity holds [4].
[cndjac,dgap,pinfeas,dinfeas,blockmat] = sdpcond(A,b,C,blk,X,y,Z)
A large value of cndjac is a strong indication of degeneracy (primal, dual or both), or that the solution violates strict complementarity. This routine takes a long time to execute compared to primalcond.m and dualcond.m, but the advantage over primalcond.m and dualcond.m is that no tolerance is required.
To use these routines to examine the degeneracy or conditioning
properties of a Lovász function problem or of a diagonally
constrainted SDP, the user must ensure that the data
,
and
have been constructed. This can easily be done by calling the
appropriate script (lsdp.m or dsdp.m) with
and
. Upon termination of the script, these variables
will be defined in the Matlab workspace.
K = skron(M,N,blk)
This routine is called only by sdpcond.m.
[Anew,bnew,flag] = preproc(A,b,rkthresh)
where rkthresh is a small threshold
(e.g. ) used to determine the rank of
.
In addition to these routines, the convert subdirectory contains scripts that will convert SDP data to a format recognized by some other popular codes. In particular, there are scripts to_sp, to_lmitlbx and to_sdpa which convert SDP data in the Matlab workspace to formats recognized by SP [6], Matlab's LMI Toolbox, and SDPA [7] respectively. Typing help routine_name within Matlab provides some more information on the correspondence between SDPpack variables and those used by the other codes. This is merely to encourage users to try other codes on the benchmark problems in Appendix C (available from the SDPpack web page). These routines may not be supported in future releases.