Dear All,
I am trying to create an array of symmetric matrix variables in JuMP
, i.e., an array of matrix variables X_i\in\mathbf{S}^n for i\in\{1,2,\ldots,N\}. If I had only one symmetric matrix variable X\in\mathbf{S}^n, I could create it in JuMP
using
method 1: @variable(model, X[1:n, 1:n], Symmetric)
and if I had regular matrix variables X_i\in\mathbf{R}^{n \times n} for i\in\{1,2,\ldots,N\}, then I could do:
method 2: @variable(model, X[1:n, 1:n, 1:N])
.
Is there any command where I can enforce symmetry on each X[:,:,i]
in method 2, or any way to extend method 1 to an array of matrices? I could individually impose the symmetry constraint X_i[j,k]=X_i[k,j] for matrix indices j,k for every X_i, but I am wondering if there is any other way.
I will very much appreciate any tips/suggestion!