An Efficient Procedure for Inserting Buffers to Generate Robust Berth Plans in Container Terminals

Uncertainty is an inevitable aspect of seaside operations in container terminals. Operators therefore need to find robust plans that can resist the impact of uncertainties. Instead of solving a stochastic berth allocation problem, this paper proposes an efficient procedure for inserting buffers into baseline berth plans to strengthen the schedule stability. Such a method is highly versatile and compatible with various solutions to berth allocation problem with different objectives. Numerical results obtained by using simulation on a representative set of instances of the problem are reported; these indicate that the proposed procedure not only increases the flexibility of operations with minor loss of resource utilization but also addresses the impact of service priority. Hence, the contribution in this paper will provide a short path that bridges the gap between berth allocation problem in deterministic and stochastic circumstances.


Introduction
Nowadays, average container terminal utilization levels have risen markedly across almost all regions of the world. On one hand, despite the spiral trade protectionism effect created by US-China trade tensions and Brexit, a milestone with total seaborne trade volumes amounting to 11 billion tons was reached in 2018, and an estimated 793.26 million TEUs were handled in container terminals worldwide. Moreover, with sustained deliveries of mega container ships, container fleet supply capacity increased by 6% in 2018 as compared to 4% in 2017 [1]. On the other hand, container terminal capacity expansion remains relatively subdued following lower investment willingness of port investors and government in recent years. e increasing traffic along with fierce competition between neighboring ports has forced port operators to promote operation efficiency [2]. Among the optimization decisions, solving the berth allocation problem (BAP), which consists in assigning vessels to berths subject to vessel arrival and departure times and size constraints, is the very first level of terminal planning. A proper berth plan can reduce the total vessel stay time, which reflects the service quality, and increase the overall competitiveness of the terminal [3].
In addition, operations in container terminals often suffer from uncertain events, including vessel arrival delays, variations in loading/unloading process times, mechanical failures, and others. ese uncertainties can interrupt the baseline schedules and negatively affect the overall efficiency of ports; they can incur high recovery costs such as contract penalties, as well as additional labour and equipment. Methods to generate robust berth plans are therefore desirable for port operators.
Many studies of BAP have been published over the past two decades. For detailed reviews, the reader is referred to Bierwirth and Meisel [4,5] and Carlo et al. [6]. Among various performance measures of berth allocation models, minimizing tardy vessel departures is considered as one of the most significant [7,8]. On the contrary, Zhen [9] and Kordic et al. [10] argued that each vessel had a preferred berthing time or operation starting time, and it should be regarded as benchmark instead of departure time for a berth plan, i.e., a cost penalty applied if the vessel berthed late. Such idea is consistent with the concept of schedule stability in project scheduling, which will be adopted as the performance measure in this research.
Only a handful of research has addressed the BAP under stochastic circumstance, most of which adopted the robust optimization (RO) method. For example, Han et al. [11] proposed a simulation-based genetic algorithm and solved the integrated berth allocation and quay crane assignment problem. A similar method was adopted by Golias et al. [12] to minimize the performance differences between best and worst cases. More recently, Xiang et al. [13] incorporated customer satisfaction with economic performances and introduced a bi-objective model; they solved the problem by an adapted grey wolf algorithm. Problems with similar objectives were also studied in their additional papers [14,15]. Furthermore, Liu et al. [16] used uncertainty sets to describe the possible scenarios without depending on probabilistic information and adopted a two-stage robust optimization approach. Another common technique, stochastic programming, was also reported in publications. Zhen et al. [17] formulated the problem as a scenario-based mixed integer programming model. In the following research, the tactical BAP was studied by using a similar method [9]. Ursavas and Zhu [18] characterized optimal policies for different types of calling vessels. Besides, some researchers have made contributions to reactive strategies to deal with uncertainties. Schepler et al. [19] built a dynamic management procedure with a rolling horizon algorithm to adjust the baseline schedules, while Umang et al. [20] proposed a series of recovery strategies. Meanwhile, Xiang et al. [21] addressed a reactive strategy for integrated berth allocation and quay crane assignment problem.
Generating robust schedules by building buffers in the operational plan has been recognized as a powerful tool and applied in various scheduling problems. Research can be found in the area of machine scheduling [22], project scheduling [23], and flight scheduling [24]. Buffer time was introduced in BAP by Xu et al. [25], in which an identical buffer was added to each vessel. Another method of inserting buffers was proposed in Zhen and Chang [26]; they presented a modified objective to maximize the idle time between successive vessels. Both papers incorporated buffers into their models and solved the problems by heuristics, which derived suboptimal solutions and might be timeconsuming when problem scales were large due to the NPhardness of BAP [27]. Hence, an efficient method regardless of the model is needed.
Combining the production practices and a literature review, we see a need for a more efficient way of inserting buffers. erefore, unlike the aforementioned studies, the present study focuses on improving the robustness of predefined berth plans by proposing a novel float factor model for berth plan adjustments [28]. e main contribution is twofold: an efficient procedure for inserting buffers is developed to generate robust baseline schedules with acceptable economic performances and solution stability in the presence of stochastic operation times, and the impact of critical attributes of BAP, such as service priority, and the choices of scheduling strategies are thoroughly analyzed.
is study is crucial not only for bridging the gap between deterministic BAP and stochastic BAP in academic research but also for the practical value for seaside operations in container terminals.

