Skip to content
/ BDD Public
forked from LPMP/BDD

An integer linear program solver using a Lagrange decomposition into binary decision diagrams. Lagrange multipliers are updated through dual block coordinate ascent.

License

Notifications You must be signed in to change notification settings

Amuwa/BDD

 
 

Repository files navigation

Build Status

BDD

An integer linear program solver using a Lagrange decomposition into binary decision diagrams. Lagrange multipliers are updated through min-marginal averaging (a form of dual block coordinate ascent). Sequential and parallel CPU solvers are provided as well as a massively parallel GPU implementation.

Installation

git clone https://github.com/LPMP/BDD

git submodule update --remote --recursive --init

Then continue with creating a build folder and use cmake:

mkdir build && cd build && cmake ..

If CUDA-solvers are to be built, set WITH_CUDA=ON in cmake and ensure CUDA is available (tested on CUDA 11.2, later versions should also work).

Command Line Usage

Given an input file ${input} in LP format, one can solve the problem via bdd_solver_cl -i ${input} -s ${solver} where ${solver} is one of

  • mma for sequential min-marginal averaging.
  • parallel_mma for parallel CPU deferred min-marginal averaging.
  • mma_cuda for parallel deferred min-marginal averaging on GPU (available if built with WITH_CUDA=ON).
  • hybrid_parallel_mma for parallel deferred min-marginal averaging on CPU and GPU simultaneously (available if built with WITH_CUDA=ON). This solver might be faster when a few long constraints are present that would constitute a sequential bottleneck for the pure GPU solver.

Primal Rounding

In order to compute a primal solution from the dual one obtained through a min-marginal averaging scheme, we provide a perturbation based rounding heuristic

  • --incremental_primal: Perturb costs iteratively to drive variables towards integrality. Parameters for this scheme are
    • --incremental_initial_perturbation ${p}: The initial perturbation magnitude.
    • --incremental_perturbation_growth_rate ${x}: The growth rate for increasing the perturbation after each round.

Termination Criteria

For terminating dual optimization we provide three stopping criteria:

  • --max_iter ${max_iter}: For terminating after a pre-specified number of iterations.
  • --improvement_slope ${p}$: For terminating if improvement between iterations is less than ${p} of the improvement after the first iteration.
  • --tolerance ${p}$: For terminating if improvement between iterations is less than ${p} of the initial lower bound.

Variable Ordering

For computing BDDs for representing constraints and for sequentially visiting variables in the mma solver the variable order can be specified.

  • -o input: Use the variable ordering as given in the input file.
  • -o bfs: Use a breadth-first search through the variable-constraint adjacency matrix to determine a variable ordering starting from the most eccentric node.
  • -o cuthill: Use the Cuthill McKee algorithm on the variable-constraint adjacency matrix to determina a variable ordering.

References

If you use this work please cite

and

for the parallel solvers.

About

An integer linear program solver using a Lagrange decomposition into binary decision diagrams. Lagrange multipliers are updated through dual block coordinate ascent.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 74.4%
  • Cuda 20.9%
  • Python 3.2%
  • CMake 1.5%