qics.io.write_sdpa¶
- qics.io.write_sdpa(model, filename)[source]¶
Writes a standard form semidefinite program, i.e.,
\[ \begin{align}\begin{aligned}\min_{x \in \mathbb{R}^p} &&& c^\top x\\\text{s.t.} &&& \sum_{i=1}^p F_i x_i - F_0 \succeq 0,\end{aligned}\end{align} \]or
\[ \begin{align}\begin{aligned}\min_{X \in \mathbb{S}^n} &&& \langle F_0, X \rangle\\\text{s.t.} &&& \langle F_i, X \rangle = b_i, \quad i=1,\ldots,p\\&&& X \succeq 0,\end{aligned}\end{align} \]represented by a
Model
to a file in the SDPA sparse format*.dat-s
. If any of the matrices \(F_i\) are complex for \(i=0,\ldots,p\), then we use the complex SDPA sparse format*.dat-c
.- Parameters:
See also
write_sdpa
Read file in the SDPA sparse format.