A problem with SOCP constraint

I want to formulate a SOCP constraint like this
using Mosek and my code here

all variables are 32 × 24 matrix,but it pulls a error

and if i give the concrete row and columns ,it works

Hi and welcome!
It is hard to tell what went wrong without a Minimum Working Example (see the forum guidelines), maybe you could provide one?
If branch is a variable, the problem could come from the indexing V[Int.(real(branch[:,1])),:].
Otherwise, my best guess is that SOCP constraints don’t accept multiplications (V .* I or squares P.^2) inside the constraint, since it is their job to square stuff. But I’m not sure about this.

thanks for replying, branch is just an known parameters,i think the key problem is that how to add a series SOCP constraint,like vector representation SOCP constraint

i solved it like this

1 Like

Glad you got it working!

Just for the future, it’s super useful for reading if you can follow the suggestions here especially this one:

Screenshots are a little a hard to read and edit. Thanks.

1 Like