Methods
In this section, we briefly explain how berth plans work in container terminals at first. en, the procedure for inserting buffers is presented in detail.

Problem Description.
In general, a berth plan is presented in a time-space two dimensional diagram as shown in Figure 1, where each rectangle represents the operation of corresponding vessel. Port operators will make a berth plan in advance based on the estimated information of all V vessels calling at the port in next planning horizon. For vessel i ∈ V, two decisions should be made simultaneously. e first is the berthing time, or operation starting time s i , which is related to vessel arrival time a i , processing time p i , and required departure time in timetable d i . It should be noted that earlier departure is welcomed by shipping liners because it promotes the flexibility of following voyage [29]. Besides, it is also encouraged by port operators since it releases quay space and cranes for other vessels, which can improve the overall operation efficiency. Hence, d i should be considered as a reference instead of a constraint. e second is the berthing position b i , which concerns the availability of quay space, the assignment of yard template, the and physical constraints, such as water depth and quay crane service range. A berth plan is feasible if no overlaps of rectangles exist in the diagram. Furthermore, a berth plan with smaller total departure delays, i.e., i (s i + p i − d i ) + , where (•) + indicates max(•, 0) is recognized as a better plan. All the notations used for berth plans are listed in Table 1.
Due to uncertainties, the actual schedule might vary from the original plan. In Figure 1, vessel 1 is supposed to berth at s 1 . However, an uncertain event, e.g., late arrival, forces vessel 1 to start its operation at s r 1 . Consequently, vessel 3 must wait until vessel 1 releases the quay space to start its own operation since reassigning a berthing position requires a reschedule for entire systems including quay cranes, yard templates, and inner transportation trucks, which can yield unacceptable recovery cost. Furthermore, extra time is needed to finish vessel 3's operation because of uncertain events such as shortage of available cranes (frequently happens to delayed vessels in practice), resulting in a late departure for vessel 3 at d r 3 . Such chain reaction in coastal operations can negatively affect the overall performance of the berth plan and eventually leads to low customer satisfaction.
us, methods for generating robust berth plans should be developed to leave more space for potential adjustment. Particularly, given the uncertainties during execution, one would like the actual schedule to resemble the baseline schedule as much as possible. In this paper, the deviation of actual operation starting time s r i from the assigned value s i for vessel i is adopted as the indicator of robustness.

2
Discrete Dynamics in Nature and Society

Procedure for Inserting Buffers.
In the canonical float factor model in project scheduling developed by Tavares et al. [28], the starting time of activity i is calculated as is defined as float factor and s i (ES) and s i (LS) denote the earliest possible starting time and latest allowable starting time of activity i, respectively. As discussed before, the canonical method cannot be applied on berth plan directly because of the more complex constraints. erefore, a modified procedure with four steps is proposed in this paper. To clarify the details, an example instance of 10 vessels with identical weight coefficients w i � 1 is adopted as the vehicle of demonstration. Table 2 lists the data settings of the example instance. Meanwhile, an optimal solution with the objective of minimizing total vessel delays is obtained by using optimization software CPLEX; the mathematical model of the deterministic BAP is provided in the first subsection of Supplementary Materials, and the corresponding time-space diagram is depicted in Figure 2. It should be noted that the example instance adopts the socalled continuous berth, in which vessels are allowed to moor anywhere within the quay space. e other type of berth is the discrete berth, where the wharf is divided into a finite set of berth segments so that one berth can serve only one vessel at a time. As reported in literature, the continuous berth can lead to better quay utilization, yet the related problem is more complex to solve [5]. e proposed     1  11  18  11  42  0  11  1  2  32  34  13  104  0  36  1  3  4  13  10  22  34  4  1  4  37  38  14  119  13  37  1  5  15  22  12  55  22  15  1  6  21  26  12  72  34  21  1  7  34  36  13  111  33  47  1  8  15  21  11  54  11  15  1  9  43  42  14  136  46  57  1  10  27  30  13  89  47  27  1 Discrete Dynamics in Nature and Society 3 procedure in this study is suitable for both types of problems because the assigned berthing position for each vessel, i.e., b i , remains unchanged throughout the procedure, which means the adjustments of baseline berth schedule will not incur any conflicts with berth boundaries. We here choose the continuous berth in the example instance to present a more thoroughly illustration of the procedure.

