Skip to main content

Gurobi log file tools for parsing and data exploration

Project description

GRBlogtools

PyPI

Extract information from Gurobi log files and generate pandas DataFrames or Excel worksheets for further processing. Also includes a wrapper for out-of-the-box interactive visualizations using the plotting library Plotly.

performance plot

Installation

pip install grblogtools

See CHANGELOG for added, removed or fixed functionality.

Usage

First, you need a set of Gurobi log files to compare, e.g.,

  • results from several model instances
  • comparisons of different parameter settings
  • performance variability experiments involving multiple random seed runs
  • ...

Pandas/Plotly

  1. parse log files:

    import grblogtools as glt
    
    summary, timelines, rootlp = glt.get_dataframe(["run1/*.log", "run2/*.log"], timelines=True)
    

    Depending on your requirements, you may need to filter or modify the resulting DataFrames.

  2. draw interactive charts, preferably in a Jupyter Notebook:

    • final results from the individual runs:
    glt.plot(summary, type="box")
    
    • progress charts for the individual runs:
    glt.plot(timelines, y="Gap", color="Log", type="line")
    

    These are just examples using the Plotly Python library - of course, any other plotting library of your choice can be used to work with these DataFrames.

Excel

Convert your log files to Excel worksheets right on the command-line:

python -m grblogtools myrun.xlsx data/*.log

List all available options and how to use the command-line tool:

python -m grblogtools --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grblogtools-0.3.2.tar.gz (16.3 kB view hashes)

Uploaded Source

Built Distribution

grblogtools-0.3.2-py3-none-any.whl (15.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page