Generation Units Maintenance in Combined Heat and Power Integrated Systems Using the Mixed Integer Quadratic Programming Approach

Yearly generation maintenance scheduling (GMS) of generation units is important in each system such as combined heat and power (CHP)-based systems to decrease sudden failures and premature degradation of units. Imposing repair costs and reliability deterioration of system are the consequences of ignoring the GMS program. In this regard, this research accomplishes GMS inside CHP-based systems in order to determine the optimal intervals for predetermined maintenance required duration of CHPs and other units. In this paper, cost minimization is targeted, and violation of units’ technical constraints like feasible operation region of CHPs and power/heat demand balances are avoided by considering related constraints. Demand-response-based short-term generation scheduling is accomplished in this paper considering the maintenance intervals obtained in the long-term plan. Numerical simulation is performed and discussed in detail to evaluate the application of the suggested mixed-integer quadratic programming model that implemented in the General Algebraic Modeling System software package for optimization. Numerical simulation is performed to justify the model effectiveness. The results reveal that long-term maintenance scheduling considerably impacts short-term generation scheduling and total operation cost. Additionally, it is found that the demand response is effective from the cost perspective and changes the generation schedule.


Introduction
Combined heat and power (CHP) generation units have high efficiency for simultaneous generation of electricity and heat compared to conventional generators such as power-only generators and heat-only boilers Salgado and Pedrero [1]. Although a CHP unit supplies the power and heat demands efficiently, continuous operation of this element in a long-term horizon without periodic maintenance leads to enhanced probability of unexpected failures. Additionally, premature degradation is unavoidable for CHP and other units in the case of ignoring yearly maintenance. If the units are randomly under maintenance in typical weeks, the system reliability may deteriorate, resulting from a lack of reserve, and even deterioration in system stability arising from the simultaneous maintenance of units. Furthermore, ignoring maintenance services imposes additional costs for repairing the generation units, which have faced sudden failures.
The generation maintenance scheduling (GMS) program is the solution of the proposed issue and is used by researchers to handle the mentioned challenge by taking into account the duration of the

