## 5 Proposed Framework for Maintenance Scheduling  
### Maintenance Scheduling with Imperfect RUL Estimation (PdMI)  
Although the k-LSTM-GFT model has shown high accuracy in predicting the RUL of turbofan engines, as demonstrated by [9], effective maintenance scheduling goes beyond RUL predictions, as previously mentioned. This work presents an approach based on the k-LSTM-GFT model to schedule maintenance actions. This approach stands out from other PdM approaches by exploiting the failure probability estimated by the GFT to dynamically calculate a safety margin for RUL prediction, which is used to schedule maintenance actions. The RUL estimation involves inherent uncertainty due to the imperfection of prognostic methods. Consequently, when using RUL predictions to schedule maintenance actions, it becomes necessary to account for this uncertainty by introducing a safety factor. In this study, we utilize the failure probability \(F_{P}\) and the optimal threshold probability \(t_{p}\), estimated by the k-LSTM-GFT, to account for a safety margin for the RUL estimation. The new estimation with a safety factor, denoted as \(RUL_{s}\), is calculated as follows:  
\[RUL_{s}(i)=RUL_{e}(i)\,\frac{1-max(F_{P}(i),t_{p})}{1-t_{p}}, \tag{1}\]  
where \(RUL_{s}(i)\) is an underestimation of the initial estimation \(RUL_{e}(i)\) made by the k-LSTM-GFT at each day or cycle \(i\). The safety margin increases as the estimated failure probability \(F_{P}(i)\) increases. It is a key feature since it is crucial to avoid the overestimation of the RUL when a given component or piece of equipment is near failure. At each maintenance slot \(d_{Si}\), a maintenance action \(d_{T}\) may be triggered, and a replacement of a component may be performed. The proposed maintenance scheduling approach intends that a replacement \(d_{R}\) is scheduled at time slot \(d_{Si}\) to be performed at \(d_{Si+1}\) if the estimated RUL considering the safety factor \(RUL_{s}(i)\) falls between \(m\) and \(2m\). This scenario is represented in Case 1 in Figure 3. The replacement is planned \(m\) days ahead, thus, there is no cost \(C_{os}\) associated with the action. On the other hand, sometimes the estimated \(RUL_{s}(i)\) may be bigger than \(2m\) at slot \(d_{Si}\), which is not sufficient for scheduling a replacement for \(d_{Si+1}\); however, at slot \(d_{Si+1}\), the estimated \(RUL_{s}(i+1)\) may be lower than \(m\). In this case, a replacement has to be performed in this maintenance slot \(d_{Si+1}\); otherwise, a failure is estimated to occur before the next maintenance slot, \(d_{Si+2}\). This scenario is represented in Case 2 in Figure 3. Since the replacement was not planned, there is an associated out-of-stock cost of \(C_{os}\). The most dangerous scenario occurs when a failure occurs but no maintenance action was triggered in the preceding maintenance slots. This is depicted by Case 3 in Figure 3. This occurs when the predictive model overestimates the RUL prediction. In such situations, corrective action with cost \(C_{c}\) becomes necessary, and since it was not planned, the additional cost \(C_{os}\) is also incurred. Note that in scenarios where safety is crucial, such as the case of aircraft engines, it is mandatory to avoid failures, highlighting the importance of an accurate RUL model and using a dynamic safety factor to account for RUL estimation uncertainties. This ensures that the safety factor increases when the equipment is near failure to avoid RUL overestimation while ensuring the exploitation of the useful life of components. The cost of this policy for a set with \(n\) components is given by Equation (2), where \(d_{Ti}\) and \(d_{Fi}\) are, respectively, the time where a maintenance action is triggered within a maintenance slot and the failure time of each component, \(\chi(x)\) is a function defined as \(\chi(x)=1\) when \(x\) is true and \(\chi(x)=0\), otherwise.