Different behavior of MIPNODE_OBJBND depending on LazyConstraints param
回答済みSolving the same model (with the same fingerprint) with LazyConstraint = 0 (the default) I get the optimal solution in 36 seconds, while using LazyConstraint = 1 (but not actually loading any lazy constraint in my callback) the solver is still running after 100 seconds with a 6.70% gap.
All coefficients in my model are integer. I noticed that when LazyConstraint = 1 the MIPNODE_OBJBND is a fractional value that slowly grows, whereas with LazyConstraint = 0 the solver is able to infer that the refined bound must be the next integer (as I expect).
In my Java callback I added a line to print its value each time it increases (it's a minimization problem):
System.out.println("[CB_MIPNODE] GRB.CB_MIPNODE_OBJBND: " + getDoubleInfo(GRB.CB_MIPNODE_OBJBND));Is this the expected behavior?
I guess that the slow growth of this value when LazyConstraint = 1 could be the reason why solving with LazyConstraint = 1 is much slower (many nodes may not be closed as soon as the actually could if the objective bound were set the the next integer value).
In this public Goggle Drive folder you can find:
- objbnd_nolazy.log: logs when running with LazyConstraint = 0
- objbnd_lazy.log: logs when running with LazyConstraint = 1
- objbnd.mps: the model file
- objbnd.mst: the initial MIP solution provided to the solver (but the issue exists even when it is not loaded)
Note: I noticed this while backtracking why adding lazy constraints in my callback was slowing the model so much (I did not set LazyConstraint = 1 just for fun), but - again - at the moment I am not loading any lazy constraint for a “fair” comparison (I know that to allow lazy constraints Gurobi deactivates some “transformations”).
-
Hi Lorenzo,
Your logs also show the use of a MIP start.User MIP start produced solution with objective 68 (0.00s) Loaded user MIP start with objective 68Please provide the MIP start (.mst) or a solution (.sol) file to help reproduce this.
Thanks,
-Ahmed0 -
Done, added to the original post.
0 -
I have only looked at this superficially, I'll leave it to Ahmed to pursue, but nothing reported here seems unusual to me.
Setting LazyConstraints=1 turns off dual reductions. These presolve reductions are quite powerful so turning them off reduces the effectiveness of the solver. Since they are the only part of presolve to consider the objective function, they will be what makes it possible to “infer that the refined bound must be the next integer”.
0 -
As Riley said, the dual reductions are turned off when LazyConstraints is set to 1. A further investigation of your model revealed no unexpected behaviors.
0
サインインしてコメントを残してください。
コメント
4件のコメント