Problem Formulation
A diagram of the CHP-based system and its elements for preventive GMS is depicted in Figure 1. The network power and heat demands can be predicted by different methods, such as principal component analysis Moradzadeh and Garcia Marquez et al. [38,39], neural networks Moradzadeh et al. [40], deep learning Moradzadeh and Pourhossein [41], support vector machines Moradzadeh and Pourhossein [42], or other methods Moradzadeh and Khaffafi [43], and supplied by CHP units and the other units, including power-only and heat-only units. The electricity demand is supplied by power-only and CHP units, while the heat demand is supplied by heat-only and CHP units. CHP units can supply both the power and heat demands simultaneously, and while they can be the only source of power, they cannot be the sole heat source. In order to accomplish maintenance management, the system operator considers the maintenance required durations of all units in a unit problem for coordinating the planned outage. The maintenance intervals are determined through a long-term plan Marquez [44]. Afterward, in short-term generation scheduling, the units that are under yearly maintenance do not participate in power generation. The operator optimizes the maintenance schedule and announces it to the units for implementation. In short-term horizons, GMS decreases the units' failure, which results in lower repair cost and higher system reliability and stability Chacon Munoz et al. [45]. Additionally, in long-term horizons, GMS delays the degradation of units, which results in a delay in the need for constructing new power plants. The feasible region of the CHP and the other units is illustrated in Figure 2. Their different functions in the generation of power/heat for load supply is observed in this figure. As seen, the feasible regions of the units are not similar. The feasible region of the power-only unit has a minimum and a maximum value, while the heat-only unit has a value between zero and a maximum value. On the other hand, the feasible region of CHP is considerably different with the feasible region of the two other units, which complicates the optimization of the problem. The objective function in this research is the overall cost of the CHP-integrated system using Equation (1). The first, second, and third terms show the cost of power-only, CHP, and heat-only units, respectively. The units' costs consist of the polynomial cost function and the maintenance cost. It is worth mentioning that for the long-term plan (for maintenance scheduling), the time horizon is 52 weeks, and hence, the range of t is (1,52), while in the short-term plan (for generation scheduling), The feasible region of the CHP and the other units is illustrated in Figure 2. Their different functions in the generation of power/heat for load supply is observed in this figure. As seen, the feasible regions of the units are not similar. The feasible region of the power-only unit has a minimum and a maximum value, while the heat-only unit has a value between zero and a maximum value. On the other hand, the feasible region of CHP is considerably different with the feasible region of the two other units, which complicates the optimization of the problem. The feasible region of the CHP and the other units is illustrated in Figure 2. Their different functions in the generation of power/heat for load supply is observed in this figure. As seen, the feasible regions of the units are not similar. The feasible region of the power-only unit has a minimum and a maximum value, while the heat-only unit has a value between zero and a maximum value. On the other hand, the feasible region of CHP is considerably different with the feasible region of the two other units, which complicates the optimization of the problem.  The objective function in this research is the overall cost of the CHP-integrated system using Equation (1). The first, second, and third terms show the cost of power-only, CHP, and heat-only units, respectively. The units' costs consist of the polynomial cost function and the maintenance cost. It is worth mentioning that for the long-term plan (for maintenance scheduling), the time horizon is 52 weeks, and hence, the range of t is (1,52), while in the short-term plan (for generation scheduling), The objective function in this research is the overall cost of the CHP-integrated system using Equation (1). The first, second, and third terms show the cost of power-only, CHP, and heat-only units, respectively. The units' costs consist of the polynomial cost function and the maintenance cost. It is worth mentioning that for the long-term plan (for maintenance scheduling), the time horizon is 52 weeks, and hence, the range of t is (1,52), while in the short-term plan (for generation scheduling), Energies 2020, 13, 2840 5 of 23 the time horizon is 24 h and hence, the range of t is (1,24). Additionally, the time accuracy (T A ) is 7 × 24 h and 1 h, respectively, for the long-term and short-term plans. All the symbols have been specified in the nomenclature.
The maintenance variables in the proposed optimization model is determined by x binary variable in which 1 shows the maintenance state and 0 represents the normal operation of units. It is clear that when a unit is under maintenance, it does not contribute to demand supply. This variable is only used in the long-term plan. In the short-term plan, when a unit is under maintenance (obtained by the long-term plan), the variable x is fixed to 1.
The power and heat generated by power-only and heat-only units are limited as Equations (2) and (3), respectively.
For the limitation of power and heat generated by CHP units, the parametric feasible operation region (FOR) of Figure 3 is considered. This figure is a detailed FOR of the typical CHP presented in Figure 2 to form the FOR constraints. It demonstrates that the power and heat generated by a CHP unit are related to each other. As mentioned, a CHP cannot generate heat solely, while the power can be generated solely by such units.
The maintenance variables in the proposed optimization model is determined by x binary variable in which 1 shows the maintenance state and 0 represents the normal operation of units. It is clear that when a unit is under maintenance, it does not contribute to demand supply. This variable is only used in the long-term plan. In the short-term plan, when a unit is under maintenance (obtained by the long-term plan), the variable x is fixed to 1.
The power and heat generated by power-only and heat-only units are limited as Equations (2) and (3) For the limitation of power and heat generated by CHP units, the parametric feasible operation region (FOR) of Figure 3 is considered. This figure is a detailed FOR of the typical CHP presented in Figure 2 to form the FOR constraints. It demonstrates that the power and heat generated by a CHP unit are related to each other. As mentioned, a CHP cannot generate heat solely, while the power can be generated solely by such units.
To limit the power generated by CHP units, Equations (5)-(8) are used to ensure that the solutions will be in the FOR of each CHP unit. The variable , s j t CHP in these equations is used for this aim that validates both the states of off and on, such that, in case of the on state, the FOR must be satisfied. In the other word, a CHP is off or operates in its FOR.
To limit the power generated by CHP units, Equations (5)-(8) are used to ensure that the solutions will be in the FOR of each CHP unit. The variable s j,t CHP in these equations is used for this aim that validates both the states of off and on, such that, in case of the on state, the FOR must be satisfied. In the other word, a CHP is off or operates in its FOR.
It is clear that the needed maintenance duration for different units is not identical. The needed maintenance duration for power-only, CHP, and heat-only units is taken into account as Sadeghian et al. [46], The maintenance period of each unit must be in consecutive intervals so that the maintenance service can be completed by crews. The continuity of maintenance interval can be taken into account by, Each unit in each time interval can have only one state of maintenance (x = 1) or normal operation (s = 1). If none of them happens, the unit is off but both of them cannot be happen simultaneously. This constraint is expressed as, In this research, the following constraints are adopted to limit the total number of simultaneous under-maintenance units as much as possible. For instance, when total number of needed weeks for maintenance of units is 53, at least one week has two under-maintenance units, and hence, the total number of simultaneous under-maintenance units in each week is lower than 2. This constraint is Energies 2020, 13, 2840 7 of 23 separately considered for power-producing units (power-only and CHP units) and heat-producing units (CHP and heat-only units) as, where shows the ceiling function. Constraints regarding the power and heat balances are calculated using Equations (23) and (24), respectively. Based on Equation (20), the power-only and CHP units participate in power generation to supply the power demand. On the other hand, the CHP and heat-only units participate in heat generation to meet the heat load of the system.
In this research, demand response is implemented to evaluate its impact on overall cost of the system. The time of use demand response program is implemented as follows: The movable load in each period is obtained as The movable load in each period is limited as The following constraint illustrates that the total amount of shifted loads over a daily period is equal to zero.
A flowchart of the suggested model for GMS in CHP-based systems is presented in Figure 4. The security and operational constraints are considered in the proposed mixed integer quadratic programming (MIQP) model Lazimy [47] for minimizing the overall cost of the system. As mentioned, MIQP stands for mixed integer quadratic programming. This optimization model stands for a model that includes both the continuous and integer variables and also has quadratic terms such as the proposed model (the objective function and its constraints). The resulted MIQP model is implemented in the GAMS software package Brooke et al. [48] version 27.3 and optimized using solving constraint integer programs (SCIP) solver Achterberg [49]. This solver performs total control of the solution process by access to the detailed information of the process. The problem is executed in a system with an Intel core i5 (Quad Core 5th Generation) @ 2.5 GHz and 6-GB of RAM. for a model that includes both the continuous and integer variables and also has quadratic terms such as the proposed model (the objective function and its constraints). The resulted MIQP model is implemented in the GAMS software package Brooke et al. [48] version 27.3 and optimized using solving constraint integer programs (SCIP) solver Achterberg [49]. This solver performs total control of the solution process by access to the detailed information of the process. The problem is executed in a system with an Intel core i5 (Quad Core 5th Generation) @ 2.5 GHz and 6-GB of RAM.

