Hi, I’m very new to Julia, and I am trying to construct a minimization over x for the following objective:
where B is a 2x8 matrix, μ is a 2x3 matrix, and x is an 8x3 matrix.
I have tried using the following line to define my objective:
@objective(model, Min, x' * (B' * B) * x - 2 * x' * B' * μ)
Edit (fixed objective):
@objective(model, Min, x' * B' * B * x - μ' * B * x - x' * B' * μ)
However, I keep getting the following error:
DimensionMismatch: array could not be broadcast to match destination
Edit: fixed objective, new error:
The objective function `QuadExpr[x[1,1]² + 2 x[2,1]*x[1,1] ... ]` is not supported by JuMP.
For reference, here is what I see when I print out x, B, and μ (with dummy values):
x: VariableRef[x[1,1] x[1,2] x[1,3]; x[2,1] x[2,2] x[2,3]; x[3,1] x[3,2] x[3,3]; x[4,1] x[4,2] x[4,3]; x[5,1] x[5,2] x[5,3]; x[6,1] x[6,2] x[6,3]; x[7,1] x[7,2] x[7,3]; x[8,1] x[8,2] x[8,3]]
B: [1 1 1 0 0 0 0 0; 0 0 0 1 1 1 1 1]
μ: [2.5 2.5 2.5; 1.5 1.5 1.5]