g++ -std=c++17 -I. performance/PerformanceRunner.cpp FileReader.cpp Truck.cpp Algorithms.cpp Pallet.cpp -o performanceRunnerIt runs the the follow datasets: datasets = {"01", "02", "03", "07", "08", "10", "11", "12", "13", "14"};
python3 code/ilp_knapsack.py input/dataset/TruckAndPallets_01.csv input/dataset/Pallets_01.csv output/output.txtg++ -std=c++11 main.cpp -o main Algorithms.cpp FileReader.cpp Menu.cpp Pallet.cpp Truck.cpp PerformanceEvaluator.cpp- has to have a virtual environment (venv) with pandas and matplotlib installed
source venv/bin/activate
python3 code/performance/plot_runtime.py- TruckAndPallets_01.csv
- Pallets_01.csv
- Tie-Breaker and Greedy Trap
- Multiple subsets yield the same total profit (e.g., [1,2], [3,4,5,6])
- Stress DP without Brute-Force Explosion
- n = 12 (safe for brute-force)
- capacity very large - W = 50000
- Stress Greedy Algorithm
- Using W = B, v1 = 1, w1 = 1, v2 = B - 1, w2 = B
- Backtracking Efficiency test
- Many combinations exceed the weight limit quickly, allowing backtracking to prune branches early