CLP Solver LNS
CLP Solver LNS
Keywords: This paper presents a Large Neighbourhood Search (LNS) algorithm that finds an effective packing of a set
Container loading problem of items into containers. The aim of the LNS algorithm is to provide packing solutions that can be adopted
Large neighbourhood search by many logistics companies. The LNS algorithm can handle a set of side constraints such as orientation,
stacking, and separation as well as weight limit, loading priorities, and stability to address the issues arising
for loading the items. The packing solution is also visualised and animated using an Excel workbook to help
the workers for loading of the items. Finally, the authors present a comparison between the performance of
the LNS algorithm and the state-of-the-art algorithms from the literature based on benchmark data sets. The
results demonstrate the quality of the solutions achieved by the LNS algorithm.
∗ Corresponding author.
E-mail addresses: osa33@bath.ac.uk (Ö. Şafak), G.Erdogan@bath.ac.uk (G. Erdoğan).
https://doi.org/10.1016/j.cor.2023.106199
Received 26 May 2022; Received in revised form 18 January 2023; Accepted 20 February 2023
Available online 1 March 2023
0305-0548/© 2023 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/).
Ö. Şafak and G. Erdoğan Computers and Operations Research 154 (2023) 106199
computational results showing the quality of our solutions on bench- (2019) ensure that an item placed below other items must have enough
mark instances, comparing them with the results from the literature. resistance to support the pressure that is applied over its top face.
Section 6 concludes the paper along with future research directions. Complete shipment constraints require that if any part of a certain
subset is loaded, then all other items belonging to it must be loaded
2. Literature review (see Bischoff and Ratcliff, 1995; Eley, 2003; Bortfeldt and Wäscher,
2013).
In this section, we provide an analysis of the literature on the CLP
Separation constraints prohibit certain items being loaded into the
based on five features. First, we address the set of side constraints that
same container, e.g. foodstuff and perfumery articles should be trans-
arise in practice. Next, we review some constructive heuristics that
ported separately (Eley, 2003). According to Bortfeldt and Wäscher
provide initial solutions as well as improvement heuristics along with
(2013), separation constraints have not received much attention from
metaheuristics for the CLP. We also review some exact approaches.
Finally, we provide a brief review of the existing studies for the solution researchers.
visualisation of CLP. Positioning constraints restrict the position of items within the
container (Bortfeldt and Wäscher, 2013). In this context, multi-drop
2.1. Constraints in container loading constraints are commonly used in practice in such a way that items
are loaded by taking into account the delivery route of the vehicle.
As pointed out in the survey of Zhao et al. (2016) who review 113 As Zhao et al. (2016) state the aim of the multi-drop constraints is
papers that cover all variants of the CLP, there is a lack of studies to avoid unnecessary unloading and reloading of large items at every
which incorporate a set of real-world constraints. For a comprehensive destinations, see Terno et al. (2000), Gendreau et al. (2006), Fuellerer
review of such constraints, we refer the reader to Bortfeldt and Wäscher et al. (2010), Iori and Martello (2010), Junqueira et al. (2012b),
(2013), wherein the authors categorise them related to the container, Ceschia and Schaerf (2013) and Pollaris et al. (2016).
items, cargo, positioning, and load. Load stability can be distinguished between vertical and horizontal
Weight limit constraint, which is crucial whenever heavy items stability. Vertical stability, which prevents items from falling down,
have to be loaded, requires that the sum of the weights of the loaded
is achieved through supporting the bottom of items by either the
items must be less than or equal to the given weight limit of the
container floor or by the items underneath (Bortfeldt and Wäscher,
container. Terno et al. (2000), Bortfeldt and Gehring (2001), Egeblad
2013). While several papers (e.g. Eley, 2002; Liu et al., 2011; Zhang
et al. (2010), Fuellerer et al. (2010), and Correcher et al. (2017) are
et al., 2012; Junqueira et al., 2012a; Ceschia and Schaerf, 2013; Liu
examples of studies in which the weight constraint for the stowed load
is incorporated into the CLP. et al., 2014) guarantee full support, others (e.g. Gendreau et al., 2006;
Weight distribution constraints ensure that weight is distributed Fuellerer et al., 2010) require partial support, at least as much the pre-
along the container. This is significantly important for handling and specified minimum fraction of the base area. In addition, horizontal
shipping the loaded container, since an unbalanced load may cause stability avoids shifting of items significantly during transport. Full hor-
item shifts, thereby resulting in damaged items (see Bortfeldt and izontal stability ensures that each item is either horizontally adjacent
Wäscher (2013)). Eley (2002) aims to achieve an even weight distri- to another item or a container wall (Bortfeldt and Wäscher, 2013). Liu
bution along the container length since this side defines the longest et al. (2011) only requires that at least one side of the item is to touch
container edge. More recently, Ramos et al. (2018) adopt vehicle the walls of the container or the sides of other items.
specific diagrams that show the admissible cargo weight as a function
of the position of the centre of gravity of the cargo, thus complying with
the regulations. Júnior et al. (2019) desire to have the load’s centre of 2.2. Constructive heuristics
gravity close to the geometric centre of the container.
When all items cannot be loaded due to insufficient capacity, load-
There is a wide range of heuristics to decide how to put items into
ing priorities of items come into play. Some items containing products
the container. In this paper, we only analyse the most commonly used
with a closer due date or expiration date may have greater priority than
heuristics, namely, wall-building and layer-building.
others (Junqueira et al., 2012a). According to Bortfeldt and Wäscher
(2013), although loading priorities are very important, they have not George and Robinson (1980) introduce a wall-building algorithm
been paid enough attention in the design of algorithms. As an exam- by constructing vertical walls that fill the width and height of the
ple, Ren et al. (2011) set the priority of items to maximise volume container. Although the wall-building approach tackles a set of simpler
utilisation. two-dimensional problems instead of a CLP, the main disadvantage of
There are six orientations for an item. As stated by Bortfeldt and this approach is to lose space when items do not fully utilise the depth
Wäscher (2013), it is common practice that the vertical orientation is of the wall they belong to Egeblad et al. (2010). Some examples in
restricted to prevent the items from being damaged or to ensure the which the wall-building heuristic is used are Bortfeldt and Gehring
stability of the load. Chien and Deng (2004), Gendreau et al. (2006), (2001) and Pisinger (2002).
and Fuellerer et al. (2010) allow only one vertical orientation with 90◦ Bischoff and Ratcliff (1995) utilise the layer-building approach that
rotations of the items on the horizontal plane. fills the container in horizontal layers from the bottom of the container
Stacking constraints (also known as load bearing constraints) re- upwards. Their motivation for this approach is to achieve a high degree
strict how items are placed on top of each other (see Bortfeldt and
of stability in contrast to wall-building approach where the height
Wäscher (2013)). In the literature, stacking constraints are introduced
of adjacent walls varies significantly or where gaps exist between
in several ways. Terno et al. (2000) and Sciomachen and Tanfani
them. Terno et al. (2000), Lim et al. (2012), and Júnior et al. (2019)
(2007) prohibit an item of a particular type being placed on top
also use the layer-building approach within their heuristic algorithm.
of another type. Gendreau et al. (2006) and Fuellerer et al. (2010)
require that no nonfragile item can be placed on top of a fragile one, The column-building heuristic aims to stack up as many items as
although fragile items can be stacked on top of each other. On the other possible. The three constructive heuristics differ in terms of the next
hand, Junqueira et al. (2012a) require that items cannot be placed point, where an item can be added, they choose. Wall-building, layer-
above a fragile item. Junqueira et al. (2012a) limit the pressure of the building, and column-building heuristics choose the rightmost, farthest
items placed above an item of a particular type. Similarly, Júnior et al. from the front-side, and the topmost points respectively.
2
Ö. Şafak and G. Erdoğan Computers and Operations Research 154 (2023) 106199
3
Ö. Şafak and G. Erdoğan Computers and Operations Research 154 (2023) 106199
Table 1
Data for Fig. 4.
Width (cm) Height (cm) Length (cm) # of items
Item type 1 10 10 10 10
Item type 2 20 20 20 10
Item type 3 30 30 30 10
Item type 4 40 40 40 10
4
Ö. Şafak and G. Erdoğan Computers and Operations Research 154 (2023) 106199
5
Ö. Şafak and G. Erdoğan Computers and Operations Research 154 (2023) 106199
Algorithm 2: Constructive Heuristic best_known solution. The secondary objective is to maximise the
Input: Item, container, and compatibility data total volume of containers utilised. Therefore, when both incumbent
𝐼𝑠𝐼𝑡𝑒𝑚𝐴𝑑𝑑𝑒𝑑 ← FALSE and best_known solutions are feasible and the profits of the in-
Sort Containers (Algorithm 5) cumbent and best_known solutions are the same, the best_known
𝐶 ← set of containers solution is updated only if the total volume packed in the incumbent
𝐼 ← set of item types solution is bigger than the total volume packed in the best_known
for 𝑘 ∈ 𝐶 do solution.
for 𝑖 ∈ 𝐼 do If users select the option of balancing items in the containers,
Sort the rotation order of the item of type 𝑖 for the container
𝑘∈𝐶
Algorithm 2 calculates the moment for each container 𝑚 with respect to
end the mid-point of the container floor (see Appendix C for the formula).
for 𝑖 ∈ 𝐼 do In addition, Algorithm 2 calculates the distances between the items of
𝐼𝑠𝐼𝑡𝑒𝑚𝐴𝑑𝑑𝑒𝑑 ← TRUE same type in each container 𝑚 ∈ 𝐶 as in (5) in Appendix C. Total
while (There exists at least one item of type 𝑖 ∈ 𝐼 to be packed) distance for the incumbent solution is the sum of distances for all the
and (𝐼𝑠𝐼𝑡𝑒𝑚𝐴𝑑𝑑𝑒𝑑 = TRUE) do
containers. The LNS algorithm attempts to minimise the total distance,
𝐼𝑠𝐼𝑡𝑒𝑚𝐴𝑑𝑑𝑒𝑑 ← AddItemToContainer(item of type
𝑖, container 𝑘) (Algorithm 6) in other words, items are located in such a way that the items with
end the same type are close to each other as possible and at the same time
end outermost point of the items is minimised.
𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 ← TRUE It is important to note that the solution of the Constructive
for 𝑖 ∈ 𝐼 do Heuristic may not be feasible because all the items that are manda-
if (There exists at least one item of type 𝑖 ∈ 𝐼 to be packed) and tory may not be packed. In this case, the solution is still passed to the
(𝑚𝑎𝑛𝑑𝑎𝑡𝑜𝑟𝑦 (𝑖) = TRUE) then Improvement Heuristic since an infeasible solution may turn into
𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 ← FALSE
exit for a feasible solution by reorganising the containers in the Improvement
end Heuristic.
end
Calculate 𝑑𝑖𝑠𝑝𝑒𝑟𝑠𝑖𝑜𝑛 for the incumbent solution 4.2.1. Packing an item to a container
Calculate 𝑢𝑡𝑖𝑙𝑖𝑠𝑎𝑡𝑖𝑜𝑛 of containers for the incumbent solution Packing starts with checking the feasibility of possible solution
if incumbent solution is better than the best known solution then when an item with type 𝑖 ∈ 𝐼 is added to the container 𝑘 ∈ 𝐶:
best_known ← incumbent
for 𝑚 ∈ 𝐶 do
1. if the item with type 𝑖 ∈ 𝐼 is compatible with the type of the
if optimise balance = TRUE then
Calculate 𝑚𝑜𝑚𝑒𝑛𝑡 (𝑚) using equation (4) container 𝑘 ∈ 𝐶.
end 2. if the volume capacity of the container 𝑘 ∈ 𝐶 is still enough to
Calculate 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒(𝑚) using equation (5) pack the item of type 𝑖 ∈ 𝐼.
end 3. if the weight capacity of the container 𝑘 ∈ 𝐶 is still enough to
∑
𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑚𝑜𝑚𝑒𝑛𝑡 ∶= 𝑚∈𝐶 𝑚𝑜𝑚𝑒𝑛𝑡 (𝑚) pack the item of type 𝑖 ∈ 𝐼.
∑
𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 ∶= 𝑚∈𝐶 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒(𝑚) 4. if the item of type 𝑖 ∈ 𝐼 is compatible with all the items already
end
packed into the container 𝑘 ∈ 𝐶.
end
Output: incumbent solution If one of the conditions does not hold, item of type 𝑖 ∈ 𝐼 is not added
to the container 𝑘 ∈ 𝐶. Only if all feasibility conditions are satisfied,
we attempt to pack item of type 𝑖 ∈ 𝐼 in its best orientation unless it
is forbidden by the user. If it is forbidden, the next orientation in 𝑂(𝑖),
where 𝑐𝑜𝑛𝑡𝑎𝑖𝑛𝑒𝑟 𝑣𝑜𝑙𝑢𝑚𝑒 𝑝𝑎𝑐𝑘𝑒𝑑 (𝑘) and 𝑐𝑜𝑛𝑡𝑎𝑖𝑛𝑒𝑟 𝑤𝑒𝑖𝑔ℎ𝑡 𝑝𝑎𝑐𝑘𝑒𝑑 (𝑘) are
where 𝑂(𝑖) is the orientation order set for the item of type 𝑖, is selected
the total volume and weight of the items packed into the container
to pack the item.
𝑘 ∈ 𝐶 and 𝑣𝑜𝑙𝑢𝑚𝑒 𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦 (𝑘) and 𝑤𝑒𝑖𝑔ℎ𝑡 𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦 (𝑘) are the volume
and weight limit of the container 𝑘 ∈ 𝐶, respectively. We use the addition point concept to determine the possible positions
If one the following conditions holds: in a container where the items can be placed. Let 𝑃 (𝑘) be the set of
addition points for the container 𝑘 ∈ 𝐶 in the current solution. When
1. 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = TRUE and 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = FALSE the container 𝑘 is empty, 𝑃 (𝑘) only includes the point with coordinates
2. 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = FALSE and 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = FALSE (0, 0, 0), meaning that the first item is added to the farthest left lower
and corner. When an item is placed at an addition point, 3 new addition
points are generated (closest left lower corner, farthest right lower
𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑣𝑜𝑙𝑢𝑚𝑒 𝑝𝑎𝑐𝑘𝑒𝑑 > 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑣𝑜𝑙𝑢𝑚𝑒 𝑝𝑎𝑐𝑘𝑒𝑑
corner, farthest left upper corner), at which the next items can be
3. 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = TRUE and 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = TRUE and placed (see Fig. 5).
We set the origins (𝑜𝑟𝑖𝑔𝑖𝑛 𝑥, 𝑜𝑟𝑖𝑔𝑖𝑛 𝑦, 𝑜𝑟𝑖𝑔𝑖𝑛 𝑧) of the item with type
𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑝𝑟𝑜𝑓 𝑖𝑡 > 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑝𝑟𝑜𝑓 𝑖𝑡 𝑖 ∈ 𝐼 to the coordinates of the addition point 𝑝 ∈ 𝑃 (𝑘). If 𝑜𝑟𝑖𝑔𝑖𝑛 𝑦 > 0
for a heavy item, we look for the next addition point to place the heavy
4. 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = TRUE and 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = TRUE and
item, since we do not place a heavy item on another item. We also
𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑝𝑟𝑜𝑓 𝑖𝑡 = 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑝𝑟𝑜𝑓 𝑖𝑡 and define the farthest coordinates (𝑜𝑝𝑝𝑜𝑠𝑖𝑡𝑒 𝑥, 𝑜𝑝𝑝𝑜𝑠𝑖𝑡𝑒 𝑦 and 𝑜𝑝𝑝𝑜𝑠𝑖𝑡𝑒 𝑧) of
𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑣𝑜𝑙𝑢𝑚𝑒 𝑝𝑎𝑐𝑘𝑒𝑑 > 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑣𝑜𝑙𝑢𝑚𝑒 𝑝𝑎𝑐𝑘𝑒𝑑 the item with type 𝑖 as follows:
{
then Algorithm 2 updates the best_known with the incumbent 𝑜𝑟𝑖𝑔𝑖𝑛 𝑥 + 𝑤𝑖𝑑𝑡ℎ (𝑖) for orientation xyz,
𝑜𝑝𝑝𝑜𝑠𝑖𝑡𝑒 𝑥 =
one. 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑝𝑟𝑜𝑓 𝑖𝑡 is the profit of items loaded in the incum- 𝑜𝑟𝑖𝑔𝑖𝑛 𝑥 + 𝑙𝑒𝑛𝑔𝑡ℎ (𝑖) for orientation zyx,
{
bent solution. The multi-objective CLP is handled by a lexicographical 𝑜𝑟𝑖𝑔𝑖𝑛 𝑦 + ℎ𝑒𝑖𝑔ℎ𝑡 (𝑖) for orientation xyz,
approach applied through these conditions. Our primary objective is 𝑜𝑝𝑝𝑜𝑠𝑖𝑡𝑒 𝑦 =
𝑜𝑟𝑖𝑔𝑖𝑛 𝑦 + ℎ𝑒𝑖𝑔ℎ𝑡 (𝑖) for orientation zyx,
to maximise the profit. When both incumbent and best_known {
solutions are feasible, the best_known solution is updated only if 𝑜𝑟𝑖𝑔𝑖𝑛 𝑧 + 𝑙𝑒𝑛𝑔𝑡ℎ (𝑖) for orientation xyz,
𝑜𝑝𝑝𝑜𝑠𝑖𝑡𝑒 𝑧 = (3)
the profit of the incumbent solution is bigger than the profit of the 𝑜𝑟𝑖𝑔𝑖𝑛 𝑧 + 𝑤𝑖𝑑𝑡ℎ (𝑖) for orientation zyx.
6
Ö. Şafak and G. Erdoğan Computers and Operations Research 154 (2023) 106199
Table 2
List of papers included in Tables 4–7.
Code Paper Code Paper
I. (1989) Ivancic et al. (1989) B.M. (1990) Bischoff and Marriott
(1990)
N. (1994) Ngoi et al. (1994) B.R. (1995) Bischoff and Ratcliff
(1995)
G.B. (1997) Gehring and Bortfeldt B.G. (1998) Bortfeldt and Gehring
(1997) (1998)
B. (2000) Bortfeldt (2000) B.G. (2001) Bortfeldt and Gehring
(2001)
E. (2002) Eley (2002) E. (2003) Eley (2003)
L. (2005) Lim et al. (2005) L.Z. (2005) Lim and Zhang (2005)
M.O. (2005) Moura and Oliveira (2005) W. (2008) Wang et al. (2008)
T. (2008) Takahara (2008) H.H. (2010) He and Huang (2010)
C. (2011) Che et al. (2011) D.D. (2011) Dereli and Das (2011)
R. (2011) Ren et al. (2011) L. (2012) Lim et al. (2012)
Z. (2012) Zhu et al. (2012) C.S. (2013) Ceschia and Schaerf (2013)
T.E.W.B. (2017) Toffolo et al. (2017) K.S.J.S.C. (2020) Kurpel et al. (2020)
7
Ö. Şafak and G. Erdoğan Computers and Operations Research 154 (2023) 106199
Table 3 After the destruction and construction steps, to compare the quality
Improvement over constructive heuristic.
of the best_known solution with the quality of incumbent solution,
Instance Constructive heuristic with LNS w. Wall B. Improvement Heuristic calculates the 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 and
Column B. Layer B. Wall B. Min Avg 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑚𝑜𝑚𝑒𝑛𝑡, if the option 𝑜𝑝𝑡𝑖𝑚𝑖𝑠𝑒 𝑏𝑎𝑙𝑎𝑛𝑐𝑒 is set to TRUE.
IMM1 25 25 25 25 25 Next, for each container 𝑘 ∈ 𝐶, Improvement Heuristic
IMM2 10 10 10 10 10 repeats the destruction and construction steps to increase the diversifi-
IMM3 21 21 21 19 19
cation on the incumbent solution until the time limit set by the user
IMM4 28 28 28 26 26
IMM5 52 52 52 51 51 is reached. In other words, the remaining time is used for reorganising
IMM6 10 10 10 10 10 the containers a time, with equal time allocated to each non-empty
IMM7 16 16 16 16 16 container. If one of the following conditions hold:
IMM8 4 4 4 4 4
IMM9 24 21 21 19 19
1. 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = TRUE and 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = FALSE
IMM10 55 55 55 55 55
IMM11 22 22 22 17 17 2. 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = FALSE and 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = FALSE
IMM12 53 53 53 53 53 and
IMM13 40 40 40 25 25
IMM14 29 29 29 27 27 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑣𝑜𝑙𝑢𝑚𝑒 𝑝𝑎𝑐𝑘𝑒𝑑 > 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑣𝑜𝑙𝑢𝑚𝑒 𝑝𝑎𝑐𝑘𝑒𝑑
IMM15 12 11 11 11 11
IMM16 29 26 26 26 26 3. 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = TRUE and 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = TRUE and
IMM17 8 8 8 7 7
IMM18 3 3 3 2 2 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑝𝑟𝑜𝑓 𝑖𝑡 > 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑝𝑟𝑜𝑓 𝑖𝑡
IMM19 3 3 3 3 3
IMM20 6 5 5 5 5 4. 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = TRUE and 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = TRUE and
IMM21 25 25 25 20 20.03
IMM22 10 10 9 8 8.97 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑝𝑟𝑜𝑓 𝑖𝑡 = 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑝𝑟𝑜𝑓 𝑖𝑡 and
IMM23 23 23 23 20 20.97
𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑣𝑜𝑙𝑢𝑚𝑒 𝑝𝑎𝑐𝑘𝑒𝑑 > 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑣𝑜𝑙𝑢𝑚𝑒 𝑝𝑎𝑐𝑘𝑒𝑑
IMM24 7 7 7 5 5.67
IMM25 5 5 5 5 5
5. 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = TRUE and 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = TRUE and
IMM26 4 4 4 3 3
IMM27 6 5 5 5 5
IMM28 13 10 10 10 10
𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑝𝑟𝑜𝑓 𝑖𝑡 = 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑝𝑟𝑜𝑓 𝑖𝑡 and
IMM29 20 20 19 17 17 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑣𝑜𝑙𝑢𝑚𝑒 𝑝𝑎𝑐𝑘𝑒𝑑 = 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑣𝑜𝑙𝑢𝑚𝑒 𝑝𝑎𝑐𝑘𝑒𝑑 and
IMM30 28 24 24 22 22 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑚𝑜𝑚𝑒𝑛𝑡 < 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑚𝑜𝑚𝑒𝑛𝑡
IMM31 16 14 14 13 13
IMM32 4 4 4 4 4 6. 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = TRUE and 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 = TRUE and
IMM33 5 5 5 4 4.97
IMM34 9 9 9 8 8 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑝𝑟𝑜𝑓 𝑖𝑡 = 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑝𝑟𝑜𝑓 𝑖𝑡 and
IMM35 3 3 3 2 2
IMM36 14 14 14 14 14 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑣𝑜𝑙𝑢𝑚𝑒 𝑝𝑎𝑐𝑘𝑒𝑑 = 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑣𝑜𝑙𝑢𝑚𝑒 𝑝𝑎𝑐𝑘𝑒𝑑 and
IMM37 23 23 23 23 23 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑚𝑜𝑚𝑒𝑛𝑡 = 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑚𝑜𝑚𝑒𝑛𝑡 and
IMM38 45 45 45 45 45
𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 < 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒
IMM39 16 16 16 15 15
IMM40 9 9 9 8 8.94
IMM41 16 16 16 15 15
the Improvement Heuristic 3 sets the best_known solution
IMM42 6 5 5 4 4 to the incumbent solution.
IMM43 4 4 3 3 3
IMM44 4 4 4 4 4
IMM45 3 3 3 3 3
IMM46 2 2 2 2 2 4.4. Solution visualisation
IMM47 4 4 4 3 3
Total 774 755 752 696 700.54 Fig. 6 shows a snapshot of visualisation of a packing solution in 3D.
It contains semi-transparent cuboids depicting the containers and the
items packed into the containers. Users can also animate the loading
plan. Furthermore, users can move the shapes around to see if they
can arrive at a better solution.
for each item type 𝑖 ∈ 𝐼. If this random number is less than 0.1,
we swap the order of item type 𝑖 with the order of another item 5. Computational experiments
type selected randomly. For each container 𝑘 ∈ 𝐶, Improvement
Heuristic destroys the incumbent solution either by emptying We now provide comparisons between our LNS algorithm and var-
the container with a probability of (1- 𝑐𝑜𝑛𝑡𝑎𝑖𝑛𝑒𝑟 𝑣𝑜𝑙𝑢𝑚𝑒 𝑝𝑎𝑐𝑘𝑒𝑑(𝑘) / ious algorithms from the literature based on their performance on
𝑐𝑜𝑛𝑡𝑎𝑖𝑛𝑒𝑟 𝑣𝑜𝑙𝑢𝑚𝑒 𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦(𝑘))/ 2 or removing a random subset of items benchmark data sets for both input minimisation and output maximi-
from the container. If the incumbent solution is infeasible and item sation problems. We have implemented LNS algorithm using Visual
of type 𝑖 is not mandatory to be packed, we remove the item of type Basic Application into CLP Spreadsheet Solver. All experiments are
𝑖. Otherwise, we randomly determine the whether to remove the item
performed on a computer with a 1.60 GHz - 1.80 GHz Intel R Core
of type 𝑖. When some items are removed from the container 𝑘 ∈ 𝐶,
TM CPU i5-8265U and 16 GB main memory. We give the list of papers
Algorithm 3 also removes the remaining items from the container 𝑘 ∈ 𝐶
that we compare our results against in Table 2.
since the remaining items might be unstable or vertical and optional
front-side support might not be ensured. To satisfy the feasibility
conditions, remaining items are packed into the container 𝑘 ∈ 𝐶 5.1. Results for input minimisation problem
using the AddItemToContainer(item of type i, container
k). Algorithm 3 also calls Constructive Heuristic to load the We use the data set IMM proposed by Ivancic et al. (1989). The
unpacked items into the containers. The aim of this destruction is to instance set contains 47 instances with homogeneous containers, with
find better solutions by rearranging the items. Half of 𝐶𝑃 𝑈 𝑡𝑖𝑚𝑒 𝑙𝑖𝑚𝑖𝑡 each instance using a different container size. The number of item types
set by the user is spent to repeatedly destruct and construct the solution. ranges from two to five and total number of items ranges from 47 to
8
Ö. Şafak and G. Erdoğan Computers and Operations Research 154 (2023) 106199
Table 4
Best known results for IMM instances.
Instance I. B.R. B. E. L.Z. T. C. L. Z. Z. with C.S. K.S.J.S.C. K.S.J.S.C. with LNS Alg. with VS
(1989) (1995) (2000) (2003) (2005) (2008) (2011) (2012) (2012) VS (2012) (2013) (2020) VS (2020) (min) (avg)
IMM1 26 27 25 25 25 25 25 25 25 25 25 25 25 25 25
IMM2 11 11 10 10 10 10 10 10 10 10 10 9 10 10 10
IMM3 20 21 20 20 19 20 19 19 19 19 19 19 19 19 19
IMM4 27 29 28 26 26 26 26 26 26 26 26 26 26 26 26
IMM5 65 61 51 51 51 51 51 51 51 51 51 51 51 51 51
IMM6 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
IMM7 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
IMM8 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4
IMM9 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19
IMM10 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
IMM11 18 19 18 17 16 16 16 16 16 17 17 16 16 17 17
IMM12 55 55 53 53 53 53 53 53 53 53 53 53 53 53 53
IMM13 27 25 25 25 25 25 25 25 25 25 25 25 25 25 25
IMM14 28 27 28 27 27 27 27 27 27 27 27 27 27 27 27
IMM15 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
IMM16 34 28 26 26 26 26 26 26 26 26 26 26 26 26 26
IMM17 8 8 7 7 7 7 7 7 7 7 7 7 7 7 7
IMM18 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2
IMM19 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
IMM20 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
IMM21 24 24 21 20 20 20 20 20 20 20 20 20 20 20 20.03
IMM22 10 11 9 8 9 9 8 9 8 8 8 8 8 8 8.97
IMM23 21 22 20 20 20 20 19 20 19 20 20 19 21 20 20.97
IMM24 6 6 6 6 5 5 5 5 5 5 6 5 5 5 5.67
Table 5
Best known results for IMM instances.
Instance I. B.R. B. E. L.Z. T. C. L. Z. Z. (2012) C.S. K.S.J.S.C. K.S.J.S.C. (2020) LNS Alg. with VS
(1989) (1995) (2000) (2003) (2005) (2008) (2011) (2012) (2012) with VS (2013) (2020) with VS (min) (avg)
IMM25 6 5 5 5 5 5 5 5 5 5 5 5 5 5 5
IMM26 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
IMM27 5 5 5 5 5 5 5 5 4 4 5 4 4 5 5
IMM28 10 11 10 10 9 10 10 9 10 10 10 9 9 10 10
IMM29 18 17 17 17 17 17 17 17 17 17 17 16 17 17 17
IMM30 24 24 22 22 22 22 22 22 22 22 22 22 22 22 22
IMM31 13 13 13 13 12 13 12 12 12 12 13 13 13 13 13
IMM32 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4
IMM33 5 5 5 5 4 5 4 4 4 4 4 4 4 4 4.97
IMM34 9 9 8 8 8 8 8 8 8 8 8 8 8 8 8
IMM35 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2
IMM36 18 19 14 14 14 14 14 14 14 14 14 14 14 14 14
IMM37 26 27 23 23 23 23 23 23 23 23 23 23 23 23 23
IMM38 50 56 45 45 45 45 45 45 45 45 45 45 45 45 45
IMM39 16 16 15 15 15 15 15 15 15 15 15 15 15 15 15
IMM40 9 10 9 8 9 9 8 9 8 8 8 8 8 8 8.94
IMM41 16 16 15 15 15 15 15 15 15 15 15 15 15 15 15
IMM42 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4
IMM43 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
IMM44 4 4 3 4 3 3 3 3 3 3 3 3 3 4 4
IMM45 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
IMM46 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
IMM47 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3
Total 763 763 705 699 694 698 692 694 691 693 696 689 693 696 700.54
180. All items ‘‘must be packed’’. The objective of the problem is to need to try them out. On IMM instances, we test the performance
minimise the number of containers used (i.e., cost of each container is of constructive heuristics by turning off the improvement phase of
equal to 1.) IMM covers only a small subset of features of the CLP, since the LNS algorithm. We solve the instances by setting the constructive
there is no weight, rotation, stacking, incompatibility, load balance, or heuristic option to column, layer and wall-building separately, and then
front side support constraint. report their results in Table 3. The results show that Constructive
We report in Tables 3, 4, 5, and 6 the number of containers used Heuristic with wall-building heuristic works better than column and
in the best solution found by Constructive Heuristics (column building, layer-building heuristics. Therefore, we execute our LNS Algorithm by
layer building, and wall building) and the LNS Algorithm, along with setting the option of Constructive Heuristic to wall-building
the results from the literature. We highlight the best known solutions in in the computational experiments. It is evident from Table 3 that
bold. In order to say that there is no significantly randomisation effect Improvement Heuristic of our LNS Algorithm improves the results of
on the performance of our LNS algorithm, we run it 30 times by using the construction phase with wall-building heuristics by 8% on the
different random numbers and report the minimum and average of the average.
results. We also set 𝐶𝑃 𝑈 𝑡𝑖𝑚𝑒 𝑙𝑖𝑚𝑖𝑡 to three minutes for each instance. Our LNS algorithm has been able to obtain better results than many
There is no definitive way of telling which of the constructive of the algorithms in the literature. It is clear that our algorithm 1
heuristics will work better for a given problem instance, users will perform significantly better than the original work Ivancic et al. (1989)
9
Ö. Şafak and G. Erdoğan Computers and Operations Research 154 (2023) 106199
Table 6
Best known results for IMM instances (with separation of items).
Instance E. K.S.J.S.C. K.S.J.S.C. (2020) LNS Alg with vertical support
(2003) (2020) w. vertical support & horizontal support
Min Avg Min Avg
IMM1 27 27 27 27 27 27 27
IMM2 11 10 10 11 11 11 11
IMM3 20 20 20 20 20.83 21 21.97
IMM4 28 28 28 28 28 28 28
IMM5 51 51 51 51 51 53 53
IMM6 10 10 10 10 10 10 10
IMM7 16 16 16 16 16 16 16
IMM8 4 4 4 4 4 4 4
IMM9 19 19 19 19 19 19 19
IMM10 55 55 55 55 55 55 55
IMM11 18 17 18 18 18 19 19
IMM12 56 56 56 56 56 56 56
IMM13 25 25 25 25 25 25 25
IMM14 28 28 28 28 28 28 28
IMM15 12 12 12 12 12 12 12
IMM16 26 26 26 26 26 26 26
IMM17 9 9 9 9 9 9 9
IMM18 2 2 2 2 2 2 2
IMM19 3 3 3 3 3 3 3
IMM20 5 5 5 5 5 5 5
IMM21 21 20 20 20 20.56 21 21.1
IMM22 8 8 8 9 9 9 9.2
IMM23 21 20 21 21 21 21 21
IMM24 6 5 5 5 5.73 6 6
IMM25 5 5 5 5 5 5 5
IMM26 3 3 3 3 3 3 3
IMM27 5 5 5 5 5 5 5
IMM28 10 9 10 10 10 10 10.23
IMM29 17 16 17 17 17 17 17
IMM30 23 22 23 23 23 23 23
IMM31 13 13 13 13 13 13 13
IMM32 4 4 4 4 4 4 4
IMM33 5 5 5 5 5 5 5
IMM34 9 8 8 8 8 9 9
IMM35 3 3 3 3 3 3 3
IMM36 18 18 18 19 19 19 19
IMM37 23 23 23 23 23 23 23
IMM38 45 45 45 45 45 45 45
IMM39 15 15 15 15 15 15 15
IMM40 9 9 9 9 9 9 9
IMM41 16 16 16 16 16 16 16
IMM42 5 4 4 4 4.6 4 4.57
IMM43 4 3 3 3 3 3 3.67
IMM44 4 4 4 4 4 4 4
IMM45 3 3 3 3 3 3 3
IMM46 2 2 2 2 2 2 2
IMM47 3 4 4 4 4 4 4
Sum: 725 715 720 723 725.72 730 732.74
Table 7
Best known results for LN instances.
Instance B.M. N. B.R. G.B. B.G. B.G. E. L. M.O. W. H.H. D.D. R. L. T.E.W.B. LNS
(1990) (1994) (1995) (1997) (1998) (2001) (2002) (2005) (2005) (2008) (2010) (2011) (2011) (2012) (2017) Avg Max
LN1 62.5 62.5 62.5 62.5 62.5 62.5 62.5 62.5 62.5 62.5 62.5 62.5 62.5 62.5 62.5 62.5 62.5
LN2 90 80.7 90 89.5 96.6 89.8 90.8 80.4 92.6 90.7 97.9 86.3 97.9 96.4 93.2 91.8 94.6
LN3 53.4 53.4 53.4 53.4 53.4 53.4 53.4 53.4 53.4 53.4 53.4 53.4 53.4 53.4 53.4 53.4 53.4
LN4 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
LN5 77.2 77.2 77.2 77.2 77.2 77.2 77.2 76.7 77.2 77.2 77.2 77.2 77.2 77.2 77.2 77.2 77.2
LN6 83.1 88.7 83.1 91.1 91.2 92.4 87.9 84.8 91.7 92.9 96.7 89.2 96.3 93.5 93 89.8 92.6
LN7 78.7 81.8 78.7 83.3 84.7 84.7 84.7 77 84.7 84.7 84.7 83.2 84.7 84.7 84.7 84.5 84.7
LN8 59.4 59.4 59.4 59.4 59.4 59.4 59.4 59.4 59.4 59.4 59.4 59.4 59.4 59.4 59.4 59.4 59.4
LN9 61.9 61.9 61.9 61.9 61.9 61.9 61.9 61.9 61.9 61.9 61.9 61.9 61.9 61.9 61.9 61.9 61.9
LN10 67.3 67.3 67.3 67.3 67.3 67.3 67.3 67.3 67.3 67.3 67.3 67.3 67.3 67.3 67.3 67.3 67.3
LN11 62.2 62.2 62.2 62.2 62.2 62.2 62.2 62.2 62.2 62.2 62.2 62.2 62.2 62.2 62.2 62.2 62.2
LN12 78.5 78.5 78.5 78.5 78.5 78.5 78.5 69.5 78.5 78.5 78.5 78.5 78.5 78.5 78.5 78.5 78.5
LN13 78.1 84.1 78.1 85.6 84.3 85.6 85.6 73.3 85.6 85.6 85.6 85.6 85.6 84.9 85.6 85.4 85.6
LN14 62.8 62.8 62.8 62.8 62.8 62.8 62.8 62.8 62.8 62.8 62.8 62.8 62.8 62.8 62.8 62.8 62.8
LN15 59.5 59.5 59.5 59.5 59.5 59.5 59.5 59.5 59.5 59.5 59.5 59.5 59.5 59.5 59.5 59.5 59.5
Avg. 68.64 69 68.6 69.9 70.4 70.1 69.91 67 70.3 70.2 71.0 69.55 70.93 70.6 70.4 70.1 70.5
10
Ö. Şafak and G. Erdoğan Computers and Operations Research 154 (2023) 106199
Table 8
Our best found results for BR instances with side constraints.
Instances Output maximisation Input minimisation
Avg vol. util. (%) Max vol. util. (%) Avg # of cont. Min # of cont.
BR1 86.3 92.2 2.00 2
BR2 81.7 88.4 2.00 2
BR3 78.6 88.8 2.11 2
BR4 70.5 87.0 2.30 2
BR5 70.9 84.5 2.50 2
BR6 64.5 78.3 2.93 2
BR7 60.3 72.7 3.05 3
BR8 50.3 62.1 3.81 3
BR9 49.1 61.1 4.00 4
BR10 46.6 56.3 4.11 3
BR11 41.6 53.2 4.25 4
BR12 39.8 53.2 4.42 4
BR13 36.2 45.6 4.81 4
BR14 33.9 44.0 4.97 4
BR15 33.4 44.1 4.95 4
and Bischoff and Ratcliff (1995). We also improve upon the later works including the horizontal support constraint together with the separation
by Bortfeldt (2000), Eley (2003) and Takahara (2008). It is important of items and vertical stability. Since we are the first who solves the IMM
to note that our LNS algorithm guarantees full vertical stability by instances with these additional constraints, no benchmark exists, and
supporting the bottom of items by either the container floor or by the we provide our results in the last two columns of Table 6.
items underneath. Our results with vertical stability are quite close to
the more recent works of Zhu et al. (2012), Ceschia and Schaerf (2013) 5.2. Results for output maximisation problem
and Kurpel et al. (2020) in which full vertical stability is ensured.
Although the LNS algorithm requires an additional container for the In the computational experiments, we also take the single container
instances IMM11, IMM27, IMM28, and IMM44 compared to the results problem where the aim of the problem is to maximise the volume
of Kurpel et al. (2020), our LNS algorithm performs better than the utilisation of the container. We adopt our LNS algorithm to this problem
work of Kurpel et al. (2020) for the instance IMM23, thereby difference setting by setting the profit of each item to its volume and the cost of
concerning the total number of containers used is only 3 (0.4%). the container to zero. We also set the priority of each item to ‘‘may be
We also consider the situation with the separation of items as well packed’’.
as with the consideration of vertical stability. As examined in Eley We use the LN1–LN15 instances introduced by Loh and Nee (1992)
(2003), we imposed that items of the first two types must not be stowed to compare the results of our LNS algorithm with the state of the art. In
in the same container. The results in Table 6 indicates that our LNS these instances, rotations around the horizontal axes are not allowed.
algorithm outperforms the procedure of Eley (2003). Compared to the The instance set contains 100 to 250 items with 6 to 10 different types.
work of Kurpel et al. (2020) which considers both separation of items To solve each instance, we execute the LNS algorithm for 10 min. In
and vertical stability, only for IMM2, IMM22, and IMM36, we require order to eliminate the randomisation effect, we run the LNS algorithm
an additional container. Finally, we solve the IMM test instances by 30 times for each instance. We again highlight the best results in bold
11
Ö. Şafak and G. Erdoğan Computers and Operations Research 154 (2023) 106199
Algorithm 3: Improvement Heuristic group as input minimisation problems by setting each item ‘‘must be
Input: Item, container, and compatibility data, incumbent solution, best_known packed’’.
solution, 𝜆, 𝛾 The original instances already include orientation constraints. To
while 𝐶𝑃 𝑈 𝑡𝑖𝑚𝑒 𝑙𝑖𝑚𝑖𝑡/2 is not exceeded do show the ability of LNS algorithm to handle the practical constraints,
𝑅𝑛𝑑 ← U[0,1]
if Rnd < 𝜆 then we include additional side constraints. We minimises the moment of
incumbent ← best_known the item weights along the central 𝑧-axis to achieve an even weight
Randomly perturb rotation and order of items in the incumbent solution
for 𝑘 ∈ 𝐶 do
distribution. We also ensure the vertical and horizontal stability. For the
𝑅𝑛𝑑 ← U[0,1] input minimisation problems, we additionally include the separation
if Rnd < (1- container volume packed(k) / container volume capacity(k) constraints such that the items of the first two types must not be loaded
)/2 then
Empty container 𝑘 into the same container.
else We execute the LNS algorithm for three minutes to solve each
Randomly remove a subset of items from container 𝑘
Repack remaining items in container 𝑘 instance and run the algorithm 30 times by using different random
end numbers. In Table 8, for output maximisation problems, we report the
Call Constructive Heuristic to pack removed items average and maximum volume utilisations of the container in the five
end
Set 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒, 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒, 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑚𝑜𝑚𝑒𝑛𝑡, 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑚𝑜𝑚𝑒𝑛𝑡 to
instances of each group and for the input minimisation problems, we
0 report the average and minimum number of containers required in the
for 𝑘 ∈ 𝐶 do five instances of each group. Since we do not allow to load the two
Calculate 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒(𝑘) using equation (5)
𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 ∶= 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 + 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒(𝑘) item types into the same container, the number of containers required
if optimise balance = TRUE then to load all items is at least 2 for each instance. As the number of item
Calculate 𝑚𝑜𝑚𝑒𝑛𝑡 (𝑘) using equation (4)
types increases, the volume utilisation of the container decreases for
𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑚𝑜𝑚𝑒𝑛𝑡 ∶= 𝑏𝑒𝑠𝑡 𝑘𝑛𝑜𝑤𝑛 𝑚𝑜𝑚𝑒𝑛𝑡 + 𝑚𝑜𝑚𝑒𝑛𝑡(𝑘)
while 𝐶𝑃 𝑈 𝑡𝑖𝑚𝑒 𝑙𝑖𝑚𝑖𝑡 𝑡𝑜𝑟𝑒𝑜𝑟𝑔𝑎𝑛𝑖𝑠𝑒 is not exceeded do output maximisation problems and the number of containers required
𝑅𝑛𝑑 ← U[0,1] to load all items increases for the input minimisation problems. We
if Rnd < 𝛾 then
incumbent ← best_known believe these generated instances with several side constraints of CLP
Randomly perturb rotation and order of items can be utilised as benchmark instances.
if Rnd < (1- container volume packed(k) / container volume capacity(k)
)/2 then
Empty container 𝑘 6. Conclusion
else
Randomly remove a subset of items from container 𝑘
Repack remaining items in container 𝑘
We have a new LNS algorithm to efficiently determine the packing
Call AddItemToContainer to pack removed items into the container of items into the containers. The main advantage of our LNS algorithm
𝑘∈𝐶 is that it is generally applicable to solve both input minimisation and
𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 ← True
for 𝑖 ∈ 𝐼 do output maximisation types of CLPs with different degree of hetero-
if (There exists at least one item of type 𝑖 ∈ 𝐼 to be packed) and geneity of the items (likewise containers). Besides, our LNS algorithm
(𝑚𝑎𝑛𝑑𝑎𝑡𝑜𝑟𝑦 (𝑖) = TRUE) then
𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑓 𝑒𝑎𝑠𝑖𝑏𝑙𝑒 ← False
can accommodate many side constraints imposed by the users such as
exit for weight limit, loading priorities, orientation, stacking, separation, and
end
stability. Moreover, our LNS algorithm attempts to achieve an even
Calculate 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒(𝑘) using equation (5)
𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 = 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 + 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒(𝑘) weight distribution through minimising the moment of the item weights
if optimise balance = TRUE then along the central 𝑧-axis. We believe that the VBA implementation of
Calculate 𝑚𝑜𝑚𝑒𝑛𝑡 (𝑘) using equation (4)
𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑚𝑜𝑚𝑒𝑛𝑡 = 𝑖𝑛𝑐𝑢𝑚𝑏𝑒𝑛𝑡 𝑚𝑜𝑚𝑒𝑛𝑡 + 𝑚𝑜𝑚𝑒𝑛𝑡(𝑘)
our algorithm, CLP Spreadsheet Solver, is suitable be used by small and
if incumbent solution is better than the best_known solution then medium-sized enterprises as well as for teaching purposes.
best_known ← incumbent There are some future research directions arising from this work.
end
The performance of our LNS algorithm depends on a strategy that
end
Output: best_known solution destructs and perturbs the current solution. It is still an open question
how to select the strategy which eventually yields better solutions.
Furthermore, the effectiveness of the proposed algorithm could enable
the researchers to accommodate more practical constraints to meet the
in Table 7. Table 7 indicates that our LNS algorithm is very competitive requirements of other users, e.g., order of unloading must be taken into
with the state of the art for those instances. We obtain the optimality account when a truck with multiple stops is being loaded.
for 13/15 of the instances (all items are loaded in a single container).
For the remaining two instances, our LNS algorithm achieves 94.6% CRediT authorship contribution statement
and 92.6% volume utilisation, where the best known results are 97.9%
and 96.7%, respectively. Özge Şafak: Data curation, Methodology, Visualization,
Roles/Writing – original draft, Writing – review & editing. Güneş Er-
5.3. Results for BR instances doğan: Methodology, Software, Roles/Writing – original draft, Writing
– review & editing.
12
Ö. Şafak and G. Erdoğan Computers and Operations Research 154 (2023) 106199
13
Ö. Şafak and G. Erdoğan Computers and Operations Research 154 (2023) 106199
References Kurpel, D.V., Scarpin, C.T., Junior, J.E.P., Schenekemberg, C.M., Coelho, L.C., 2020.
The exact solutions of several types of container loading problems. European J.
Ali, S., Ramos, A.G., Carravilla, M.A., Oliveira, J.F., 2022. On-line three-dimensional Oper. Res. 284 (1), 87–107.
packing problems: a review of off-line and on-line solution approaches. Comput. Li, Y., Tang, X., Cai, W., 2014. On dynamic bin packing for resource allocation in the
Ind. Eng. 108122. cloud. In: Proceedings of the 26th ACM Symposium on Parallelism in Algorithms
Bischoff, E.E., Marriott, M.D., 1990. A comparative evaluation of heuristics for container and Architectures. pp. 2–11.
loading. European J. Oper. Res. 44 (2), 267–276. Lim, A., Ma, H., Xu, J., Zhang, X., 2012. An iterated construction approach with
Bischoff, E.E., Ratcliff, M.S.W., 1995. Issues in the development of approaches to dynamic prioritization for solving the container loading problems. Expert Syst.
container loading. Omega 23 (4), 377–390. Appl. 39 (4), 4292–4305.
Bortfeldt, A., 2000. Eine heuristik für multiple containerladeprobleme. OR-Spektrum 22 Lim, A., Rodrigues, B., Yang, Y., 2005. 3-D container packing heuristics. Appl. Intell.
(2), 239–261. 22 (2), 125–134.
Bortfeldt, A., Gehring, H., 1998. Applying tabu search to container loading problems. Lim, A., Zhang, X., 2005. The container loading problem. In: Proceedings of the 2005
In: Operations Research Proceedings 1997. Springer, pp. 533–538. ACM Symposium on Applied Computing. pp. 913–917.
Bortfeldt, A., Gehring, H., 2001. A hybrid genetic algorithm for the container loading Liu, S., Tan, W., Xu, Z., Liu, X., 2014. A tree search algorithm for the container loading
problem. European J. Oper. Res. 131 (1), 143–161. problem. Comput. Ind. Eng. 75, 20–30.
Bortfeldt, A., Wäscher, G., 2013. Constraints in container loading–A state-of-the-art Liu, J., Yue, Y., Dong, Z., Maple, C., Keech, M., 2011. A novel hybrid tabu search
review. European J. Oper. Res. 229 (1), 1–20. approach to container loading. Comput. Oper. Res. 38 (4), 797–807.
Bowes, P., 2021. Pitney bowes parcel shipping index. https://www.pitneybowes.com/ Loh, T., Nee, A., 1992. A packing algorithm for hexahedral boxes. In: Proceedings of
us/shipping-index.html, Accessed November 2021. the Conference of Industrial Automation, Singapore. pp. 115–126.
Ceschia, S., Schaerf, A., 2013. Local search for a multi-drop multi-container loading Mack, D., Bortfeldt, A., Gehring, H., 2004. A parallel hybrid local search algorithm for
problem. J. Heuristics 19 (2), 275–294. the container loading problem. Int. Trans. Oper. Res. 11 (5), 511–533.
Chan, F.T., Bhagwat, R., Kumar, N., Tiwari, M., Lam, P., 2006. Development of a Moura, A., Oliveira, J.F., 2005. A GRASP approach to the container-loading problem.
decision support system for air-cargo pallets loading problem: A case study. Expert IEEE Intell. Syst. 20 (4), 50–57.
Syst. Appl. 31 (3), 472–485. do Nascimento, O.X., de Queiroz, T.A., Junqueira, L., 2021. Practical constraints in
Che, C.H., Huang, W., Lim, A., Zhu, W., 2011. The multiple container loading cost the container loading problem: Comprehensive formulations and exact algorithm.
minimization problem. European J. Oper. Res. 214 (3), 501–511. Comput. Oper. Res. 128, 105186.
Chen, C., Lee, S., Shen, Q., 1995. An analytical model for the container loading problem. Ngoi, B., Tay, M., Chua, E., 1994. Applying spatial representation techniques to the
European J. Oper. Res. 80 (1), 68–76. container packing problem. Int. J. Prod. Res. 32 (1), 111–123.
Chien, C., Deng, J., 2004. A container packing support system for determining and Paquay, C., Schyns, M., Limbourg, S., 2016. A mixed integer programming formula-
visualizing container packing patterns. Decis. Support Syst. 37 (1), 23–34. tion for the three-dimensional bin packing problem deriving from an air cargo
Correcher, J.F., Alonso, M.T., Parreño, F., Alvarez-Valdés, R., 2017. Solving a large application. Int. Trans. Oper. Res. 23 (1–2), 187–213.
multicontainer loading problem in the car manufacturing industry. Comput. Oper. Parreño, F., Alvarez-Valdés, R., Oliveira, J.F., Tamarit, J.M., 2010. Neighborhood
Res. 82, 139–152. structures for the container loading problem: a VNS implementation. J. Heuristics
Davies, A.P., Bischoff, E.E., 1999. Weight distribution considerations in container 16 (1), 1–22.
loading. European J. Oper. Res. 114 (3), 509–527. Pisinger, D., 2002. Heuristics for the container loading problem. European J. Oper. Res.
Dereli, T., Daş, G.S., 2010. Development of a decision support system for solving 141 (2), 382–392.
container loading problems. Transport 25 (2), 138–147. Pollaris, H., Braekers, K., Caris, A., Janssens, G.K., Limbourg, S., 2016. Capacitated
Dereli, T., Das, G.S., 2011. A hybrid ‘bee (s) algorithm’for solving container loading vehicle routing problem with sequence-based pallet loading and axle weight
problems. Appl. Soft Comput. 11 (2), 2854–2862. constraints. EURO J. Transp. Logist. 5 (2), 231–255.
Egeblad, J., Garavelli, C., Lisi, S., Pisinger, D., 2010. Heuristics for container loading Ramos, A.G., Silva, E., Oliveira, J.F., 2018. A new load balance methodology for
of furniture. European J. Oper. Res. 200 (3), 881–892. container loading problem in road transportation. European J. Oper. Res. 266 (3),
Eley, M., 2002. Solving container loading problems by block arrangement. European 1140–1152.
J. Oper. Res. 141 (2), 393–409. Ren, J., Tian, Y., Sawaragi, T., 2011. A tree search method for the container loading
Eley, M., 2003. A bottleneck assignment approach to the multiple container loading problem with shipment priority. European J. Oper. Res. 214 (3), 526–535.
problem. OR Spectrum 25 (1), 45–60. Sciomachen, A., Tanfani, E., 2007. A 3D-BPP approach for optimising stowage plans
Fasano, G., 2004. A MIP approach for some practical packing problems: Balancing and terminal productivity. European J. Oper. Res. 183 (3), 1433–1446.
constraints and tetris-like items. Q. J. Belgian French Ital. Oper. Res. Soc. 2 (2), Silva, E.F., Toffolo, T.A.M., Wauters, T., 2019. Exact methods for three-dimensional
161–174. cutting and packing: A comparative study concerning single container problems.
Fuellerer, G., Doerner, K.F., Hartl, R.F., Iori, M., 2010. Metaheuristics for vehicle routing Comput. Oper. Res. 109, 12–27.
problems with three-dimensional loading constraints. European J. Oper. Res. 201 Takahara, S., 2008. A multi-start local search approach to the multiple container
(3), 751–759. loading problem. In: Greedy Algorithms. IntechOpen.
Gehring, H., Bortfeldt, A., 1997. A genetic algorithm for solving the container loading Terno, J., Scheithauer, G., Sommerweiß, U., Riehme, J., 2000. An efficient approach
problem. Int. Trans. Oper. Res. 4 (5–6), 401–418. for the multi-pallet loading problem. European J. Oper. Res. 123 (2), 372–381.
Gendreau, M., Iori, M., Laporte, G., Martello, S., 2006. A tabu search algorithm for a Toffolo, T.A.M., Esprit, E., Wauters, T., Berghe, G.V., 2017. A two-dimensional heuristic
routing and container loading problem. Transp. Sci. 40 (3), 342–350. decomposition approach to a three-dimensional multiple container loading problem.
George, J.A., Robinson, D.F., 1980. A heuristic for packing boxes into a container. European J. Oper. Res. 257 (2), 526–538.
Comput. Oper. Res. 7 (3), 147–156. Tsai, J., Wang, P., Lin, M., 2015. A global optimization approach for solving three-
He, K., Huang, W., 2010. A caving degree based flake arrangement approach for the dimensional open dimension rectangular packing problems. Optimization 64 (12),
container loading problem. Comput. Ind. Eng. 59 (2), 344–351. 2601–2618.
Hifi, M., Kacem, I., Nègre, S., Wu, L., 2010. A linear programming approach for Wang, Z., Li, K.W., Levy, J.K., 2008. A heuristic for the container loading problem: A
the three-dimensional bin-packing problem. Electron. Notes Discrete Math. 36, tertiary-tree-based dynamic space decomposition approach. European J. Oper. Res.
993–1000. 191 (1), 86–99.
Iori, M., Martello, S., 2010. Routing problems with loading constraints. Top 18 (1), Wäscher, G., Haußner, H., Schumann, H., 2007. An improved typology of cutting and
4–27. packing problems. European J. Oper. Res. 183 (3), 1109–1130.
Ivancic, N., Mathur, K., Mohanty, B., 1989. An integer programming based heuristic Wu, Y., Li, W., Goh, M., de Souza, R., 2010. Three-dimensional bin packing problem
approach to the three-dimensional packing problem. J. Manuf. Oper. Manage. 2 with variable bin height. European J. Oper. Res. 202 (2), 347–355.
(4), 268–298. Zhang, D., Peng, Y., Leung, S.C., 2012. A heuristic block-loading algorithm based on
Júnior, R.R., Yanasse, H.H., Morabito, R., Junqueira, L., 2019. A hybrid approach for multi-layer search for the container loading problem. Comput. Oper. Res. 39 (10),
a multi-compartment container loading problem. Expert Syst. Appl. 137, 471–492. 2267–2276.
Junqueira, L., Morabito, R., Yamashita, D.S., 2012a. Three-dimensional container Zhao, X., Bennell, J.A., Bektaş, T., Dowsland, K., 2016. A comparative review of 3D
loading models with cargo stability and load bearing constraints. Comput. Oper. container loading algorithms. Int. Trans. Oper. Res. 23 (1–2), 287–320.
Res. 39 (1), 74–85. Zhu, W., Huang, W., Lim, A., 2012. A prototype column generation strategy for the
Junqueira, L., Morabito, R., Yamashita, D.S., 2012b. MIP-based approaches for the multiple container loading problem. European J. Oper. Res. 223 (1), 27–39.
container loading problem with multi-drop constraints. Ann. Oper. Res. 199 (1),
51–75.
14