Data-driven dynamic stacking strategy for export containers in container terminals

This study investigates a method for improving real-time decisions regarding the storage location of export containers while the containers are arriving. To manage the decision-making process, we propose a two module-based data-driven dynamic stacking strategy that facilitates stowage planning. Module 1 generates the Gaussian mixture model (GMM) specific to each container group for container weight classification. Module 2 implements the data-driven dynamic stacking strategy as an online algorithm to determine the storage location of an arriving container in real time. Numerical experiments were conducted using real-life data to validate the effectiveness of the proposed method compared to other alternative stacking strategies. These experiments revealed that the performance of the proposed method is robust, and therefore it can improve yard operations and container terminal competitiveness.


Introduction
With the development of container transportation, the task of efficiently managing scarce storage space resources in container terminals has become an important role for marine transport hubs. Containers arrive at the storage area randomly and are 1 3 Data-driven dynamic stacking strategy for export containers… stacked on the ground in the arrangement of a yard block as shown in Fig. 1. Yard cranes (YCs) must first handle the containers located at the top tier, and the containers already stacked are rehandled to access the target container buried beneath them. Thus, inefficient handling can result in excessive operational delays, which can lead to bottlenecks in container flows. Therefore, to improve the productivity of container terminals, effective methods for determining the most efficient storage location of the arriving containers must be employed (Zhang et al. 2003).
Container terminals handle various types of incoming containers, which can be classified as import or export containers depending on the vehicles that carry them. Import containers are discharged from vessels and loaded onto external trucks (ETs), whereas export containers are transported to the terminal by ETs and are loaded onto vessels. All of these containers are temporarily stored in the yard, and the goal of the storage strategy is to minimize the amount of time the vehicles that are to be loaded stay in the terminal. For this reason, the way the containers are stored depends on the characteristics of the vehicles that are to be loaded, such as the vehicles' capacities and their arrival times. For example, ETs have small carrying capacities and large uncertainties in arrival times depending on the traffic conditions. Therefore, import containers are stacked at higher tiers, as the estimated retrieval times are shorter. In contrast, vessels carry large quantities of containers, and their arrival times are expected via berth plans. Thus, export containers are stored through decisions at two different levels: planning and operational (Chen and Lu 2012;Jiang and Jin 2017;Zhou et al. 2020;He et al. 2020a, b;Feng et al. 2021). At the planning level, containers are assigned to sub-blocks based on the container group, which is defined as a group of containers having the same departing vessel, port of destination (POD), size, and type (Kim et al. 2004;Zhen 2013Zhen , 2014Jiang and Jin 2017;He et al. 2020a). At the operational level, containers are stacked within the range of a single yard bay in consideration of the loading operation (Kim et al. 2000;Zhang et al. 2010Zhang et al. , 2014a. In the loading operation, planners schedule the loading sequence with two objectives: minimizing the handling effort of quay cranes (QCs) and YCs, and ensuring the stability of the vessel (Kim et al. 2000). Therefore, the storage configuration of export containers must be in a good shape to generate an efficient loading sequence. In this study, we focus on the container stacking problem (CSP) for export containers at the operational level in order to aid planners in constructing optimal load sequences.
The CSP for export containers is a real-time decision problem because incomplete and imperfect information is involved (Steenken et al. 2004;Borgman et al. 2010;He et al. 2020b). First, as most studies assume, the time at which the containers arrive at the yard cannot be accurately predicted because the arrival times are dynamically updated depending on the traffic conditions. Therefore, it is difficult to achieve the optimal results. Second, information on the weight of the containers to be loaded onto the vessel is uncertain. Many studies assume that container weight falls within one of three classes: heavy (H), medium (M), and light (L) (Kim et al. 2000;Zhang et al. 2010Zhang et al. , 2014a. Some extended studies have converted the uncertainty of the weight information into probabilities (Kang et al. 2006;Zhang et al. 2014b). In practice, the estimated weight class can be identified as a different weight class when the container arrives at the terminal. Because of this, terminal operators use their experience as the basis for classifying container weights into different classes for each vessel. Third, the stowage instructions are not known one to two weeks in advance. Container ships are berthed at multiple ports along the shipping line, and stowage instructions vary depending on the loading operations performed at the previous port. For example, as shown in Fig. 2, heavier containers are required in section A and lighter containers are required in section B. This requires a stacking strategy that responds flexibly to this uncertain environment. Lastly, the YC workload at the time of container arrival is unknown in advance (Jiang and Jin 2017). Therefore, containers are dynamically allocated to multiple bays depending on the YC's workload at the time of arrival, resulting in different container weight distributions in each bay. Data-driven dynamic stacking strategy for export containers… In this study, we propose a stacking strategy based on an online algorithm in which decisions are made with incomplete knowledge of the future (Karp 1992). Unlike an offline algorithm that yields optimal solutions with extensive computations, an online algorithm facilitates operations in dynamic environments that do not have ample time to compute before performing tasks. Because containers cannot be held after they arrive and the order in which they arrive cannot be controlled, an online algorithm that allocates storage locations when containers arrive at the block is appropriate (Murty et al. 2005).
A number of studies have employed online algorithms for the CSP (Dekker et al. 2006;Borgman et al. 2010;Park et al. 2011;Chen and Lu 2012;Ambrosino et al. 2013;Eliiyi 2014, 2019;He et al. 2020b), but they do not take into account many practical considerations such as uncertainty of the weight, type and arrival timing of containers, uncertainty about the stowage instruction of the vessel, and the dynamic nature of YC workload according to other interconnected operations. Therefore, this study proposes a data-driven dynamic stacking strategy (DSS) based on an online algorithm.
The data-driven DSS consists of two modules. The first is the Gaussian mixture model (GMM) generation module, which clusters the container weight into several weight classes. The second is the DSS module based on the online algorithm to determine the storage location of an arriving container in real time. This module adjusts itself to dynamically respond to the environment.
The remainder of this paper is organized as follows. In Sect. 2, relevant literature on the CSP is reviewed. A detailed description of the proposed method is provided in Sect. 3. In Sect. 4, computational experiments are conducted and interpreted. Finally, the conclusions are drawn in Sect. 5.

Literature review
In this section, we review previous studies related to the CSP in container terminals. Many researchers have studied on the related problem, and we refer to Vis and De Koster (2003), Steenken et al. (2004), Voß (2008), andCarlo et al. (2014) which conducted comprehensive reviews of numerous studies on the efficient operation of container terminals. The solutions to the CSP have been classified into two types: one for import containers and one for export containers. For import containers, De Castillo and Daganzo (1993) proposed two stacking strategies: a nonsegregation strategy that includes all stacks of the same size from all vessels, and a segregation strategy in which containers from different vessels are segregated. Kim and Kim (1999) implemented a segregation strategy for import containers that estimated the expected total number of rehandles. They presented a mathematical model for the relationship between the height of the stack and the number of rehandles. They also considered the uncertainty in the arrival times of import containers for constant, periodic, and dynamic arrival rates. Kim and Kim (2002) proposed a cost model that determines the optimal storage space and number of transfer cranes for import containers. The cost model included the costs of space, transfer cranes, and ETs, and they illustrated the effectiveness of their deterministic and stochastic models using numerical examples. Ting et al. (2010) proposed a category stacking strategy (also called a clustering stacking strategy) for import containers by analyzing historical data. They presented a pick-up booking system that categorizes the containers into several groups according to the pick-up priority predicted by historical data. Sauri and Martin (2011) extended the work of De Castillo and Daganzo (1993) and developed a segregation strategy that generates the fewest number of rehandles by mixing containers from different vessels. In addition, they considered the different probabilities of the time that elapsed before each container left the terminal as a function of the time each container arrived. Ambrosino et al. (2013) modeled import containers being loaded onto a train by comparing train loading policies (sequential, non-sequential, and partially sequential) for different stacking strategies (random, based on container weight, and based on container weight and commercial priority) in a container terminal. Maldonado et al. (2019) proposed three different stacking strategies based on the prediction (nominal, numerical, and nominal and numerical) of expected dwell times using the random forest method. They assessed their proposed method by applying it to two strategies (horizontal and vertical) in two scenarios (average and stressed).
Because the storage periods for import containers vary depending on the arrival time of ETs and trains, the CSP for import containers has been studied in a way that enables the arrival times to be predicted probabilistically. In contrast, the CSP for export containers considers vessel characteristics. Kim et al. (2000) proposed a dynamic programming (DP) model to determine the storage locations of export containers based on their weights. They assumed that heavier containers should be loaded onto the lower tiers of a vessel to guarantee its stability. Therefore, heavier containers are stacked at the higher tiers of the yard block to reduce the expected number of rehandles. Furthermore, they developed a decision tree to support realtime decisions. Duinkerken et al. (2001) evaluated the performance of the remaining stack capacity (RSC) strategy, which considers the stack height and container category using various stacking strategies (random, levelling, and closest position). Dekker et al. (2006) proposed a category stacking strategy that allows online optimization to facilitate loading operations. They used a simulation method to compare random stacking with category stacking based on the number of rehandles. Kang et al. (2006) presented a stacking strategy for export containers with uncertain weight information using a simulated annealing approach to minimize the number of rehandles. Furthermore, they proposed an advanced stacking strategy that overcomes the uncertainty in container weight through machine learning techniques. Park et al. (2011) proposed stacking strategies to dynamically determine the stacking location as the operational environment changes. The proposed strategies, which were based on an online algorithm, were generated by evaluating the weights of the decision criteria during the evaluation period. Simulations were conducted for a variety of stacking strategies, which were demonstrated to be effective in reducing QC delays. Chen and Lu (2012) proposed a hybrid sequence stacking algorithm (HSSA) based on an online algorithm to make decisions in real time. They observed that the HSSA outperformed the random and vertical stacking strategies in terms of the number of rehandles. Zhang et al. (2010) analyzed the error of a key model transformation in Kim et al. (2000) and presented the correct form. Zhang et al. (2014a), which was Data-driven dynamic stacking strategy for export containers… an extension of the studies by Kim et al. (2000) and Zhang et al. (2010), proposed two conservative models by reinterpreting the punishment coefficient for stacking light containers on top of stacks loaded with heavy containers. The proposed models outperformed the previous optimized models in terms of static and dynamic indicators. Zhang et al. (2014b) considered adjusting the proportion of unarrived containers in each weight class to a non-constant proportion in the constant proportion DP model proposed by Kim et al. (2000) and Zhang et al. (2010). In numerical experiments, they demonstrated that the proposed models with the adjusted weight class proportions for the remaining containers improved the stacking quality. Hu et al. (2014) proposed a branch-and-bound method based on the least-cost priority queue (LCBB) to obtain an optimal solution in which the number of rehandles is minimized, using the HSSA proposed by Chen and Lu (2012) to calculate the upper bound for the LCBB. Güven and Eliiyi (2014) studied two stacking strategies (random stacking and category stacking) for export containers. They considered container weight as another category attribute, and grouped containers with a weight of less than three tons into the same category. Güven and Eliiyi (2019) extended Güven and Eliiyi (2014) and expanded the stacking strategies to include all types of containers (export, transit, import, and empty containers). They compared three stacking strategies (random stacking, attribute-based stacking, and weight-relaxed stacking) through simulations. He et al. (2020b) studied stacking strategies that consider the uncertainty in the arrival sequence of vessels, assuming that the weight information and arrival order of the containers are known. Based on the three stacking rules (least reshuffle rule, lowest stack rule, and nearest stack rule), five heuristic algorithms were proposed according to a set of rules.
The contributions of our study in the context of the aforementioned studies are summarized as follows. First, this is the first study that applies predictive analytics for container weight classification to prescribe optimal decisions for the CSP. Most previous studies have simplified the problem by assuming three classes (light, medium, and heavy), and certain studies (Kang et al. 2006;Zhang et al. 2014b) have considered the weight uncertainty for each class. However, in practice, these assumptions are not practical because the weight is classified according to the size of the vessel and the range of weights of the containers to be loaded. Therefore, this study analyzes the historical data for container weight, and estimates the classification model for container weight class as a GMM using a machine learning technique. Second, we propose a dynamic stacking strategy that considers multiple bays. To the best of our knowledge, most studies have focused on the CSP for a single bay, and the stacking strategy was applied homogeneously to each bay. However, in a realworld environment, the proportion of containers in each weight class assigned to each bay is not constant. Hence, the remaining containers must respond dynamically to the containers that are already stacked. Therefore, this study presents a stacking strategy that responds to the configurations of multiple bays. Third, we develop a category stacking strategy to present practical alternatives that reflect real-world considerations. In most studies on the CSP for export containers (the exceptions being Dekker et al. 2006;Güven and Eliiyi 2019), the problem is defined as minimizing the expected number of rehandles based on the weight class. However, heavier containers are normally loaded onto lower tiers, depending on the configuration of the stowage and the precise weight of the containers. The category stacking that clusters containers with similar weights into the same stack can facilitate stowage planning by providing containers of various weights on the top tier in the yard.

Problem description
This study aims to optimize real-time decisions regarding the precise storage location of export containers for a given storage area while the containers are arriving. The storage area consists of multiple stacks in a bay, as shown in Fig. 3. In this study, the decision on the storage location refers to the selection of one stack in the storage area. In practice, the storage areas of export containers are not shared with those of import containers (Kim and Kim 1999;He et al. 2020b;Hu et al. 2021). Furthermore, each storage area designates areas for containers belonging to the same container group (Kim et al. 2004;Zhen 2013Zhen , 2014Jiang and Jin 2017;He et al. 2020a). For these reasons, different stacking decisions are made depending on the container group. Therefore, we focus on stacking decisions that apply to the containers in a single container group.
The goal is to assign an arriving container to a stack in a way that conforms to the category stacking strategy. Category stacking for export containers aims to cluster containers with similar weights in the same stack. However, it is difficult to achieve this outcome due to the randomness of the arriving containers. The following two aspects need to be considered to improve the stacking quality according to the category stacking strategy: (1) how to define the similarity in container weights and (2) how to define the specific location assignment rules for each storage area. For aspect (1), researchers have manually classified container weights into several weight classes with approximate weight ranges. For aspect (2), the location assignment rules have been executed in the same way for all storage areas. However, predictive analytics for container weight classification and container assignment rules specific to dynamic storage areas can enhance the stacking strategy. In this respect, we propose a data-driven DSS that outperforms existing stacking strategies. The proposed container stacking system is divided into two modules, as shown in Fig. 4. Module 1 is executed in advance, and module 2 is triggered by a container arriving at the port. In module 1, GMM-based predictive models, which cluster the container weights into several weight classes for each container group, are generated. Next, once a container has arrived, the pre-selected storage area is given, and the weight class for the container is predicted by the GMM generated in module 1. In module 2, the precise storage location (i.e., stack) for the container is selected using the proposed dynamic stacking strategy for the given storage area. The proposed stacking strategy is intended to dynamically adjust itself depending on the stack configuration in the storage area. A detailed description of the modules is provided in the following subsections.

Module 1: generation of GMM
In module 1, we aggregate the historical data for the container weights over the entire voyage for each container group, and then generate the GMM specific to each container group for the container weight classification. The GMM is a model that represents a population as a linear superposition of subpopulations, and it assumes that each subpopulation follows a Gaussian distribution. Because the class label (i.e., subpopulation) of the data point is unknown, the GMM is an unsupervised learning method (Figueiredo and Jain 2002). In addition, the GMM is a soft clustering method that uses probabilistic inference to explain how much a given data point is associated with a certain cluster (i.e., subpopulation). Due to these characteristics, the GMM has been widely employed in unsupervised classification applications in which data tend to follow multimodal and complex distributions. In this study, the container weight class was defined for each cluster of the GMM. Furthermore, Fig. 4 Overview of the proposed container stacking system the probable weight class was predicted for new container input. For the detailed description, the following notations are introduced: Set of container groups, indexed by g K g Set of clusters (i.e., weight class) for container group g , indexed by k Mean of cluster k for container group g Σ g k Covariance of cluster k for container group g g k Mixture weight of cluster k for container group g ; 0 ≤ g k ≤ 1 and ∑ k∈K g g k = 1 z g k Latent indicator variable; defined as 1 if the observation data belongs to cluster k and 0 otherwise; Marginal probability distribution of container weight x for container group g z g k |g Posterior probability (i.e., "responsibility") that container weight x is observed from cluster k for container group g ; z The GMM is parameterized by the mean g k , covariance Σ g k , and mixture weight g k . The assignment of the unknown class label z g k is considered a latent variable instead of a parameter. It enables the joint distribution p x, z g k to marginalize the variable z g k out to define the cost function independently of z g k . The resulting standard form of the GMM is written as To estimate the three parameters of the GMM, the objective function is to maximize the marginal likelihood of the data ( p(x|g) ). Because there is no analytical solution, a numerical method was employed for the maximum likelihood estimation. The most widely used method is expectation maximization (EM). The EM algorithm estimates the model parameters through iterations of the expectation step (E step) and maximization step (M step). Given the initialized model parameters and the log-likelihood estimate, the E step uses the model parameters to evaluate the responsibility z k |g via Then the M step re-estimates the model parameters using this responsibility value. These iterations lead to the convergence of the model parameters, and the resulting trained GMM provides the probable weight class of the new container input via ( Data-driven dynamic stacking strategy for export containers…

Module 2: dynamic stacking strategy
In module 2, we executed the DSS as an online algorithm to determine the storage location of an arriving container in real time. The overall framework of the proposed DSS is shown in Fig. 5. The algorithm inputs include the GMM-based prediction results for the weight class as well as the yard stack configuration of the pre-selected storage area for the arriving container. The storage location for the container is determined after the weight class-to-stack assignment. Both methods accommodate the GMM-based prediction results for the weight class obtained from module 1. Furthermore, the weight class-to-stack assignment method adapts the adjustment mechanism according to the dynamic change in the stack configuration, which leads to the generation of the stacking strategy that is specific to the storage area.
For the weight class-to-stack assignment, conventional approaches of category stacking apply the assignment method homogeneously for all storage areas, and they remain consistent during the period in which containers are arriving. However, in real-world environments, the stack configuration cannot be the same for all storage areas, and thus the stacking strategy must be adjusted according to the different stack configurations. Taking into account the limitations of conventional methods, we propose an improved approach to accommodate the dynamic change in the stack configuration of the storage areas. For the detailed description, the following notations are introduced: List of container weights for stack s in storage area a of container group g First, we describe the procedure for the weight class-to-stack assignment. This assignment satisfies a many-to-many relationship. Regarding the GMM-based prediction results for the weight class, we focus on the mixture weight g k , which defines the weight class-to-stack assignment K g as such that the membership of the weight classes in a stack is determined by whether the elements of R g k lie in the specified R as . The variable K g as is continuously adjusted because dynamic container placements change t as , which impact R as . Figures 6 and 7 provide an example of the adjustment mechanism in the weight class-to-stack assignment procedure. It is supposed that two storage areas are assigned containers that belong to the same container group. The number of weight classes is set to four for the container group, and the number of stacks is set to four for both storage areas. The mixture weights g k are set to 0.25 for all weight classes. Figure 6 shows the initialized K g as in which there are no differences between the storage areas.
In contrast, Fig. 7 shows the adjusted K g as after a total of 22 containers are stacked. The adjustment varies depending on the storage area. We now elaborate the steps to derive K g as for storage area "A" using Eqs. (4)-(6). First, R g k is always (0, 0.25], (0.25, 0.5], (0.5, 0.75], and (0.75, 1] for the weight classes. Second, R as is initialized as (0, 0.25], (0.25, 0.5], (0.5, 0.75], and (0.75, 1] for the empty storage area. After three, three, one, and three containers are stacked in each stack, R as is updated as (0, 0.2], (0.2, 0.4], (0.4, 0.8], and (0.8, 1] for the stacks. Therefore, it is necessary to check whether there is an overlap between R g k and R as . For weight class 1, the infimum and supremum of R g k lie in R as for stacks 1 and 2, respectively. Accordingly, K g as of Data-driven dynamic stacking strategy for export containers… weight class 1 includes stacks 1 and 2. In this way, the K g as of the weight classes are dynamically updated when the stack configuration is changed, establishing the stacking strategy specific to the storage area. Next, we describe the procedure for the storage location assignment for a container, given the weight class-to-stack assignment. Regarding the GMM-based prediction results for the weight class, we focus on the responsibility value z g k |g , which represents the probability that a container belongs to a certain weight class. If a single weight class is assigned to each stack (e.g., the weight class-to-stack assignment is 1-1, 2-2, 3-3, 4-4), as shown in Fig. 6, an effective strategy is to select a stack with the largest z g k |g for the corresponding weight class k . However, because multiple weight classes can be assigned to each stack, as shown in Fig. 7, a more sophisticated strategy that considers the contributions of multiple weight classes should be employed. In this context, defines the contribution of weight class k to R as . Then, where C as = 1∕ ∑ |g for stack 2. Thus, for a new container input, the stack that yields the largest weighted average of z g k |g is selected among all the stacks in the given storage area.
The overall procedure of the DSS is described by Algorithm 1.
(7) f k as = min sup R g k , sup R as − max inf R g k , inf R as 1 3 Data-driven dynamic stacking strategy for export containers…

Numerical experiments
We conducted numerical experiments to validate the data-driven DSS (also called a GMM-DSS), which features the GMM-based weight clustering and dynamic adjustment mechanism for storage location assignment. We illustrate the improvements achieved by our proposed method through the experiments comparing with the stacking strategies that do not employ GMMs and/or dynamic adjustment mechanisms. First, the input data in the numerical experiment are described. Second, as a result of module 1, the generated GMM to define the weight class for each test instance is reported. Third, the impacts of the unit number of stacks on the algorithm performance are analyzed. Finally, an analysis comparing the stacking performances of the container stacking strategies is presented. This analysis shows how the wealth of data can be applied in the CSP to provide valuable decision support. All the algorithms were coded in Python and executed on a PC with an i5-6600H 3.3 GHz Intel Core processor and 8.0 GB of RAM.

Input data
The input data used in the numerical experiments were collected for 10 months in 2018 from a typical container terminal in Busan, Republic of Korea. The original data included detailed container information, such as the time of arrival and departure, departing vessel, POD, size, type, and weight of each container. Because the stacking decisions are made according to the container group, the original data were classified into container groups with the same attributes (e.g., departing vessel, POD, size, and type). In addition, only 20-foot containers were used in this study. Subsequently, a dataset of 12 container groups was used for the analysis. Table 1 reports the details of the selected 12 instances. Next, we present the input data distributions over the entire voyage to check the justification for converting the container weights. This analysis comes from our assumption that the probability distribution of the container weights can be made available from the historical data due to the repeated tendencies over the voyage. It is rarely studied in literature to handle the information on container weights. Only a few studies, such as Kang et al. (2006) and Zhang et al. (2014b), utilized the true probability distribution or portion of the weight groups assuming such information is given or estimated by analysis of historical data in advance. Figure 9 shows the distribution of the container weights over the entire voyage for instances 4 and 7. The x-axis indicates the range of container weight uniformly divided by 10 classes, and the y-axis indicates the number of containers for each voyage which is normalized to a value between 0 and 1. In this case, the distribution of container weights was similar over the entire voyage of the same instance. This is reasonable because the composition of the export cargo tends to 1 3 Data-driven dynamic stacking strategy for export containers… be similar for each voyage. Due to the extensive data, GMM-based predictions for weight classes can be a powerful tool for effective category stacking in yards. For container groups of a general type, the terminal had 19 blocks consisting of 50 bays each, as well as 10 stacks and six tiers. The storage area for the same container group was reserved in a unit of stacks. Because the unit number of stacks is usually set to 10 stacks (i.e., one bay) or five stacks, we conducted the experiments for both cases where the experimental results are presented in Sect. 4.5. The total number of storage areas was set to the minimum value required for the corresponding container group. Considering the buffer storage space for rehandling operations that exists in practice, the maximum allowable tier for containers was limited to the fifth tier.

Design of experiments
For each instance in this study, we divided a training dataset for generating the GMM in module 1 and a test dataset for simulation. The test dataset is constructed by randomly selecting a voyage and collecting a corresponding list of loaded containers from the historical data of the test ship-lanes (test instances). The training dataset is the remainder of historical data except for the test dataset. The results of GMM-based clustering with the training dataset are provided in Sect. 4.3, followed by sensitivity and comparative analysis results.
In simulation experiments, two kinds of randomness are considered: the container arrival sequence and assignment to a storage area. The detailed list of the tobe-stacked containers is unknown in advance and even unpredictable in practice. Further, a pre-selected storage area is given because the designation of the storage area for an arriving container is dynamically assigned depending on the workload of the YC. Therefore, the container arrival sequence was made by randomly selecting a container list in the test dataset, and a storage area was randomly assigned to a container in the simulations.
The stacking performance was evaluated based on category stacking, which aims to cluster containers with similar weights into the same stack. Therefore, we introduced an evaluation function where the standard deviation of the container weights in the stack was measured. The evaluation function E(g) indirectly minimizes the makespan during future loading operations for a given category stacking strategy.

GMM-based clustering for container weights
Using 12 test instances, we employed the GMM method to cluster the container weights into K clusters. For the training data, a set of preliminary experiments was conducted to investigate the appropriate value of K for each test instance, varying K from 1 to 5 in steps of 1. The value of K was assigned the smallest value based on the Bayesian information criterion (BIC). Figure 10 shows the resulting GMM for the two test instances. The histogram in Fig. 10 indicates that the container weights exhibited a multi-peak distribution, and in both instances, it can be seen that five clusters are most appropriate. Figure 10 shows that GMM obtained via statistical modeling reasonably represents a distribution that is difficult to express as a single normal distribution. The results of module 1 for all the instances are presented in Appendix A.

Sensitivity analysis of the unit number of stacks
This section validates the performance of GMM-DSS according to the unit number of stacks. The unit number of stacks within a storage area is usually set to 10 stacks for export containers, but it varies from terminal to terminal. For the sensitivity analysis of the unit number of stacks, | | S a | | was set to 5, 10, 15, and 20. The GMM was generated using the training dataset, and then GMM-DSS was implemented using the test dataset. Table 2 reports the change in the average of E(g) according to the variation in the unit number of stacks | | S a | | . In the case of instance 1, it was excluded from experiments on more than 15 stacks as the number of tested containers was less than 50. In most instances, it is observed that E(g) decreases as the unit number of stacks increases. These results imply that as the number of unit stacks increases, the weight distribution of containers may have been relatively stable and homogeneous over storage areas since the containers are less scattered into multiple storage areas. Meanwhile, Instances 3, 5, and 6 yield the minimum E(g) when the unit number of stacks is equivalent to 10 and 15, although the differences of E(g) in instances are not significant. The GMM-DSS works reliably to comply with the category stacking strategy, including the case of 10 stacks widely used in container terminals. Thus it is believed to be worth being introduced into the terminal operating system.

Comparative analysis of container stacking strategies
For comparison purposes, we implemented four alternative stacking strategies: a GMM-based static stacking strategy (GMM-SS), current practice, hybrid sequence Data-driven dynamic stacking strategy for export containers… stacking strategy (HSSS), and a random stacking strategy (RSS). For the GMM-SS, the weight classes and storage locations of the containers were determined by our GMM-based dynamic stacking strategy (GMM-DSS), while the dynamic adjustment mechanism in the weight class-to-stack assignment was ignored. For the current practice, the weight classes were defined by dividing the container weights into weight classes by 'number of stacks in a bay,' where each weight class has equal size of weight range according to the historical data. In addition, the storage locations of the containers were determined in such a way that the stack and weight classes were allocated on a one-to-one basis. For the HSSS proposed by Chen and Lu (2012), the weight classes were defined by dividing the container weights weight classes by '(number of stacks in a bay)+(number of tiers in a stack)−3. ' Then, HSSS induces heavier containers to be stacked in the left upper locations and lighter containers to be stacked in the right lower locations. In the RSS, the containers were stacked in a way that filled the stack sequentially according to the arrival order without considering the container weights. All five strategies, including our proposed method, were executed in seconds; thus, they are suitable for an online algorithm.
We conducted a simulation to compare the proposed method to the four alternative strategies for two different cases where the unit of storage area is five stacks or 10 stacks. The resulting performance for the stacking strategies is presented in Tables 3 and 4 for the cases in terms of the average E(g) for 100 repetitions. For both cases, the proposed GMM-DSS method obtained the minimum E(g) on average for all test instances. Specifically, for the case of five stacks in Table 3, the GMM-DSS performed better than the GMM-SS by 6.0%. This is the result of the dynamic adjustment mechanism in the weight class-to-stack assignment. In addition, the performance of the GMM-DSS was better than the current practice, HSSS, and RSS by 33.1, 41.6 and 44.1%, respectively. This result implies that the proposed method was more effective as the data-driven approach as well as the dynamic adjustment mechanism was incorporated into the stacking strategy. For the case of 10 stacks in Table 4, the results show that proposed method is superior to the other methods as in the case of five stacks. The performance of the GMM-DSS was better than the GMM-SS, current practice, HSSS, and RSS by 8.1, 43.6, 52.8, and 59.6%, respectively. Moreover, Fig. 11 demonstrates the robust performance of our proposed method for the experimental repetitions. The current practice performed better on average than the HSSS and RSS, and the proposed GMM-DSS and GMM-SS are dominant over the current practice. Therefore, we can conclude that the proposed GMM-DSS method is worth introducing in practice because it has the most reliable and best performance.

Comparative analysis according to variability
This section validates the algorithm performances according to variability in container weights. The proposed GMM-DSS utilizes the information on container weights from historical data and creates a GMM to approximate the distribution of container weights; thus it should be verified whether the GMM-DSS and GMM-SS can yield robust performance under a certain degree of variability. To this end, container weights x(i) � for the test were randomly generated as follows: x(i) � = min(max(x(i) + 500 × × N(0, 1), LB(i)), UB(i)) (kg), where x(i) is a randomly selected sample data from the training dataset, is related to the variability, N(0, 1) is the random generator from a standard normal distribution, and LB(i) and UB(i) are the lower bound and upper bound on weights of container i introduced to avoid extreme values. was set to 0, 1, 2, 3, and 4. Figure 12 shows the performance of five stacking algorithms for the experimental repetitions under variability on container weights. For all the cases of σ, the proposed GMM-DSS and GMM-SS dominantly outperform the other algorithms in terms of E(g) . GMM-DSS slightly outperforms GMM-SS. Furthermore, although performance degrades as variability increases, there is no significant difference in the change compared to other algorithms. Thus, it can be concluded that the proposed algorithms are robust to variabilities by taking advantage of predictive analytics.

Conclusion
The goal of this paper is to introduce the wealth of data generated by the container terminal into the methodology of determining the storage location of the arriving containers. We presented a two module-based DSS to manage the CSP in container terminals. In our study, the CSP was solved by a category stacking strategy to facilitate stowage planning. In contrast to previous studies, the proposed method applies predictive analytics for container weight classification using historical data, and container assignment to a specific storage area is executed dynamically to outperform the existing stacking strategies. To the best of our knowledge, these two main features have not been introduced in the literature before. Specifically, in module 1, we generated a container group-specific GMM for container weight classification. In module 2, we implemented the DSS as an online algorithm to determine the storage location of an arriving container in real time. We conducted numerical experiments to validate the effectiveness of the proposed method using real-life data from a typical container terminal in Busan, Republic of Korea. For the generality of terminal environments, two different cases for the reservation unit in a storage area are considered in the experiments. The experimental results showed that the proposed method outperforms four other alternative stacking strategies (i.e., the GMM-SS, current practice, HSSS, and RSS). Therefore, our proposed method performs robustly and can further improve yard operations and terminal competitiveness. The experimental results are encouraging in that it implies that the improvements in the stacking performance are related to the category stacking. The proposed method is expected to achieve greater improvements in practice when datadriven inferences can be derived from more historical data. In future research, our method could be extended to transshipment containers by considering the detailed characteristics of those operations. In addition, novel stacking strategies, such as the flexible space-sharing strategy and related operations such as stowage planning, could be integrated into our method to generate greater effectiveness in terminal operations.

Appendix A: The results of module 1 for the test instances
See Table 5. Data-driven dynamic stacking strategy for export containers…

Availability of data and material Not applicable.
Code availability Not applicable.

Conflict of interest
The authors declare no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission Data-driven dynamic stacking strategy for export containers… directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.