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

370 APPENDIX A. API REFERENCE A.5 Dispose and garbage collection The garbage collecter in Python will automatically dispose and reuse both Task and Env objects, but since these objects may allocate substantial amounts of memory or reserve MOSEK licenses outside Python, in some cases it is desireable to explicitly free up this memory when the task or environment will not be used anymore. The native memory associated with Task and Env can be free’d by calling the del () method: task. del () env. del () Notice that even if an Env is disposed before all Tasks that belongs to it were disposed, its memory will not be free’d before that last task is disposed. A.6 All functions by name Task.analyzenames Analyze the names and issue an error for the first invalid name. Task.analyzeproblem Analyze the data of a task. Task.analyzesolution Print information related to the quality of the solution. Task.appendbarvars Appends a semidefinite variable of dimension dim to the problem. Task.appendcone Appends a new cone constraint to the problem. Task.appendconeseq Appends a new conic constraint to the problem. Task.appendconesseq Appends multiple conic constraints to the problem. Task.appendcons Appends a number of constraints to the optimization task. Task.appendsparsesymmat Appends a general sparse symmetric matrix to the vector E of symmetric matrixes. Task.appendstat Appends a record the statistics file.

A.6. ALL FUNCTIONS BY NAME 371 Task.appendvars Appends a number of variables to the optimization task. Task.basiscond Computes conditioning information for the basis matrix. Task.checkconvexity Checks if a quadratic optimization problem is convex. Env.checkinlicense Check in a license feature from the license server ahead of time. Task.checkmem Checks the memory allocated by the task. Env.checkoutlicense Check out a license feature from the license server ahead of time. Task.chgbound Changes the bounds for one constraint or variable. Task.commitchanges Commits all cached problem changes. Task.deletesolution Undefines a solution and frees the memory it uses. Task.dualsensitivity Performs sensitivity analysis on objective coefficients. Env.echointro Prints an intro to message stream. Task.getacol Obtains one column of the linear constraint matrix. Task.getacolnumnz Obtains the number of non-zero elements in one column of the linear constraint matrix Task.getacolslicetrip Obtains a sequence of columns from the coefficient matrix in triplet format. Task.getaij Obtains a single coefficient in linear constraint matrix. Task.getarow Obtains one row of the linear constraint matrix.

A.6. ALL FUNCTIONS BY NAME 371<br />

Task.appendvars<br />

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

Task.basiscond<br />

Computes conditioning information for the basis matrix.<br />

Task.checkconvexity<br />

Checks if a quadratic optimization problem is convex.<br />

Env.checkinlicense<br />

Check in a license feature from the license server ahead of time.<br />

Task.checkmem<br />

Checks the memory allocated by the task.<br />

Env.checkoutlicense<br />

Check out a license feature from the license server ahead of time.<br />

Task.chgbound<br />

Changes the bounds for one constraint or variable.<br />

Task.commitchanges<br />

Commits all cached problem changes.<br />

Task.deletesolution<br />

Undefines a solution and frees the memory it uses.<br />

Task.dualsensitivity<br />

Performs sensitivity analysis on objective coefficients.<br />

Env.echointro<br />

Prints an intro to message stream.<br />

Task.getacol<br />

Obtains one column of the linear constraint matrix.<br />

Task.getacolnumnz<br />

Obtains the number of non-zero elements in one column of the linear constraint matrix<br />

Task.getacolslicetrip<br />

Obtains a sequence of columns from the coefficient matrix in triplet format.<br />

Task.getaij<br />

Obtains a single coefficient in linear constraint matrix.<br />

Task.getarow<br />

Obtains one row of the linear constraint matrix.

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

Saved successfully!

Ooh no, something went wrong!