Skip to main content

heuristiciohbsp

Heuristic Methods for Minimizing Cut Bars and Using Leftovers from the One-dimensional Cutting Process - IOH-BSP Heuristic.

Getting Started

Dependencies

You need Python 3.8 or later to use heuristiciohbsp. You can find it at python.org.

Installation

Clone this repo to your local machine using:

git clone https://github.com/omatheuspimenta/heuristiciohbsp.git

or

pip install heuristiciohbsp

Features

In this heuristic, the losses of the cutting process are concentrated on the smallest number of bars possible, using a greedy structure, in order to become losses (unusable) into leftovers (usable).

Example

from heuristiciohbsp import bsp

n = 7
L = 30
l = [7, 9, 11, 14, 19, 21, 26]
d = [2, 3, 2, 2, 2, 1, 1]

left = loss = bar = 0
x = []

left,loss,bar,x = bsp.ioh(L=L, n=n, l=l, d=d)

Input and Parameters

  • L: Size of bar to be cutting. (int)
  • n: Number of Items to be cutting. (int)
  • l: Lenght of items to be cutting. (list)
  • d: Demand of items to be cutting. (list)
  • smallitem: Size of small item. Default is the smallest item to be cutting. (int)

Output

  • left: Leftover from the cutting process. (int)
  • loss: Loss from the cutting process. (int)
  • bar: Bar number used in the cutting process. (int)
  • x: Cutting pattern. (list)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Citation

If you use this software in your work, please cite our paper. (soon)

License

MIT

Release files for heuristiciohbsp 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for heuristiciohbsp 1.0.1
File Size Uploaded
heuristiciohbsp-1.0.1.tar.gz 3.3 kB Details

Release files / heuristiciohbsp-1.0.1.tar.gz

Download URL heuristiciohbsp-1.0.1.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7ecc74e55721a2d8f8913551f2c6aad9a4befb3567dcf905d88f995177d0407e
BLAKE2b-256 checksum
How to use checksums
92b12a50e4aca63a7f1ea4391aab031698c35d8f82f52072a4da32610f697556
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page