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.
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.
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)
);
python3 src/main.py --path path/to/csv/file [--theme degradation] [--output custom_filename.dot]