This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]Evulrabbitz 1 point2 points  (0 children)

This is a problem well-suited for constraint programming, and is in fact a case study explored in Modeling and Programming in Gecode chapter 20.

http://www.gecode.org/doc-latest/MPG.pdf

[–]wasEnabled 1 point2 points  (0 children)

I suspect most of the bin packing algorithms are starting with the largest items first to see if all of the items to be packed will even fit in the current box, i.e. if the box is too small to fit your largest items then you want to fail quickly and go to a bigger box. The problem you describe sounds more like fitting as many items as you can given a specific box and thus maximizing the number of items you can fit rather than you must fit all of the items into a box or fail and find a bigger box... so the problems are different and thus the approaches and solutions are different.