-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af42b61
commit b0662df
Showing
3 changed files
with
47 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env python | ||
|
||
from treed import TreeD | ||
import argparse | ||
|
||
desc = """Draw a visual representation of the branch-and-cut tree of SCIP for | ||
a particular instance using spatial dissimilarities of the node LP solutions. | ||
""" | ||
|
||
parser = argparse.ArgumentParser(description=desc) | ||
|
||
parser.add_argument("model", type=str, help="path to model") | ||
parser.add_argument( | ||
"--transformation", | ||
"-t", | ||
type=str, | ||
default="mds", | ||
help="2D transformation algorithm for node LP solutions ('mds' or 'tsne')", | ||
) | ||
parser.add_argument( | ||
"--hidecuts", | ||
action="store_true", | ||
help="hide cutting rounds and only show final node LP solutions", | ||
) | ||
|
||
parser.add_argument( | ||
"--nodelimit", type=int, default=500, help="node limit for solving the model" | ||
) | ||
|
||
args = parser.parse_args() | ||
|
||
treed = TreeD( | ||
probpath=args.model, | ||
transformation=args.transformation, | ||
showcuts=~args.hidecuts, | ||
nodelimit=args.nodelimit, | ||
) | ||
|
||
treed.main() | ||
treed.draw() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
setup( | ||
name="treed", | ||
version="0.0.1", | ||
version="0.0.2", | ||
author="Matthias Miltenberger", | ||
author_email="[email protected]", | ||
description="3D Visualization of Branch-and-Cut Trees using PySCIPOpt", | ||
|
@@ -21,4 +21,5 @@ | |
], | ||
install_requires=["pyscipopt", "scikit-learn", "pandas", "plotly", "networkx"], | ||
python_requires=">=3.6", | ||
scripts=['bin/treed'], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters