You are on page 1of 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/321111963

Mixed-Integer Programming Model for Two-Dimensional Non-Guillotine Bin


Packing Problem with Free Rotation

Conference Paper · July 2017


DOI: 10.1109/ICISCE.2017.102

CITATIONS READS

3 486

2 authors, including:

Ning Ma
Xi'an Jiaotong University
7 PUBLICATIONS 90 CITATIONS

SEE PROFILE

All content following this page was uploaded by Ning Ma on 07 October 2019.

The user has requested enhancement of the downloaded file.


2017 4th International Conference on Information Science and Control Engineering

Mixed-integer Programming Model for


Two-dimensional Non-guillotine Bin Packing Problem with Free Rotation

Ning Ma ∗† , Zhili Zhou ∗†


∗ School
of Management, Xian Jiaotong University, 710049 Xian, China
† State Key Laboratory for Manufacturing Systems Engineering, Xian Jiaotong University, 710054 Xian, China
Email: peakning@stu.xjtu.edu.cn [Ning Ma], zlzhou@xjtu.edu.cn [Zhili Zhou]

Abstract—Two-dimensional bin packing problem (2BPP) is • 2BPP-GR: two-dimensional guillotine (G) bin packing
a classical problem in operations research and has been problem with free rotation (R).
extensively investigated in the past years. The 2BPP can • 2BPP-NR: two-dimensional non-guillotine (N) bin
be classified according to choices of the orientation (fixed
orientation or 90 degrees rotated) and the cut type (guillotine packing problem with free rotation (R).
or non-guillotine cut). Many mathematical models and solution Many researchers devote to the 2BPP, and related lit-
methods have been proposed for the problem. However, due to erature is abundant [3], [4]. Among them, many mathe-
the difficulty in representing constraints, no exact mathematical matical models and solution methods have been proposed
model is presented for the two-dimensional non-guillotine bin
for the 2BPP. Christofides [7] investigated the 2BPP-GO
packing problem with free rotation (2BPP-NR). In this paper,
we present two Mixed-integer programming (MIP) models for with maximizing the value of items cut and proposed an
the 2BPP-NR. Computational experiments are conducted on exact method to solve it. However, they did not present
random problem instances and comparative analyses of the an mathematical model to formulate the problem. Lodi [8]
proposed models are presents. Results show the Model II presents two integer linear programming models for the 2-
outperforms the Model I in both number of constraints and
staged 2BPP-GO. Yanasse [9] presented integer linear and
computational time.
non-linear models for the 2BPP-GO. Computational experi-
Keywords-two-dimensional; non-guillotine; free rotation; bin ments were performed to demonstrate the effectiveness of
packing problem; mixed-integer programming model
the proposed models. Macedo [10] described an integer
linear programming arc-flow model to formulate the two
I. I NTRODUCTION
stages 2BPP-GO.
The two-dimensional bin packing problem (2BPP) has Beasley [5] considered the 2BPP-NO with maximizing
been extensively investigated in the past years [1]. The the profit of items packing into the bin. He presented an
2BPP considers allocating a set of rectangular items to a integer programming model to formulate the problem and
larger rectangular bin to minimize the waste or maximize the proposed a tree search procedure to obtain the exact solution.
total value. The 2BPP has many important applications in Hadjiconstantinou [6] presented a 0-1 integer programming
steel, wood, glass, or paper industries. In cutting departments formulation of the 2BPP-NO and proposed a exact pro-
of manufacturing companies, rectangular items have to be cedure to solve it. Both of them provided upper bounds
cut from large plates for assembling final productions. In through Lagrangian relaxation and subgradient optimization.
general, items should be packed parallel to edges of the bin. Fernández [11] considered the two-dimensional bin packing
The solution of the 2BPP determines which item is allocated with rotation and load balancing. However, there were many
in the bin to maximize the total values while satisfying the non-linear constraints in the proposed model, which could
packing constraints. not be solved directly by the commercial solvers. Cui [12]
Some special choices should be made on packing/cutting investigated into the two-dimensional bin packing problem,
patterns, i.e., the orientation and the cut type [2]. Choices on and proposed an efficient sequential heuristic. Sykora [13]
the orientation consist of a fixed orientation or free rotation presents a number constructive algorithms to solve the two-
of the item. Choices on the cut type consist of whether or dimensional irregular bin packing problem with free rota-
not the cutting patterns meet the requirement of guillotine tion. However, both of them did not present an mathematical
cuts, i.e., items are cut horizontally or vertically from one model for the problem.
border to the opposite one. Considering the combinations of Though the 2BPP-NR has a wide variety of application-
these choices, the 2BPP can be classified into four types: s in practice, few study concerns presenting linear pro-
• 2BPP-GO: two-dimensional guillotine (G) bin packing gramming mathematical model of the problem. The linear
problem with fixed orientation (O). programming models are useful for the academic research
• 2BPP-NO: two-dimensional non-guillotine (N) bin and practical application. These models help develop more
packing problem with fixed orientation (O). effective solution methods, explore model decomposition,

