The MOSEK Python optimizer API manual Version 7.0 (Revision 141)

Optimizer API for Python - Documentation - Mosek Optimizer API for Python - Documentation - Mosek

25.11.2015 Views

208 APPENDIX A. API REFERENCE A.2.7 Task.appendconesseq() Task.appendconesseq( conetype, conepar, nummem, j) Appends multiple conic constraints to the problem. Arguments conepar : double[] This argument is currently not used. Can be set to 0.0. conetype : conetype Specifies the type of the cone. j : int Index of the first variable in the first cone to be appended. nummem : int[] Number of member variables in the cone. Description: See also Appends a number conic constraints to the problem. The kth cone is assumed to be of dimension nummem[k]. Moreover, is is asummed that the first variable of the first cone has index j and the index of the variable in each cone are sequential. Finally, it assumed in the second cone is the last index of first cone plus one and so forth. • Task.appendcone Appends a new cone constraint to the problem. • Task.appendconeseq Appends a new conic constraint to the problem. A.2.8 Task.appendcons() Task.appendcons(num) Appends a number of constraints to the optimization task. Arguments num : int Number of constraints which should be appended.

A.2. CLASS TASK 209 Description: Appends a number of constraints to the model. Appended constraints will be declared free. Please note that MOSEK will automatically expand the problem dimension to accommodate the additional constraints. See also • Task.removecons The function removes a number of constraints. A.2.9 Task.appendsparsesymmat() idx = Task.appendsparsesymmat( dim, subi, subj, valij) Appends a general sparse symmetric matrix to the vector E of symmetric matrixes. Arguments dim : int Dimension of the symmetric matrix that is appended. idx : long Each matrix that is appended to E is assigned a unique index i.e. idx that can be used for later reference. subi : int[] Row subscript in the triplets. subj : int[] Column subscripts in the triplets. valij : double[] Values of each triplet. Description: MOSEK maintains a storage of symmetric data matrixes that is used to build the ¯c and Ā. The storage can be thought of as a vector of symmetric matrixes denoted E. Hence, E i is a symmetric matrix of certain dimension. This functionsappends a general sparse symmetric matrix on triplet form to the vector E of symmetric matrixes. The vectors subi, subj, and valij contains the row subscripts, column subscripts and values of each element in the symmetric matrix to be appended. Since the matrix that is appended is symmetric then only the lower triangular part should be specified. Moreover, duplicates are not allowed. Observe the function reports the index (position) of the appended matrix in E. should be used for later references to the appended matrix. This index

A.2. CLASS TASK 209<br />

Description:<br />

Appends a number of constraints to the model. Appended constraints will be declared free.<br />

Please note that <strong>MOSEK</strong> will automatically expand the problem dimension to accommodate the<br />

additional constraints.<br />

See also<br />

• Task.removecons <strong>The</strong> function removes a number of constraints.<br />

A.2.9<br />

Task.appendsparsesymmat()<br />

idx = Task.appendsparsesymmat(<br />

dim,<br />

subi,<br />

subj,<br />

valij)<br />

Appends a general sparse symmetric matrix to the vector E of symmetric matrixes.<br />

Arguments<br />

dim : int<br />

Dimension of the symmetric matrix that is appended.<br />

idx : long<br />

Each matrix that is appended to E is assigned a unique index i.e. idx that can be used for<br />

later reference.<br />

subi : int[]<br />

Row subscript in the triplets.<br />

subj : int[]<br />

Column subscripts in the triplets.<br />

valij : double[]<br />

Values of each triplet.<br />

Description:<br />

<strong>MOSEK</strong> maintains a storage of symmetric data matrixes that is used to build the ¯c and Ā. <strong>The</strong><br />

storage can be thought of as a vector of symmetric matrixes denoted E. Hence, E i is a symmetric<br />

matrix of certain dimension.<br />

This functionsappends a general sparse symmetric matrix on triplet form to the vector E of<br />

symmetric matrixes. <strong>The</strong> vectors subi, subj, and valij contains the row subscripts, column<br />

subscripts and values of each element in the symmetric matrix to be appended. Since the matrix<br />

that is appended is symmetric then only the lower triangular part should be specified. Moreover,<br />

duplicates are not allowed.<br />

Observe the function reports the index (position) of the appended matrix in E.<br />

should be used for later references to the appended matrix.<br />

This index

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!