https://github.com/flokapi/bar-cutting-optimizer
Python/Qt app for bar cutting optimization
https://github.com/flokapi/bar-cutting-optimizer
pyqt5 python qt
Last synced: about 1 month ago
JSON representation
Python/Qt app for bar cutting optimization
- Host: GitHub
- URL: https://github.com/flokapi/bar-cutting-optimizer
- Owner: flokapi
- License: agpl-3.0
- Created: 2024-01-10T15:18:00.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-10T15:58:54.000Z (over 2 years ago)
- Last Synced: 2025-02-04T16:50:57.997Z (over 1 year ago)
- Topics: pyqt5, python, qt
- Language: Python
- Homepage:
- Size: 95.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bar Cutting Optimizer
The bar cutting optimizer helps to find the best way of cutting bars.
This is actually not an easy task because there are many possible combinations and it must be defined what can be considered as "better".
In this implementation, a cutting considered to be better if it produces the smallest remaining part. If the remaining part is the same, then the cutting with the longest bar is preferred.
# Implementation
The optimization algorithm works as follows:
1. Create the cutting possibility tree for one bar based on the target values.
2. Convert the possibility tree to a cutting possibility list.
3. Select the best cutting possibility among the list.
4. Remove the selected possibility from the target and repeat from step 1, as long as bars needed.
# Getting started
```shell
git clone git@github.com:flokapi/bar-cutting-optimizer.git
cd bar-cutting-optimizer
python3 src/main.py
```
# Example