Generating the Right-Justified
Plan. e first step of the proposed procedure is to obtain the latest allowable operation starting time s l i of each vessel i, i.e., moving the rectangles in the time-space diagram to their right-most positions without exceeding the required departure times. Meanwhile, the non-overlapping constraints should still be followed to maintain the feasibility of the adapted berth plan. erefore, a heuristic is developed for generating the rightjustified plan and described as follows: Step 1: sort all the vessels in descending order of s i + p i (i ∈ V), i.e., the departure time in baseline plan. Define set R to restore the vessels that have been rightjustified. Denote parameter t as time reference.
Step 2: for the ith vessel, if s i + p i ≥ d i , set s l i � s i and go to Step 5.
Step 3: define set A to restore the successors of vessel i, Step 5: add i into R and move to the next vessel in V unless all the vessels have been right-justified in the diagram. Figure 3 presents the right-justified berth plan of the example instance in Figure 2, where each vessel has been moved to the right-most allowable position without changing the berthing position by using the above heuristic. Such plan maintains feasible yet is not efficient enough. erefore, further adjustments need to be carried out.

Updating the Weight Coefficients.
e weight coefficient reflects the service priority of each vessel. A more important costumer's vessel will have a higher service priority; this is guaranteed by assigning a larger weight coefficient to the vessel. For those vessels with large coefficients, their operations should resemble the baseline schedule as much as possible to increase the customer satisfaction. However, considering the original and right-justified berth plans, the operations of some vessels are not likely to be affected due to physical constraints. Consequently, their weight coefficients should be set to 0 for the convenience of calculation. e detailed method for recognizing such vessels are as follows: Step 1: for the ith vessel in V, define set B to restore neighboring vessels of i, Step 2: repeat Step 1 until all the vessels in V have been checked. e updated weight coefficients of the example instance are presented in Table 3. Since only 10 vessels are considered, the berth plan is quite "loose" and the weight coefficients of 5 vessels are set to 0.
is simple method can sufficiently reduce the searching space in following operations, especially when more vessels are calling at the port.

Calculating the Accumulative Weights.
Before obtaining the weight coefficient-based float factor for each vessel, the two key parameters, i.e., the accumulative weights of predecessor vessels α i and successor vessels β i for vessel i should be calculated. However, in a berth plan, not only the transitive predecessors and successors but also other vessels that share the same quay space should be considered. erefore, two heuristics are designed to search for related vessels forwards and backwards, respectively. e first heuristic is responsible for calculating α i and is described as follows: Step 1: sort all the vessels in V in ascending order of s i . Define set F(i) to restore the predecessor vessels of i.   Discrete Dynamics in Nature and Society Step 2: for the ith vessel in V, if w i � 0, set α i � 0, F(i) � ∅, and go to Step 4. Step , and remove the duplicate vessels from F(i). en calculate α i � j∈F(i) w j + w i .
Step 4: repeat Steps 2 and 3 until all the vessels have been checked.
Likewise, the second heuristic is developed to calculate β i and is described as follows: Step 1: denote W as the total weight of all vessels, W � i∈V w i . Sort all the vessels in V in descending order of s i . Define set B(i) to restore the successor vessels of i.
Step 2: set B(i) � j ∈ V|b j < b i + l i , b i < b j + l j , s i < s j , w j ≠ 0}. For each j ∈ B(i), reset B(i) � B(i) ∪ B(j), and remove the duplicate vessels from B(i).
Step 4: repeat Step 2 and 3 until all the vessels have been checked. e results of the example instance are listed in Table 3. By now, the main parameters that impact the starting time of each vessel have been obtained, which lays the foundation for generating the robust berth plan.

