## 3 Production Control
### Fuzzy Approach  
The proposed approach considers both the upstream (UP) and downstream (DOWN) buffers for the definition of a decision-making model based on fuzzy logic that can also be extended to other indicators such as station efficiency, reliability, etc. The design model of the flow line determines the percentage of the shared operations to the first and second stations of a couple. The total time shared assigned to the first station is denoted as P%1, while the percentage assigned to the second station is P%2. The goal of the fuzzy model is to dynamically change the allocation of the shared operations with a more continuous variation. Then, the output of the model is a percentage variation x which is used to increase/decrease the allocation of the shared operations from the designed parameters as follows:  
\[\text{P}\%_{\text{1}}=\text{P}\%_{\text{1}}+\text{x} \tag{1}\]  
\[\text{P}\%_{\text{2}}=\text{P}\%_{\text{2}}-\text{x} \tag{2}\]  
The value of x can be positive or negative; the positive value means a shift of the shared operations towards the first station (Equation (1)), while a negative value means a shift of the shared operations towards the second station (Equation (2)).  
The fuzzy engine computes the value of x using a set of fuzzy rules that are reported in Table 2.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Rule No.** & **Buffer UP** & **Operator** & **Buffer Down** & **Output x** & **Rule** \\ \hline
1 & Low & And & Low & x is medium & R1 \\ \hline
2 & Low & And & Medium & x is high & R2 \\ \hline
3 & Low & And & High & x is very high & R3 \\ \hline
4 & Medium & And & Low & x is low (negative) & R4 \\ \hline
5 & Medium & And & Medium & x is medium & R5 \\ \hline
6 & Medium & And & High & x is high & R6 \\ \hline
7 & High & And & Low & x is very low (negative) & R7 \\ \hline
8 & High & And & Medium & x is low & R8 \\ \hline
9 & High & And & High & x is medium & R9 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Fuzzy rules.  
Figure 1: Workload allocation.  
The fuzzy rules operate with the definition of the fuzzy sets for the buffers and the output value. The fuzzy set used for both upstream and downstream buffer levels is shown in Figure 2.  
The fuzzy set for the output value x is shown in the Figure 3.  
The composition of fuzzy rules follows the \"_min_\" operator considering the minimum value of the antecedent sets for each rule [28]. Following the notation of Figure 2, the consequents of the fuzzy rules \(y_{1}\), \(y_{m}\), and \(y_{h}\) are computed as shown in Table 3 according the value of the buffer level \"_buffer_\".  
The value of the computed \(y_{1}\), \(y_{m}\), and \(y_{h}\) determine the area (weight) of each output fuzzy set (Figure 3). The generic abscissa of each output fuzzy set is computed as follows:  
\[\text{abscissa}=\text{a}+y^{*}(\text{b}-\text{a}) \tag{3}\]  
and the related area is computed as follows:  
\[\text{area}=(\text{b}-\text{abisssa})^{*}y^{*}2+(\text{abscissa}-\text{a})^{*}y \tag{4}\]  
The crisp value (x value used in Equations (1) and (2)) is obtained by multiplying the area by each central value of the whole and dividing by the sum of the areas (centroid approach).  
Figure 3: Fuzzy sets for the output value.  
\begin{table}
\begin{tabular}{c c c c} \hline
**Buffer Levels** & \(y_{1}\) & \(y_{m}\) & \(y_{h}\) \\ \hline IF Buffer =0 & \(1\) & \(0\) & \(0\) \\ \hline IF Buffer \textgreater{}0 and \textless{}b_{m}\(1-(\text{buffer}/c_{\text{l}})\) & \(\text{Buffer}/c_{\text{l}}\) & \(0\) \\ \hline If Buffer = \(b_{m}\) & \(0\) & \(1\) & \(0\) \\ \hline If buffer \textgreater{}b_{m} and \textless{}b_{h}\(0\) & \(0\) & \(1-((\text{buffer}-b_{m})/(c_{m}-b_{m}))\) & \((\text{buffer}-a_{h})/(b_{h}-a_{h})\) \\ \hline If buffer \textgreater{}b_{h}\(0\) & \(0\) & \(0\) & \(1\) \\ \hline \end{tabular}
\end{table}
Table 3: Output computation.  
Figure 2: Fuzzy sets for the buffers’ level.