## 3 Methodology
### Model Validation  
The AnyLogic(r) Personal Learning Edition multi-method simulation platform that supports not only agent-based general-purpose simulations but also it supports DES modeling was used to build the agent-based simulation model that underpins the decision support system in a HP Workstation with an Intel Zeon CPU operating at 3.40 GHz and equipped with 8 GB RAM. The decision-making rules for the decision support agents, IF-THEN fuzzy inference rules and mixed integer programming, were implemented in Python through the integration AnyLogic(r)-Python. To validate the simulation model and to check if it is an adequate representation of the real system, a paired \(t\)-test was applied, which is used to compare the results from the simulation model to \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Definition** \\ \hline h\({}^{\prime}\) & new planning horizon \\ E\({}^{-}\) & upper limit on maximum earliness \\ tmod & the planning period immediately following modification of orders \\ Jmod & set of modified orders \\ Jold & subset of orders in J remaining for completion without modification \\ J\({}^{N}_{old},\mathrm{J^{S}_{old}}\) & subset of orders in Jold, respectively non-reschedulable, reschedulable \\ Tnew & \(\{h+1,\ldots,h^{\prime}\}\) set of new planning periods \\ Told & \(\{t_{mod},\ldots,h\}\) subset of remaining planning periods in T \\ T\({}^{N}_{old}\) & subset of periods in Told with fixed assignment of orders in Jold \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Rescheduling parameters. the historical data of the real system. The indicator refers to the amount of good green coffee beans resulting from the sequence of processes, sift sorting, pneumatic sorting, and optical sorting, with an intake of 37,740 kg of Parchment coffee. The results of 10 replicas are shown in Table 9, where Xj is the number of kilograms of good green coffee beans resulting from the sequence of processes (1) sift sorting, (2) pneumatic sorting, and (3) optical sorting, with an intake of 37,740 kg of Parchment coffee, in the real system. In the same way, Yj is the number of kilograms of good green coffee beans result from the simulation model. A 95% confidence interval is constructed using Equations (19)-(21):  
\[ \begin{array}{c}Z^{-}(n)=\sum^{n}_{(i=1)}Z_{i})/n\\ Z^{-}(10)=-1584.36/10\\ Z^{-}(10)=-158.43\\ \end{array}  \tag{19}\]  
\[ \begin{array}{c}\text{Var}^{*}\left[Z^{-}10\right]=\sum^{10}_{(i=1)}\left[(Z _{j}-Z^{-}10)^{2}\right]/n\ (n--1)\\ \text{Var}^{*}\left[Z^{-}10\right]=1,962,287.05/10\ (10--1)\\ \text{Var}^{*}\left[Z^{-}10\right]=21,803.18\\ Z^{-}(n)\pm\text{t}_{(n-1,1-(1-\infty)2)}\sqrt{\text{Var}[Z^{-}n]}\\ -158.43\pm\text{t}_{9,0.975}\sqrt{21,803.18}\\ -158.43\pm\text{2.26}(147.65)\\ (-492.46,175.59)\\ \end{array}  \tag{20}\]  
It is observed that the confidence interval includes zero, so it is concluded, with a confidence index of 95% that the difference between the means of the real data and the simulation results is not statistically significant. The optimal number of replicas of the simulation model was determined using the procedure of estimating the mean \(\mu=\text{E}\ (x)\) with a specific error. Table 10 shows the results of 10 independent pilot replicas, where each replica represents the number of kilograms of good green coffee beans resulting from the sequence of processes (1) sift sorting, (2) pneumatic sorting, and (3) optical sorting, with an intake of 37,740 kg of Parchment coffee. \begin{table}
\begin{tabular}{c c c c c} \hline
**Replicate** & **Xj** & **Yj** & **Zj = Xj** - Yj** & **(Zj - Z^-10)2** \\ \hline
1 & 27,176.00 & 27,935.05 & \(-\)759.05 & 360,735.09 \\
2 & 27,901.00 & 27,811.70 & 89.30 & 61  
The average amount of coffee beans leaving the process, in kilograms, was estimated with an absolute error of \(\beta=15\) kg and a 95% confidence level.