next up previous contents
Next: Setting the options Up: The Script sql.m and Previous: The Script sql.m and

Preparing the data

  The problem is defined by the following data:

tex2html_wrap_inline4135
a structuregif with three fields:
tex2html_wrap_inline4137
a matrix with m rows and tex2html_wrap_inline4141 columns. The kth row holds the symmetric block diagonal matrix tex2html_wrap_inline4059 stored as a vector

tex2html_wrap_inline4147
a matrix with m rows and tex2html_wrap_inline4151 columns. The kth row holds the block vector tex2html_wrap_inline4155

tex2html_wrap_inline4157
a matrix with m rows and tex2html_wrap_inline4055 columns. The kth row holds the vector tex2html_wrap_inline4165
tex2html_wrap_inline4167
the vector b defining the dual objective function. Its length m is equal to the number of primal constraints

tex2html_wrap_inline4173
a structure with three fields, defining the primal objective function:

tex2html_wrap_inline4175
the block diagonal matrix tex2html_wrap_inline4057
tex2html_wrap_inline4179
the block vector tex2html_wrap_inline4063
tex2html_wrap_inline4183
the vector tex2html_wrap_inline4069

tex2html_wrap_inline4187
a structure with three fields defining the block sizes:

tex2html_wrap_inline4189
a vector whose length is the number of blocks in the block diagonal matrix tex2html_wrap_inline4039 and with entries set to the matrix block sizes tex2html_wrap_inline4193 . Note that these numbers must be all greater or equal to two, as any blocks with size one should be incorporated in the vector tex2html_wrap_inline4053

tex2html_wrap_inline4197
a vector whose length is the number of blocks in the block vector tex2html_wrap_inline4049 and with entries set to the vector block sizes tex2html_wrap_inline4051 . Note that these numbers must be all greater or equal to two, as each vector block has a special first component and at least one other component

tex2html_wrap_inline4203
the scalar tex2html_wrap_inline4055 (the length of tex2html_wrap_inline4053 )

Important: If one or more of the three parts of the SQLP is not present, the corresponding field of tex2html_wrap_inline4187 may be set to 0, or to the Matlab empty matrix [ ], or left unspecified. In any of these cases, the corresponding fields of tex2html_wrap_inline4135 and tex2html_wrap_inline4173 , if set, will be ignored.

Important: In order to be able to use the mex files, all block diagonal matrices must be stored in Matlab's sparsegif format, unless they contain only one block.

In particular, tex2html_wrap_inline4175 must be stored in sparse format, unless it has only one block. If it has only one block, it may be stored in either sparse or full format. The vectors tex2html_wrap_inline4179 , tex2html_wrap_inline4183 and tex2html_wrap_inline4167 are stored in full format. The matrices tex2html_wrap_inline4147 and tex2html_wrap_inline4157 may be stored in either sparse or full format. There are four different ways to set up the matrix tex2html_wrap_inline4137 , whose rows represent tex2html_wrap_inline4229 :

  1. Constructing tex2html_wrap_inline4137 directly using the function svec.m, which converts block diagonal matrices to vector representation. The function smat.m restores the symmetric matrix from such a vector. These routines are invoked by

    displaymath4127

    The block diagonal matrix M passed to svec.m must be stored in sparse format if it has more than one block. By default, the blocks are assumed to be dense. If the user wishes to take advantage of the sparsity in the blocks of the matrix M, then a third, optional parameter sparseblks can be passed to svec.m. When tex2html_wrap_inline4233 , svec.m treats the blocks as sparse, and returns a sparse vector.

    These routines preserve the inner product, i.e. if tex2html_wrap_inline4235 and tex2html_wrap_inline4237 for block diagonal matrices M, N, then

    displaymath4128

  2. Using the routine makeA.m, which calls svec.m, to construct tex2html_wrap_inline4137 from given predefined matrices. This is invoked by

    displaymath4129

    where blk.s is as above and Amat is a one-dimensional cell array. The kth component of the cell array Amat is the matrix tex2html_wrap_inline4059 . Cell arrays are indexed using braces tex2html_wrap_inline4247 . For example, to set tex2html_wrap_inline4249 assign a matrix value to Amat{3}; this must be in sparse format if it has more than one block. The individual blocks of the block diagonal data matrices are treated by default as being dense. If they are sparse, and the user wishes to take advantage of this sparsity, a third optional parameter spblocks may be passed to makeA.m, and this parameter should be set to the value 1. In this case the matrix tex2html_wrap_inline4135 will be stored using the sparse matrix storage option.

  3. Using the routine import.m to load all the data ( tex2html_wrap_inline4135 , tex2html_wrap_inline4167 , tex2html_wrap_inline4173 and tex2html_wrap_inline4187 ) from a plain ASCII file. This is invoked by

    displaymath4130

    The ASCII data in the file must be stored in a special compact format that is described in Appendix A. The file name must have a period and an extension (anything other than the standard Matlab extensions mat, mex etc.) following the period. The user-specified extension is important as Matlab treats file names without an extension as mat files. The routine export.m implements the reverse operation, saving a problem's data in an ASCII file, in a format recognized by import.m.

  4. Loading a mat file defining the data tex2html_wrap_inline4135 , tex2html_wrap_inline4167 , tex2html_wrap_inline4173 , tex2html_wrap_inline4187 , saved previously by Matlab's save command, using Matlab's load command. This option may be used to load all the examples (from control theory and truss topology design) benchmarked in Appendix C, for which mat files are available from the SDPpack home page.

next up previous contents
Next: Setting the options Up: The Script sql.m and Previous: The Script sql.m and

Madhu Nayakkankuppam
Wed Jun 25 18:01:54 EDT 1997