Reliable Results ?
AnsweredHello,
When I run my optimization problem I get results but I wonder to what extent the results I get are reliable, especially that I receive this warning:
Warning: Model contains large rhs
Consider reformulating model or setting NumericFocus parameter
to avoid numerical issues.
I am dealing with a MIP and it would be helpful, in order to understand more, to know which algorithms are used by gurobi to solve such problems, for example : Branch and Bound ...?
Thank you.
Regards,
Ibtissam
-
Hello Ibtissam,
with regards to the warning message you get, often the users improve upon this by re-scaling the units of measurement. For instance, if the RHS measures a large shipment weight, perhaps evaluating this quantity in kilograms is not the best idea, and by switching to tons or kilotons one would get much more "reasonable" numbers. You may want to consult our guideline to numerics here,
https://www.gurobi.com/documentation/9.0/refman/num_grb_guidelines_for_num.html
as such simple strategies may not always work, and one should generally proceed with caution.
With regards to the algorithms employed for MIP, indeed, at a high level you can think of Gurobi using a variant of branch and bound, further strengthened by adding cuts (sometimes scaled branch and cut). Several algorithmic options are available for processing the LP relaxations at the MIP tree nodes, such as primal and dual simplex, and the interior point method (a.k.a. the barrier).
For questions such as yours it would also help to see the log file you observe.
Hope this helps.
0 -
Hello Yuriy,
Thank you for your response. Indeed, the solution was to rescale the units of the variables I have. Now I don't get the warning message anymore.
Also, as far as I understand , some concurrent slovers can be used to better solve MIP by setting Method = 3 or Method = 4 . I would like to try that to compare results but I was not sure if this the right line of code to use :
model.setParam(GRB.Param.Method, 3)
Regards,
Ibtissam
0 -
These settings --changing Method-- will only affect the root relaxation, which may or may not matter (typically this is negligible for most MIPs). However, you can experiment with that, chaining the parameter either the way you have described, or
> model.params.method = 3
There is a node method counterpart parameter as well which can be used to change the default algorithm to solve MIP nodes, https://www.gurobi.com/documentation/9.0/refman/nodemethod.html
However, we rarely see these things play a large role, unless your model is really special in some sense. For a very good overview of choosing the parameters that may better fit your model, you may want to watch this,
https://www.gurobi.com/resource/parameter-setting/
Hope this helps.
0
Please sign in to leave a comment.
Comments
3 comments