978-1-5386-3013-6/17 $31.00 © 2017 IEEE 456


DOI 10.1109/ICISCE.2017.102
and evaluate performances of heuristic methods. Therefore, p : coordinate in the width axis;
this paper proposes two mixed-integer programming models q : coordinate in the height axis;
for the two-dimensional non-guillotine bin packing problem M : An arbitrarily large number.
with free rotation. Model I is a generalized Gilmore and Decision variables:
Gomorys model, and Model II is a generalized arc flow xipq : 1, if the bottom-left corner of item i is placed at
model. Model I is based on the discrete representation the coordinate (p, q); 0, otherwise;
of the geometrical space, where binary variables are used si : 1, if item i is selected in the bin; 0, otherwise;
to handle coordinates of items. Model II is based on the ri : 1, if item i is 90 degrees rotated; 0, otherwise;
real geometrical space, where integer variables are used f wi : integer, the final occupied length of item i in the
to represent the physical positions of items. Computational width axis;
experiments are conducted on random problem instances and f hi : integer, the final occupied length of item i in the
comparative analyses of the proposed models are presents height axis;
Results show Model II outperforms Model I in both number bwpq : 0, if the coordinate (p, q) is occupied in the width
of constraints and computational time. axis; 1, otherwise;
The remainder of this paper is organized as follows. bhpq : 0, if the coordinate (p, q) is occupied in the height
Section II gives the problem description and presents the two axis; 1, otherwise.
mixed-integer programming models. Section III reports the The Model I for the 2BPP-NR can be formulated mathe-
computational results and evaluates the performances of the matically as follows:
proposed models. Section IV concludes the paper, offering n

some suggestions for future research. min vi si (1)
i=1
II. M ATHEMATICAL M ODELS
subject to:
The two-dimensional non-guillotine bin packing problem H
W 

with free rotation can be described as follows. The 2BPP- xipq ≥ si ∀i (2)
NR considers allocating a set of n rectangular items into p=0 q=0
a bin while maximizing the total values of items selected. n
Every item i(i = 1, . . . , n) is characterized by a width wi 
xipq ≤ 1 ∀p, q (3)
and a height hi , while the bin with a width W and a height
i=0
H. Without loss of generality, we assume that wi ≤ W and
hi ≤ H(i = 1, . . . , n). The value of each item is set to be
vi = wi × hi . Items have to be packed parallel to edges of M (si − 1) ≤ f wi − (hi − wi )ri − wi ≤ M (1 − si ) (4a)
the bin with free rotation and non-guillotine cut requirement. M (si − 1) ≤ f hi − (wi − hi )ri − hi ≤ M (1 − si ) (4b)
The objective is to find a feasible packing with maximizing f w i ≤ M s i , f hi ≤ M s i ∀i (4c)
the total values. The 2BPP-NR is strongly NP-hard, as the
one-dimensional bin packing problem is strongly NP-hard
[14].
p · xipq + f wi ≤ W ∀i (5a)
In this section, we propose two mixed-integer program-
ming models for the 2BPP-NR, named Model I and Model II q · xipq + f hi ≤ H ∀i (5b)
respectively. Model I is a generalized Gilmore and Gomorys
model, and Model II is a generalized arc flow model. The
main difference of these two models is the representation of p · xipq + f wi − r ≤ M (1 − bwrs ) (6a)
items’ locations. Model I uses binary variables to handle the q · xipq + f hi − s ≤ M (1 − bhrs ) (6b)
coordinates of items, while Model II considers that variables xjrs ≤ bwrs + bhrs ∀i = j, p < r, q < s (6c)
corresponding to items are indexed by the physical position
they occupy in the bin. The detailed descriptions of the Equation (1) represents the objective, which is maximizing
models are presented as follows. the total values of item selected in the bin. Constraint (2)
specifies that an item is packed at most once in the bin. Con-
A. Model I straint (3) specifies that one point of the bin is occupied at
We first describe Model I for the 2BPP-NR where binary most once by an item. Due to that items could be 90 degrees
variables are used to handle coordinates of items. Notations rotated, the occupied lengths in the width and height axes
and decision variables are listed as follow: is not fixed. Constraint (4) represents the relation between
Notations: item selection, item rotation and final occupied lengths of
i, j : indexes of items; item i in the width and height axes. Final occupied lengths
vi : value of item i; are active if and only if item i is selected in the bin; or set

