Here we describe a number of support routines which are available. These routines are in the subdirectory support except where noted. More information is available by typing help routine_name from within Matlab.
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 the data was successfully exported, export.m returns 0, otherwise 1. The file name fname must have a period and an extension (other than the standard Matlab extensions mat, mex etc.) following the period (see Section 3.1). The calling sequence for import.m is
where fname is the name of a file (string) containing an SQLP in one of the two formats described in Appendix A.
where M is a block diagonal matrix (not a structure), blk is a vector of block sizes, and sortflag is an optional input argument. The vector of eigenvalues, lam, is sorted blockwise in ascending or descending order depending on whether sortflag is 1 or -1. The matrix of eigenvectors, Q, has its columns permuted accordingly. The output parameter indef is set to 1 if the input matrix is not positive definite and 0 otherwise. For example, eigenvalue complementarity may be checked by typing
where the structures and contain computed solutions of an SQLP. The routine blkeig.m is in the sdppack directory since it is used by the main routines.
where x and z are block vectors with block sizes given by the vector blk, and the output vectors x0 and z0 have entries consisting of the first entries of each block of x and z respectively.
where x is the block vector, blk is the vector of block sizes, v is the vector on the right-hand side of (8) and dist is the minimum entry in v (possibly negative or zero, if x is outside the quadratic cone or on its boundary. Using this routine together with qcfirst.m, one can conveniently check strict complementarity for the quadratic part of an SQLP, explicitly displaying the pairs of vectors in (7) and (8) by
[x0,z0] = qcfirst(X.q,Z.q,blk.q); [distx,vx] = qcpos(X.q,blk.q); [distz,vz] = qcpos(Z.q,blk.q); [ x0 vz ] % check one complementary pair (x=0, z on boundary) [ z0 vx ] % check other complementary pair (z=0, x on boundary)This routine is in the sdppack directory since it is used by the main routines.
This routine is called only by sqlcond.m.
This routine is called only by sqlcond.m.
where tol is a tolerance (e.g. ) used to determine the rank of .
where blk.s is as above and Amat is a cell array storing the block diagonal matrices (see Section 3.1).
The package also provides routines to create a variety of randomly generated test problems. There is also a routine to create SQLP's with solutions having prescribed properties. These routines are discussed below.
and the ``primal" is
where the vectors and are of length d and the vector y is of length M (so the matrices have size M by d). The routine converts this to a quadratically constrained linear program expressed in SQLP format, so it can then be solved by sql.m. This provides an interesting class of problems, since the blocks in the resulting block vector must always be on the cone boundary at the solution, i.e. with the right-hand component of (7) always zero. See the comments in the code for further details. This routine is in the special subdirectory.
In addition, scripts sql2sdp and sdp2sql convert SDP's in SQLP format to the SDP format required by SDPpack Version 0.8 and vice versa, and sql2qc and qc2sql likewise convert QCLP's from SQLP format to a QCLP-only format and vice versa.