Numerical Results
In this section, numerical simulation is accomplished to confirm the effectiveness of the suggested MIQP model using the SCIP solver in a GAMS environment. The case studies include two systems. The first system is a system that contains four units including one power-only unit, two CHP units, and one heat-only unit. The data of power-only, CHP, and heat-only generation units is shown in Tables 1-3, respectively. The maintenance required duration of units are also included in these tables.  Moreover, the heat-power FOR of the CHP unit 1 and CHP unit 2 are provided in Figure 5 Mohammadi-Ivatloo et al. [12].
For the short-term generation scheduling, first, the long-tern GMS should be studied to determine the maintenance schedule. It is worth mentioning that in short-term scheduling, each unit that is under yearly maintenance does not participate in power or heat generation. It is clear that the power and heat demands vary due to changes in needed power and heat caused by changes in air temperature and space heating requirements. The long-term power and heat profiles for the understudy systems are as Figure 6. These per-unit profiles are multiplied with the base power and heat demands that are 350 MW and 450 MWth, respectively.

Unit
Cost Function Moreover, the heat-power FOR of the CHP unit 1 and CHP unit 2 are provided in Figure 5 Mohammadi-Ivatloo et al. [12]. For the short-term generation scheduling, first, the long-tern GMS should be studied to determine the maintenance schedule. It is worth mentioning that in short-term scheduling, each unit that is under yearly maintenance does not participate in power or heat generation. It is clear that the power and heat demands vary due to changes in needed power and heat caused by changes in air temperature and space heating requirements. The long-term power and heat profiles for the understudy systems are as Figure 6. These per-unit profiles are multiplied with the base power and heat demands that are 350 MW and 450 MWth, respectively. As mentioned, the long-term problem is optimized to determine the maintenance schedule that is needed for short-term generation scheduling. Table 4 lists the power generation of units in the long-term plan. As can be seen from the obtained results in this table, the CHP units operate in their FOR and do not deviate from that. It is worth noting that the global optimal solution has been obtained by GAMS for the understudy system. Table 5 depicts the cost of different units in the longterm plan as well as the total cost. The yearly maintenance plan is illustrated in Figure 7. It can be seen from this figure that the power-generating units (power-only and the CHP units) are not undermaintenance simultaneously. Likewise, the maintenance intervals of heat-generating units (heat-only and the CHP units) are not simultaneous. Also, it can be seen that the maintenance interval of each unit is consecutive. As mentioned, during these weeks, the units do not participate in power or heat generation and they are out of task for the maintenance services. This figure indicates that the optimal maintenance interval of power-only, CHP 1, CHP 2, heat-only units are in weeks 31-34, 36-41, 11-15, and 32-35.  As mentioned, the long-term problem is optimized to determine the maintenance schedule that is needed for short-term generation scheduling. Table 4 lists the power generation of units in the long-term plan. As can be seen from the obtained results in this table, the CHP units operate in their FOR and do not deviate from that. It is worth noting that the global optimal solution has been obtained by GAMS for the understudy system. Table 5 depicts the cost of different units in the long-term plan as well as the total cost. The yearly maintenance plan is illustrated in Figure 7. It can be seen from this figure that the power-generating units (power-only and the CHP units) are not under-maintenance simultaneously. Likewise, the maintenance intervals of heat-generating units (heat-only and the CHP units) are not simultaneous. Also, it can be seen that the maintenance interval of each unit is consecutive. As mentioned, during these weeks, the units do not participate in power or heat generation and they are out of task for the maintenance services. This figure indicates that the optimal maintenance interval of power-only, CHP     Based on the obtained maintenance intervals, some days are selected for the short-term generation scheduling. The results are presented in three cases as Case I: a day with 1 under-maintenance unit (located in weeks 15,31,35,41); Case II: a day with 2 under-maintenance unit (located in week 32); and Case III: a day with no under-maintenance unit (located in week 51). The load factor for these weeks is presented in Table 6. Table 6. Demand factors for the selected weeks.

