3D Visualization of Branch-and-Cut Trees using PySCIPOpt
Project description
TreeD
Visual representation of the branch-and-cut tree of SCIP using spatial dissimilarities of LP solutions -- Interactive Example
Installation
python -m pip install treed
Usage
- run Python script
bin/treed
(will be installed into your PATH on Linux/macOS when usingpip install treed
) to get usage information or use this code snippet in a Jupyter notebook:
from treed import TreeD
treed = TreeD(
probpath="model.mps",
nodelimit=20,
transformation='mds',
showcuts=True
)
treed.solve()
fig = treed.draw()
fig.show(renderer='notebook')
Dependencies
- PySCIPOpt to solve the instance and generate the necessary tree data
- Plotly to draw the 3D visualization
- pandas to organize the collected data
- sklearn for multi-dimensional scaling
- pysal to compute statistics based on spatial (dis)similarity; this is optional
Export to Amira
- run
AmiraTreeD.py
to get usage information.
AmiraTreeD.py
generates the '.am' data files to be loaded by Amira software to draw the tree using LineRaycast.
Settings
DataTree.am
: SpatialGraph data file with tree nodes and edges.LineRaycast
: Module to display the SpatialGraph. Note that is needed to set the colormap according to py code output (For instance 'Color map from 1 to 70' in this picture).DataOpt.am
: SpatialGraph data file with optimun value.Opt Plane
: Display the optimal value as a plane.
Preview
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
treed-1.0.0.tar.gz
(8.5 kB
view hashes)
Built Distribution
treed-1.0.0-py3-none-any.whl
(8.9 kB
view hashes)