# Fog Computing Architecture for Load Balancing in Parallel Production with a Distributed MES
## 4 Analysis of Results
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Initial Architecture** & \multicolumn{3}{c}{**Evolutionary Architecture**} \\ \hline
**Communication Layer** & **Latency** & **Communication Layer** & **Latency** \\ \hline Connection: MES \(\Leftrightarrow\) & & & \\ CLOUD & \(\sim\) 1.7 [s] & Connection: MES \(\Leftrightarrow\) FC & \\ / CLOUD \(\Leftrightarrow\) MES & & & \\ Bidirectional communication & & & \\ \hline \multirow{4}{*}{MES \(\Leftrightarrow\) CLOUD} & \multirow{2}{*}{\(\sim\) 65 [s]} & **Communication Layer** & **Latency** \\ \cline{3-4}  & & Connection: FC node \(\Leftrightarrow\) & \\ \cline{3-4}  & & CLOUD/CLOUD \(\Leftrightarrow\) FC node & \(\sim\) 1.7 [s] \\ \cline{3-4}  & & Bidirectional communication & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of transmission latency and resilience in the communication layer of the base and extended architectures. 61 \({}^{\circ}\)C, a value that is below the thermal throttling (T\(\_\)Thr) threshold and is therefore stable in its operation. However, to avoid possible approaches to this critical temperature limit, it was decided to maintain forced ventilation during the period of orchestration of all order requests to the MESs, with an average execution time for task assignment decision-making of 900 [ms]. The time required for the load distribution decision-making process is justified when considering aspects such as strategic business expansion needs, the dynamism of current markets, and the optimization of production processes. Table 3 shows how the implemented algorithm assigns five tasks to the MESs. However, before their execution, the FC node must acquire specific dynamic parameters from the plant and assign them to an array, such as the time it takes the plant to prepare and replenish each type of part, as well as the energy consumption involved in these actions. According to Table 1, the following data are available for the time: [A(218 [s]-MPS1.156 [s]-MPS2); B(156 [s]-MPS1.154 [s]-MPS2); and C(128 [s]-MPS1.127 [s]-MPS2)). And, as equivalent parameters of energy consumption, we have the following: [A(843 [W]-MPS1.562 [W]-MPS2); B(569 [W]-MPS1.558 [W]-MPS2); and C(572 [W]-MPS1.571 [W]-MPS2)]. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Orders** & **Cost** & **Cost** & **Assigned** & **Decision Judgment** \\
**[A, B, C]** & **MPS1** & **MPS2** & **MES** & **Decision Judgment** \\ \hline
[5, 7, 10] & 3205 & 2757 & 1 &
\begin{tabular}{c} Similar cost, assigned to the one with \\ the lowest load (both empty, \\ choose MPS1) \\ \end{tabular} \\ \hline
[4, 6, 7] & 2463.7 & 2181.4 & 2 &
\begin{tabular}{c} MPS2 cost \textless{} MPS1 and MPS2 with \\ lower load, assigned to MPS2 \\ \end{tabular} \\ \hline
[2, 5, 8] & 2209.1 & 1853.8 & 2 &
\begin{tabular}{c} Similar cost, assigned to MPS2 with \\ lower load \\ \end{tabular} \\ \hline
[7, 0, 0] & 1653.3 & 1184.5 & 2 &
\begin{tabular}{c} Threshold deviation: MPS1 cost \\ (1653.33) \textgreater{} 1.30 MPS2 (1184.50) \\ \end{tabular} \\ \hline
[0, 0, 3] & 362.4 & 378 & 1 &
\begin{tabular}{c} Similar cost, assigned to MPS1 with \\ lower load \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Validation of a hybrid algorithm based on integer linear programming (ILP) and a heuristic rule for load balancing during task distribution. Figure 5: Thermal and computational performance of the FC node during its orchestration process. On the other hand, the maximum capacity for each production line was set at 40 units, and a heuristic limit of 1.3 times the lower cost value was also set; i.e., the higher operating cost between the two MPSs was evaluated against this threshold. If it is exceeded, the allocation option will serve as an alternative. Finally, weightings were added for production time and energy consumption, allowing the algorithm to adapt to business management needs in terms of sales, production, and energy.