3d bin packing algorithm

2020-02-08 04:48发布

I am looking for a deterministic implementation for any 3d bin packing algorithm, i.e. for packing many small and different cuboids inside one or many bigger ones. The solution could vary from the optimal one.

It should be written in C, C++, Java, C#, IronPython, IronRuby or any other language an can bin to from .Net code.

I found this C algorithm http://www.diku.dk/hjemmesider/ansatte/pisinger/3dbpp.c , but it doesn’t rotate the cuboids to find the best fit. I am ok with not rotating them upside down, but horizontal rotation should be possible.

6条回答
乱世女痞
2楼-- · 2020-02-08 05:01

The general version of the problem is considered in "Algorithms for General and Robot-packable Variants of the Three-Dimensional Bin Packing Problem: http://www.3dbinbox.com/Public/home/

查看更多
乱世女痞
3楼-- · 2020-02-08 05:08

I converted wknechtel/3d-bin-pack C code to javascript. Can be easily port to C#.

https://github.com/keremdemirer/3dbinpackingjs

You can run example calculations from index.html file and review the generated report. pack1.js file contains the app and algorithm. I'm not sure how the algorithm works but the results are satisfying for packaging calculations.

查看更多
Summer. ? 凉城
4楼-- · 2020-02-08 05:10

I have written an approximate algorithm for the case you describe i.e. 3D rectangular boxes, with orthogonal rotation, in C++. You can find the results and algorithm in the published paper: http://www.cs.ukzn.ac.za/publications/erick_dube_507-034.pdf

查看更多
时光不老,我们不散
5楼-- · 2020-02-08 05:22

This problem is NP-hard. Your best bet is an approximation algorithm (until a genius person solves any NP problem, or a very lucky fellow stumbles across a solution.) I do not know of any well know approximation algorithms for this problem unfortunately.

查看更多
爱情/是我丢掉的垃圾
6楼-- · 2020-02-08 05:27

You can have a look at my approximation for this algorithm.

It is a intelligent first fit algorithm based on maximal area coverage.

https://github.com/mohitesh07/3d-bin-packing

It is written in Java

查看更多
Melony?
7楼-- · 2020-02-08 05:28

Open source Java project with support for Largest Area Fit First: 3d-bin-container-packing

Rotates in 2D or 3D.

查看更多
登录 后发表回答