# Production Optimization in a Grain Facility through Mixed-Integer Linear Programming +
## 6 Experimental Evaluation
### Numerical Results
#### 6.4.2 GAP Evolution and Cost Improvements  
Table 6 presents an analysis of the GAP and objective function value evolution of the solution computed using the proposed MILP model for the case study, when using different fixed-effort time stopping criteria. The table reports the values of the objective function and the (percentage) GAP computed in seven executions of the proposed model with different time limits, from 60 to 14,400 s. It is useful to determine how much execution time is worth to spend in order to obtain improved solutions. During the first hour of execution, the best solutions found are significantly improved. After one hour, the reduction in the objective function value and gap are close to 1200 units and 2.3% with respect to the solution found in few seconds (60). With higher execution times, both the gap and the objective function value almost stagnate. The variable costs involved in a typical soy harvest, which correspond to the objective function in the model, amount to approximately USD 200,000; 66% to labor, 30% to energy and consumables for production and 4% to energy and consumables for line cleaning. Therefore, a reduction of 1200 units represents a cost saving of USD 3300. The fact that most of the improvements are reached in few hours has very relevant practical consequences. Once the harvest has begun and some weeks have passed, there might be minor changes in the withdrawal \begin{table}
\begin{tabular}{c c c c c c c} \hline _Line_ & _Shifts_ & _Production (Tons)_ & _Hours per Line_ & _Cleanings_ & _Saved Cleanings_ & _Cleanings_ \\ \hline
1 & 20 & 4531.70 & 733.88 & 14 & 8 & 84 \\
2 & 31 & 8024.30 & 1206.66 & 8 & 12 & 64 \\ \hline _total_ & 51 & 12556 & 1940.54 & 22 & 20 & 148 \\ \hline \end{tabular}
\end{table} 
Table 4: Production and cleanings for the considered case study. \begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline _Week_ & **1** & **2** & **3** & **4** & **5** & **6** & **7** & **8** & **9** & **10** \\ \hline _stored production (tons)_ & 0 & 0 & 495 & 1044 & 1318 & 2141 & 2415 & 2506 & 2605 & 2234 \\ _available capacity_ & 2700 & 2700 & 2205 & 1656 & 1382 & 559 & 285 & 194 & 95 & 466 \\ \hline _week_ & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & \\ \hline _stored production (tons)_ & 1710 & 1100 & 880 & 412 & 439 & 339 & 39 & 0 & 0 & \\ _available capacity_ & 990 & 1600 & 1820 & 2288 & 2261 & 2361 & 2661 & 2700 & 2700 & \\ \hline \end{tabular}
\end{table} 
Table 5: Stored production and available capacity by week for the case study. dates. Storms and strikes are among the most frequent reasons. Should this happen, the algorithm might be quickly run again to re-optimize the remaining part of the harvest in light of the modified expected withdrawals. The graph in Figure 1 graphically presents the evolution of the GAP metric for the real problem instance solved, for a range of 0 to 14,000 s (4 h). The shape of the curve indicates that the convergence speed towards the global optimum is faster in the first 30 min, then it decreases significantly up to two hours, and finally it stagnates for execution times greater than two hours (the percentage of improvement in the last two hours was just 0.1%). A logarithmic regression analysis confirmed that the GAP evolution closely matches a logarithmic function \(f(x)=a+b\cdot\ln(x)\), where GAP\(=f(x)\) and \(x\) is the solver execution time, considering parameters \(a=5.63\) and \(b=-0.52\). The correlation coefficient (defined by Equation (27)) is \(r=0.97\), suggesting a high similitude between the empirical results and the considered logarithmic function. \[r=\left|\frac{S_{xy}}{\sqrt{S_{xy}}\sqrt{S_{yy}}}\right|, \tag{24}\]  
\[S_{xx}=\sum_{i}{(\ln x_{i}-\overline{\ln x})^{2}}=\sum_{i}{(\ln x_{i})^{2}}-n \cdot\overline{\ln x}^{2}, \tag{25}\]  
\[S_{yy}=\sum_{i}{(y_{i}-\overline{y})^{2}}=\sum_{i}{y_{i}^{2}}-n\cdot{ \overline{y}}^{2}, \tag{26}\]  
\[S_{xy}=\sum_{i}{(\ln x_{i}-\overline{\ln x})\cdot(y_{i}-\overline{y})}=\sum_ {i}{\ln x_{i}\cdot y_{i}}-n\cdot\overline{\ln x}\cdot\overline{y}. \tag{27}\]