hlefebvr / idol-tree-dot

A viewer for idol branch-and-bound trees

Repository from Github https://github.comhlefebvr/idol-tree-dotRepository from Github https://github.comhlefebvr/idol-tree-dot

A Viewer for idol Branch-And-Bound Trees

This is a python script to convert csv exports of the idol C++ library into .dot files. This allows to visualize the exploration tree of a branch-and-bound algorithm after its execution.

Themes

Debug

debug theme

Degradation

degradation theme

Centered Degradation

centered degradation theme

Infeasible

minimal theme

Temporal

temporal theme

Minimal

minimal theme

Plot

Contrary all the other themes, this theme generates a .tex file instead of a .dot file.

It generates an alternative tree representation according to Practical Solution of Large Mixed Integer Programming Problems with Umpire J. J. H. Forrest, J. P. H. Hirst, and J. A. Tomlin, Management Science (1974) 20:5, 736-773. https://doi.org/10.1287/mnsc.20.5.736.

plot theme

How to generate the csv file

The csv file is generated by adding the Utils::ExportBranchAndBoundTreeToCSV callback to idol's BranchAndBound optimizer.

model.use(
        BranchAndBound()
                .with_node_optimizer(HiGHS::ContinuousRelaxation())
                .with_branching_rule(PseudoCost())
                .with_callback(Utils::ExportBranchAndBoundTreeToCSV("tree.csv")) // Here
                .with_callback(Heuristics::SimpleRounding())
                .with_node_selection_rule(BestEstimate())
                .with_log_level(Info, Blue)
                .with_log_frequency(1)
);

How to use

python3 src/main.py --path path/to/csv/file [--theme degradation] [--output custom_filename.dot]

About

A viewer for idol branch-and-bound trees


Languages

Language:Python 100.0%