Obtaining the Robust Plan.
In this final step, the operation starting time s r i of each vessel i in the robust berth plan is calculated based on s i , s l i , α i , and β i . e process is as follows: Step 1: calculate the float time ft i by ft i � s l i − s i . Step 2: calculate the float factor λ i by λ i � α i /(α i + β i ).
Step 3: calculate the operation starting time s r i by s r i � s i + λ i · ft i . Again, the results of example instance are shown in Table 3, in which s r i is rounded to the nearest integer, and the robust berth plan generated by the above procedure is presented in Figure 4. Compared with the original plan in Figure 2, buffers to resist the impact of possible delays have been inserted between successive vessels, while the expected departure time of each vessel is not as late as in the rightjustified plan in Figure 3.

Results and Discussion
In this section, the berth plans generated by proposed procedure will be validated by using simulation studies. And, the total deviation of operation starting time in randomly generated scenarios with uncertain factors is chosen as the indicator of robustness. If at time s i (or time s r i in robust plans), vessel i cannot start its operation due to the delays of predecessor vessels; it should wait until the assigned quay space becomes available and the actual operation starting time is denoted as s i . Such policy is commonly referred to as right-shift strategy in BAP [13] or railway scheduling [30]. Evidently, late arrival of one vessel can also lead to delayed operation starting time. However, such delay is not caused by the berth plan and therefore should not be included when testing the plan performances with aforementioned indicator. Hence, in following experiments, only the uncertain operation time is considered.
In this study, the data are generated based on Xiang et al. [13] and Xu et al. [25], in which the experiments consider a 1200 meters wharf on a weekly basis. A length unit of 20 meters and a time unit of 5 minutes are adopted. e arrival time a i , estimated operation time p i , vessel length l i , and required departure time in timetable d i are randomly generated in the intervals [1,2016], [60,252], [10,15] and [a i , a i + p i + 60] (time units), respectively.
Denote the original berth plans as S 1 ; these are generated by a genetic algorithm (GA) developed by Frojan et al. [31] since CPLEX cannot solve large scale problems in acceptable time. e main procedure of GA is presented in Supplementary Materials, and the robust berth plans derived by the proposed procedure are denoted as S 2 . Both S 1 and S 2 will be tested on ω identical scenarios that are randomly generated with actual vessel operation time p i in [p i , 1.  Discrete Dynamics in Nature and Society 5 deviations of operation starting time is calculated as , and the improvement ratio IR � ((Δs(S 1 ) − Δs(S 2 )) /Δs(S 1 )) × 100%.
e results show satisfied robustness improvement of the proposed procedure under uncertainty. For small scale problems, the total deviation of operation starting time of S 1 can be reduced by up to more than 80%. While with more vessels calling at the port, the problem of congestion may lead to unstable berth plans, whereas S 2 still outperforms S 1 with IR > 10%. e distribution of the total operation starting time deviation for problem with 30 vessels in 1000 scenarios is presented in Figure 5, in which in 67.2% of all cases, S 2 can guarantee a total operation starting time deviation that is less than 40 and this number is 41.9% for S 1 . Meanwhile, in only 4.6% of all cases the deviation is larger than 55 for S 2 , compared to 17.7% for S 1 . Figure 6 presents the results in 20 scenarios with 30 vessels. e two curves have a similar pattern, which indicates that uncertain events may have the same impact on both types of berth plans. Yet, S 2 always outperforms S 1 regardless of the scenarios. erefore, it can be concluded that the berth plan generated by proposed procedure is more robust than the original plan without buffers.
Besides, the proposed procedure can generate S 2 in negligible computational time. In additional tests, the procedure takes less than one second to deal with 100 vessels instances. In Xu et al. [25], they reported that when integrated buffer time into BAP model, the optimization solver Lingo can only solve problems with less than 20 vessels, and the heuristic algorithm they developed can find approximate optimal solutions for 30 vessels instances in less than 5 minutes. Nevertheless, the computational results in Frojan et al. [31] showed that a 40 vessels instance without considering uncertain factors can be solved in 5 seconds. erefore, by incorporating the proposed procedure into deterministic BAP is more time-efficient to generate robust berth plan.
As the results showed satisfied improvement, we then take further steps to discuss the influences of the service priority and the structure of original berth plan, respectively.

e Impact of Service Priority.
In above experiments, the weight coefficient of all vessels is set to 1, which indicates that all vessels have an equal service priority. However, in practice, some vessels may be more important and their schedules should be held stable. Hence, additional experiments are needed to demonstrate the impact of different service priorities.
In this experiment, an instance with 20 vessels is used, in which the weight coefficient of 15 vessels are set to 1 while 5 vessels are randomly selected as the important vessels. Weight coefficients ranging from 1 to 40 are assigned to selected vessels one at a time to generate different robust berth plans; these are tested by 1000 rounds of simulation with random scenarios. e average performances, i.e., the operation starting time deviation, are presented in Figure 7.
As shown in Figure 7, the operation starting time deviation of selected vessels decreases significantly with the weight coefficient increases from 1 to 5. en, the descending trend slows down and the indicator becomes   6 Discrete Dynamics in Nature and Society stable when the weight coefficient is around 20. On the other hand, there is a slight increase in the total operation starting time deviation of all vessels, which indicates that the operation starting time deviation of vessels with small weight coefficients (1 in the case) is increasing. ese findings show that the higher service priority will lead to a more stable schedule for one vessel. However, this may affect the schedule robustness of other vessels or even the robustness of overall berth plan. Hence, one should avoid assigning too large weight coefficients to vessels.

e Impact of Original Berth Plan.
Given a set of vessels, there can be more than one optimal berth plans with different structures and identical vessel total designed delays.
Since the proposed procedure in this study is based on the original berth plan, the performances of obtained robust berth plans may be affected when different original berth plans are adopted.
To test the impact, 5 original berth plans denoted as S r 1 , S r 2 , S r 3 , S r 4 , and S r 5 are generated with a set of 10 vessels. In each of these plans, all the vessels can finish the operations before     Discrete Dynamics in Nature and Society required departure times in timetable. en, robust berth plans based on the original plans are generated with proposed procedure and are tested in 1000 rounds of simulation. e average total operation starting time deviations Δs are given in Table 5, along with the relative difference (RD) defined as RD plan � ((RD plan − RD best )/RD best ) × 100%. As shown in Table 5, S r 2 derives the best performance while S r 5 obtains the worst performance. e relative difference can be more than 110%, which indicates the importance of original berth plan. To further investigate the berth plan structure, S r 2 and S r 5 are depicted in Figures 8(a) and 8(b), respectively. Comparing the two berth plans, the major difference is the location of the right-most vessels. In S r 5 , although vessels 3 and 8 are scheduled to finish their operations in time, the designed departure times are very close to their required departure times, which leaves little space for adjustments and eventually leads to low robustness plans. While in S r 2 , most of the right-most vessels maintain the possibility for right-justify. erefore, when determining the original berth plans, one should pay extra attention to the rightmost vessels. e Earliest Due Date (EDD) policy [32] in machine scheduling should be recommended for this problem.

Conclusions
is research addresses the problem of generating a robust berth plan in container terminals, which is important for seaside operational systems in practice. An efficient procedure for inserting buffers is proposed, in which the operation starting time for each vessel in a predefined berth plan is reassigned. e procedure preserves the required departure times in timetable and the assigned berthing positions so that the entire terminal operational system as well as the schedules of shipping liners will not be affected. While the flexible time in a berth plan is organized as buffers to resist the impact of uncertainties, numerical experiments prove that such procedure can significantly increase the robustness of original berth plans even in congested situations. In addition, the procedure takes the service priority into consideration and can automatically promote the schedule stability for vessels with higher service priority. e trade-off between individual plan robustness and overall robustness is also demonstrated in experiments. Finally, the impact of original berth plan is discussed and the test results indicate that the right-most vessels have major influences on the performances of generated robust berth plans.
In the future, several valuable research directions can be considered. Since the proposed procedure relies on the original berth plan, it is worthy of modifying the BAP model so that solutions suitable for adopting this procedure can be obtained. e integration method may lead to better robust berth plans. Besides, with reassigned operation starting times, the quay crane schedules also need adjustments. Hence, an adaptive procedure for quay crane rescheduling should be developed. Finally, there are other ways to insert buffers, such as critical chain buffer management (CC/BM) method, the comparison of methods under different measures of robustness may provide more insights of the problem.

Data Availability
e data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.
Acknowledgments is work was supported by the National Natural Science Foundation of China (Grant no. 71771130).

Supplementary Materials
e first subsection of supplementary materials provides the details of the mathematical model of BAP that we used to derive the original berth plan, in which additional notations are defined in Table S1 and the objective function as well as constraints is presented. While the genetic algorithm we adopted to solve large-scale BAPs is introduced in the second subsection of supplementary materials, where the pseudocode shows the process of the algorithm and Figure  S1 presents an example of crossover operation in the algorithm to clarify the detailed procedure. (Supplementary Materials)