## 2 Materials and Methods
### Opportunistic Grouping Strategy for the Preventive Maintenance Plan
#### 2.2.4 Computational Implementation and Optimization Settings  
The framework presented in Section 2.2.3 responds to the MILP mathematical programming paradigm, whose computational implementation has been widely extended in optimization problems, especially on operations and maintenance management, including the planning and scheduling phases, logistics, distribution, and multi-product optimization [50]. In decision-based optimization problems, it is common to incorporate not only quantities attributable to continuous variables but also discrete variables and non-linearities that can be replaced by piecewise linearizations [50]. In these cases, the MILP paradigm is adjusted responding to the requirements through Linear Programming-base Branch and Bound solvers, which allow, in addition to the generation of strict upper and lower bounds, to obtain performance metrics regarding the optimization of the solutions obtained, improving computing times, and decreasing computational costs through the decision tree pruning of integrality constraints [51]. In this way, these algorithms are characterized by the obtention of deterministic optimal solutions, considering only exact parametrizations.  
Despite the approach of these algorithms, a variety of highly complex problems, including maintenance activity grouping problems [52], can offer a large number of ramifications of the decision tree, reducing the quality of upper and lower bounds, and therefore generating a suboptimal solution [50]. However, new commercial alternatives combine sophisticated techniques that combine the use of Branch and Bound algorithms with Branch and Cut, e.g., engines such as CPLEX or Gurobi. Using commercial optimization engines to solve the MILP model, the programming stages are described in detail below:  
1. Definition of instance sets and parameters: In the first stage, the script defines the parametric set that characterizes the instance presented through the PM plan in Section 2.1. This implies incorporating information such as the number and frequency of activities, the execution tolerance factors, and repair times per activity.
2. Embedding MILP solver: The Gurobi solver is implemented using Python programming language for its optimization and obtaining results. To do this, a general optimization instance is defined over which the sets of constraints that make up the formulated framework are loaded. The optimization engine is executed under standard searching settings, aiming at an intensification strategy to improve the optimality of the solution found, at the expense of higher computing times.  
Determination of performance indicators and rendering process: Once the best solution found by the Gurobi solver has been obtained, the results are compiled and stored in sorted list-type data, on which the information of each of the performance indicators is obtained according to the definition specified in Section 3. To calculate these indicators, the use of specialized programming packages is considered to manipulate the data using real intervals, allowing the operations of union and intersection of sets in the system unavailability estimation. The graphic material is then rendered under the Python programming language, using the information stored from the compilation.