Programmatically determining warnings, e.g. large RHS
回答済みHello,
I'm currently facing a model issue that's causing the following warning:
Warning: Model contains large rhs
While I've figured out the actual model issue already, I'm wondering if there is a programmatic way of determining whether your model has this or any other similar issue prior to actually solving (i.e. large coefficients). I'd like to add a sanity check into our build process such that we can immediately detect and flag these issues whenever they pop up.
-
正式なコメント
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. -
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,
Matthias0 -
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 -
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
投稿コメントは受け付けていません。
コメント
4件のコメント