Case
Week Under-Maintenance Unit(s) (Based on Figure 7) Demand Factors (Based on Figure 6) The per-unit profiles of power and heat demands are illustrated in Figure 8 Alipour et al. [52]. These profiles are multiplied with the mentioned base power and heat demands of system (350 MW and 450 MWth, respectively) and the power and heat demand factors of the related week (based on Table 6) to form the real power and heat demand. Based on the obtained maintenance intervals, some days are selected for the short-term generation scheduling. The results are presented in three cases as Case I: a day with 1 undermaintenance unit (located in weeks 15,31,35,41); Case II: a day with 2 under-maintenance unit (located in week 32); and Case III: a day with no under-maintenance unit (located in week 51). The load factor for these weeks is presented in Table 6.

Case
Week Under-maintenance Unit(s) (Based on Figure 7) Demand Factors (Based on Figure 6) Power Heat The per-unit profiles of power and heat demands are illustrated in Figure 8 Alipour et al. [52]. These profiles are multiplied with the mentioned base power and heat demands of system (350 MW and 450 MWth, respectively) and the power and heat demand factors of the related week (based on Table 6) to form the real power and heat demand.

Case I
For this case, days in weeks 15, 31, 35, and 41 are selected for short-term generation scheduling. First, a day in week 15 is selected. On this day, CHP unit 2 is under maintenance. Therefore, this unit does not participate in power or heat generation.
The generated power by the units is depicted in Figure 9. As this figure illustrates, the CHP unit 2 does not participate in power and heat generation. This figure also shows that the CHP units operate in their FOR. As observed, the power demand is mainly supplied by the CHP unit 1 while the heat demand is mainly supplied by the heat-only unit. Table 7 tabulates the total cost of different units as well as the total cost of the system. It is worth mentioning that the obtained cost for the CHP unit 2 includes the fixed and maintenance costs.

