This repository contains three Python files implementing two optimization algorithms: Branch and Bound and Exhaustive Search. Additionally, there is a text file used for input.
-
BnB.py:
- Contains the implementation of the Branch and Bound algorithm.
-
ExhaustiveSearch.py:
- Includes the code for the Exhaustive Search algorithm, solving the same problem as in BnB.py.
-
Compared-BnB-ES.py:
- Combines the Exhaustive Search and Branch and Bound programs for direct comparison. This file allows you to observe and analyze the running time and cost differences between the two algorithms.
-
input.txt:
- A text file used for input. Save it in the same directory as the program files if you choose to use it for input.
-
Choose Input Method:
- When running the programs, you can either use the input data from the provided text file (
input.txt
) or input the data manually.
- When running the programs, you can either use the input data from the provided text file (
-
Save Input Data (if using input.txt):
- Save
input.txt
in the same directory as the program files.
- Save
-
Program Files:
BnB.py
: Execute this file to run the Branch and Bound algorithm.ExhaustiveSearch.py
: Run this file for the Exhaustive Search algorithm.Compared-BnB-ES.py
: Use this file to compare the performance of both algorithms.
-
Comparison Results:
- The
Compared-BnB-ES.py
file displays a direct comparison between running times and costs for both algorithms. Analyze the results to understand the efficiency of each approach.
- The