bin packer pro
Project description
BinPackerPro
BinPackerPro is a Python library for dealing with palletization.
Installation
Use the package manager pip to install BinPackerPro.
pip install BinPackerPro==0.0.9
Usage
from BinPackerPro.BinPackerPro import BinPackerPro
# declare an object of class BinPackerPro
box1 = [{"BoxName":f"Box{i}","Length":20.0,"Height":20.0,"Width":20.0,"Weight":50.0} for i in range(24)]
box2 = [{"BoxName":f"Box{i}","Length":20.0,"Height":40.0,"Width":40.0,"Weight":100.0} for i in range(24,28)]
bin_packer_pro = BinPackerPro(
pallet_length = 80.0, #float
pallet_width = 40.0, #float
pallet_height = 100.0, #float
dimension_units = "inch", #str
pallet_weight = 2000.0 , #float
weight_units = "pound", #str
pacakge_list = box1+box2 # list(dict)
)
# use pack function to run bin packer
bin_packer_pro.pack() # this function runs the bin packer algorith to find the least number of pallets to fit the given package list and also the box arrangement in each pallet
# use get_box_arrangement function to get the box arrangement in each pallet
box_arrangement = bin_packer_pro.get_box_arrangement() # this function gives box arrangement and rotation in each pallet
print(box_arrangement)
#Output
'''
[{'PalletName': 'pallet-1',
'BoxArrangementList': [{'BoxName': 'Box24',
'BoxLength': '20.00',
'BoxWidth': '40.00',
'BoxHeight': '40.00',
...
'PalletLength': '80.00',
'PalletWidth': '40.00',
'PalletHeight': '100.00',
'PalletWeight': '1600.00',
'BoxCount': 28}]
'''
# use get_box_arrangement_plot to get box arrangement plot
bin_packer_pro.get_box_arrangement_plot('path/to/store/plot.pdf') # this will create a step by step 3d plot of box arrangement in each pallet and store it in pdf file
Contributing
will publish the code on git soon
License
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 Distribution
BinPackerPro-0.0.9.tar.gz
(6.3 kB
view details)
File details
Details for the file BinPackerPro-0.0.9.tar.gz
.
File metadata
- Download URL: BinPackerPro-0.0.9.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1cfe924a3a31f16619ea77db5a20fac17332c90b15bccee285024890935730e |
|
MD5 | a93c905eb3f010100b550179dd495934 |
|
BLAKE2b-256 | 9f70fb6d4c2fa46cecbf1c6d005c92a188c53595e4d59e3f12da56029ab4acb2 |