Hi all,
I’m trying to multiply three JuMP variables within a function but getting an error:
LoadError: Cannot multiply a quadratic expression by a variable
Here is the simplified version of code:
using JuMP, Ipopt
f(x,u) = x[1] * u[1] * x[2]
model = Model(Ipopt.Optimizer)
n = 20
@variables(model, begin
0 <= x[1:n] <= 100
0<= u[1:n] <= 1
end)
println(f(x,u))
Is there any way to do this kind of multiplication with variables?