Convex QCQP in CVXOPT

1.2k Views Asked by At

So I have the following simple QCQP:

$$ \underset{\mathbf{x}}{minimize} \quad \mathbf{x}^{T} Q_{0}\mathbf{x} + \mathbf{q}_{0}^{T}\mathbf{x} + c_{0} $$ $$ subject \; to \quad \mathbf{x}^{T} Q_{i}\mathbf{x} + \mathbf{q}_{i}^{T}\mathbf{x} + c_{i} \leq 0 \quad i=1,2$$

Using the epigraph trick, I can rewrite this as:

$$ \underset{\mathbf{x}, \theta}{minimize} \quad \theta $$ $$ subject \; to \quad \mathbf{x}^{T} Q_{0}\mathbf{x} + \mathbf{q}_{0}^{T}\mathbf{x} + c_{0} \leq \theta\\ \quad \quad \quad \; \quad \quad \quad \quad \quad \quad \mathbf{x}^{T} Q_{i}\mathbf{x} + \mathbf{q}_{i}^{T}\mathbf{x} + c_{i} \leq 0 \quad i=1,2$$

Since the $Q_{i}$ are all positive semi definite, I can rewrite use the Choleksy Decomposition ie: $Q_{i} = M_{i}^{T} M_{i}$. The problem then becomes:

$$ \underset{\mathbf{x}, \theta}{minimize} \quad \theta $$ $$ subject \; to \quad \begin{bmatrix} I& M_{0} \mathbf{x}&\\ \mathbf{x}^{T} M_{0}^{T}& -c_{0} -\mathbf{q}^{T}_{0}\mathbf{x} + \theta&\\ \end{bmatrix} \geq 0 \\ \quad \quad \quad \quad \quad \quad \quad \quad \begin{bmatrix} I& M_{i} \mathbf{x}&\\ \mathbf{x}^{T} M_{i}^{T}& -c_{i} -\mathbf{q}^{T}_{i}\mathbf{x}&\\ \end{bmatrix} \geq 0 \quad i=1,2 $$

Which is now an SDP. CVXOPT has a section on semidefinite programming, but I do not understand how I can formulate this problem in the format CVXOPT expects because of the $\mathbf{x}$ and $\theta$ being in the matrices.

How can I formulate the above program into something I can solve with CVXOPT in Python?