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

286 APPENDIX A. API REFERENCE asgn : int Is non-zero if the name somename is assigned to a variable. index : int If the name somename is assigned to a variable, then index is the name of the variable. somename : str The name which should be checked. Description: Checks whether the name somename has been assigned to any variable. If it has been assigned to variable, then index of the variable is reported. A.2.151 Task.getvarnamelen() len = Task.getvarnamelen(i) Obtains the length of a name of a variable variable. Arguments i : int Index. len : int Returns the length of the indicated name. Description: Obtains the length of a name of a variable variable. See also • Task.getbarvarname Obtains a name of a semidefinite variable. A.2.152 Task.getvartype() vartype = Task.getvartype(j) Gets the variable type of one variable. Arguments j : int Index of the variable.

A.2. CLASS TASK 287 vartype : variabletype Variable type of variable j. Description: Gets the variable type of one variable. A.2.153 Task.getvartypelist() Task.getvartypelist( subj, vartype) Obtains the variable type for one or more variables. Arguments subj : int[] A list of variable indexes. vartype : mosek.variabletype[] The variables types corresponding to the variables specified by subj. Description: Obtains the variable type of one or more variables. Upon return vartype[k] is the variable type of variable subj[k]. A.2.154 Task.getxc() Task.getxc( whichsol, xc) Obtains the xc vector for a solution. Arguments whichsol : soltype Selects a solution. xc : double[] The x c vector. Description: Obtains the x c vector for a solution.

286 APPENDIX A. <strong>API</strong> REFERENCE<br />

asgn : int<br />

Is non-zero if the name somename is assigned to a variable.<br />

index : int<br />

If the name somename is assigned to a variable, then index is the name of the variable.<br />

somename : str<br />

<strong>The</strong> name which should be checked.<br />

Description:<br />

Checks whether the name somename has been assigned to any variable. If it has been assigned<br />

to variable, then index of the variable is reported.<br />

A.2.151<br />

Task.getvarnamelen()<br />

len = Task.getvarnamelen(i)<br />

Obtains the length of a name of a variable variable.<br />

Arguments<br />

i : int<br />

Index.<br />

len : int<br />

Returns the length of the indicated name.<br />

Description:<br />

Obtains the length of a name of a variable variable.<br />

See also<br />

• Task.getbarvarname Obtains a name of a semidefinite variable.<br />

A.2.152<br />

Task.getvartype()<br />

vartype = Task.getvartype(j)<br />

Gets the variable type of one variable.<br />

Arguments<br />

j : int<br />

Index of the variable.

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

Saved successfully!

Ooh no, something went wrong!