Removing constraints from model makes objective value (that Gurobi says is optimal) worse

25 views
Skip to first unread message

Stefan Poikonen

unread,
May 29, 2017, 8:07:24 AM5/29/17
to Gurobi Optimization
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.

Sonja Mars

unread,
May 29, 2017, 8:12:48 AM5/29/17
to gur...@googlegroups.com
Hi,

Can you post log files for both runs?

Thanks and best regards,
Sonja


----
Dr. Sonja Mars
Gurobi Optimization - Technical Support


Reply all
Reply to author
Forward
0 new messages