I am trying to write an application that generates drawing for compartmentalized Panel.
I have N cubicles (2D rectangles) (N <= 40). For each cubicle there is a minimum height (minHeight[i]) and minimum width (minWidth[i]) associated. The panel itself also has a MAXIMUM_HEIGHT constraint.
These N cubicles have to be arranged in a column-wise grid such that the above constraints are met for each cubicle.
Also, the width of each column is decided by the maximum of minWidths of each cubicle in that column.
Also, the height of each column should be the same. This decides the height of the panel
We can add spare cubicles in the empty space left in any column or we can increase the height/width of any cubicle beyond the specified minimum. However we cannot rotate any of the cubicles.
OBJECTIVE: TO MINIMIZE TOTAL PANEL WIDTH.
At present I have implemented it simply by ignoring the widths of cubicles in my optimization. I just choose the cubicle with largest minHeight and try to fit it in my panel. However, it does not gurantee an optimal solution.
Can I get any better than this?
EDIT 1: MAXIMUM_HEIGHT of panel = 2100mm, minwidth range (350mm to 800mm), minheight range (225mm to 2100mm)
EDIT 2: PROBLEM OBJECTIVE: TO MINIMIZE PANEL WIDTH (not panel area).