Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fill volume algorithm

I have a Box with some dimension length, width, height.

I have items with different length, width, height.

Is there an existing algorithm that can determine the best items to use to put inside the box?

like image 590
pdiddy Avatar asked Aug 08 '11 20:08

pdiddy


1 Answers

This is called a Bin Packing/Cutting Stock/Knapsack problem, and it is NP hard. In general you can only get an approximate solution by using heuristics, see for example

http://en.wikipedia.org/wiki/Knapsack_problem

http://en.wikipedia.org/wiki/Bin_packing_problem

http://en.wikipedia.org/wiki/Cutting_stock_problem

like image 61
Anders Forsgren Avatar answered Oct 10 '22 11:10

Anders Forsgren