Skip to main content

Reliable Results ?




  • Yuriy Zinchenko
    Gurobi Staff Gurobi Staff

    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,

    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.


  • ibtissam labriji

    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)




  • Yuriy Zinchenko
    Gurobi Staff Gurobi Staff

    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,


    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,


    Hope this helps.


Please sign in to leave a comment.