457
to be zero if not selected. The final lengths are computed xwi + f wj − xwj ≤ M owij (11a)
by f wi = hi ri + wi (1 − ri) and f hi = wi ri + hi (1 − ri). xhi + f hj − xhj ≤ M ohij (11b)
Constraint (5) implies that any item should be completely
xwj + f wi − xwi ≤ M owji (11c)
packed within the bin. Constraint (6) denotes no overlap
happens between two packed items. Constraints (6a) and xhj + f hi − xhi ≤ M ohji (11d)
(6b) denote that coordinate (r,s) is interfered in the width owij + ohij + owji + ohji ≤ 3 ∀i = j (11e)
and height axes respectively. Constraint (6c) represents that
In this formulation, equation (7) represents the objective,
no item can be packed in coordinate (r,s) if and only if it is
which is the same as the objective (1) of Model I. Constraint
occupied in both the width and height axes.
(8) specifies the definition of f wi , f hi , and is the same
B. Model II as constraint (4) in Model I. Constraint (9) represents the
condition that item i is selected in the bin if its coordinate
In Model II for the 2BPP-NR, integer variables represent
of the top-right corner is not zero. Constraint (10) implies
the physical positions of items. Let (xwi , xhi ) denotes the
that any item should be not packed out the edge of the
coordinate of the top-right corner of item i. We assume that
bin. Constraints (11a), (11b), (11c), and (11d) describe the
the coordinate of the top-right corner of the bin is (W, H).
condition whether item i and j interfere each other in width
Notations and decision variables used are listed as follow:
or height axis. Constraint (11e) denotes the condition that no
Notations:
overlap happens between item i and j. Because if two items
i, j : indexes of items;
overlap, item i and j interfere each other in both width and
vi : value of item i;
height axes, then the sum of interferences is equal to 4.
M : An arbitrarily large number. Table I shows comparisons of Model I and II in term of
Decision variables the number of variables and constraints. The complexity of
xwi : integer, coordinate of the top-right corner in the Model I is related with the size of the bin and the number
width axis of item i; of items, while the complexity of Model II is only related
xhi : integer, coordinate of the top-right corner in the with the number of items.
height axis of item i;
si : 1, if item i is selected in the bin; 0, otherwise; Table I
C OMPARISON OF THE PROPOSED TWO MODELS
ri : 1, if item i is 90 degrees rotated; 0, otherwise;
f wi : integer, the final occupied length in the width axis Number of variables Number of constraints
(n2 +n)W 2 H 2
of item i; Model I 4n + (n + 1)W H 5n + (n + 1)W H + 4
f hi : integer, the final occupied length in the height axis Model II 6n + n2 7n + 5/2n2

of item i;
owij : 1, if item i interferes item j in the width axis; 0, III. C OMPUTATIONAL R ESULTS
otherwise;
In this section, we present the computational results
ohij : 1, if item i item j in the height axis; 0, otherwise;
obtained by Model I and Model II for some random problem
The Model II for the 2BPP-NR can be formulated math-
instances [15]. The models is codified in Matlab and the
ematically as follows:
experiment is conducted on a personal computer with an
n
 Intel Core i5 3.10GHz CPU and 4GB RAM. Both mod-
min vi si (7) els are solved by the integer linear programming solver
i=1
CPLEX 12.6 under standard default settings. Four groups
subject to: of instances (Groups 1-4) are randomly generated with
different values of the following parameters: number of item,
M (si − 1) ≤ f wi − (hi − wi )ri − wi ≤ M (1 − si ) (8a)
width and height of the bin. Every group has 10 instances.
M (si − 1) ≤ f hi − (wi − hi )ri − hi ≤ M (1 − si ) (8b) Parameters in each group are described below:
f w i ≤ M s i , f hi ≤ M s i ∀i (8c) Group 1: number of item is randomly generated within
[3,5], wi and hi are randomly generated within [1,8], and
W = 10, H = 8.
si ≤ xwi ∀i (9a) Group 2: number of item is randomly generated within
[8,10], wi and hi are randomly generated within [1,8], and
si ≤ xhi ∀i (9b) W = 10, H = 8.
Group 3: number of item is randomly generated within
[8,10], wi and hi are randomly generated within [1,8], and
xwi − f wi ≥ 0 ∀i (10a) W = 20, H = 15.
xhi − f hi ≥ 0 ∀i (10b)

