This repository contains two Python scripts implementing the Branch-and-Bound algorithm to solve linear optimization problems. The two scripts utilize different libraries to solve the optimization problems:
- branch-and-bound-scipy.py: This script uses the
scipy.optimize.linprogfunction from theSciPylibrary. - branch-and-bound-xpress.py: This script uses the
xpresslibrary.
Both scripts also include functionalities for visualizing the solution process using the networkx and matplotlib libraries.
- Python 3.x
- SciPy
- Matplotlib
- NetworkX
- Xpress (only for
branch-and-bound-xpress.py)
You can install the necessary packages using pip:
pip install scipy matplotlib networkx xpressYou can execute each script from the command line:
python3 branch-and-bound-scipy.pyor
python3 branch-and-bound-xpress.pyThe scripts also generate a visualization of the Branch-and-Bound process, showing the search tree and the solutions found.