treed

Visual representation of the branch-and-cut tree of SCIP using spatial dissimilarities of LP solutions

https://github.com/mattmilten/treed

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.5%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

Visual representation of the branch-and-cut tree of SCIP using spatial dissimilarities of LP solutions

Basic Info
  • Host: GitHub
  • Owner: mattmilten
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 8.34 MB
Statistics
  • Stars: 29
  • Watchers: 4
  • Forks: 5
  • Open Issues: 0
  • Releases: 11
Created almost 8 years ago · Last pushed almost 4 years ago
Metadata Files
Readme Funding License Citation

README.md

TreeD

TreeD on PyPI

Visual representation of the branch-and-cut tree of SCIP using spatial dissimilarities of LP solutions -- Interactive Example


Example


Example2D


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.

The color of the individual nodes is used to show different values like node age, LP iteration count, or LP condition number.

The shape of the nodes depict whether this LP solution was created through branching (🔵) or through LP resolves (🔷) at the ssame node, e.g. including cutting planes or added conflicts.

There is also a more traditional mode that ignores the spatial dimension and draws an abstract tree. This is activated via the method draw2d() or the command line flag --classic.

Installation

python -m pip install treed

Usage

  • run python -m treed --help to get usage information or use this code snippet in a Jupyter notebook:

``` from treed import TreeD

treed = TreeD( probpath="model.mps", nodelimit=2000, showcuts=True )

treed.solve() fig = treed.draw() fig.show(renderer='notebook') ```

There is also a (faster) 2D mode that skips the projection of LP solutions and generates a more traditional tree instead:

... fig = treed.draw2d() 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

Project View

  • 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

Amira preview

Owner

  • Name: Matthias Miltenberger
  • Login: mattmilten
  • Kind: user
  • Location: Berlin
  • Company: Gurobi Optimization

Optimization Support Manager at Gurobi - PhD in Mathematics

Citation (CITATION.cff)

cff-version: 1.1.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: Miltenberger
    given-names: Matthias
    orcid: https://orcid.org/0000-0002-0784-0964
title: "TreeD - Visualizing Branch-and-Cut Trees"
version: 1.2.1
license: MIT
repository-code: https://github.com/mattmilten/TreeD
date-released: 2021-05-16

GitHub Events

Total
  • Watch event: 4
Last Year
  • Watch event: 4

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 59
  • Total Committers: 3
  • Avg Commits per committer: 19.667
  • Development Distribution Score (DDS): 0.169
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Matthias Miltenberger m****r@g****m 49
Jose Salmeron s****n@z****e 9
Mohammed Ghannam m****m@g****m 1
Committer Domains (Top 20 + Academic)
zib.de: 1

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 5
  • Total pull requests: 2
  • Average time to close issues: 4 months
  • Average time to close pull requests: about 11 hours
  • Total issue authors: 4
  • Total pull request authors: 2
  • Average comments per issue: 3.0
  • Average comments per pull request: 2.5
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Zishanna (2)
  • MajidSKhoshghalb (1)
  • ktnr (1)
  • rschwarz (1)
Pull Request Authors
  • mmghannam (1)
  • josmangarsal (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 39 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 11
  • Total maintainers: 1
pypi.org: treed

3D Visualization of Branch-and-Cut Trees using PySCIPOpt

  • Versions: 11
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 39 Last month
Rankings
Dependent packages count: 10.0%
Stargazers count: 14.2%
Forks count: 15.3%
Average: 18.3%
Dependent repos count: 21.7%
Downloads: 30.3%
Maintainers (1)
Last synced: 8 months ago

Dependencies

setup.py pypi
  • pyscipopt *