## 3 Maintenance Strategy
### Opportunistic Maintenance
The minimum maintenance costs for subsystem \(k\) between \([0,T]\) is:  
\[C_{mk}=C_{smk}\left[\sum\limits_{i=1}^{m_{k}}\int_{0}^{T_{jk}}\lambda_{ik}(t) dt+\int_{0}^{T-\sum\limits_{j=1}^{m_{k}}T_{jk}}\lambda_{q_{k}+1k}(t)dt\right] \tag{27}\]  
where \(C_{smk}\) is the minimum maintenance cost for subsystem \(k\), \(\lambda_{ik}(t)\) is the failure rate function of subsystem \(k\) in the \(i\)th maintenance cycle, \(i\) is the remainder of \(j\) divided by \(N_{k}\), and \(i=j-\left\lfloor\frac{j}{N_{k}}\right\rfloor N_{k}\), \(\lfloor a\rfloor\) indicates rounding down \(a\). The preventive maintenance is set, and the replacement cost incurred by subsystem \(k\) in the \(j\)th maintenance cycle is:  
\[C_{pjk}= \begin{cases}C_{pjk}&O(j,k)=1\\ C_{rk}&O(j,k)=2\end{cases}  \tag{28}\]  
where \(C_{pjk}\) is the preventive maintenance cost for the \(i\)th (\(i=1,2,\cdots,N_{k}\)) maintenance cycle of subsystem \(k\), and \(C_{rk}\) is the preventive replacement cost for subsystem \(k\). \(O(j,k)=1\) if the \(j\)th maintenance cycle of subsystem \(k\) ends with preventive maintenance, whereas \(O(j,k)=2\) means the maintenance cycle ends with preventive replacement. In summary, the direct maintenance cost for subsystem \(k\) between \([0,T]\) is:  
\[C_{zk}=C_{mk}+\sum\limits_{j=1}^{m_{k}}C_{pjk} \tag{29}\]  
Then, the direct maintenance cost generated by the machining center between \([0,T]\) is:  
\[C_{z}=\sum\limits_{k=1}^{s}C_{zk} \tag{30}\]  
The downtime loss costs of a machining center in finite time consist of the loss costs caused by sudden failure downtime and the loss costs caused by preventive maintenance or replacement downtime. Shutdown time caused by sudden failure of subsystem \(k\) in \([0,T]\) is:  
\[T_{fdk}=t_{cmk}\left[\sum_{j=1}^{m_{k}}\int_{0}^{T_{jk}}\lambda_{ik}(t)dt+\int_{0 }^{T-\sum\limits_{j=1}^{m_{k}}T_{jk}}\lambda_{q_{k}+1k}(t)dt\right] \tag{31}\]  
The downtime loss cost caused by sudden failures of the machining center in \([0,T]\) is:  
\[C_{fd}=c_{d}T_{fd}=c_{d}\sum_{k=1}^{s}T_{fdk} \tag{32}\]  
Assuming that the machining center has experienced \(N\) shutdowns caused by preventive maintenance or replacement between \([0,T]\), for the \(n\)th shutdown, it is assumed that there is a total of \(s_{d}\) subsystems undergoing preventive maintenance-replacement or opportunistic maintenance-replacement during this period. For different subsystems, these maintenance or replacement activities are parallel, so the downtime of the \(n\)th shutdown is the maximum value of these times. \[t_{dn}=\max_{1\leq k\leq s_{d}}(t_{pik},t_{rk}) \tag{33}\]  
where \(t_{pik}\) is the preventive maintenance time for the subsystem \(k\) in the \(i\)th maintenance cycle, and \(t_{rk}\) is the preventive replacement time for the subsystem \(k\). Therefore, the total downtime loss cost caused by preventive maintenance and replacement in \([0,T]\) of the machining center is:  
\[C_{pd}=c_{d}T_{pd}=c_{d}\sum_{n=1}^{N}t_{dn} \tag{34}\]  
Therefore, the total downtime loss cost of the machining center is:  
\[C_{d}=C_{fd}+C_{pd} \tag{35}\]  
The failure risk cost in \([0,T]\) of subsystem \(k\) is;  
\[C_{risk}=c_{krisk}\left[\sum_{j=1}^{m_{k}}\int_{0}^{T_{jk}}\lambda_{ik}(t)dt+ \int_{0}^{T-\sum\limits_{j=1}^{m_{k}}T_{jk}}\lambda_{q_{k}+1k}(t)dt\right] \tag{36}\]  
The failure risk cost of the machining center is;  
\[C_{risk}=\sum_{k=1}^{s}C_{krisk} \tag{37}\]  
When conducting opportunistic maintenance on subsystem \(k\), it has not yet reached its reliability threshold \(R_{ik}\). Therefore, opportunistic maintenance will incur penalty costs due to the waste of the remaining life of the subsystem. Therefore, the penalty cost \(C_{ck}\) for subsystem \(k\) due to opportunistic maintenance is:  
\[C_{ck}=\sum_{j=1}^{m_{k}}\left(R_{jk}-R_{hk}\right)\cdot V_{k} \tag{38}\]  
where \(R_{jk}\) is the corresponding reliability of subsystem \(k\) at the end of the \(j\)th maintenance cycle. \(V_{k}\) represents the unit reliability life costs of subsystem \(k\).