Executing Bin Packing Problem in parallel with OpenMP in C++.
The program reads the text file and determines the minimum number of containers needed to store all of the boxes based on the algorithm used (First Fit and Next fit in parallel - First Fit Decreasing, First Fit and Next fit in sequential). Each algorithm has its own time complexity and performance.
I was unable to use First Fit Decreasing in parallel since it is pointless to sort the boxes just to randomly select them at the end (each threat will select a box at a different position).
First Fit performed the best in parallel with 201 containers compared to Next fit with 210 containers.
- Follow C/C++ for Visual Studio Code installation process
- After compiling the code, make this change in
tasks.json. Convert-gto-fopenmpinside of"args"
"args": [..., "-g", ...] --> "args": [..., "-fopenmp", ...]
- Compile and run the code, either through the
Run and Debugoption on the side panel in vscode or the terminal.