Is there a straightforward way to constrain a variable in Convex.jl to be block triangular (either upper or lower)? I am looking for something like YALMIP’s blkvar command. It seems rather tedious to constrain the upper/lower elements of a matrix to be zero. Thank you!
I am trying to model a matrix that looks like the following
where each of the K_ij are matrices themselves. My approach right now is to define a fucntion
function LowerBlockTriVariable(N, m, n)
K = []
X = Variable(m, n)
push!(K, X)
L = [X zeros(m, n*N)]
count = 2
for j = 2:N
X = [Variable(m, n) for k = j:j+count-1]
push!(K, X)
a = [hcat(X...) zeros(m, n*(N+1-j))]
L = [L; a]
count += 1
end
L, K
end
that inserts a matrix variable into the desired location of the whole block matrix, but I was just wondering if there was a more efficient way to do so.