JuMP: defining objective function uses matrix multiplication

JuMP doesn’t have the same features as CasADi for writing nonlinear problems with matrix-valued and vector-valued subexpressions. However, it looks like you’re in luck because your objective appears to be quadratic with respect to U. You can therefore write something like:

@objective(m, Min, 0.5 * ((U’ * (I’ * I)) * U) + transpose(-1 * (I’ * z)) * U)

(possibly with modifications to make sure the output is a scalar and not a 1x1 matrix).

2 Likes