458
Group 4: number of item is randomly generated within loose upper bound for the problem, from 1387.9 to 296.2 in
[15,20], wi and hi are randomly generated within [1,8], and average.
W = 20, H = 15.
Table IV
Table II presents the computational results obtained by R ESULTS OF MIP AND MIP RELAXATION FOR INSTANCES IN G ROUP 4
Model I and Model II for instances in Group 1. In this
table, the multicolumns labeled “Model I” and “Model II” Instance MIP MIP relaxtion
show the results of instances in Group 1 obtained by the Solution CPU time(s) Solution CPU time(s)
1 288 147.44 1189 0.04
two models respectively. Columns “Number of variables”, 2 293 14.7 1394 0.04
“Number of constraints” describe the complexity of each 3 295 629.07 1253 0.05
instance. Column “Preprocess time” denotes the consumed 4 296 31.1 1525 0.05
5 300 39.04 1302 0.05
time for writing the model into CPLEX, and Column “CPU 6 295 7.09 1427 0.04
time” denotes the computational time for obtaining the 7 297 82.88 1290 0.03
optimal solution. 8 300 1.28 1540 0.04
Computational results clearly show that Model II is supe- 9 298 6.56 1397 0.04
10 300 0.81 1562 0.04
rior to Model I. The average number of variables of Model II Average 296.2 96.00 1387.9 0.042
is quite less than Model I, from 142.5 to 428.8. The average
number of constraints of Model II is also less than Model I,
from 94 to 32013.2. Due to the higher number of constraints, IV. C ONCLUSION
the preprocess time in writing model into CPLEX in Model This paper considers the two-dimensional non-guillotine
II is superior to Model I, from 0.08s to 226.17s. The CPU bin packing problem with free rotation (2BPP-NR). Due to
time for obtaining the optimal solution in Model II is also the difficulty in representing constraints, no exact mathe-
superior to Model I, from 0.03s to 5.17s. matical model is proposed for it. We present two mixed-
Due to the poor performance of Model I, the following integer programming mathematical models to formulate the
instances in Groups 2-4 is only solved by Model II. Table problem. Model I is a generalized Gilmore and Gomorys
III presents the average results of instances in Groups 1-4 model, and Model II is a generalized arc flow model. The
solved by Model II. linear programming models are useful for the academic
research and practical application. We conduct computation-
Table III
C OMPUTATIONAL RESULTS OF M ODEL II al experiments on random problem instances and present
comparative analyses between the two models. Results show
Group Model II the Model II outperforms the Model I. Future research could
Number of Number of Preprocess CPU
variables constraints time(s) time(s) considers proposing efficient heuristic methods for large-
Group 1 142.50 94.00 0.08 0.03 scale problem, or extending the model to three-dimensional
Group 2 298.20 208.00 0.20 1.29 bin packing problems.
Group 3 299.40 209.00 0.23 8.82
Group 4 1082.45 820.67 1.13 96.00 ACKNOWLEDGMENT
The authors would like to acknowledge the financial
Computational results show that as the increase of the support from the the National Natural Science Foundation
number of items, the length of weight and height of the of China (NSFC) under Grant NO. 71390333.
bin, the CPU time increases sharply. Results show that
the number of variables and constraints increase smoothly, R EFERENCES
which validates the model complexity in Table I. Results in
[1] A. Lodi, S. Martello, and M. Monaci, “Two-dimensional
Group 2 and 3 show that the length of weight and height packing problems: A survey,” European journal of opera-
of the bin does not affect the number of variables and tional research, vol. 141, no. 2, pp. 241–252, 2002.
constraints. However a bigger bin increases the complexity
and need more the computational time. Results in Group 3 [2] A. Lodi, S. Martello, and D. Vigo, “Heuristic and metaheuris-
and 4 show that the number of items plays an important tic approaches for a class of two-dimensional bin packing
problems,” INFORMS Journal on Computing, vol. 11, no. 4,
effect in the model complexity. pp. 345–357, 1999.
Due to that most instances in Group 4 can not obtain
optimal solution in limit time. We consider relax all the [3] H. Dyckhoff, “A typology of cutting and packing problems,”
variables in MIP of Model II and obtain the MIP relaxation European Journal of Operational Research, vol. 44, no. 2,
by CPLEX. Table IV presents the results of MIP and MIP pp. 145–159, 1990.
relaxation for instances in Group 4. It can be seen that the [4] G. Wäscher, H. Haußner, and H. Schumann, “An improved
MIP relaxation consumes less CPU time than the MIP, from typology of cutting and packing problems,” European journal
0.04s to 96.00s in average. However, it provides a quite of operational research, vol. 183, no. 3, pp. 1109–1130, 2007.

