Error: JuMP constraint vs Array constraint (same size) --> ArgumentError: Broadcasting

y Is a DenseAxisArray and lower_bound_early is a Array{Float64, 1}. They might have the same number of elements, but JuMP doesn’t know that you want a 1-to-1 mapping.

You want something like:

for (lhs, rhs) in zip(y[:, "early"], lower_bound_early)
     @constraint(model, lhs >= rhs)
end
2 Likes