Case I
For this case, days in weeks 15, 31, 35, and 41 are selected for short-term generation scheduling. First, a day in week 15 is selected. On this day, CHP unit 2 is under maintenance. Therefore, this unit does not participate in power or heat generation.
The generated power by the units is depicted in Figure 9. As this figure illustrates, the CHP unit 2 does not participate in power and heat generation. This figure also shows that the CHP units operate in their FOR. As observed, the power demand is mainly supplied by the CHP unit 1 while the heat demand is mainly supplied by the heat-only unit. well as the total cost of the system. It is worth mentioning that the obtained cost for the CHP unit 2 includes the fixed and maintenance costs.  For more evaluation of the obtained results, demand response is implemented. A different participation percent is considered in this research. Table 8 lists the optimal cost of the power-only, CHP, and heat-only units for different participation percent in demand response. As can be seen, the optimal cost of the units is changed respect to participation percent. Improving trend of the total cost of the system is also observed in this table. As mentioned, the cost of CHP unit 2 is related to the fixed and maintenance costs. In Figure 10, optimal hourly participation percent in demand response is illustrated. As observed, based on the cost optimization, the hourly loads are shifted to other hours. Additionally, it can be seen from this figure that the values of the shifted loads are not identical for different hours. Decreasing trend of the total cost respect to participation percent is shown in Figure  11. This figure shows the system cost for participation percent in the range of (0-50%) in demand response. The value of the improved cost is not uniform for identical intervals of participation percent and vary with percent and with problem.   For more evaluation of the obtained results, demand response is implemented. A different participation percent is considered in this research. Table 8 lists the optimal cost of the power-only, CHP, and heat-only units for different participation percent in demand response. As can be seen, the optimal cost of the units is changed respect to participation percent. Improving trend of the total cost of the system is also observed in this table. As mentioned, the cost of CHP unit 2 is related to the fixed and maintenance costs. In Figure 10, optimal hourly participation percent in demand response is illustrated. As observed, based on the cost optimization, the hourly loads are shifted to other hours. Additionally, it can be seen from this figure that the values of the shifted loads are not identical for different hours. Decreasing trend of the total cost respect to participation percent is shown in Figure 11. This figure shows the system cost for participation percent in the range of (0-50%) in demand response. The value of the improved cost is not uniform for identical intervals of participation percent and vary with percent and with problem. For the other days of Case I (located in weeks 31, 35, and 41), the short-term generation scheduling is presented in Table 9. In each of the selected weeks, one of the units is under maintenance. As mentioned, the obtained cost for the under-maintenance units includes the fixed cost and the maintenance cost. The impact of demand response on improving the system's cost is also seen in this table. Additionally, the total cost of the system is considerably different, arising from difference in power and demand of typical days of the selected weeks. The under-maintenance units in those weeks are another influential factor on the total cost of the system.  For the other days of Case I (located in weeks 31, 35, and 41), the short-term generation scheduling is presented in Table 9. In each of the selected weeks, one of the units is under maintenance. As mentioned, the obtained cost for the under-maintenance units includes the fixed cost and the maintenance cost. The impact of demand response on improving the system's cost is also seen in this table. Additionally, the total cost of the system is considerably different, arising from difference in power and demand of typical days of the selected weeks. The under-maintenance units in those weeks are another influential factor on the total cost of the system.   For the other days of Case I (located in weeks 31, 35, and 41), the short-term generation scheduling is presented in Table 9. In each of the selected weeks, one of the units is under maintenance. As mentioned, the obtained cost for the under-maintenance units includes the fixed cost and the maintenance cost. The impact of demand response on improving the system's cost is also seen in this table. Additionally, the total cost of the system is considerably different, arising from difference in power and demand of typical days of the selected weeks. The under-maintenance units in those weeks are another influential factor on the total cost of the system.

Case II
In this case, a day with two under-maintenance units is selected. A typical day in week 32 is considered. Based on constraints (18) and (19), the power-generation units cannot be under-maintenance simultaneously. Likewise, the heat-generation units cannot be under-maintenance in a week. Therefore, undoubtedly, the two units that are under maintenance in week 32 are power-only and heat-only units so that the system reliability not to be exposed to risk (Figure 7 confirms this issue.). Generation scheduling ignoring demand response is illustrated in Figure 12. As this figure shows, the CHP units operate in their FOR zone. In Table 10, the obtained costs for different participation percent of demand response is depicted for this day. Figure 13 depicts the decreasing trend of the total cost with respect to participation percent in demand response.

