Hello,

I am trying to solve an optimization problem with 174 quadratic constraints of the form

x_{1,2}(k)^TQx_{1,2}(k) +c^Tx_3(k) \leq 0, where Q is symmetric positive definite and the subscripts 1,2 are meant to indicate that at each time step k only variables 1 and 2 are included in this constraint. Currently I enforce these constraints by looping over all time steps.

I would like to try a semidefinite relaxation of these constraints which is defined as: \text{Tr}\ QX(k) + c^Tx_3(k) \leq 0, where the condition X(k) = x_{1,2}(k)x_{1,2}(k)^T is relaxed to an inequality and written as \begin{pmatrix}1& x_{1,2}(k)^T \\ x_{1,2}(k)& X(k) \end{pmatrix} \succeq 0 using the Schur complement.

My question is: is it possible to declare a variable X(k) for every timestep k within a loop so that the matrix inequality stated above can be enforced within a loop?