A Mathematical Program for Scheduling Preventive Maintenance of Cogeneration Plants with Production

This paper considers the scheduling of preventive maintenance for the boilers, turbines, and distillers of power plants that produce electricity and desalinated water. It models the problem as a mathematical program (MP) that maximizes the sum of the minimal ratios of production to the demand of electricity and water during a planning time horizon. This objective encourages the plants’ production and enhances the chances of meeting consumers’ needs. It reduces the chance of power cuts and water shortages that may be caused by emergency disruptions of equipment on the network. To assess its performance and effectiveness, we test the MP on a real system consisting of 32 units and generate a preventive maintenance schedule for a time horizon of 52 weeks (one year). The generated schedule outperforms the schedule established by experts of the water plant; it induces, respectively, 16% and 12% increases in the surpluses while either matching or surpassing the total production. The sensitivity analysis further indicates that the generated schedule can handle unforeseen longer maintenance periods as well as a 120% increase in demand—a sizable realization in a country that heavily relies on electricity to acclimate to the harsh weather conditions. In addition, it suggests the robustness of the schedules with respect to increased demand. In summary, the MP model yields optimal systematic sustainable schedules.


Introduction
Preventive maintenance (PM) is crucial to many service and manufacturing industries. Their routine application avoids unexpected equipment breakdown that, otherwise, would not only negatively impact the reliability of the logistic chain, but would also cause sizable losses, reduced productivity, and deteriorated quality of products and services. Many companies (from different industrial sectors) resort to scheduling PMs with the objective of optimizing service delivery, be it in terms of continuity or quality. For example, in the transport sector, ships [1,2], trains [3,4], and airplanes [5] are subject to different types of PMs, with some of them being daily, monthly, or usage-dependent. In manufacturing, some environments resort to maintenance events to allow for machine cooling [6] or to avoid slowing down the processing times [7]. Similarly, some plants resort to PMs to minimize the disruption of their supply [8].

Motivation
In power plants, PMs prevent failures, which could cause a general blackout not only of the areas served by the power plant, but of the complete electric grid. In harsh weather conditions, such as in the 2021 Texas case [9], a blackout translates into depriving households, industrial factories, and businesses not only of electricity, but also of heating and air conditioning, causing a chain reaction that makes it impossible for populations to access basic necessities. It affects the most deprived, causing many deaths and extreme medical emergencies. Restoring the grid is not instantaneous. It generally takes a couple of hours but may extend to several days depending on the severity of the equipment failure. Examples of such power plants are cogeneration energy plants that produce both electricity and water.
In arid/hot countries, the production of electricity and desalination of sea water are of prime importance. Drinking water is a scarce resource, while harsh weather conditions make the consumption of electricity for air conditioning purposes a necessity for any sustainable form of life. Cogeneration energy plants produce fresh water and electricity in more than 120 countries [10]. They owe their worldwide spread to their efficiency, reliability and economic value. To remain reliable over time, these plants require periodic PMs, according to a predefined preventive maintenance schedule (PMS).

Problem Statement and Contribution
A PMS is a set of repetitive actions undertaken for the maintenance of an equipment with the objective of its examination and renewal. For cogeneration plants, it is particularly crucial to the reliability of the power generation system: it discovers and eliminates a large number of unexpected failures that, in turn, cause a domino effect. It must be coordinated with the production. Subsequently, optimizing a PMS consists of finding the "best"sequence of maintenance activities for each unit of a plant in each period of a planning horizon such that this sequence minimizes water and power outages, subject to technical and demand functional requirements. This problem is particularly complex for two reasons. First, a PMS must consider all equipment simultaneously, not separately. Second, each PM is quite lengthy over time (reaching four to five weeks). Third, once initiated, a PM cannot be stopped or accelerated. This paper schedules the maintenance events of power units. It enhances the units' utilization and avoids power outages, subject to the availability of maintenance crews, maintenance time windows, time limits, and load thresholds for power and water. Evidently, any feasible schedule must satisfy the demands for water production and power generation, with no interruption or failure of the equipment. This paper models the problem of generating a PMS for each unit of the power plants, using a mixed integer mathematical program (MP), where some of the decision variables are binary while others are integers and real. The choice of MP was motivated by its effective and successful implementation for the selection of exclusive and interconnected projects and in the scheduling of PMs. MP is herein validated, using the real-life case of a power plant in Kuwait for a 12-month cyclical planning horizon. It maintains a steady number of units under maintenance and an almost constant level of production while increasing the minimal surplus production by 16% and 12%, respectively.
The applicability of the model is straightforward. MP can read the data from a spreadsheet, such as Excel. It displays the results in a user-friendly format, i.e., as tables summarizing the status of each plant over the planning horizon, providing the PMS for all production units, and tallying the production and its surplus. Production engineers use these results to ensure a reliable coverage of the electric grid and the continuous availability of water. In addition, managers use these schedules to estimate the cost of maintenance contracts. Contractors bid lower prices when their workforce has little fluctuation, but have to charge higher prices when part of their workforce remains idle. The mathematical model can further be applied, as reliably, to all cogeneration power plants of a grid (simultaneously) and to other industrial sectors.

