Trying to work with JuMP and Julia with Gurobi solver I would like to minimize a vector of variable, but can't figure it out how to formulize it.
I have where m
is my model name and size_teachers
an integer:
@variable(m, days_worked_vec[1:size_teachers], Int)
which is a size_teachers
vector length, and I would like to minimize each items of this vector. I tried to define:
for teacher in 1:size_teachers
@objective(m, Min, days_worked_vec[teacher])
end
But it made the root relaxation infeasible, leading to a non optimal solution (no calculation performed).
Anyone know or have a clue on how to setup the @objective
to minimize each elements of a vector?