Professional Documents
Culture Documents
CSCLP 2010
Points to Remember
Almost Square Packing: Generalization of Square Packing (Simonis and OSullivan, CP 2008) Allows rotation of items, extra degree of freedom Interleave orientation of item with interval choice for X Redundant constraints similar to square packing Further decomposition possible, treat X variables on their own Does not need disjoint2 and second cumulative constraint Problems up to N=26 solved optimally (very similar to square packing)
Consider almost squares, rectangles n (n + 1) Pack all items 1 2, 2 3, ..., n (n + 1) Into smallest possible rectangle Items are non-overlapping
Background
Suggested by Prof. Des MacHale, Math, UCC Solved packing up to 13 14 by hand Starting point for Barrys and my interest in packing My objection: This is too complicated
Look at square packing Known results, benchmark comparison
Consider squares, rectangles n n Pack all items 1 1, 2 2, ..., n n Into smallest possible rectangle Items are non-overlapping
Outline
Problem (N=26)
10 15 43 7 6 8 9 16 2 12 20 11 5 26 21 23 14 13 25 17 19
24
22
18
Problem Decomposition
Search for candidate enclosing rectangle Area must be larger than sum of items to be placed Search in order of increasing area
and increasing squareness
Check each candidate for (in)feasibility until rst solution is found Observation: Only limited number of candidates explored
Basic Model
Width
W H X,Y Height
disjoint2 cumulative
cumulative
Key Idea: Fixing intervals, not values Fixing variables to values is too restrictive Select area in which item is placed Allows items to shift slightly Restrict domain to intervals Only at end x actual values
10
Compulsory parts
Xl
Xr
11
X2 + W2 X1 + W1
X1 , Y1
12
Strategies Comparison
1e+06
100000
10000
1000 Time[s]
100 Korf BlueBlocker naive naive gaps xtheny disj semantic4 semantic dual interval split xy 16 18 20 22 Problem Size 24 26 28
10
0.1
0.01
13
17
15
18
12
21
23
22
10
16
11
5 3 27
26
24
25
14
13
19
20
14
Outline
15
Apply lessons learned to almost square packing Added degree of freedom, rotation of items Weak impact, length only changes by one But 2n additional choices
16
14x13
12x13
15x14
20x21
23x22
23x24
18x17
3x4 4x5
6x7
5x6
17x16
10x11 11x12
7x8
2x3 2x1
22x21
19x18
19x20
10x9
24x25
25x26
27x26
9x8
15x16
17
20
x202
1..7
w192
19
x196
1..6
w182
18
2 6 x187 1..6 8..13 17..22
77387 66481
43 27
w172
17 18 55775 46472
x178
1..6
w16
16 17 6077 4580
x16
10
1..6
w15
15 16 1297 919
x15
20
w14
14
15
543 416
x14
1..5
13 1
21
2
157 87
w13 x13
13
16
1..4
w12
12
2 x123 19..22 23..26
10 8 13 7
w112
11 12
1 4 x118 14..17 18..21 24
141 76
5 3
w102
10
x1010
14..17
w9 2
9
x9 w8
8
19..21 1
x8 w7
7
28
2
x7 w6
6
28
2
x6 w5
5
21
1
x5 w4
4
19
1
x4
20
w3 2
3 4
x3
14
w2 2
2 3
x2
21
1 xx20
1
1 xx19
xx18
18
xx17
1
xx16
1
xx15
20
xx14
21
xx13
1
xx12
24
xx11
24
xx10
14
xx91
19
xx81
28
xx71
28
xx61
21
xx51
19
xx41
20
xx31
14
xx2 y20
41 25 4 3 40 23
21
20 27 37 38 25..31
y19
1 2 1 1 13 5
19 57 58 1 7
44
1..6 1
52
1
y15
1 4 9
62..66 67..71 74
15
31..35 1
17
27
y101
20
y9 y8 y7 y6 y5 y4 y3 y2
53
8
47..49 1
56
1
47
1
63
1
69
1
17
1
31
yy20
31
yy19
69
yy18
1
yy17
52
yy16
1
yy15
74
1 yy14
33
1 yy13
17
1 yy12
20
1 yy11
63
1 yy10
20
yy91
53
47
1
56
1
47
1
63
1
69
1
17
1
31
18
Showing complete tree is clearly infeasible We only show path to solution But most time is spent in non-solution parts of tree
19
Search Choices
Based on best method for square packing Assign X intervals, x X values, assign Y intervals, x Y values When to x orientation? Eager Before assigning X intervals Lazy After assigning X intervals Interleaved Mixed with X interval assignment
20
100000
100
10
1 0 10 20 30 40 Depth 50 60 70 80
21
100000
100
10
1 0 10 20 30 40 Depth 50 60 70 80
22
10000
1000 Nodes
100
10
1 0 10 20 30 40 Depth 50 60 70 80
23
Comparison (N=17)
1e+07 Eager Lazy Interleaved 1e+06
100000
100
10
1 0 10 20 30 40 Depth 50 60 70 80
24
10000
1000 Nodes
100
10
1 0 10 20 30 40 50 Depth 60 70 80 90 100
25
100000
10000
Nodes
1000
100
10
1 0 10 20 30 Depth 40 50 60 70
26
1e+06
100000
100
10
27
28
Redundant Constraints
29
Forbidden Gaps
Large items can be placed either directly on border or away from border Otherwise gap must be lled with small items and slack For each gap size, pre-compute length of item that can not be covered Slight complication due to rotation of items, use constructive disjunction
Remove most forbidden gaps at setup by reducing domains Further reduction when item is oriented
30
14x13 6x5 12x11 7x6 13x12 4x5 15x14 7x8 10x11 4x3 2x3 16x17 16x15
10x9 8x9
31
32
17 18 19 20 21 22 23 24 25 26
0.15
0.2
0.25
0.3
0.35
0.4
0.45
Parameter
33
Do we really need the full basic model? Most search in X variable search phase Postpone setting up Y variables, disjoint2 and 2nd cumulative Only create them when complete solution for X variables found Uses just single cumulative constraint We can even replace disjoint2 by reied inequalities
34
Decomposition Results
N 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Basic Model Back Time 2 00:00 1 00:00 6 00:00 9 00:00 10 00:00 27 00:00 159 00:00 54 00:00 274 00:00 1040 00:00 1501 00:00 7617 00:00 3989 00:00 107611 00:07 5550 00:00 13690 00:01 161410 00:14 6524396 09:13 17319946 23:54 6400629 10:33 9801577 16:10 13232221 25:15 29432467 54:08 With Redundant Constraints Decomposed Model Decomposed Reied Back Time Back Time 2 00:00 2 00:00 1 00:00 1 00:00 6 00:00 6 00:00 9 00:00 9 00:00 10 00:00 10 00:00 27 00:00 27 00:00 176 00:00 176 00:00 54 00:00 54 00:00 301 00:00 301 00:00 1040 00:00 1040 00:00 1501 00:00 1501 00:00 7617 00:00 7617 00:00 3989 00:00 3989 00:00 107611 00:05 107611 00:06 5550 00:00 5550 00:00 13690 00:00 13690 00:00 161410 00:11 161410 00:16 6524396 07:10 6524396 08:05 17319946 19:13 17319946 21:50 6400629 08:04 6400629 08:58 9801577 12:11 9801577 13:07 13232221 20:07 13232773 23:34 29432467 40:26 29432467 43:51
35
Size 17 18 19 20 21 22 23 24 25 26
Area 3457 3076 3576 3588 3991 4492 40115 40130 45130 42156
Korf, Moftt and Pollack Nodes Times 6,889,973 :07 22,393,428 :26 11,918,834 :11 608,635,198 12:50 792,197,287 23:21 4,544,585,807 1:49:32 32,222,677,089 15:06:56 41,976,042,836 18:39:34 557,540,262,189 12:11:30:32 -
Redundant Back Times 107611 00:07 5550 00:00 13690 00:01 161410 00:14 6524396 09:13 17319946 23:54 6400629 10:33 9801577 16:10 13232221 25:15 29432467 54:08
Decomposition Back Times 107611 00:05 5550 00:00 13690 00:00 161410 00:11 6524396 07:10 17319946 19:13 6400629 08:04 9801577 12:11 13232221 20:07 29432467 40:26
36
Future Work
SICStus Prolog cumulative does not know about volume of items Domain variables [n, n + 1] for duration and resource use Does not know that w h is n (n + 1) Underestimates volume as n n Improved energetic reasoning possible (CHIP)
37
Points to Remember
Almost Square Packing: Generalization of Square Packing (CP 2008) Interleave orientation of item with interval choice for X Further decomposition possible, treat X variables on their own Does not need disjoint2 and second cumulative constraint Problems up to N=26 solved optimally (very similar to square packing) Outperforms best published results by 103
38