## 2 Materials and Methods
### Opportunistic Grouping Strategy for the Preventive Maintenance Plan
#### 2.2.2 Illustrative Example  
The aspects addressed in Section 2.2.1 determine the application of new applicability criteria under this opportunistic grouping framework. In order to illustrate the application of the grouping schemes, consider below the following applied example, addressing the planning of four PM activities in a time horizon of 8 (t.u.), whose periodicities and execution times are specified in Table 2.  
Figure 4 represents a preliminary grouping scheme through the application of Algorithm 1, considering the initial instance where \(r_{i,\ j}=p_{i},\ \forall i\in I\). The intervals colored in blue represent the time-window tolerances, while the grey intervals represent the proposed intersections for each activity. In this scenario, the number of preliminary grouping pairs established and stored in the set \(N_{p}\) corresponds to \(N_{p}=\{(1,1,4,1),\ (1,2,2,1),\ (1,2,3,1),\ (2,1,4,1)\}\). As observed in Figure 4, the time window for execution (1,2) depends directly on the execution time of the previous execution \((1,1)\). For example, if \(z_{1,2,2,1}=1\) is assigned, then its feasibility will depend exclusively on the use of the tolerance time windows (i.e., an execution delaying) of the previous execution \((1,1)\). Implementing Algorithm 1 for all the generated instances, the set of total grouping pairs delivers \(N=\{(1,1,4,1),\ (1,2,2,1),\ (1,2,3,1),\ (2,\ 1,\ 4,1)\}\), maintaining the preliminary results from the initial instance.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Sets and Parameters** & **Notation** & **Value** \\ \hline Planning horizon & \(T\) & 8 \\ Execution tolerance & \(e_{i}\) & \(e_{i}=0.15,\ \forall i\in I\) \\ Scheduled activities & \(|I|\) & 4 \\ \hline
**Activity** & **Periodicity \(T_{i}\) (t.u.)** & **Execution time \(p_{i}\) (t.u.)** \\ \hline
1 & 3 & 0.2 \\
2 & 5 & 0.1 \\
3 & 7 & 0.3 \\
4 & 4 & 0.2 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Application example. Instance specifications.  
The grouping scheme of the previous initial solution delivers five maintenance interventions with a system availability equivalent to 1.0 (t.u.). The feasible solution associated with the tentative maintenance plan is given by \(z_{i,\ j,\ n,\ o}=0,\ \forall\ (i,\ j,\ n,\ o)\in N\); \(t_{1,1}^{\rm s}=3.0,\ t_{1,2}^{\rm s}=6.65,\ t_{2,1}^{\rm s}=4.25,\ t_{3,1}^{ \rm s}=6.65,\ t_{4,1}^{\rm s}=4.25\). The feasible grouping scheme presented in Figure 5 is depicted by the set \(\{z_{1,1,4,1}=0,\ z_{1,2,2,1}=0,\ z_{1,2,\ 3,1}=1,\ z_{2,1,4,1}=1\}\). This feasible solution is traduced into system unavailability of 0.7 (t.u.), thus generating three interventions in total. Considering that the initial execution for execution \((1,1)\) corresponds to \(t_{1,1}^{\rm s}>T_{1}\), the time-window tolerance considered for \(t_{1,2}^{\rm s}\) is reduced, discarding the feasibility of grouping the pair \((1,\ 2,2,1)\), thus forcing \(z_{1,2,2,1}=0\).  
The proposed grouping schemes still allow a further reduction in system unavailability. Figure 6 establishes the optimal solution for the illustrative example, considering the solution \(\{z_{1,1,4,1}=1,\ z_{1,2,2,1}=0,\ z_{1,2,3,1}=1,\ z_{2,1,4,1}=0\}\), generating three system interventions with total unavailability of 0.6 (t.u.). The new optimized scenario establishes a 40% reduction in the downtime associated with the base scenario derived from Figure 4, allowing substantial savings in fixed maintenance costs and considerably improving the availability of the production system.  
Figure 4: Representation of the use of tolerances for the generation of feasible grouping schemes.  
Figure 5: Illustrative example. Grouping scheme for a feasible solution.