• Gurobi Staff

Hi,

thank you for bringing this to our attention. I was able to reproduce this problem with the following code snippet:

import gurobipy as gpmodel = gp.Model()x = model.addMVar(5)y = model.addVar()# This worksmodel.setObjectiveN(y,0)model.setObjectiveN(y,1)# This does not workmodel.setObjectiveN(x[0],0)model.setObjectiveN(y,1)# This does not workmodel.setObjectiveN(y,0)model.setObjectiveN(x[0],1