Outline
Section 2 reviews the literature. Section 3 describes and models the problem. Section 4 validates the model via a real-life case study, and highlights its advantages. Finally, Section 5 is a summary with possible extensions.

Literature Review
PMS is the core of many research studies. Alardhi and Labib [11] designed a PMS for multiple cogeneration plants. Their integer programming-based PMS maximizes units' availability during a specified planning horizon while satisfying both demand and technical constraints. Ramírez-Martínez et al. [12] generated a one-week maintenance plan that matches hydrothermal transmission. They minimized the cost of operating the hydrothermal transmission cost, using a hybrid of a genetic algorithm and non-linear programming, where the nonlinearity is caused by the fuel cost of the thermal power plants. Balaji and Lakshminarasimman [13] identified the minimal cost starting and ending dates of PMs for power plants' generators. They obtained these dates via assisted differential evolution. Guedes et al. [14] applied a non-linear model to coordinate cascaded hydro-power generation and its PMS. They avoided the use of binary variables by modeling the PMs' starting dates as continuous variables. Perez-Canto and Rubio-Romero [15] studied a real power system and determined the generators that should stop production for periodic PMs subject to safety restrictions. They verified the efficiency and the robustness of the proposed PMs, whereby the consistency of the system is maximized. For cogeneration systems, a panoply of optimization approaches varying from approximate to exact methods are available. Approximate approaches vary from simple heuristics, tabu search to genetic algorithms [12][13][14][16][17][18][19] whereas exact approaches are mostly integer programming based [20][21][22][23][24][25][26].

Problem Description and Mathematical Formulation
In Kuwait, the Ministry of Electricity and Water (MEW) is solely responsible for supplying power and water. Both electricity and, subsequently, fresh water are the byproduct of the multiple-stage transformation of gas and liquid oils. Each stage involves complex and bulky but delicate equipment that require huge financial investments. Such equipment include boilers that burn large amounts of fuel to transform their chemical energy into heat, which, in turn, produces large amounts of highly-pressured hot steam. This pressurized steam powers the turbines; it converts the heat into mechanical energy that rotates an output shaft. Finally, the rotation generators convert the mechanical energy into electrical energy, which is exported to the grid for transmission, distribution and delivery to consumers.
Herein, we assimilate a power plant to a boiler, a turbo-generator, and a distiller. The boiler produces high pressure steam from fuel; the turbo-generator produces power from high pressure steam, while the distillers produce desalinated water from salt water, using low pressure steam. To remain operational at their specified levels, these three types of equipment need regular maintenance. However, no maintenance can be scheduled during peak demand periods.
Consider a plant with a set U = {1, . . . ,ū} ofū units. Each unit u ∈ U contains 3 types of equipment: a boiler b u ∈ B = {1, . . . ,b}, a distiller d u ∈ D = {1, . . . ,d}, and a turbine r u ∈ R = {1, . . . ,r}. Let E = B ∪ R ∪ D denote the set of all equipment. A turbine r u ∈ R, u ∈ U, is characterized by its ideal electricity production level p r u . A distiller d u ∈ D, u ∈ U, is characterized by its maximum water production p d u . Equipment e u ∈ E is characterized by the duration τ e u of its PM, its earliest start s e u , its latest starts e u , and the qualified manpower m e u needed to undertake the PM. During any period t ∈ T, at most, o u ∈ N units of equipment e u , u ∈ U, may be in maintenance.
A period t ∈ T is characterized bym t , the maximum number of qualified maintenance personnel available, the demand δ e t for electricity and the demand δ w t for water. At t = 0, the water level at the reservoir is 0 ∈ [ ,¯ ], where and¯ are the minimum and maximum water levels at the reservoir. Finally, a period t ∈ T is further characterized by a minimal target level of production surplus of electricity α e t and of water α w t . These levels guard against demand surges, network failures, and natural variations. The larger the surplus production during any period t ∈ T, the better the PMS. Because the surpluses are expressed on different scales, we consider their ratios with respect to their respective yearly production capacities w e and w w .
To model this problem, we use eight classes of decision variables: three binary, one integer, and four positive. These decision variables as follow: • x e u t = 1 if equipment e u ∈ E starts a PM during period t ∈ T and 0 otherwise. • z e u t = 1 if e u ∈ E is under maintenance during t ∈ T and 0 otherwise. • a e u t = 1 if e u ∈ E is available during t ∈ T and 0 otherwise. • y e u ∈ N, the starting time of the PM of e u ∈ E such that s e u ≤ y e u ≤s e u . • g e t ≥ 0 and g w t ≥ 0, the excess electricity and water production during t ∈ T. • γ e ≥ 0 and γ w ≥ 0, the minimal excess production of electricity and water during the planning horizon.
Using these variables, the problem is formulated as follows.
x e u t ∈ {0, 1}, z e u t ∈ {0, 1}, a e u t ∈ {0, 1} u ∈ U, e u ∈ E, t ∈ T (17) Equation (1) maximizes the sum of the minimal relative surpluses of water and electricity with respect to their yearly production capacity. Equation (2) specifies that equipment e u of unit u ∈ U must undergo a single PM during its time window. Equation (3) calculates the PM starting time of equipment e u of unit u ∈ U. Equation (4) further constrains this starting time to time window [s e u ,s e u ]. Equation (5) marks e u of unit u ∈ U under maintenance during all time periods t, . . . , t + τ e u if a PM starts at time t, and is redundant otherwise. Along with Equation (6), it ensures that the maintenance of e u of unit u ∈ U lasts exactly τ e u time units and that it is not interrupted. Equations (7) and (8) reinforce the non-availability of the turbine and distiller of a unit u ∈ U when their boiler is under maintenance. Equation (9) guarantees that the PM of either a turbine or a distiller of a unit u does not cause the unavailability of the boiler, while their simultaneous PM causes the boiler's unavailability. Equation (10) indicates that during any period t ∈ T, at most, u equipment may be in maintenance. Equation (11) forces the electricity production during period t ∈ T to exceed the demand δ e t and determines this excess demand g e t . Similarly, Equation (12) forces the water production during period t ∈ T to exceed the demand δ w t and determines this excess demand, g w t . Equations (13) and (14) set a minimal threshold level on the excess production of electricity and water for a period t ∈ T, while Equation (15) ensures that the level of the water reservoirs remains within its tolerance levels and¯ during any period t ∈ T. Equation (16) constrains the manpower used for the scheduled PMs to the available manpower during period t. Finally, Equations (17)- (20) define the decision variables' type. The resulting MP is a mixed integer program.

