Optimal Packing of High- Precision Rectangles By Eric Huang & Richard E. Korf 25 th AAAI Conference,...
-
Upload
sabina-pearson -
Category
Documents
-
view
218 -
download
0
Transcript of Optimal Packing of High- Precision Rectangles By Eric Huang & Richard E. Korf 25 th AAAI Conference,...
S
Optimal Packing of High-Precision
RectanglesBy Eric Huang & Richard E. Korf
25th AAAI Conference, 2011
Florida Institute of TechnologyCSE 5694 Robotics & AIMindaugas Beliauskas
Problem Overview
Rectangle-packing problem – finding smallest enclosing rectangle that can contain a given rectangles without overlap
Why Is It Important?
Many practical applications Mechanical prospective
Loading a set of rectangular objects on a pallet without stacking them
Cutting stock – requires least material to be unused
Computer science prospective Scheduling and allocating
contiguous memory addresses to programs, where width of rectangle – time required to run it, height – memory it needs
Time, s
Mem
ory
, G
b
Sub ProblemMinimal Bounding Box
Problem
Finding the smallest rectangle that can contain rectangles of sizes:
Such a problem – minimal bounding box problem Finds a bounding box of least area that can contain a
given set of rectangles
In other words, here number and dimensions of boxes are known
Sub ProblemContainment Problem
Packaging of given rectangles in a given bounding box of rectangles of sizes:
Models rectangles positions over possible positions in the bounding box
In other words, the enclosing rectangle is known
Algorithm that solves minimal bounding box problem calls algorithm that solves containment problem as a subroutine
Unfeasible Problem
1968 Meir and Moser proposed a problem:
Finding the smallest square that can contain an infinite series of rectangles of sizes Rectangles cannot overlap Rectangles are unoriented – can be rotated 90° Unit square has exactly enough area for all rectangles
No space can be wasted Suggest infeasible task
Solution Strategy
Minimal bounding box problem Boxes of all sizes are generated and tested in non-
decreasing order of area until all feasible solutions of smallest area are found Lower bound – sum of all rectangle areas Upper bound – setting the height of the tallest box, and
placing rectangles to the first available position on the right
Containment problem All possible locations tested for each rectangle up to N
Minimum Bounding Box Problem
Generating all subset sums prior to searching – width and the height will be a subset sum of rectangles dimensions Unoriented problem - all widths and heights need to be
considered together
Excluding infeasible pairs of dimensions Example: for N = 4 consists four boxes of 60x30, 30x20, 20x15
and 15x12. Bounding box width of 57, requires 30 + 15 + 12, can’t have height of 47, because this combination requires rotating 12x15 box. Two rectangles cannot be simultaneously vertically and horizontally Bounding box of size 57 x 47 is then eliminated
Learning From Infeasible Attempts
Minimal bounding box problem calls containment problem When placing rectangles, the algorithm will run into
infeasible solution – the dimension of bounding box needs to be increased
Too small increment may cause to to the same partial solutions we already explored
Example
of oriented
boxes:
Containment Problem
We prune the sums of rectangles, when they overlap or exceeds the limits
Assigning x-coordinates dynamically Place rectangle on the left side of bounding box For the assigned rectangles coordinates, add
coordinate of unassigned rectangle (width or height) into each set and insert the new sums back
Build a set of subset sums
Once possible x-coordinates are assigned, the y-coordinates need to be assigned
Containment Problem
Previously used solution: Perfect Packing Transformation – creation of 1x1 rectangles in addition to placed existing rectangles to check for all empty left space Results in # of original rectangles + # of new 1x1
rectangles For N = 15, requires creating 1.5 billion of 1x1
rectangles, because the problem is scaled up by the least common multiple This requires too much memory and time
Suggested solution: Widening Existing Rectangles & Turning Empty Space Into Large Rectangles
Widening Existing Rectangles
Once x coordinates are assigned, we have to assign y coordinates Partial solution
example:
For any assignment of y-coordinates the space right of 40x10 rectangle must be always empty, hence it is replaced with 60x10 rectangle. Same procedure for 10x20 and 20x10 rectangles
Method used to generate possible rectangles’ y-coordinates
Turning Empty Space Into Large Rectangles
Now, instead of creating 300 1x1 rectangles, the new method suggests creating 10 30x1 for single hash marks and 20 30x1 for double-hashed empty spaces, instead of 900 rectangles
Method used to fit unplaced rectangles
Fitting Unplaced Rectangles
Finally, after packing transformation, we assign y-coordinates by asking which rectangle can be placed in a given empty corner We limit the y-coordinate to subset sums of height in the original
instance For an empty corner, we disallow assigning any rectangle that is not in a
subset sum, because only rectangles to create perfect packing can be assigned
We generate subset sums for every x-coordinate solution
Result is far fewer values in the possible solution set, because we already picked the rectangles’ orientation
Experimental Algorithm Results
Column 1 – size of the problem
Column 2 – method when problem scaled completely in integers
Column 3 – testing only those bounding boxes, whose widths and heights are subset sums of rectangles widths and heights
Column 4 – rejecting mutually exclusive bounding boxes widths and heights
Column 5 – using information of infeasible attempts
Experimental Algorithm Results
LCM – least common multiple
Packer needs to compare minimal bounding box At N=12, the number of
boxes to be compared exceeds 32bit integer
Most of optimal solutions have width of 1/2
Experimental Algorithm Results
Comparison to different algorithms of computing times
Empty Space – precomputes all subset sums prior searching over x-coordinates
Dynamic – dynamically computes subset sums
HK11 – added ability to learn and prune unfeasible subtrees
Solution of Unfeasible Problem
Recall the infeasible problem mentioned in the beginning
Main infeasibility – no space can be wasted, since the series of rectangles equals unit square
A packing solution for rectangles in the unit square of N = 50000 is presented on the right!
Conclusion
New benchmark consisting of instances with rectangles
Techniques presented Dynamically using subset sets to limit the number of possible positions
(Widening Existing Rectangles and Turning Empty Space Into Large Rectangles)
Rules to filter out subsets (Rejecting pairs of mutually exclusive subset sums)
Methods to learn from infeasible trees (Recalls infeasible result if noticed)
Solves problems problems up to two orders of magnitude faster
Solved infinite series of rectangles in the unit square, proving that such a packing exists
Thank you!
Time for questions!