459
Table II
C OMPUTATIONAL RESULTS OF M ODEL I AND M ODEL II FOR INSTANCES IN G ROUP 1

Instance Model I Model II


Number of Number of Preprocess CPU Number of Number of Preprocess CPU
variables constraints time(s) time(s) variables constraints time(s) time(s)
1 244 5941 28.95 0.28 144 93 0.28 0.03
2 496 40780 315.80 1.12 72 42 0.11 0.05
3 580 62408 528.81 40.74 297 207 0.08 0.04
4 328 15458 73.49 0.27 189 126 0.02 0.02
5 580 60805 488.50 1.14 24 11 0.07 0.05
6 412 28523 167.05 5.17 45 24 0.04 0.03
7 328 12050 47.96 0.36 297 207 0.02 0.03
8 496 42496 313.15 1.36 72 42 0.05 0.04
9 412 24113 125.34 0.45 240 164 0.04 0.02
10 412 27558 172.66 0.82 45 24 0.04 0.02
Average 428.8 32013.2 226.17 5.17 142.5 94 0.08 0.03

[5] J. Beasley, “An exact two-dimensional non-guillotine cutting [15] J. O. Berkey and P. Y. Wang, “Two-dimensional finite bin-
tree search procedure,” Operations Research, vol. 33, no. 1, packing algorithms,” Journal of the operational research
pp. 49–64, 1985. society, vol. 38, no. 5, pp. 423–429, 1987.

[6] E. Hadjiconstantinou and N. Christofides, “An exact algorithm


for general, orthogonal, two-dimensional knapsack problems,”
European Journal of Operational Research, vol. 83, no. 1, pp.
39–56, 1995.

[7] N. Christofides and E. Hadjiconstantinou, “An exact algorithm


for orthogonal 2-d cutting problems using guillotine cuts,”
European Journal of Operational Research, vol. 83, no. 1,
pp. 21–38, 1995.

[8] A. Lodi and M. Monaci, “Integer linear programming models


for 2-staged two-dimensional knapsack problems,” Mathemat-
ical Programming, vol. 94, no. 2-3, pp. 257–278, 2003.

[9] H. H. Yanasse and R. Morabito, “Linear models for 1-group


two-dimensional guillotine cutting problems,” International
Journal of Production Research, vol. 44, no. 17, pp. 3471–
3491, 2006.

[10] R. Macedo, C. Alves, and J. V. De Carvalho, “Arc-flow model


for the two-dimensional guillotine cutting stock problem,”
Computers & Operations Research, vol. 37, no. 6, pp. 991–
1001, 2010.

[11] A. Fernández, C. Gil, R. Baños, and M. G. Montoya, “A


parallel multi-objective algorithm for two-dimensional bin
packing with rotations and load balancing,” Expert Systems
with Applications, vol. 40, no. 13, pp. 5169–5180, 2013.

[12] Y.-P. Cui, Y. Cui, and T. Tang, “Sequential heuristic for the
two-dimensional bin-packing problem,” European Journal of
Operational Research, vol. 240, no. 1, pp. 43–53, 2015.

[13] A. Martinez-Sykora, R. Alvarez-Valdes, J. Bennell, R. Ruiz,


and J. Tamarit, “Matheuristics for the irregular bin packing
problem with free rotations,” European Journal of Opera-
tional Research, vol. 258, no. 2, pp. 440–455, 2017.

[14] C. McDiarmid, “Pattern minimisation in cutting stock prob-


lems,” Discrete Applied Mathematics, vol. 98, no. 1, pp. 121–
130, 1999.

460

View publication stats

You might also like