25.11.2015 Views

The MOSEK Python optimizer API manual Version 7.0 (Revision 141)

Optimizer API for Python - Documentation - Mosek

Optimizer API for Python - Documentation - Mosek

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

transp :<br />

val :<br />

int<br />

If this argument is non-zero, then (A.3) is solved. Otherwise the system (A.2) is solved.<br />

double[]<br />

As input it is the vector b. Although the positions of the non-zero elements are specified in<br />

sub it is required that val[i] = 0 if b[i] = 0. As output val is the vector ¯X.<br />

Please note that val is a dense vector — not a packed sparse vector. This implies that val<br />

has room for numcon elements.<br />

Description:<br />

If a basic solution is available, then exactly numcon basis variables are defined. <strong>The</strong>se numcon<br />

basis variables are denoted the basis. Associated with the basis is a basis matrix denoted B.<br />

This function solves either the linear equation system<br />

B ¯X = b<br />

(A.2)<br />

or the system<br />

B T ¯X = b<br />

(A.3)<br />

for the unknowns ¯X, with b being a user-defined vector.<br />

In order to make sense of the solution ¯X it is important to know the ordering of the variables in the<br />

basis because the ordering specifies how B is constructed. When calling Task.initbasissolve<br />

an ordering of the basis variables is obtained, whicd can be used to deduce how <strong>MOSEK</strong> has<br />

constructed B. Indeed if the kth basis variable is variable x j it implies that<br />

B i,k = A i,j , i = 0, . . . , numcon − 1.<br />

Otherwise if the kth basis variable is variable x c j<br />

it implies that‘<br />

See also<br />

B i,k =<br />

{ − 1, i = j,<br />

0, i ≠ j.<br />

Given the knowledge of how B is constructed it is possible to interpret the solution ¯X correctly.<br />

Please note that this function exploits the sparsity in the vector b to speed up the computations.<br />

• Task.initbasissolve Prepare a task for basis solver.<br />

• iparam.basis solve use plus one Controls the sign of the columns in the basis matrix<br />

corresponding to slack variables.

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

Saved successfully!

Ooh no, something went wrong!