Skip to main content

Numeric stability with SOC




  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Leonard,

    When solving quadratic problem, numerics are often key to a successful solution process.

    In your case, having a very dense SOC constraint makes the problem even more prone to numerical trouble.

    The coefficient range of your linear matrix is

    Matrix range [1e-03, 1e+05]

    It is recommended to keep this range below 6 orders of magnitude if possible, 4 is the actual way to go.

    It is possible that your problem is on the edge of infeasibility, meaning that it is feasible but only within tolerances. This would explain the IIS behavior. You could test the following to try to improve the behavior:

    • Update to the latest version 9.1.2
    • Have a look at our Guidelines for Numerical Issues and try to rescale your model
    • Experiment with the NumericFocus parameter. You stated that you already did with success. This makes sense as the parameter forces Gurobi to focus more on numerical stability.
    • Check whether you have almost parallel constraints as these may cause serious trouble in the solution process
    • Check whether your model has stable behavior without the SOC constraint, i.e., remove the SOC constraint and tighten the FeasibilityTol parameter.

    If none of the above works, you might consider sharing your model with the community as described in Posting to the Community Forum.

    Best regards,

  • Leonard Göke
    First Comment
    First Question

    Ok. Thanks.


Please sign in to leave a comment.