Case II
In this case, a day with two under-maintenance units is selected. A typical day in week 32 is considered. Based on constraints (18) and (19), the power-generation units cannot be undermaintenance simultaneously. Likewise, the heat-generation units cannot be under-maintenance in a week. Therefore, undoubtedly, the two units that are under maintenance in week 32 are power-only and heat-only units so that the system reliability not to be exposed to risk (Figure 7 confirms this issue.). Generation scheduling ignoring demand response is illustrated in Figure 12. As this figure shows, the CHP units operate in their FOR zone. In Table 10, the obtained costs for different participation percent of demand response is depicted for this day. Figure 13 depicts the decreasing trend of the total cost with respect to participation percent in demand response.     Figure 13. Decreasing trend of the total cost of the system for a typical day in week 32 respect to demand response.

Case III
Finally, in this case, the generation scheduling is accomplished for a day that no unit is under maintenance. For this aim, a day in week 51 (peak power demand of the year) is selected. Table 11 illustrates the generation scheduling for this day. As observed, all the units participate in demand supply and also the CHP units operate in their FOR zone. The CHP unit 2 participates in power and heat generation due to its lower cost. The improving trend of the system cost respect to participation

Case III
Finally, in this case, the generation scheduling is accomplished for a day that no unit is under maintenance. For this aim, a day in week 51 (peak power demand of the year) is selected. Table 11 illustrates the generation scheduling for this day. As observed, all the units participate in demand supply and also the CHP units operate in their FOR zone. The CHP unit 2 participates in power and heat generation due to its lower cost. The improving trend of the system cost respect to participation percent in demand response is shown in Figure 14. The impact of participation percent is more for the lower participation percent. However, a higher participation percent has a lower cost. In Table 12, the total cost of the units as well as the system cost are listed for 0%, 15%, and 30% participation in demand response. As seen, the cost of the power-only unit for 30% participation in demand response is 0 for the considered day because the power-only unit is not under maintenance and so it has not maintenance cost. Additionally, this unit has not fixed cost based on its data (presented in Table 1). Therefore, when this unit is off while it is not under maintenance, its cost will be 0. For more evaluation of the proposed model, a 24-unit CHP-based system is adopted. This system contains of 13 power-only units, six CHP units, and five heat-only units. The data of the generation units for this system is listed in   For more evaluation of the proposed model, a 24-unit CHP-based system is adopted. This system contains of 13 power-only units, six CHP units, and five heat-only units. The data of the generation units for this system is listed in Table 13 [12].   By optimizing the long-term plan, the yearly maintenance scheduling is depicted in Figure 15. The maintenance intervals are dispersed throughout the year. The maintenance interval for all the power-only, CHP, and heat-only units is shown in this figure. The total cost of the system for each week is illustrated in Figure 16. This cost includes the cost of power-only, CHP, and heat-only units that is depicted in Figure 17. As observed, the power-only units 10, 11, 12, and 13 do not participate in power generation due to their higher cost, and hence, their cost is related to the fixed and maintenance costs. By optimizing the long-term plan, the yearly maintenance scheduling is depicted in Figure 15. The maintenance intervals are dispersed throughout the year. The maintenance interval for all the power-only, CHP, and heat-only units is shown in this figure. The total cost of the system for each week is illustrated in Figure 16. This cost includes the cost of power-only, CHP, and heat-only units that is depicted in Figure 17. As observed, the power-only units 10, 11, 12, and 13 do not participate in power generation due to their higher cost, and hence, their cost is related to the fixed and maintenance costs.   The total number of under-maintenance units is illustrated in Figure 18. As seen, the maximum number of power-producing units that are simultaneously under maintenance (i.e., 2) is greater than that of power-producing units (i.e., 1). This is due to the greater number of power-producing units. Additionally, it can be seen that constraints (18) and (19) are effective for limiting the maximum number of simultaneous under-maintenance units.  The total number of under-maintenance units is illustrated in Figure 18. As seen, the maximum number of power-producing units that are simultaneously under maintenance (i.e., 2) is greater than that of power-producing units (i.e., 1). This is due to the greater number of power-producing units. Additionally, it can be seen that constraints (18) and (19) are effective for limiting the maximum number of simultaneous under-maintenance units. The total number of under-maintenance units is illustrated in Figure 18. As seen, the maximum number of power-producing units that are simultaneously under maintenance (i.e., 2) is greater than that of power-producing units (i.e., 1). This is due to the greater number of power-producing units. Additionally, it can be seen that constraints (18) and (19) are effective for limiting the maximum number of simultaneous under-maintenance units. The total number of under-maintenance units is illustrated in Figure 18. As seen, the maximum number of power-producing units that are simultaneously under maintenance (i.e., 2) is greater than that of power-producing units (i.e., 1). This is due to the greater number of power-producing units. Additionally, it can be seen that constraints (18) and (19) are effective for limiting the maximum number of simultaneous under-maintenance units. The short-term generation scheduling for the second system is studied in two cases includes Case I for week 10 and Case II for week 40. The number of under-maintenance units in these weeks is listed in Table 14. Table 14. Under-maintenance units in the selected weeks.

