Skip to main content

Automated approach to improving numerical stability

Answered

Comments

1 comment

  • Alison Cozad
    • Gurobi Staff Gurobi Staff

    I am glad you were able to find our Guidelines for Numerical Issues.  This was put together because the most effective way to improve model numerics is through upfront reformulation.  Because of this, our team keeps this guideline up to date with our latest scaling and reformulation tips.

    While it is best to do upfront reformulation of your model to address numerical challenges, there are a few automated gems in Gurobi that may help QCQPs as a workaround:

    • Adjust the degree to which Gurobi attempts to detect and manage numerical issues using the NumericFocus parameter.  
    • Adjust how Gurobi does its internal scaling using the ScaleFlag parameter.  We find that for numerically challenging problems, a ScaleFlag of 2 may be effective. It sounds like this may be the most similar to the approach you are implementing.
    • Turn off presolve aggregation by setting Aggregate to 0.

    You can try each of these on their own, or see how various combinations of them work together.  Remember, these parameters are only a workaround; the most reliable fix is to reformulate the model.

    0

Please sign in to leave a comment.