Case Study
MP is solved using the mixed integer programming solver CPLEX 12.9.0 on an HP desktop computer i7-6700, 3.40 MHz and 64.0 RAM. It is tested on a real case study, provided by MEW of the state of Kuwait. The case considers a plant with 8 units, each consisting of one boiler, two distillers, and one turbine. It designs a PMS for 32 equipment over a 52-week planning horizon. The demand for electricity and water during this planning period is given in Figure 1. During the T = 52-week time horizon, any equipment may have its PM as early as the first week and as late as week 52. In fact, additional maintenance manpower may be outsourced from the local market. However, no more than two equipment of a same type can undergo PM, i.e., the following: ∑ u∈U z e u t ≤ 2 , t ∈ T, e u = r u , b u , d u .
The weekly production of a distiller of unit u = 1, . . . , 6 is 50.4 million gallons (MG) but only 40.2 MG for a distiller of unit u = 7 or 8. A turbine's weekly production is 47,040 megawatts (MW). It follows that the ratio w = w e w w of the yearly production capacity of electricity to the yearly production capacity of water equals 487. MEW prohibits mainte-nance activities during the summer months, i.e., for t ∈ {20, . . . , 32}. For either a distiller or a boiler, the duration of a PM is five weeks, while it is four weeks for a turbine. In the following, we first compare the schedules generated by MP and by MEW experts. Second, we study the sensitivity of the results to the problem's parameters.

