Question about arrays

@variable(model,Y[1:n], lower_bound=0)
T = Float64.(model.TP)

a = Int64
b = Int64
a = 1
b = n

Y[1:n]*T[a:b] - MethodError: no method matching *(::Array{VariableRef,1}, ::Array{Float64,1})

Have you tried .*?

In julia, element-wise ops are mostly done via broadcast / dot-syntax.

4 Likes