## 2 Materials and Methods
### Cost KPI Definition: Cost Loss Indicator (CLI)  
Our new KPI (CLI) is defined as the costs associated with the six big losses during a specific period, e.g., a working day. Each component of the KPI is composed by different costs which can be seen in Figure 2. The main cost components are opportunity cost (OC), referring to benefit loss, and production cost (PC).  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Value** & **Observations** \\ \hline Labor cost & 12 €/h & One operator per action \\ Informatics resources & 0 €/h & There is no maintenance or licenses \\ Transform resource & 5.84 €/h & 8 years of amortization \\ Tools & 0.34 €/h & 15 min of useful life \\ Tooling & 0.55 €/h & Only 1 tooling is used \\ Fluids & 0.21 €/h & Distilled water and coolant \\ Energy & 0.135 €/kWh & Standard electric rate \\ Preparation time & 1 h & Measured in the workshop \\ Programming time & 1 h & Measured in the workshop \\ Number of rejects & 1 & Hypothesis \\ Number of reworks & 1 & Hypothesis \\ \hline \hline \end{tabular}
\end{table}
Table 1: Database parameters.  
This KPI is obtained by adding three components:  
\[\text{CLI}=\text{C}_{\text{AL}}+\text{C}_{\text{PL}}+\text{C}_{\text{QL}} \tag{1}\]  
where \(\text{C}_{\text{AL}}\), \(\text{C}_{\text{PL}}\), and \(\text{C}_{\text{QL}}\) are the availability, performance, and quality cost losses, respectively.  
\(\text{C}_{\text{AL}}\) can be expressed as:  
\[\text{C}_{\text{AL}}=\text{OC}_{\text{A}}+\text{PC}_{\text{A}} \tag{2}\]  
\[\text{OC}_{\text{A}}=\sum_{\text{j}=0}^{\text{m}}\biggl{(}\frac{\text{n}_{ \text{j}}}{\sum_{\text{i}=0}^{\text{n}}\text{Machining time of i}}[\text{u}/\text{s}] \times\text{t}_{\text{AL}}\ [\text{s}]\times\text{f}_{\text{j}}\times\text{Bj}\ [\text{\epsilon}/\text{u}]\biggr{)} \tag{3}\]  
\[\text{PC}_{\text{A}}=\sum_{\text{j}=0}^{\text{m}}\Bigl{(}\text{t}_{\text{AL}} \ [\text{h}]\times\text{f}_{\text{j}}\times\text{Availability Cost j}\ [\text{\epsilon}/\text{h}]\Bigr{)} \tag{4}\]  
where \(\text{t}_{\text{AL}}\) is the time corresponding to breakdowns, adjustments and waits (the two big losses related to availability), \(\text{m}\) is each machining reference, \(\text{n}\) the total number of machining parts per reference, \(\text{B}\) is the benefit calculated as the difference between its sale price and its production cost, Availability Cost is the sum of costs reflected in Table 1, and \(\text{f}_{\text{j}}\) is defined as follow:  
\[\text{f}_{\text{j}}=\frac{\sum_{\text{j}=0}^{\text{m}}\text{ total time reference j}}{\text{total time}} \tag{5}\]  
Being total time the period in which the Six Big Losses are calculated, e.g., a working day.  
The \(\text{C}_{\text{PL}}\) is expressed as:  
\[\text{C}_{\text{PL}}=\text{OC}_{\text{P}}+\text{PC}_{\text{P}} \tag{6}\]  
\[\text{OC}_{\text{P}}=\sum_{\text{j}=0}^{\text{m}}\biggl{(}\frac{\text{n}_{ \text{j}}}{\sum_{\text{i}=0}^{\text{n}}\text{Machining time of i}}[\text{u}/\text{s}] \times\text{t}_{\text{PL}}[\text{s}]\times\text{f}_{\text{j}}\times\text{Bj }\ [\text{\epsilon}/\text{u}]\biggr{)} \tag{7}\]  
\[\text{PC}_{\text{P}}=\sum_{\text{j}=0}^{\text{m}}\Bigl{(}\text{t}_{\text{PL}} [\text{h}]\times\text{f}_{\text{j}}\times\text{Performance Cost j}\ [\text{\epsilon}/\text{h}]\Bigr{)} \tag{8}\]  
where \(\text{t}_{\text{PL}}\) is the performance losses time, associated with reduced speed and minor stoppage losses, Performance Cost is the sum of costs reflected in Table 1 and the rest of parameters has been defined before.  
Figure 2: Costs for each loss.  
The CQL is composed by rejects and reworks:  
\[\text{C}_{\text{QL}}=\text{C}_{\text{QL-rej}}+\text{C}_{\text{QL-rew}} \tag{9}\]  
The CQLreq adds a new component, the material cost (MC):  
\[\text{C}_{\text{QL-rej}} =\text{OC}_{\text{Qrej}}+\text{PC}_{\text{Qrej}}+\text{MC}_{\text{ rej}}\] (10) \[\text{OC}_{\text{Qrej}} =\sum_{\text{j}=0}^{\text{m}}(\text{p}[\text{u}]\times\text{Benefit j }\left[\text{\text{\