## 3 Problem Description and Formulation
### Formulation for the Real-Time Scenario of CRP  
Learning from [6], we first present a simplified DP model of real-time CRP. Let \(R(S^{k})\) denote the minimum number of relocations required to remove all the remaining containers based on the layout \(S^{k}\), and let \(q(a^{k}|S^{k-1})\) denote the number of realized operations that occur during the \(k\)th operation round. The DP model can be formulated as a recursive function as in Equation (2). \[ \begin{cases}R(S^{k-1})=\min_{a^{k}}\Big{\{}q(a^{k}|S^{k-1})+R(S^{k})\Big{\}}, \ 1\leq k\leq K\\ R(S^{K})=0\end{cases}  \tag{2}\]  
Another equivalent form of Equation (2) is shown in Equation (3)  
\[R(S^{k-1})=\min_{a^{k}}\left\{q(a^{k}|S^{k-1})+\min_{a^{k+1}}\left\{q(a^{k+1} |S^{k})+\ldots+\min_{a^{K}}\left\{q(a^{K}|S^{K-1})+\right\}\ldots\right\} \right\} \tag{3}\]  
From Equation (3), to obtain the optimal operation plan \(a^{k}\) for the \(k\)th operation round, the solution process requires simultaneous evaluation of the optimal operation plans from the \((k+1)\)th operation round to the last operation round. So, solving the total optimization objective \(R(S^{0})\), which is the minimum number of relocations for picking up all containers during the whole retrieval process, is difficult because the complete solving process will generate a large number of redundant computation efforts. Consider it another way, and we can try to find an approximate optimal solution for it. According to Equation (2), if \(a^{*}\) is the theoretically optimal operation plan for the \(k\)th round, then we have \(R(S^{k-1})=q(a^{*}|S^{k-1})+R(S^{k})\). Since solving for the theoretical optimum is difficult, assuming that we obtain an available solution \(a^{k}\) for the \(k\)th operation round, we can derive an inequality Equation (4). \[R(S^{k-1})\leq q(a^{k}|S^{k-1})+R(S^{k}) \tag{4}\]Without loss of generality, if \(a^{1},a^{2},\ \ldots,a^{K}\) are available solutions for each round, respectively, then we must have inequality Equation (5). \[R(S^{0})\leq\sum_{k=1}^{K}q(a^{k}|S^{k-1}) \tag{5}\]  
In this way, we convert the solving process of Equation (3) to summing the number of practical relocations during each operation round. We can ensure an approximate optimal solution if we minimize the number of relocations within each round and the impact on the subsequent operation rounds. According to the definition, \(q(a^{k}|S^{k-1})\) includes two aspects: forced relocations and relocations to free up storage placements. The forced relocations result from blocking the target containers during the real-time operation round. The relocations to free up storage placements result from the containers having nothing to do with the target containers and aim to free up good placements for the blocking containers. In addition, some blocking containers may be relocated twice or more due to all candidate storage positions containing the target containers, but this case is included in the forced relocations. Therefore, we can derive the following inequation as Equation (6). \[R(S^{0})\leq\sum_{i=1}^{K}\left(\left|\bigcup_{c\in P_{k}}B_{c}^{k}\right|+|U_ {k}|\right) \tag{6}\]  
\(B_{c}^{k}\) denotes the blocking containers of the target container \(c\) in \(k\)th operation round, and \(U_{k}\) means the set of relocated containers unrelated to the target containers during the \(k\)th operation round. Let \(LB(S^{k})\) denote the number of blocking containers in the layout \(S^{k}\), which will require rehandling operations in the remaining rounds. \(P_{k}\) indicates the set of target containers in \(k\)th operation round. During the \(k\)th operation round, each container \(b\in B_{c}^{k}\) must be moved into other stacks and may become new blocking containers in the move-in stack. Let \(f(b,s)\) denote the expected additional number of the blocking containers when the container \(b\) is moved into the stack \(s\). Its formula will be given later. Thus, after completing the \(k\)th operation round, the number of blocking containers in the layout \(S^{k}\) is as Equation (7).