What does Gurobi do for different values of the NumericFocus parameter?
AnsweredTL;DR
I need to understand what exactly Gurobi does for the different values of NumericFocus. I would be very grateful for any explanations or pointers to relevant documentation!
I hope that understanding better, what setting NumericFocus=2 and NumericFocus=3 does, will gain me some understanding of what exactly is causing the numerical issue I am facing, since I am currently still in the Dark on where the issues lies.
/TL;DR
The reason is the following:
I am debugging a program, that exhibits numerical issues (more details here: https://support.gurobi.com/hc/en-us/community/posts/360055747932-Constraint-violation-after-changing-cost-values-in-an-existing-code-base?page=1#community_comment_360008875352)
I have now found that setting NumericFocus=3 (along with some other parameters) solves the issues, but makes solving extremely slow. Furthermore, relaxing the parameter to NumericFocus=2 still exhibits the numerical issue, but does increase performance.
In the Gurobi Guidelines for Numerical Issues (http://www.gurobi.cn/download/GuNum.pdf) I found the following statement:
"However, when NumericFocus helps numerics but makes everything much slower, you can try setting Quad=1 and/or larger values of MarkowitzTol such as 0.1 or 0.5."
Following this I set Quad=1 and MarkowitzTol=0.5, which again still exhibits the numerical issues, but also increases performance.
Hence, setting NumericFocus=3 does something that solves the issue, but I do not know what it does! Hence my question ...
Thanks and best regards,
Michael
-
Hi Michael,
In general, we can say that the higher you set NumericFocus the more careful Gurobi tries to be with numerics in the simplex algorithms, presolve, barrier and crossover. We cannot give you all the details, but here are some of the things that the NumericFocus parameter does: It tightens tolerances such as the Markowitz tolerance, bounds on redundant constraint detection or the step length for barrier. It also makes Gurobi use less aggressive cuts. The higher the setting, the tighter the tolerances. With NumericFocus=3, it also switches to quad precision (Quad=1).
Best regards,
Silke0
Please sign in to leave a comment.
Comments
1 comment