I have a program that will calculate the minimal area taken by fitting rectangles together.
Input: Rectangles of different height and width.
Output: One rectangle that contains all these rectangles.
Rules: One cannot turn or roll the rectangles around and they cannot overlap.
I understand that this is related or is possibly defined as a bin packing problem (NP-hard). However the algorithms i found for those often set a limit on for example width. I have no such limits, the only goal is to get the resulting area as small as possible.
Any pointers on what algorithm is appropriate to get a decent solution?
http://www-rcf.usc.edu/~skoenig/icaps/icaps04/icapspapers/ICAPS04KorfR.pdf
Apparently this problem is harder than it looks at first. It’s an interesting algorithm, since first it guesses a solution and then improves on it, so if you don’t want to wait for the optimal solution, you can just run it for a set number of iterations to get an approximate solution (the longer you run it, the better the approximation).