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 327<br />

Description:<br />

Replaces all quadratic entries in the constraints. Consider constraints on the form:<br />

l c k ≤ 1 2<br />

numvar−1<br />

∑<br />

i=0<br />

numvar−1<br />

∑<br />

j=0<br />

<strong>The</strong> function assigns values to q such that:<br />

numvar−1<br />

∑<br />

qijx k i x j +<br />

j=0<br />

a kj x j ≤ u c k, k = 0, . . . , m − 1.<br />

and<br />

q qcsubk[t]<br />

qcsubi[t],qcsubj[t]<br />

= qcval[t], t = 0, . . . , numqcnz − 1.<br />

See also<br />

Values not assigned are set to zero.<br />

q qcsubk[t]<br />

qcsubj[t],qcsubi[t]<br />

= qcval[t], t = 0, . . . , numqcnz − 1.<br />

Please note that duplicate entries are added together.<br />

• Task.putqconk Replaces all quadratic terms in a single constraint.<br />

• Task.putmaxnumqnz Changes the size of the preallocated storage for quadratic terms.<br />

A.2.216<br />

Task.putqconk()<br />

Task.putqconk(<br />

k,<br />

qcsubi,<br />

qcsubj,<br />

qcval)<br />

Replaces all quadratic terms in a single constraint.<br />

Arguments<br />

k : int<br />

<strong>The</strong> constraint in which the new Q elements are inserted.<br />

qcsubi : int[]<br />

Row subscripts for quadratic constraint matrix.<br />

qcsubj : int[]<br />

Column subscripts for quadratic constraint matrix.<br />

qcval : double[]<br />

Quadratic constraint coefficient values.

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

Saved successfully!

Ooh no, something went wrong!