Exact Methods for Recursive Circle Packing
Stephen J. Maher
joint work with
Ambros M. Gleixner, Benjamin Müller, and João Pedro Pedroso
Lancaster University Management School,
20th July 2017
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 1/19
Motivation
I originates from tube industry
I reduce large shipping costs
I recursive packing of tubes into containers
I can be modelled as a 2D problem
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 2/19
Recursive Circle Packing Problem (RCPP)
input . . .
I set of ring types T := {1, . . . ,T}I external radius Rt and internal radius rt for each t ∈ TI demand Dt ∈ N for each t ∈ TI in�nitely many rectangles with width W and height H
objective . . .
I minimize z∗ = number of rectangles
I s.t.⋃
t{Dt many rings of type t} are packable into z∗ rectangles
TheoremRCPP is NP-hard.
Proof.For r = 0 : RCPP → Circle Packing Problem (CPP)
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 3/19
Recursive Circle Packing Problem (RCPP)
input . . .
I set of ring types T := {1, . . . ,T}I external radius Rt and internal radius rt for each t ∈ TI demand Dt ∈ N for each t ∈ TI in�nitely many rectangles with width W and height H
objective . . .
I minimize z∗ = number of rectangles
I s.t.⋃
t{Dt many rings of type t} are packable into z∗ rectangles
TheoremRCPP is NP-hard.
Proof.For r = 0 : RCPP → Circle Packing Problem (CPP)
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 3/19
Recursive Circle Packing Problem (RCPP)
input . . .
I set of ring types T := {1, . . . ,T}I external radius Rt and internal radius rt for each t ∈ TI demand Dt ∈ N for each t ∈ TI in�nitely many rectangles with width W and height H
objective . . .
I minimize z∗ = number of rectangles
I s.t.⋃
t{Dt many rings of type t} are packable into z∗ rectangles
TheoremRCPP is NP-hard.
Proof.For r = 0 : RCPP → Circle Packing Problem (CPP)
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 3/19
Compact MINLP Formulation
I consider each ring individually
I (xi , yi ) center of ring i
I φr ∈ {0, 1} if rectangle r is used
I ui,j ∈ {0, 1} if ring i is directly placed inside ring j
I wi,r ∈ {0, 1} if ring i is directly placed inside rectangle r
min∑r
φr
s.t
∥∥∥∥(xiyi)−(xjyj
)∥∥∥∥2 ≥ (Ri + Rj)2(wi,r + wj,r − 1) ∀i 6= j ∀r∥∥∥∥(xiyi
)−(xjyj
)∥∥∥∥2 ≥ (Ri + Rj)2(ui,k + uj,k − 1) ∀i 6= j 6= k
...
Hopeless to solve with a general MINLP solver!
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 4/19
Compact MINLP Formulation
I consider each ring individually
I (xi , yi ) center of ring i
I φr ∈ {0, 1} if rectangle r is used
I ui,j ∈ {0, 1} if ring i is directly placed inside ring j
I wi,r ∈ {0, 1} if ring i is directly placed inside rectangle r
min∑r
φr
s.t
∥∥∥∥(xiyi)−(xjyj
)∥∥∥∥2 ≥ (Ri + Rj)2(wi,r + wj,r − 1) ∀i 6= j ∀r∥∥∥∥(xiyi
)−(xjyj
)∥∥∥∥2 ≥ (Ri + Rj)2(ui,k + uj,k − 1) ∀i 6= j 6= k
...
Hopeless to solve with a general MINLP solver!
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 4/19
Compact MINLP Formulation
I consider each ring individually
I (xi , yi ) center of ring i
I φr ∈ {0, 1} if rectangle r is used
I ui,j ∈ {0, 1} if ring i is directly placed inside ring j
I wi,r ∈ {0, 1} if ring i is directly placed inside rectangle r
min∑r
φr
s.t
∥∥∥∥(xiyi)−(xjyj
)∥∥∥∥2 ≥ (Ri + Rj)2(wi,r + wj,r − 1) ∀i 6= j ∀r∥∥∥∥(xiyi
)−(xjyj
)∥∥∥∥2 ≥ (Ri + Rj)2(ui,k + uj,k − 1) ∀i 6= j 6= k
...
Hopeless to solve with a general MINLP solver!
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 4/19
Cutting stock formulation
min∑P∈P
zP∑P∈P
αt,P · zP ≥ Dt ∀t ∈ T (cons-demand)
zp ∈ Z+ ∀P ∈ P
Pricing Problem (PP)
I (λ1, . . . , λT ) dual multipliers of (cons-demand)
I λt gain for packing a ring of type t
I �nd P ∈ P minimizing 1−∑
t αt,Pλt
Drawbacks of PP
I recursive structure of RCPP is completely in PP
I PP is the maximization variant of RCPP
I can be modeled as nonconvex MINLP → hopeless to solve
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 5/19
Cutting stock formulation
min∑P∈P
zP∑P∈P
αt,P · zP ≥ Dt ∀t ∈ T (cons-demand)
zp ∈ Z+ ∀P ∈ P
Pricing Problem (PP)
I (λ1, . . . , λT ) dual multipliers of (cons-demand)
I λt gain for packing a ring of type t
I �nd P ∈ P minimizing 1−∑
t αt,Pλt
Drawbacks of PP
I recursive structure of RCPP is completely in PP
I PP is the maximization variant of RCPP
I can be modeled as nonconvex MINLP → hopeless to solve
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 5/19
Cutting stock formulation
min∑P∈P
zP∑P∈P
αt,P · zP ≥ Dt ∀t ∈ T (cons-demand)
zp ∈ Z+ ∀P ∈ P
Pricing Problem (PP)
I (λ1, . . . , λT ) dual multipliers of (cons-demand)
I λt gain for packing a ring of type t
I �nd P ∈ P minimizing 1−∑
t αt,Pλt
Drawbacks of PP
I recursive structure of RCPP is completely in PP
I PP is the maximization variant of RCPP
I can be modeled as nonconvex MINLP → hopeless to solveExact Methods for Recursive Circle Packing (Stephen J. Maher) 5/19
Pattern-based Dantzig-Wolfe Decomposition
I inspired by multi-stage cutting stock formulation [Muter, Birbil, Bülb�l
2012]
I zC ∈ Z+ for C ∈ CPI zR ∈ Z+ for R ∈ RPI αt,R / αt,C number of circles of type t in pattern R / C
min∑
R∈RP
zR∑C=(d,t)∈CP
zC ≥ Dt ∀t ∈ T
∑C=(d,t)∈CP
zC ≤∑
R∈RP
αt,RzR +∑
C∈CP
αt,C zC ∀t ∈ T (cons-pack)
zR ∈ Z+ ∀R ∈ RPzC ∈ Z+ ∀C ∈ CP
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 6/19
Pattern-based Dantzig-Wolfe Decomposition
I inspired by multi-stage cutting stock formulation [Muter, Birbil, Bülb�l
2012]
I zC ∈ Z+ for C ∈ CPI zR ∈ Z+ for R ∈ RPI αt,R / αt,C number of circles of type t in pattern R / C
min∑
R∈RP
zR∑C=(d,t)∈CP
zC ≥ Dt ∀t ∈ T
∑C=(d,t)∈CP
zC ≤∑
R∈RP
αt,RzR +∑
C∈CP
αt,C zC ∀t ∈ T (cons-pack)
zR ∈ Z+ ∀R ∈ RPzC ∈ Z+ ∀C ∈ CP
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 6/19
One-level Packings
De�nitionA tuple (d , t) ∈ ZT
+ × T is a circular pattern :⇔I⋃
i{di many circles with radius Ri} packable inside a ring of type t
Exampleinput
all circular patterns
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 7/19
One-level Packings
De�nitionA tuple (d , t) ∈ ZT
+ × T is a circular pattern :⇔I⋃
i{di many circles with radius Ri} packable inside a ring of type t
Exampleinput
all circular patterns
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 7/19
One-level Packings
RP the set of all rectangular patterns
RP = { , , , . . .}
I elements of RP are vectors d = (d1, . . . , dT ) ∈ ZT+
I |RP| depends on T ,R,W ,H
Main Idea
I using R ∈ RP → possibility to use �tting C ∈ CPI using C ∈ CP → possibility to use �tting C ′ ∈ CP
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 8/19
One-level Packings
RP the set of all rectangular patterns
RP = { , , , . . .}
I elements of RP are vectors d = (d1, . . . , dT ) ∈ ZT+
I |RP| depends on T ,R,W ,H
Main Idea
I using R ∈ RP → possibility to use �tting C ∈ CPI using C ∈ CP → possibility to use �tting C ′ ∈ CP
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 8/19
One-level Packings
RP the set of all rectangular patterns
RP = { , , , . . .}
I elements of RP are vectors d = (d1, . . . , dT ) ∈ ZT+
I |RP| depends on T ,R,W ,H
Main Idea
I using R ∈ RP → possibility to use �tting C ∈ CPI using C ∈ CP → possibility to use �tting C ′ ∈ CP
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 8/19
Recursive Packings
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 9/19
Recursive Packings
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 9/19
Recursive Packings
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 9/19
Recursive Packings
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 9/19
Recursive Packings
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 9/19
Recursive Packings
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 9/19
How to solve it?
1. enumeration of CP2. pattern-based branch-and-price
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 10/19
Enumeration of CPI The feasible placement of circles within rings is veri�ed by solving an
NLP. ∥∥∥∥(xiyi)−(xjyj
)∥∥∥∥2
≥ Ri + Rj ∀i , j ∈ C : i < j ,∥∥∥∥(xiyi)∥∥∥∥
2
≤ rt − Ri ∀i ∈ C ,
xi , yi ∈ R ∀i ∈ C .
I All dominated circle packings are elimated.
I Two sets of circle packings are formed, CP feas and CPunknown,
CP∗ ⊆ CP feas ∪ CPunknown.
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 11/19
Enumeration of CPI The feasible placement of circles within rings is veri�ed by solving an
NLP. ∥∥∥∥(xiyi)−(xjyj
)∥∥∥∥2
≥ Ri + Rj ∀i , j ∈ C : i < j ,∥∥∥∥(xiyi)∥∥∥∥
2
≤ rt − Ri ∀i ∈ C ,
xi , yi ∈ R ∀i ∈ C .
I All dominated circle packings are elimated.
I Two sets of circle packings are formed, CP feas and CPunknown,
CP∗ ⊆ CP feas ∪ CPunknown.
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 11/19
Pattern-based Branch-and-Price
Restricted Master Problem (RMP ′)
I contains recursive structure ofRCPP
I decides how to use patterns(→ arrows)
I after solving RMP ′ →branching
Pricing Problem (PP ′)
I task: �nd improving zR forR ∈ RP
I (λ1, . . . , λT ) dual multipliersfor (cons-pack)
I λt gain for packing a circle oftype t
I classical Circle Packing Problem
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 12/19
Pattern-based Branch-and-Price
Restricted Master Problem (RMP ′)
I contains recursive structure ofRCPP
I decides how to use patterns(→ arrows)
I after solving RMP ′ →branching
Pricing Problem (PP ′)
I task: �nd improving zR forR ∈ RP
I (λ1, . . . , λT ) dual multipliersfor (cons-pack)
I λt gain for packing a circle oftype t
I classical Circle Packing Problem
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 12/19
The Pricing Challenge
I PP ′ still NP-hardI can be modelled as nonconvex MINLP
I but much easier to solve than PP
I useful: Farley Bound [Farley 1990]
Corollaryd ν(RMP′)1−ν(PP′)e ≤ OPT (RCPP) is a valid lower bound for RCPP.
Could not solve PP ′ . . .
I LB(PP ′) ≤ ν(PP ′) ⇒ d ν(RMP′)1−LB(PP′)e ≤ OPT (RCPP)
I improvement LB(PP ′) ⇒ improvement for LB(RCPP)
I strengthen relaxation of PP ′ viaI symmetry breakingI positive semi-de�nite relaxationI disjunctive cuts [Saxena, Bonami, Lee 2010]
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 13/19
The Pricing Challenge
I PP ′ still NP-hardI can be modelled as nonconvex MINLP
I but much easier to solve than PP
I useful: Farley Bound [Farley 1990]
Corollaryd ν(RMP′)1−ν(PP′)e ≤ OPT (RCPP) is a valid lower bound for RCPP.
Could not solve PP ′ . . .
I LB(PP ′) ≤ ν(PP ′) ⇒ d ν(RMP′)1−LB(PP′)e ≤ OPT (RCPP)
I improvement LB(PP ′) ⇒ improvement for LB(RCPP)
I strengthen relaxation of PP ′ viaI symmetry breakingI positive semi-de�nite relaxationI disjunctive cuts [Saxena, Bonami, Lee 2010]
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 13/19
The Pricing Challenge
I PP ′ still NP-hardI can be modelled as nonconvex MINLP
I but much easier to solve than PP
I useful: Farley Bound [Farley 1990]
Corollaryd ν(RMP′)1−ν(PP′)e ≤ OPT (RCPP) is a valid lower bound for RCPP.
Could not solve PP ′ . . .
I LB(PP ′) ≤ ν(PP ′) ⇒ d ν(RMP′)1−LB(PP′)e ≤ OPT (RCPP)
I improvement LB(PP ′) ⇒ improvement for LB(RCPP)
I strengthen relaxation of PP ′ viaI symmetry breakingI positive semi-de�nite relaxationI disjunctive cuts [Saxena, Bonami, Lee 2010]
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 13/19
The Pricing Challenge
I PP ′ still NP-hardI can be modelled as nonconvex MINLP
I but much easier to solve than PP
I useful: Farley Bound [Farley 1990]
Corollaryd ν(RMP′)1−ν(PP′)e ≤ OPT (RCPP) is a valid lower bound for RCPP.
Could not solve PP ′ . . .
I LB(PP ′) ≤ ν(PP ′) ⇒ d ν(RMP′)1−LB(PP′)e ≤ OPT (RCPP)
I improvement LB(PP ′) ⇒ improvement for LB(RCPP)
I strengthen relaxation of PP ′ viaI symmetry breakingI positive semi-de�nite relaxationI disjunctive cuts [Saxena, Bonami, Lee 2010]
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 13/19
Valid bounds
I The lower bound is provided by the Farley Bound [Farley 1990]
I Valid primal bounds can be found using the partitioning of thecircular patterns.
CP feas ⊆ CP and
CP∗ ⊆ CP feas ∪ CPunknown.
I Thus, any primal feasible solution using only patterns from CP feas isa valid primal bound.
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 14/19
Valid bounds
I The lower bound is provided by the Farley Bound [Farley 1990]
I Valid primal bounds can be found using the partitioning of thecircular patterns.
CP feas ⊆ CP and
CP∗ ⊆ CP feas ∪ CPunknown.
I Thus, any primal feasible solution using only patterns from CP feas isa valid primal bound.
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 14/19
Test Set
I contains 800 random generated instances
I |T | ∈ {3, 4, 5, 10}I maxi ri
mini Ri∈ {2.0, 2.3, . . . , 5.0}
I max{W ,H}maxi Ri
∈ {2.0, 2.3, . . . , 5.0}
I Di ∈[0.8·W ·Hπ(Ri )2
, 1.2·W ·Hπ(Ri )2
]· γ for γ ∈ {5, 10}
Experiments
I Time limit of 7200 seconds
I Computing primal and dual bounds,I Primal bound with tNLP = 30s and tCPP = 600,I Dual bound with tNLP = 100s and tCPP = ∞
I Comparison with GRASP heuristic
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 15/19
Test Set
I contains 800 random generated instances
I |T | ∈ {3, 4, 5, 10}I maxi ri
mini Ri∈ {2.0, 2.3, . . . , 5.0}
I max{W ,H}maxi Ri
∈ {2.0, 2.3, . . . , 5.0}
I Di ∈[0.8·W ·Hπ(Ri )2
, 1.2·W ·Hπ(Ri )2
]· γ for γ ∈ {5, 10}
Experiments
I Time limit of 7200 seconds
I Computing primal and dual bounds,I Primal bound with tNLP = 30s and tCPP = 600,I Dual bound with tNLP = 100s and tCPP = ∞
I Comparison with GRASP heuristic
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 15/19
Results: Reached Gaps
I gap = |primal−dual|min{primal,dual}
I dual = dual bound for CPLB
I primal = primal bound for CPUB
0% gap 0− 25% gap 25− 50% gap 50− 100% gap > 100% gap
0% gap
30.4%
0− 25% gap
6.1%
25− 50% gap
43.4%
50− 100% gap
7.6%
> 100% gap
12.5%
# instances
|T |0%
25%
50%
3 4 5 10
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 16/19
Results: Reached Gaps
I gap = |primal−dual|min{primal,dual}
I dual = dual bound for CPLB
I primal = primal bound for CPUB
0% gap 0− 25% gap 25− 50% gap 50− 100% gap > 100% gap
0% gap
30.4%
0− 25% gap
6.1%
25− 50% gap
43.4%
50− 100% gap
7.6%
> 100% gap
12.5%
# instances
|T |0%
25%
50%
3 4 5 10
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 16/19
Results: Primal Bounds
I compare to randomized greedy heuristic GRASP [Pedroso, Cunha, Tavares
2013]
I time limit 7200s
Instance branch+price GRASP
Name T maxt rtmint Rt
dual primal primal
s03i1 3 2.2 1 1 1s03i2 3 2.2 9 10 10s03i3 3 2.2 82 100 95s05i1 5 5.1 1 1 1s05i2 5 5.1 8 10 10s05i3 5 5.1 73 94 98s16i1 16 6.3 1 1 1s16i2 16 6.3 8 10 10s16i3 16 6.3 � 96 96
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 17/19
Instances from Tube Industry
I maxi rimini Ri
large → many and hard veri�cation NLPs to solveI rectangles too large compared to rings → PP ′ too hardI still: Comparable performance with GRASP (one better and one
worse).
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 18/19
Instances from Tube Industry
I maxi rimini Ri
large → many and hard veri�cation NLPs to solveI rectangles too large compared to rings → PP ′ too hardI still: Comparable performance with GRASP (one better and one
worse).Exact Methods for Recursive Circle Packing (Stephen J. Maher) 18/19
Recursive Circle Packing Problem
I pack set of rings; minimize the number of rectangles
I generalization of Circle Packing Problem
Pattern-based Dantzig-Wolfe decomposition
I recursive master problem
I nonconvex MINLP pricing
First exact algorithm: one-level enumeration +branch-and-price
I optimal solutions for many small and medium-sized instances
I improved primal solutions compared to existing heuristic
Future work
I tighter convex relaxations of PP ′?
I branching on original variables?
Exact Methods for Recursive Circle Packing (Stephen J. Maher) 19/19