## 4 Methodology
### Preliminaries
#### 4.1.2 Heuristic Relocation Rules  
We introduce three relocation rules in this subsection. The first relocation rule, namely the Least-relocations-and-Lowest-precedence-gap (LL) rule, draws inspiration from relocation rules such as ERI [6], Minmax [29], and EM [5]. The other two relocation rules are used to compensate for the deficiencies of the LL rule, including the prospective re-allocations for some non-instant-relocated blocking containers to produce a better layout.  
LL Rule  
Two conditions construct the LL rule. They are first, selecting the set of stacks that produces the smallest increment of the ENBC after reshuffles, and, second, choosing the move-in stack from the set of stacks obtained in the \"first step\" with the closest priority value for the blocking container. Equation (12) describes the mathematical formula of the LL rule.  
\[s^{*}=\operatorname*{arg\,min}_{s}\left\{|p_{\min}(s)-p(c)|\right\},\;s\in \left\{r|\min f(c,r)\right\},\;s\
eq s(c) \tag{12}\]  
\(s(c)\) denotes the function to obtain the stack index where the container \(c\) is stacked. If \(f(c,s^{*})=0\), it indicates that the topmost slot of stack \(s^{*}\) is a sequential stack for blocking container \(c\). Therefore, moving container \(c\) to stack \(s^{*}\) does not increase the ENBC. If \(f(c,s^{*})\
eq 0\), it indicates that there is no sequential stack for blocking container \(c\) to move in. The LL rule provides a method for selecting the move-in stack for container \(c\), which suggests that the stack with the closest precedence to container \(c\) is the best choice. This rule has the advantage of keeping the stack with lower priority to provide sequential stacks for subsequent blocking containers as much as possible. Figure 2 illustrates the processing of heuristic rule \(LL\). In Figure 2, we set the priority of the target container to 0 and presented the decision process to relocate the blocking containers by LL. The container priority value marked by the red circle is the current blocking container. Numbers under the layout represent the minimum priority of each assignable stack and the increment of ENBC if the current blocking container is moved into this stack. The blue number marks the optimal selection. The tag \"\((1,3)\)\" represents the container placed in the first stack and 3 rd tier. The tag \"\(\langle(1,3),1,4\rangle\)\" denotes an instruction, meaning the container \"(1,3)\" will be moved from the first stack into the fourth one. (The symbols illustrated in Figure 2 have the same meaning in the subsequent figures.)  
Figure 2: Processing of heuristic rule \(LL\).  
The \(LL\) rule has two potential areas for improvement. Firstly, it is a greedy approach that always assigns a sequential placement for the relocating container whenever possible, which will likely trap into the local optimum. In other words, reallocating a blocking container with higher retrieval priority to a sequential placement with lower priority may result in losing sequential-placed slots for subsequent relocations. Secondly, when only inverted-placement slots are available for the blocking container, the subsequent blocking containers likely have no more sequential placements to select from, which will directly make additional relocations or result in more potential relocations in the following retrieval processes. The next two relocation rules remedy the deficiencies of the \(LL\) rule in the previously mentioned aspects.