Edit: I'm looking for an efficient Ruby, JavaScript, Java or Python implementation of 3D bin-packing with the constraints below
I'm looking for an efficient algorithm for correctly identifying the number of containers required to store a list of items. The context is around generating the accurate number and type of shipping labels for an e-commerce order.
Given:
- Items have a known width, length, depth and weight
- Items have a packing type specifying that they can be combined with other items in the same container ("over-pack"), or must be shipped in their own container ("ship-alone")
- Containers have a known width, length, depth and weight capacity
- Multiple containers are available of varying sizes and capacities
Problem:
- A list of items exists, possibly of varying sizes and packing types, and possibly in multiple quantities. Split the list of items so that they can be stored in the minimum number of containers possible
I figure this is an interesting volumetric math challenge that a few of you might enjoy. I'm looking to figure out the best programmatic solution to this.
Grateful to receive solutions in any language with a preference for Java, JavaScript, Python or Ruby.
Thanks in advance!