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

272 APPENDIX A. API REFERENCE y: See also Corresponds to variable y. slc: Corresponds to variable s c l . suc: Corresponds to variable s c u. slx: Corresponds to variable s x l . sux: Corresponds to variable s x u. xc: Corresponds to Ax. The meaning of the values returned by this function depend on the solution status returned in the argument solsta. The most important possible values of solsta are: solsta.optimal An optimal solution satisfying the optimality criteria for continuous problems is returned. solsta.integer optimal An optimal solution satisfying the optimality criteria for integer problems is returned. solsta.prim feas A solution satisfying the feasibility criteria. solsta.prim infeas cer A primal certificate of infeasibility is returned. solsta.dual infeas cer A dual certificate of infeasibility is returned. • Task.getsolutioni Obtains the solution for a single constraint or variable. • Task.getsolutionslice Obtains a slice of the solution. A.2.131 Task.getsolutioni() sk,x,sl,su,sn = Task.getsolutioni( accmode, i, whichsol) Obtains the solution for a single constraint or variable.

A.2. CLASS TASK 273 Arguments accmode : accmode If set to accmode.con the solution information for a constraint is retrieved. Otherwise for a variable. i : int Index of the constraint or variable. sk : stakey Status key of the constraint of variable. sl : double Solution value of the dual variable associated with the lower bound. sn : double Solution value of the dual variable associated with the cone constraint. su : double Solution value of the dual variable associated with the upper bound. whichsol : soltype Selects a solution. x : double Solution value of the primal variable. Description: See also Obtains the primal and dual solution information for a single constraint or variable. • Task.getsolution Obtains the complete solution. • Task.getsolutionslice Obtains a slice of the solution. A.2.132 Task.getsolutioninf() prosta,solsta,primalobj,maxpbi,maxpcni,maxpeqi,maxinti,dualobj,maxdbi,maxdcni,maxdeqi = Task.getsolutioninf(whichsol) Deprecated Arguments dualobj : double Value of the dual objective. (l c ) T s c l − (u c ) T s c u + c f

A.2. CLASS TASK 273<br />

Arguments<br />

accmode : accmode<br />

If set to accmode.con the solution information for a constraint is retrieved. Otherwise for<br />

a variable.<br />

i : int<br />

Index of the constraint or variable.<br />

sk : stakey<br />

Status key of the constraint of variable.<br />

sl : double<br />

Solution value of the dual variable associated with the lower bound.<br />

sn : double<br />

Solution value of the dual variable associated with the cone constraint.<br />

su : double<br />

Solution value of the dual variable associated with the upper bound.<br />

whichsol : soltype<br />

Selects a solution.<br />

x : double<br />

Solution value of the primal variable.<br />

Description:<br />

See also<br />

Obtains the primal and dual solution information for a single constraint or variable.<br />

• Task.getsolution Obtains the complete solution.<br />

• Task.getsolutionslice Obtains a slice of the solution.<br />

A.2.132<br />

Task.getsolutioninf()<br />

prosta,solsta,primalobj,maxpbi,maxpcni,maxpeqi,maxinti,dualobj,maxdbi,maxdcni,maxdeqi = Task.getsolutioninf(whichsol)<br />

Deprecated<br />

Arguments<br />

dualobj : double<br />

Value of the dual objective.<br />

(l c ) T s c l − (u c ) T s c u + c f

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

Saved successfully!

Ooh no, something went wrong!