Skip to content

Commit

Permalink
update README and some clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmilten committed Nov 6, 2021
1 parent 4c4b64c commit cf7f038
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@

### Visual representation of the branch-and-cut tree of SCIP using spatial dissimilarities of LP solutions -- [Interactive Example](http://www.zib.de/miltenberger/treed-showcase.html)

[![Example](res/treed-example.png)](https://plot.ly/~mattmilten/103/)
---

![Example](res/treed-example.png)

---

![Example2D](res/tree2d-example.png)

---

TreeD uses SCIP via PySCIPOpt to visualize the Branch-and-Cut tree traversed during the solution of a mixed-integer linear program (MIP or MILP). The LP solutions at each node are projected into a 2-dimensional space using a range of different transformation algorithms. Per default, multi-dimensional scaling (mds) is used. Other methods and further options can be displayed by running `python -m treed --help`. The 2-dimensional data points are visualized in a 3D space with regards to their respective LP solution value. Nodes higher up represent LP solutions with a higher value. These nodes are usually found later in the search and show the progress in increasing the lower or dual bound to close the MIP gap.

Expand Down
Binary file added res/tree2d-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/treed-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="treed",
version="1.2.1",
version="2.0.0",
author="Matthias Miltenberger",
author_email="matthias.miltenberger@gmail.com",
description="3D Visualization of Branch-and-Cut Trees using PySCIPOpt",
Expand All @@ -19,6 +19,6 @@
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
install_requires=["pyscipopt", "scikit-learn", "pandas", "plotly", "networkx"],
install_requires=["pyscipopt", "scikit-learn", "pandas", "plotly", "networkx", "numpy"],
python_requires=">=3.6"
)
9 changes: 6 additions & 3 deletions src/treed/treed.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,12 @@ def draw(self):
title="Objective value", backgroundcolor="white", gridcolor="lightgray"
)
scene = go.layout.Scene(xaxis=xaxis, yaxis=yaxis, zaxis=zaxis)
title = (
"TreeD: " + self.probname + ", " + self.scipversion if self.title else ""
)

if self.title:
title = f"TreeD: {self.probname} ({self.scipversion}, {self.status})"
else:
title = ""

filename = "TreeD_" + self.probname + ".html"

layout = go.Layout(
Expand Down

0 comments on commit cf7f038

Please sign in to comment.