Cutting stock problem optimizer
Project description
opcut is cutting stock problem optimizer utilizing multiple panels and guillotine cuts (end-to-end cuts). This project includes:
multiple back-end optimizer implementations
command line front-end
REST service API (OpenAPI definition)
single-page web application front-end
Git repository is available at https://github.com/bozokopic/opcut.git.
Public instance https://opcut.kopic.xyz/ is constrained with limited resources and should be used only for functionality evaluation purposes. In case of complex and repetitive calculations, please consider running self hosted instance.
Runtime requirements
python >=3.10
Install
Archlinux
opcut is available as AUR package:
$ yay -S opcut
Windows
Windows distribution, with embedded python, is available at GitHub releases.
This archive contains opcut-server.cmd, which can be used for running server application, and opcut.cmd as generic opcut action launcher.
Python wheel
Opcut is available as PyPI project:
$ pip install opcut
Docker
opcut server is available as Docker image:
$ docker run -p 8080:8080 bozokopic/opcut
Usage
opcut command is interface for execution of three distinct actions:
opcut calculate …
Calculation of cutting stock problem. Input parameters and result is formatted as JSON data (JSON, YAML or TOML).
opcut generate …
Generate output representation (SVG, PDF, …) based on calculation result.
opcut server …
Run HTTP server providing single-page web application interface and OpenAPI interface (default listening address is http://0.0.0.0:8080).
For additional command line arguments and documentation, run:
$ man 1 opcut
JSON schema describing data structures is available at schemas/opcut.yaml.
OpenAPI definition is available at schemas/openapi.yaml.
opcut calculate
Example:
$ opcut calculate --input-format yaml --output result.json << EOF cut_width: 1 panels: panel1: width: 100 height: 100 items: item1: width: 10 height: 10 can_rotate: false EOF
opcut generate
Example:
$ opcut generate --output output.pdf result.json
opcut server
Example:
$ opcut server
Development requirements
C99 compiler (gcc, clang, …)
nodejs >=7
npm
Build
Build tool used for opcut is pydoit (http://pydoit.org/). It can be installed together with other python dependencies by running:
$ pip install -r requirements.pip.txt
For listing available doit tasks, use:
$ doit list
Default task:
$ doit
creates wheel package inside build directory.
TODO
unit tests
changelog
mailing list
roadmap
Contributing
This project is currently in “proof of concept” state and is not yet recommended for production usage.
Any kind of help in development of this project is appreciated.
Issues and feature requests can be submitted to issue tracker.
Repository changes can be sent as patches over email (Github pull request are also acceptable until dedicated mailing list is set up). Changes containing new functionality or other significant changes should be discussed prior to sending patch.
For any questions regarding this project, contact me at bozo@kopic.xyz.
License
opcut - cutting stock problem optimizer
Copyright (C) 2017-2024 Bozo Kopic
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file opcut-0.4.15-cp310.cp311.cp312-none-win_amd64.whl
.
File metadata
- Download URL: opcut-0.4.15-cp310.cp311.cp312-none-win_amd64.whl
- Upload date:
- Size: 181.0 kB
- Tags: CPython 3.10, CPython 3.11, CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0fca746a72f8149bbf3b1b3faf71201eae1a91976779624cf1eda342db24756 |
|
MD5 | c0680b884134284950b76f1ce64eb852 |
|
BLAKE2b-256 | c61678bd8143858c2c6c16a016e3ba9e38e9e11da67cb60c9b197f48205221f5 |
File details
Details for the file opcut-0.4.15-cp310.cp311.cp312-none-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: opcut-0.4.15-cp310.cp311.cp312-none-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 150.2 kB
- Tags: CPython 3.10, CPython 3.11, CPython 3.12, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 237be2c08812ca2c88cce61a3aceecd9e56f9a552e2644a67cd69bc800cffab2 |
|
MD5 | 450d29fc5a376776fe639c278c433864 |
|
BLAKE2b-256 | 5439061a3affbbd29a0d67efc47016904415530310a046a89ed1aa48aa0903b1 |
File details
Details for the file opcut-0.4.15-cp310.cp311.cp312-none-musllinux_1_2_armv7l.whl
.
File metadata
- Download URL: opcut-0.4.15-cp310.cp311.cp312-none-musllinux_1_2_armv7l.whl
- Upload date:
- Size: 150.0 kB
- Tags: CPython 3.10, CPython 3.11, CPython 3.12, musllinux: musl 1.2+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a8f9741fb3bf9b66eb3f2aa5f07ad9027af973aa822daebd2fac76cb4689598 |
|
MD5 | 256ce3c240f87e372395a1553c813eb3 |
|
BLAKE2b-256 | fbbc8a075d220e430936a2cbab40a5a4692d8b6254e96b07aa543f11321d27c5 |
File details
Details for the file opcut-0.4.15-cp310.cp311.cp312-none-musllinux_1_2_aarch64.whl
.
File metadata
- Download URL: opcut-0.4.15-cp310.cp311.cp312-none-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 150.7 kB
- Tags: CPython 3.10, CPython 3.11, CPython 3.12, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf6c46202aec7be5041c9ff0b437c06d5406aadeec3a6aba4c7207137f6889d5 |
|
MD5 | 361b2da77f63f6086c664eb2d84f22fd |
|
BLAKE2b-256 | 81c409ee8a21fa71b81b3e502dfc2783881db8e739e5e1cae3028eb86a3a2e66 |
File details
Details for the file opcut-0.4.15-cp310.cp311.cp312-none-manylinux_2_24_x86_64.whl
.
File metadata
- Download URL: opcut-0.4.15-cp310.cp311.cp312-none-manylinux_2_24_x86_64.whl
- Upload date:
- Size: 149.7 kB
- Tags: CPython 3.10, CPython 3.11, CPython 3.12, manylinux: glibc 2.24+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 482ea15eabcffe2bfdd99ef600de798f339b62cc9a1b9c61f2f3fda21b259a7b |
|
MD5 | 1e15ecea49cd60f2802e4c977344f39a |
|
BLAKE2b-256 | 8e09a505437cd7145bdf5c967a5559e8f0d27b67fafae6900f637547d8bcea04 |
File details
Details for the file opcut-0.4.15-cp310.cp311.cp312-none-manylinux_2_24_armv7l.whl
.
File metadata
- Download URL: opcut-0.4.15-cp310.cp311.cp312-none-manylinux_2_24_armv7l.whl
- Upload date:
- Size: 149.5 kB
- Tags: CPython 3.10, CPython 3.11, CPython 3.12, manylinux: glibc 2.24+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea0a72af3f82c4230273e25044df96e04b073998e2678f38ddcd36a1508f6231 |
|
MD5 | 7bda1325b615123e589b8f26387afacc |
|
BLAKE2b-256 | b4d90bc46f25db7739270eb3601e39411a5fe00cf7e22139f11f72d699cabea6 |
File details
Details for the file opcut-0.4.15-cp310.cp311.cp312-none-manylinux_2_24_aarch64.whl
.
File metadata
- Download URL: opcut-0.4.15-cp310.cp311.cp312-none-manylinux_2_24_aarch64.whl
- Upload date:
- Size: 149.8 kB
- Tags: CPython 3.10, CPython 3.11, CPython 3.12, manylinux: glibc 2.24+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ae7ae589c6973541245568cf8eaa6ca9835caeb1d42a9864b6f6a039755faa9 |
|
MD5 | f5d5f1932ec0136cb3950b41721afa6f |
|
BLAKE2b-256 | 303163004704bc9a063fe88dc2a4ebb2df1e352131fada8863c80e4e9592c5e9 |