# Dwell Time Estimation of Import Containers as an Ordinal Regression Problem
## 4 Results and Discussion  
We have assumed that by estimating the dwell time with an ordinal regression algorithm, we can reduce the reshuffles in the container stacking compared to those produced with supervised classification algorithms. The ordinal regression algorithm OCC + Kernel Logistic Regression reached the lowest MAE\(\mu\) in our previous experiments with 15 ordinal regression algorithms using the two training and validation datasets (Dataset1_T&V and Dataset2_T&V). However, we have selected two supervised classifiers (Lazy-IBK and Lazy-KStar) for each dataset according to the results of the Auto-WEKA tool. There is no consensus about the measures to evaluate the worthiness of the estimated dwell time with machine-learning algorithms for the optimal stacking of containers. Since we have estimated the dwell time as an ordinal regression problem, we can employ the \(MAE\mu\) as a practical measure. We can also compute the \(MAE\mu\) for estimating the dwell time as a supervised classification problem but considering the size of the error. Thus, we can compare the performance of both approaches. Moreover, we have included the number of reshuffles as another performance measure, starting from the estimated departure date of each container computed with the date of the arrival to the yard and the estimated dwell time. Using the estimated departure date, we have allocated the containers with the optimization model proposed by [PERSON] et al. [2] and implemented using the solver GNU Linear Programming Kit (GLPK ([[http://www.gnu.org/software/glpk](http://www.gnu.org/software/glpk)]([http://www.gnu.org/software/glpk](http://www.gnu.org/software/glpk)) (accessed on 14 July 2019))) version 4.64. The optimization algorithm output a matrix with the positions assigned to the containers in the yard. Finally, we have substituted the estimated departure date of each container with its actual departure date (obtained from the recorded data) and computed the number of reshuffles. We have considered three configurations of the container yard (45 stacks with three tiers, 90 stacks with three tiers, and 45 stacks with five tiers). We have started with an empty yard for each configuration, with the maximum number of allocation spaces available. Moreover, we have set up 21 optimization instances (see Table 4) using the examples in the datasets Dataset1_Test and Dataset2_Test. An optimization algorithm can reach the optimal solution with different containers' allocations. Therefore, such an optimization algorithm can yield dissimilar numbers of reshuffles for the same optimization instance. Reshuffles come from the use of the estimated departure date for optimizing the containers' allocation but the actual departure date for computing the reshuffles. Figure 4 illustrates an example with three allocations to the containers with the same optimization value (0 reshuffles) but different numbers of actual reshuffles. Therefore, reducing the \(MAE\mu\) does not always reduce the number of reshuffles, but in general, it does, as we shall show with our experimental results. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Optimization Instance ID** & **Dataset** & **Examples** & **Stacks** & **Tiers** & **Slots** \\ \hline \(1,2,3\) & Dataset1\_Test & \(135\) & & & \\ \hline \(4\) & & & 49 & & \\ \hline \(5,6,7,8,9\) & & & 135 & & \\ \hline \(10\) & & 68 & & & \\ \hline \(11,12\) & Dataset1\_Test & \(227\) & & & \\ \hline \(13,14\) & & & 248 & 90 & 3 & 270 \\ \hline \(15\) & & 247 & & & \\ \hline \(16,17\) & & & 225 & & \\ \hline \(18,19,20\) & & & 225 & & \\ \hline \(21\) & & 68 & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Description of the optimization instances regarding the dataset and the number of examples, stacks, tiers, and slots. Figure 4: Example of three different space allocations to the same containers. These allocations achieve the same optimization value, zero reshuffles computed using the estimated departure date, but three different numbers of reshuffles.