# Towards Optimizing Multi-Level Selective Maintenance via Machine Learning Predictive Models
## 4 Proposed Methodology  
### Estimation of Actual Age and System Reliability Function  
As the first step, the proposed methodology aims to determine the actual age by calculating the age acceleration factor using the K-means algorithm and then calculating the reliability of the manufacturing system based on a new model that is closely related to the determined actual age [32,33].  
The algorithm of k-means clustering allows us to regroup system maintenance data into clusters according to certain features such as number of preventive and corrective maintenance, mean time between failures, etc. Each cluster \(k\) is represented by a centroid denoted by \(O_{k}\) and a set of components \(\{C_{1},\)\(C_{2},\)\(\ldots,\)\(C_{s}\}\). Indeed, to extract similarity between different components, each element \(i\) is associated with a distance between it and the centroid of the group to which it belongs. Thus, the farthest element from the centroid of the class it belongs to is the \"bad-representative-component\", while the \"best  
Figure 1: Overview of the proposed maintenance selective approach.  
representative-component\" \(O_{M}\) is the average of all clusters calculated by the mean of all centroids.  
So, the component degradation degree can be considered as its deviation from the \"most representative component\". Consider \(L_{i}\) is the distance from the \"best-representative-component\" to the element \(i\) and \(l_{i}\) is the distance between the best and the bad component. The degradation coefficient is calculated by using Equation (1).  
\[b_{i}(k_{i},m)=min(\frac{L_{i}}{l_{i}},\frac{l_{i}}{L_{i}}\,,),\;0\leq b_{i}\leq 1 \tag{1}\]  
Note that \(b_{i}=0\) when the component \(i\) does not deteriorate, and its actual age is as provided by the manufacturer. Otherwise, if \(b_{i}\) is very close to 1, indicating a maximum degradation, maintenance of the component is necessary to prevent a system breakdown.  
Then, the actual age of the components \(\gamma_{i}^{*}(m)\) at the end of mission \(m\) is calculated by Equation (2).  
\[\gamma_{i}^{*}(k_{i},m)=A_{i}^{*}(m)\cdot e^{-b_{i}(k_{i},m)} \tag{2}\]  
where the theoretical age \(A_{i}^{*}(m)\) at the end of mission \(m\) can be formulated by Equation (3).  
\[A_{i}^{*}(m)=A_{i}^{*}-\sum_{j=1}^{m}d_{j} \tag{3}\]  
To account for the genuine impact of component age on its failure rate, we present a novel formula crafted by amalgamating insights from [PERSON] et al. [34] and [PERSON] et al. [35]. The primary goal is to scrutinize system availability, which diminishes with degradation. To achieve this, the authors model the system's failure rate as a function that grows with the component's age. In our proposed formula, represented by Equation (4), we define the failure rate of a specific component \(i\) as a function of its current age, denoted as \(\gamma_{i}^{*}(k_{i},m))\).  
\[\lambda(\gamma_{i}^{*}(k_{i},m))=s_{i1}+s_{i2}\cdot e^{-g_{i}\times(\gamma_{i }^{*}(k_{i},m))^{3}} \tag{4}\]  
where \(s_{i1}\), \(s_{i2}\) and \(g_{i}\) are system settings depending on the equipment characteristics and its age degradation. Indeed, for such components that have been maintained recently, the failure rate is close to \(s_{i1}\). Otherwise, when the actual age decreases, the failure rate becomes higher until it reaches the sum \(s_{i1}+s_{i2}\). In addition, the positive parameter \(g_{i}\) is introduced due to significant variations of the maintenance data and the real conditions that may occur during the period of operation such that the system age degrades when the \(g_{i}\) is important however the system has a low failure rate when the \(g_{i}\) is less significant.  
Therefore, the system reliability function is considered closely related to the failure rate and takes into account the degradation of the system lifetime, so that it can be expressed as follows:  
\[R(\gamma_{i}^{*}(m))=e^{\int_{0}^{dn}\lambda(\gamma_{i}^{*}(m))dm}\;\forall\; m\in[0,D_{m}] \tag{5}\]