QCP Results Change for Different Versions of Gurobi
AnsweredI recently upgraded to the latest version of Gurobi and noticed some discrepancies in the results of my QCPs. For example, after maximizing the same QCP under Gurobi v9.0.3 and under Gurobi v9.1.2, I get the following objectives
Optimal objective 2.01583712e+00 # Gurobi v9.0.3
Optimal objective 2.07836490e+00 # Gurobi v9.1.2
The difference is on the order of 1e-2, which is much larger than what I expected. How large of a discrepancy in the results between different Gurobi versions should I expect to see?
Following the advice of a previous post, I increased the \(\texttt{NumericFocus}\) parameter to be the maximum value of 3. The resulting objective values are now
Optimal objective 2.01902647e+00 # Gurobi v9.0.3
Optimal objective 2.01768626e+00 # Gurobi v9.1.2
Notice that using Gurobi v9.1.2 under \(\texttt{NumericFocus = 3}\) reduced the optimal objective by ~0.06 units.
Does this suggest that the latest version of Gurobi when using the default parameters may be more susceptible to numerical issues when solving QCPs? And similar to the question above, are discrepancies as large as 1e-03 expected? Lastly, aside from increasing \(\texttt{NumericFocus}\), is there anything I can/should do to increase the accuracy of the solutions?
Any help would be greatly appreciated!
---
The mps files of the QCP that I ran using the default value of \(\texttt{NumericFocus}\) and the max value of \(\texttt{NumericFocus}\) can be found at this Dropbox link: https://www.dropbox.com/sh/15acpyc6kedyc85/AAAn1YbcKGscVQSVtUGBHI4-a?dl=0. The log files are also available at the same link.
-
The difference between the Gurobi versions is not a bug in this case. The issue boils down to the convergence criterion of interior point algorithms. The main issue with the model you provided is reaching primal feasibility for both Gurobi versions. The theory on interior-point methods only talks about relative violations, so we can't expect to always hit absolute numbers for feasibility tolerances. And Second Order Cones make that even harder. This explains the difference in objective value when setting the NumericFocus parameter, because the absolute primal feasibility is actually not fulfilled without setting the parameter. So in both versions, the final solution point is slightly infeasible making a comparison between solution values rather impracticable.
As an alternative to the NumericFocus setting, you might want to use the BarHomogeneous algorithm which is numerically more stable but a bit slower than the standard Barrier algorithm. Often using the homogeneous algorithm should still be faster than using the NumericFocus parameter.
Another alternative might be to try a different formulation of the problem where the quadratic constraint is less dense while still maintaining convexity.
If you are interested in more details on interior-point algorithms, we recommend having a look at the book by Stephen J. Wright on Primal-Dual Interior-Point Methods.
Best regards,
Jaromił0
Please sign in to leave a comment.
Comments
1 comment