Skip to main content

Programmatically determining warnings, e.g. large RHS

Answered

Comments

4 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • Matthias Miltenberger
    • Gurobi Staff

    Hi Frederik,

    Apart from checking your data before or while building the model, you can also run a quick sanity check before optimizing it.

    This will print the model statistics:

    model.update()
    model.printStats()

    Please note that you must process pending model changes by calling update() before displaying the statistics.

    I hope that helps!

    Cheers,
    Matthias

    0
  • Frederik Schadd
    • Gurobi-versary
    • First Comment
    • First Question

    Hi Matthias,

    thanks for the response. This approach would print the stats to the stdout which I would then have to read back in again. Is there a more direct of doing this? Also, what are the thresholds that gurobi applies to decide whether to throw a warning? 

    0
  • Marika Karbstein
    • Gurobi Staff

     You could also check the Model Attributes, for example, MaxRHS. 
    The threshold for the warning is 1e+09 for rhs, bounds, and obj coefficients. It is 1e+08 for matrix coefficients.
    But we recommend to even have smaller values, see Recommended ranges for variables and constraints and Advanced user scaling.

    1

Post is closed for comments.