Case
Week Units Under-Maintenance Units (Based on Figure 15) Week 10

Case I
As previously mentioned, in this case, the generation scheduling of week 10 is studied. In this week, power-only unit 1 and heat-only unit 4 are under maintenance. The hourly cost of the system with respect to hour is shown in Figure 19. This figure illustrates the system cost in the presence of demand response for participation of 0% and 30%. Table 15 shows the total cost of the system respect to demand response participation. As seen, demand response is effective and has improved the system cost. with respect to hour is shown in Figure 19. This figure illustrates the system cost in the presence of demand response for participation of 0% and 30%. Table 15 shows the total cost of the system respect to demand response participation. As seen, demand response is effective and has improved the system cost.

Case II
Generation scheduling of week 40 is studied in this case. In this week, power-only units 4 and 9 and CHP unit 2 are being maintenance. The system cost with respect to hour is shown in Figure 20. This figure illustrates the system cost in the presence of demand response for participation of 0% and

Case II
Generation scheduling of week 40 is studied in this case. In this week, power-only units 4 and 9 and CHP unit 2 are being maintenance. The system cost with respect to hour is shown in Figure 20. This figure illustrates the system cost in the presence of demand response for participation of 0% and 30%. The system cost respect to demand response participation is depicted in Table 16, which shows the effective influence of demand response on the system cost.
Energies 2020, 13, 2840 20 of 25 30%. The system cost respect to demand response participation is depicted in Table 16, which shows the effective influence of demand response on the system cost.

Conclusions
In this paper, the yearly preventive GMS in CHP-based systems was accomplished due to its important role in retaining network reliability as well as cost improvement. The GMS problem for power-only, CHP, and heat-only units was done with the aim to minimize the total cost of the system. The security constraints like the FOR of CHP units and demand balances for electricity and heat loads were considered. In this research, the short-term generation scheduling of the units was performed subject to the obtained yearly maintenance. The under-maintenance units did not participate in power or heat generation. The impact of demand response on generation scheduling was also investigated in this research. The resulting MIQP model was implemented in the GAMS software package and solved by the SCIP solver. Numerical simulation was accomplished to validate the

Conclusions
In this paper, the yearly preventive GMS in CHP-based systems was accomplished due to its important role in retaining network reliability as well as cost improvement. The GMS problem for power-only, CHP, and heat-only units was done with the aim to minimize the total cost of the system. The security constraints like the FOR of CHP units and demand balances for electricity and heat loads were considered. In this research, the short-term generation scheduling of the units was performed subject to the obtained yearly maintenance. The under-maintenance units did not participate in power or heat generation. The impact of demand response on generation scheduling was also investigated in this research. The resulting MIQP model was implemented in the GAMS software package and solved by the SCIP solver. Numerical simulation was accomplished to validate the effectiveness of the suggested model.
The obtained results revealed that the yearly maintenance scheduling impacts the total cost of the generating units and system in the short-term generation scheduling. The units that are under maintenance based on the long-term maintenance scheduling do not participate in power or heat generation in the short-term generation scheduling. It has been found that demand response impacts the mentioned costs as well as the generation scheduling of power-only, CHP, and heat-only units. In the case under study, CHPs participated more in demand supply due to their potential for simultaneous power and heat generation.