How do you create an array of (variable)matrices A1,..,AN of semi definite matrices in Julia Jump where N is a parameter? @variable(model,x[1:N]) won't work because this is an array of variables, not of matrix variables.
Thanks in advance.
It's best to use the anonymous variable syntax here.
@variable(m, [1:N,1:N], SDP)
returns one matrix N x N of variables which is symmetric and PSD constrained. If you want a collection of K of them, just make one:
A = [@variable(m, [1:N, 1:N], SDP) for k in 1:K]
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more