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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5.2. LINEAR OPTIMIZATION 25<br />

and the bounds<br />

lj x ≤ x j ≤ u x j , j = 0, . . . , n − 1, (5.3)<br />

where we have used the problem elements:<br />

m and n<br />

which are the number of constraints and variables respectively,<br />

x<br />

c<br />

which is the variable vector of length n,<br />

which is a coefficient vector of size n<br />

⎡<br />

c = ⎣<br />

c 0<br />

c n−1<br />

⎤<br />

⎦ ,<br />

c f<br />

A<br />

which is a constant,<br />

which is a m×n matrix of coefficients is given by<br />

l c and u c<br />

⎡<br />

A = ⎣<br />

a 0,0 · · · a 0,(n−1)<br />

⎤<br />

· · ·<br />

⎦ ,<br />

which specify the lower and upper bounds on constraints respectively, and<br />

l x and u x<br />

which specifies the lower and upper bounds on variables respectively.<br />

Please note the unconventional notation using 0 as the first index rather than 1. Hence, x 0 is the first<br />

element in variable vector x. This convention has been adapted from <strong>Python</strong> arrays which are indexed<br />

from 0.<br />

5.2.1 Example: Linear optimization<br />

<strong>The</strong> following is an example of a linear optimization problem:

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

Saved successfully!

Ooh no, something went wrong!