## 2 Materials and Methods
### Opportunistic Grouping Strategy for the Preventive Maintenance Plan  
#### 2.2.1 Maintenance Grouping Strategy Framework Formulation  
The grouping strategy proposed below considers an extension of the research originally presented in [PERSON] et al. [46], which incorporates the use of time-window tolerances for the creation of grouping schemes during the planning stage of preventive maintenance activities. The extended formulation, as presented below, considers the incorporation of new applicability criteria to improve adherence and adaptation of grouping strategies under several industrial environments, including wastewater treatment plants. Consider an arbitrary set \(I\) that includes a total of \(|I|\) maintenance activities to be planned on a fixed planning horizon \(T\), characterized by a continuous-time analysis and set by the planner according to scheduling requirements. Consider \(J_{i}\) as the set of total executions to be scheduled for each \(i\in I\). Considering that the most common scenario is to establish a fixed frequency for each PM \(i\in I\) activity, the framework contemplates a fixed execution periodicity \(T_{i}<T\) and known fixed execution times \(p_{i}\). As in the base formulation presented in [PERSON] et al. [46], the framework originally establishes a time window over which each activity can delay or advance its execution time \(t^{s}_{i,\ j}\), by a maximum of \(w_{i}=e\cdot T_{i}\) time units, where \(e\) represents a tolerance factor, expressed in terms of a percentage. In this way, the length of the time window \(w_{i}\) depends exclusively on the periodicity associated with each PM activity \(i\), and in turn, \(t^{s}_{i,\ j}\in\left[t^{f}_{i,\ j-1}+T_{i}-e_{i}\cdot T_{i},\ t^{f}_{i,\ j-1}+T_{i}+e_{i} \cdot T_{i}\right]\), so the start time \(t^{s}_{i,\ j}\) depends directly on the execution completion time \(t^{f}_{i,\ j-1}\). In this way, the start time can be modified with respect to its tentative execution date, which corresponds to  
\[t^{s}_{i,j}=t^{f}_{i,j-1}+T_{i} \tag{1}\]  
Therefore, the use of tolerance seeks to generate simultaneous executions of work activities, thus establishing grouping schemes throughout the planning horizon (See Figure 3a). The framework defines the existence of a work package when two or more executions \((i,\ j)\) and \((i^{\prime},j^{\prime})\) satisfy the following condition:  
\[t^{s}_{i,j}=t^{s}_{i^{\prime},j^{\prime}},\ \forall i,i\in I:\ i\
eq i^{\prime} \tag{2}\]  
This means that a work package is necessarily formed if two or more selected activities are executed in parallel and at the same start time. Therefore, the grouping definition stated in expression (2) establishes that the time windows of the executions \((i,\ j)\) and \((i^{\prime},j^{\prime})\) must overlap to generate new grouping schemes. This formally implies that two activities can be grouped only if the following condition is satisfied, with respect to the time-window tolerance definition:  
\[\left[t^{f}_{i,j-1}+T_{i}-e_{i}\cdot T_{i^{\prime}},\ t^{f}_{i,j-1}+T_{i}+e_{i }\cdot T_{i}\right]\cap\left[t^{f}_{i^{\prime},j^{\prime}-1}+T_{i^{\prime}}-e _{i^{\prime}}\cdot T_{i^{\prime}},\ t^{f}_{i^{\prime},j^{\prime}-1}+T_{i^{ \prime}}+e_{i^{\prime}}\cdot T_{i^{\prime}}\right]\
eq\varnothing \tag{3}\]  
The definition of grouping schemes presented is based on two main advantages. On the one hand, simultaneous execution of PM activities allows sharing fixed maintenance costs in economic-dependent systems, reducing the number of system interruptions while reducing downtime in multi-component series processing lines. On the other hand, the definition allows to reduce the complexity of the problem arising in other overlapping conditions, e.g., in the case where \(t^{s}_{i,\ j}\
eq\ t^{s}_{i^{\prime},\ j^{\prime}}\) and \(\max\left\{t^{s}_{i,\ j},\ t^{s}_{i^{\prime},\ j^{\prime}}\right\}\leq\min \left\{t^{f}_{i,\ j},\ t^{f}_{i^{\prime},\ j^{\prime}}\right\}\). As a general rule, it is satisfied that \(p_{i}\
eq\ p_{i^{\prime}}\).