Model analysis tools; v1.0 is an ill conditioning explainer.
Project description
Gurobi Model Analyzer
Gurobi Model Analyzer is an open-source python package that provides detailed analysis of model solutions and model characteristics. Version 1.0 consists of a results_analyzer module that calculates explanations of ill-conditioned basis matrices.
Note: At the moment this repository is public, but final docs configuration and packages is not yet finished. We recommend that you hold off on using it until version 1.0 is announced as available.
Documentation
The latest user manual is available on readthedocs.
Contact us
For questions related to using Gurobi Model Analyzer, please use Gurobi's Forum.
For reporting bugs, issues, and feature requests please open an issue.
If you encounter issues with Gurobi or gurobipy please contact Gurobi Support.
Installation
Dependencies
- Python >= 3.9
numpy
>= 1.21.5 (although earlier versions compatible with python 3.7 will probably work).
Pip installation
The easiest way to install gurobi-modelanalyzer is using pip in a virtual environment:
(.venv) pip install gurobi-modelanalyzer
This will also install the numpy and gurobipy dependencies. One of the advanced functions makes use of matplotlib; if you haven't already installed that and plan to use this function (matrix_bitmap), you can either install the matplotlib package directly, or install it with the gurobi-modelanalyzer package via "pip install gurobi-modelanalyzer matplotlib".
Please note that gurobipy is commercial software and requires a license. When installed via pip or conda, gurobipy ships with a free license for testing and can only solve models of limited size.
Then use the explainer functions. Example usage
import gurobipy as gp
import gurobi_modelanalyzer as gma
model=gp.read("myillconditionedmodel.mps")
model.optimize()
gma.kappa_explain(model)
# row-based explanation (default)
gma.kappa_explain(model, expltype="ROWS")
# column-based explanation
gma.kappa_explain(model, expltype="COLS")
# angle-based explanation (only looks for pairs of rows or columns
# that cause ill-conditioning.
gma.angle_explain(model)
Use help(gma.kappa_explain)
or help(gma.angle_explain)
for information
on more advanced usage.
Getting a Gurobi License
Alternatively to the bundled limited license, there are licenses that can handle models of all sizes.
As a student or staff member of an academic institution you qualify for a free, full product license. For more information, see:
For a commercial evaluation, you can request an evaluation license.
Other useful resources to get started:
Development
We value any level of experience in using Gurobi Model Analyzer and would like to encourage you to contribute directly to this project. Please see the Contributing Guide for more information.
Source code
You can clone the latest sources with the command:
git clone git@github.com:Gurobi/gurobi-modelanalyzer.git
Testing
Submitting a Pull Request
Before opening a Pull Request, have a look at the full Contributing page to make sure your code complies with our guidelines.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for gurobi_modelanalyzer-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e14e930efd7b21b2e1d5bbeb9044f2602ec639836e3583527a01380fbb949ab0 |
|
MD5 | 01981f1d2e12f5aad56a82d131802be6 |
|
BLAKE2b-256 | 814e7b366194b01712466f8b0db67a3bce47e6f9248915631e767fdc6eaf987a |
Hashes for gurobi_modelanalyzer-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 778fa5f4b91d3b9740f4c29a2b09a4e3a9434388b40017f13a461b3f16bd7716 |
|
MD5 | c36718de5caa978c27730a7b471e7a43 |
|
BLAKE2b-256 | aba21d5920a0708b1ddd900eaa3a7c034c64df1c6ccf40ccadff679b09dc79ec |