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

354 APPENDIX A. API REFERENCE Arguments subset : int[] Indexes of cones which should be removed. Description: Removes a number conic constraint from the problem. In general, it is much more efficient to remove a cone with a high index than a low index. A.2.261 Task.removecons() Task.removecons(subset) The function removes a number of constraints. Arguments subset : int[] Indexes of constraints which should be removed. Description: See also The function removes a subset of the constraints from the optimization task. This implies that the existing constraints are renumbered, for instance if constraint 5 is removed then constraint 6 becomes constraint 5 and so forth. • Task.appendcons Appends a number of constraints to the optimization task. A.2.262 Task.removevars() Task.removevars(subset) The function removes a number of variables. Arguments subset : int[] Indexes of variables which should be removed. Description: The function removes a subset of the variables from the optimization task. This implies that the existing variables are renumbered, for instance if constraint 5 is removed then constraint 6 becomes constraint 5 and so forth.

A.2. CLASS TASK 355 See also • Task.appendvars Appends a number of variables to the optimization task. A.2.263 Task.resizetask() Task.resizetask( maxnumcon, maxnumvar, maxnumcone, maxnumanz, maxnumqnz) Resizes an optimization task. Arguments maxnumanz : long New maximum number of non-zeros in A. maxnumcon : int New maximum number of constraints. maxnumcone : int New maximum number of cones. maxnumqnz : long New maximum number of non-zeros in all Q matrixes. maxnumvar : int New maximum number of variables. Description: See also Sets the amount of preallocated space assigned for each type of data in an optimization task. It is never mandatory to call this function, since its only function is to give a hint of the amount of data to preallocate for efficiency reasons. Please note that the procedure is destructive in the sense that all existing data stored in the task is destroyed. • Task.putmaxnumvar Sets the number of preallocated variables in the optimization task. • Task.putmaxnumcon Sets the number of preallocated constraints in the optimization task. • Task.putmaxnumcone Sets the number of preallocated conic constraints in the optimization task. • Task.putmaxnumanz The function changes the size of the preallocated storage for linear coefficients. • Task.putmaxnumqnz Changes the size of the preallocated storage for quadratic terms.

A.2. CLASS TASK 355<br />

See also<br />

• Task.appendvars Appends a number of variables to the optimization task.<br />

A.2.263<br />

Task.resizetask()<br />

Task.resizetask(<br />

maxnumcon,<br />

maxnumvar,<br />

maxnumcone,<br />

maxnumanz,<br />

maxnumqnz)<br />

Resizes an optimization task.<br />

Arguments<br />

maxnumanz : long<br />

New maximum number of non-zeros in A.<br />

maxnumcon : int<br />

New maximum number of constraints.<br />

maxnumcone : int<br />

New maximum number of cones.<br />

maxnumqnz : long<br />

New maximum number of non-zeros in all Q matrixes.<br />

maxnumvar : int<br />

New maximum number of variables.<br />

Description:<br />

See also<br />

Sets the amount of preallocated space assigned for each type of data in an optimization task.<br />

It is never mandatory to call this function, since its only function is to give a hint of the amount<br />

of data to preallocate for efficiency reasons.<br />

Please note that the procedure is destructive in the sense that all existing data stored in the<br />

task is destroyed.<br />

• Task.putmaxnumvar Sets the number of preallocated variables in the optimization task.<br />

• Task.putmaxnumcon Sets the number of preallocated constraints in the optimization task.<br />

• Task.putmaxnumcone Sets the number of preallocated conic constraints in the optimization<br />

task.<br />

• Task.putmaxnumanz <strong>The</strong> function changes the size of the preallocated storage for linear<br />

coefficients.<br />

• Task.putmaxnumqnz Changes the size of the preallocated storage for quadratic terms.

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

Saved successfully!

Ooh no, something went wrong!