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.

F.1. THE MPS FILE FORMAT 593<br />

Constraint Sign of v 1 l c i u c i<br />

type<br />

E - u c i + v 1<br />

E + l c i + v 1<br />

G - or + l c i + |v 1|<br />

L - or + u c i − |v 1|<br />

N<br />

F.1.1.9<br />

QSECTION (optional)<br />

Within the QSECTION the label [cname1] must be a constraint name previously specified in the ROWS<br />

section. <strong>The</strong> label [cname1] denotes the constraint to which the quadratic term belongs. A record in<br />

the QSECTION has the form<br />

[vname1] [vname2] [value1] [vname3] [value2]<br />

where the requirements for each field are:<br />

Field Starting Maximum Re- Description<br />

position width quired<br />

[vname1] 5 8 Yes Variable name<br />

[vname2] 15 8 Yes Variable name<br />

[value1] 25 12 Yes Numerical value<br />

[vname3] 40 8 No Variable name<br />

[value2] 50 12 No Numerical value<br />

A record specifies one or two elements in the lower triangular part of the Q i matrix where [cname1]<br />

specifies the i . Hence, if the names [vname1] and [vname2] have been assigned to the k th and j th<br />

variable, then Q i kj<br />

is assigned the value given by [value1] An optional second element is specified in<br />

the same way by the fields [vname1], [vname3], and [value2].<br />

<strong>The</strong> example<br />

minimize − x 2 + 0.5(2x 2 1 − 2x 1 x 3 + 0.2x 2 2 + 2x 2 3)<br />

subject to x 1 + x 2 + x 3 ≥ 1,<br />

x ≥ 0<br />

has the following MPS file representation<br />

* File: qo1.mps<br />

NAME<br />

qo1<br />

ROWS<br />

N obj<br />

G c1<br />

COLUMNS<br />

x1 c1 1.0<br />

x2 obj -1.0<br />

x2 c1 1.0<br />

x3 c1 1.0<br />

RHS<br />

rhs c1 1.0

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

Saved successfully!

Ooh no, something went wrong!