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.

A.2. CLASS TASK 329<br />

qosubj : int[]<br />

Column subscripts for quadratic objective coefficients.<br />

qoval : double[]<br />

Quadratic objective coefficient values.<br />

Description:<br />

Replaces all the quadratic terms in the objective<br />

1<br />

2<br />

numvar−1<br />

∑<br />

i=0<br />

numvar−1<br />

∑<br />

j=0<br />

numvar−1<br />

∑<br />

qijx o i x j +<br />

j=0<br />

c j x j + c f .<br />

It is assumed that Q o is symmetric, i.e. qij o = qo ji , and therefore, only the values of qo ij<br />

i ≥ j should be specified. To be precise, <strong>MOSEK</strong> uses the following procedure<br />

for which<br />

Please note that:<br />

1. Q o = 0<br />

2. for t = 0 to numqonz − 1<br />

3. qqosubi[t],qosubj[t] o = qo qosubi[t],qosubj[t] + qoval[t]<br />

3. qqosubj[t],qosubi[t] o = qo qosubj[t],qosubi[t] + qoval[t]<br />

• Only the lower triangular part should be specified because Q o is symmetric.<br />

values for qij o where i < j will result in an error.<br />

• Only non-zero elements should be specified.<br />

• <strong>The</strong> order in which the non-zero elements are specified is insignificant.<br />

• Duplicate entries are added to together.<br />

Specifying<br />

For a code example see Section 5.5.1.<br />

A.2.218<br />

Task.putqobjij()<br />

Task.putqobjij(<br />

i,<br />

j,<br />

qoij)<br />

Replaces one coefficient in the quadratic term in the objective.<br />

Arguments<br />

i : int<br />

Row index for the coefficient to be replaced.<br />

j : int<br />

Column index for the coefficient to be replaced.

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

Saved successfully!

Ooh no, something went wrong!