User's Guide for BAK: Branch-and-bound Analysis Kit

Brady Hunsaker

University of Pittsburgh

Table of Contents
1. Overview
1.1. Dependencies
1.2. The name
2. Installation
3. Using BAK
3.1. Creating the data file
3.2. Running BAK
3.3. Recommendations

Chapter 1. Overview

BAK is a tool to help evaluate the progress and performance of branch-and-bound algorithms. It is based on research done by Osman Ozaltin, Brady Hunsaker, and Ted Ralphs. The coding was done by Osman Ozaltin and Brady Hunsaker.

BAK can generate images for visualizing various aspects of branch-and-bound performance and can also generate predictions about when the branch-and-bound algorithm will terminate.

The branch-and-bound solver must output a data file with information in the form that BAK expects. Then BAK will operate on this output file to generate the images.

branch-and-bound solver -> data file -> BAK_visual.pl -> images


1.1. Dependencies

BAK is written in Perl, and images are generated with Gnuplot. Both of these must be available. They are both free and open-source programs available on a variety of platforms (including Windows).

BAK was written and tested in a GNU/Linux environment. It has not yet been tested in Windows. Any feedback would be welcome.


1.2. The name

The name BAK is pronounced like "Bach" in English. Bak means "look" in Turkish.


Chapter 2. Installation

BAK consists of a single Perl script, so no installation is necessary. Simply copy the file BAK_visual.pl to the desired location.

BAK uses a system call to Gnuplot, so gnuplot should be in the path or the final image files will not be generated.


Chapter 3. Using BAK

3.1. Creating the data file

The branch-and-bound solver must be modified to output a data file in the appropriate format. Several solvers have already been adapted. When possible, the modified code is provided with this distribution of BAK in the interfaces directory.

If you want to modify a solver, read the file labeled grammar_details, which describes the format that BAK expects.


3.2. Running BAK

Once a data file is being generated--even if it is not yet complete--visual information can be generated. A variety of images may be generated. Use the following command to see the options.

BAK_visual.pl --help

The following are example commands:

  • BAK_visual.pl --interval 10 --all input_file: generate all types of images with 10-second intervals between them

  • BAK_visual.pl --interval 10 --scatterplot input_file: generate only scatterplots with 10-second intervals between them

  • BAK_visual.pl --interval 10 --scatterplot --tree input_file: generate scatterplots and trees with 10-second intervals between them

  • BAK_visual.pl --interval 10 --fixedtree input_file: generate tree images with fixed horizontal positions with 10-second intervals between them

  • BAK_visual.pl --interval 10 --all --label "Solver X" input_file: generate all images with 10-second intervals between them and add the label "Solver X" to each of them


3.3. Recommendations

If you plan to use the output images in presentations or papers, then we recommend that you save the .gnuplot files in addition to the images themselves. By changing a line or two near the beginning of the .gnuplot file, you can change the output, especially the font and the text labels used. You can even change the file format that is created if you don't want a PNG.

If the file is name example.gnuplot, then running gnuplot example.gnuplot will regenerate the image.