Solution Quality
For this case study, MP has 10,194 variables (with 9952 binary) and 20,852 constraints. CPLEX solves MP within 157 s. This negligible runtime is far less than the time it takes a human expert to generate any schedule, let alone a schedule that maximizes the minimum gap. Figures 2 and 3 display the MP solution. They display the production, demand and number of units under maintenance.  Based on Figures 2 and 3, the number of distillers and turbines under maintenance is constant whenever maintenance is allowed. Thus, the production of both water and electricity is constant during the first 20 weeks. It peaks when demand increases and maintenance activities stop. By the end of summer, the maintenance activities restart, restoring production to its previous levels while demand decreases steadily. Excess production is largest during the winter, but ensures a large backup level and avoids water shortages and power outages. It equals 118.1 MG for water and 124,426 MW for electricity. The total production is 36,321.6 MG of water and 17,687,040 MW of electricity.
The comparison of Figures 2 and 3 to their MEW's PMS of Figures 4 and 5 shows that our model schedules more PMs for distillers than MEW's experts. In addition, MP has a steadier production than MEW's PMS. These differences are further evidenced in Table 1, which displays the PMS of MP and MEW. Table 1 confirms the satisfaction of all constraints. For instance, no more than two pieces of equipment of a given type are under PM during any of the 52 weeks of the planning horizon. Similarly, neither a distiller nor a turbine are operational when their boiler is under PM.     T-5  22  ----23  ----24  ----25  ----26  ----27  ----28  ----29  ----30  ----31  ----32  --B-7 Even though MEW's water production matches MP's water production, the electricity production is 1.1% smaller at 17,498,880 MW. In fact, MEW idles the turbines for 12 weeks, whereas MP reduces the turbines' idleness to 8 weeks. MEW makes T-7 idle (even though T-7 is not under maintenance) during weeks 32-36 (because B-7 is under maintenance), while T-7 undergoes its PM during weeks 44-47.
MP outperforms MEW's experts in terms of water and electricity excess productions: it increases these excesses by 16.58% and 12.12%, i.e., MEW's water and electricity excess production equal 101.3 MG and 110,971 MW, respectively. Recall that the larger the excess production, the more robust the demand satisfaction. It makes the system less prone to unforeseen events that may randomly occur on the network. In addition to these observed differences, MEW's PMS has a very low production surplus during weeks 37-39, with demand almost equaling total production as shown in Figures 4 and 5. This situation is quite risky, as it could lead to water shortages during unusually hot days. Moreover, MEW's PMS is not leveled, with an interruption during week 11 and only one piece of equipment under maintenance in week 47. This is undesirable: it creates undue costs to contractors who have to pay for idle (resp. supplementary) manpower during low (resp. peak) maintenance activities. MP avoids such undue costs to contractors.

Sensitivity Analysis
We study the sensitivity of the generated PMS to (i) demand and to (ii) both demand and the duration of a PM. First, we increase the demand of both water and electricity. Figures 6 and 7 illustrate MP's resulting surplus production as demand increases. In all considered cases, MP's optimal PMS satisfies the increased demand over the epochs of the time horizon. Further increasing demand may result in infeasible solutions, that is, it would be impossible to maintain the equipment while still satisfying demand. These cases are generally handled by rerouting demand through different networks. Second, we study the sensitivity of the generated PMS to both demand and the duration of a PM. We increase the demand by 120% and the duration of a PM by one week. In addition, we add a couple of technical restrictions.

•
If the PMs of the second distiller and of the turbine of unit 4 start a PM during period t ∈ T, then the PM of the first distiller must also begin during the same period.
• The time windows of the PM starting times of certain equipment are now restricted. For example, the PM of the first distiller of unit 8 cannot start before week 40, whereas that of the second distiller of unit 7 must start between week 15 and week 40. MP has again 10,194 variables (with 9952 binary) but more constraints, with 20,904 in lieu of 20,852 constraints. The additional constraints reduce the search space of CPLEX, which solves the restricted model within 143 s-less than the time of the original model. In fact, adding constraints makes the problem easier to solve for CPLEX, while it makes it more complicated for a human expert. Table 2 shows the resulting restricted PMS for all equipment. The excess production for water and electricity equals 3.96 MG for water and 56,394 MW for electricity. These levels are far from those previously observed (i.e., 118.1 MG for water and 124,426 MW for electricity). The change in the total production is, on the other hand, much smaller-35,548.8 MG of water and 17,310,730 MW of electricity in lieu of 36,321.6 MG of water and 17,687,040 MW of electricity.

Conclusions
Preventive maintenance scheduling is a critical issue in energy systems. It aims at increasing energy efficiency while ensuring the systems' reliability, safety, security and robustness against unexpected events. This paper proposes a mathematical program to plan maintenance events, and illustrates its application on real-life data provided by the Ministry of Electricity and Water of the State of Kuwait. The mathematical program maximizes the sum of the minimal relative surpluses of water and electricity with respect to their yearly production capacity. This translates into satisfying demand for water and electricity all along the planning horizon while ensuring a safety net for shortages in the event of equipment breakdown. The mathematical program obtains a feasible preventive maintenance schedule that improves the surplus production of water by 16.58% and of electricity by 12.12%. In addition, it increases electricity production of the current used system by 1.1%. The sensitivity analysis of the maintenance plan infers its robustness with respect to the increased production, maintenance duration, additional restrictions on concurrent maintenance of equipment, and tighter time windows.
The proposed mathematical program is not specific to a given power plant. It can be extended to cover the whole grid. In the case that the optimizer fails to converge to the global optimum, heuristic approaches can then be used. The proposed model can be adapted to other areas, such as the maintenance of oil wells. These applications may involve nonlinear constraints and quadratic objective functions.