Hi all,
I have a minimization question, so I set:
my_model.setAttr(grb.GRB.Attr.ModelSense,1)
My problem inputs are completely set; there is nothing stochastic.
When I leave the following set of constraints in the model, I get an objective value of 112.
my_model.addGenConstrMin(EarlierDeparture[k], [D1[k],D2[k]])
my_model.addGenConstrMax(LaterDeparture[k], [D1[k],D2[k]])
my_model.addConstr(TD[k],grb.GRB.GREATER_EQUAL,EarlierDeparture[k])
my_model.addConstr(TD[k],grb.GRB.LESS_EQUAL,LaterDeparture[k])
Gurobi says the above are optimal.
When I comment out the constraints (as below), I get an objective value of 144, which Gurobi says is optimal.
# my_model.addGenConstrMin(EarlierDeparture[k], [D1[k],D2[k]])
# my_model.addGenConstrMax(LaterDeparture[k], [D1[k],D2[k]])
# my_model.addConstr(TD[k],grb.GRB.GREATER_EQUAL,EarlierDeparture[k])
# my_model.addConstr(TD[k],grb.GRB.LESS_EQUAL,LaterDeparture[k])
I change absolutely nothing else.
This seems to violate the basic idea that the minimum value on some set S should always be less than or equal to the minimum value on any subset of S.
Any ideas?
Much thanks in advance.