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

584 APPENDIX D. API CONSTANTS D.53 Variable types variabletype.type cont Is a continuous variable. variabletype.type int Is an integer variable. D.54 XML writer output mode xmlwriteroutputtype.row Write in row order. xmlwriteroutputtype.col Write in column order.

Appendix E Troubleshooting When creating multiple tasks and running for a long time memory usage grows, and the Task and Env objects are never garbage collected. The Task and Environment objects cannot always be automatically garbage collected by Python, when when they are no longer in use. There are two ways to ensure that they are destroyed. Use the with-statement: with Task(env,0,0) as t: t.readdata("somefile.task") # use the task This will ensure that the create Task is automatically destroyed when the with-statement exits. Alternatively, call the del () method directly when the object should not be used anymore. 585

584 APPENDIX D. <strong>API</strong> CONSTANTS<br />

D.53 Variable types<br />

variabletype.type cont<br />

Is a continuous variable.<br />

variabletype.type int<br />

Is an integer variable.<br />

D.54 XML writer output mode<br />

xmlwriteroutputtype.row<br />

Write in row order.<br />

xmlwriteroutputtype.col<br />

Write in column order.

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

Saved successfully!

Ooh no, something went wrong!