Maintenance Scheduling
Maintenance scheduling constraints are implemented for the Generator, Link
and Process components. The Process component follows the same formulation as the Link,
applied to its internal power . For components marked as maintainable=True, two new variables are
introduced: binary maintenance start variables , indicating
that a maintenance event begins in snapshot , and continuous maintenance status
variables , indicating whether the component is undergoing
maintenance (1) or available (0). The integrality of is implied through the
window coverage equality below, so only enters the model as a binary. This
turns the model into a mixed-integer linear programme (MILP).
Scheduling generator maintenance as an integer program dates back to Dopazo and Merrill (1975).[^1] The event-based formulation here follows the tradition of scheduling a given number of maintenance events of fixed duration[^2]; for a survey of alternative formulations and the tightness of their linear relaxations, see Andrade (2025).[^3] A broader review of maintenance scheduling in the electricity industry is given by Froger et al. (2016).[^4]
Event Count
The total number of maintenance start events must equal the specified number of events :
Constraint name: *-maint-event-count
Maintenance Windows
The duration per event (maintenance_duration) is given in elapsed time. For
each potential start snapshot , the coverage window is the
minimal run of consecutive snapshots whose weightings accumulate to at
least :
The maintenance status equals the sum of all start events whose window covers the snapshot:
Together with , this single equality enforces contiguous maintenance blocks, forbids overlapping events and implies the integrality of .
Constraint name: *-maint-window
Round-up semantics
Each event lasts at least elapsed hours, overshooting by less than the weighting of the last covered snapshot. For uniform hourly snapshots and integer , the duration is exact.
Start Validity
Maintenance cannot start where the coverage window does not fit, i.e. where the remaining weighted horizon is shorter than or where the window would span snapshots in which the component is inactive:
Constraint name: *-maint-start-horizon
Effect on Dispatch Limits
During maintenance, the available capacity is reduced by a fraction (maintenance_pu). When (default), the component is fully unavailable during maintenance.
Non-Extendable Components
GeneratorLink
| Constraint | Name |
|---|---|
Generator-fix-p-lower | |
Generator-fix-p-upper |
| Constraint | Name |
|---|---|
Link-fix-p-lower | |
Link-fix-p-upper |
Extendable Components
For extendable components, the dispatch coupling involves the bilinear product . Since is a continuous variable (the optimised capacity), this product is linearised using a McCormick envelope with the auxiliary variable :
GeneratorLink
| Constraint | Name |
|---|---|
Generator-ext-p-lower | |
Generator-ext-p-upper |
| Constraint | Name |
|---|---|
Link-ext-p-lower | |
Link-ext-p-upper |
The McCormick envelope bounds on are:
| Constraint | Name |
|---|---|
*-maintcap_upper | |
*-maintcap_upper_nommax | |
*-maintcap_lower_nommax | |
*-maintcap_lower_nommin (only added where ) |
Together with , these form the convex hull of for and . Since only takes integral values in any feasible solution, the linearisation is exact. It requires a finite p_nom_max. The auxiliary variable is internal and not written to the network outputs.
Committable Components
When combined with unit commitment (committable=True), the dispatch bounds scale the available capacity by , where is the product of the commitment status and the maintenance status. This couples the two decisions exactly: at full maintenance () the unit can be shut down (), while fractional maintenance leaves the remaining capacity available if committed.
Generator (fixed capacity)Generator (modular capacity)Generator (extendable capacity)
| Constraint | Name |
|---|---|
Generator-com-p-lower | |
Generator-com-p-upper | |
Generator-maint-status-le-status | |
Generator-maint-status-le-maint | |
Generator-maint-status-lb |
Together with , these McCormick inequalities give exactly, since is binary. This holds for binary status (standard unit commitment) and for the relaxed continuous status of linearized_unit_commitment=True. The auxiliary variable is internal and not written to the network outputs.
For modular committables the status is the integer number of committed modules and the module size. The same product scales the committed capacity, with bounding the module count.
| Constraint | Name |
|---|---|
Generator-com-mod-p-lower | |
Generator-com-mod-p-upper | |
Generator-maint-modstatus-le-status | |
Generator-maint-modstatus-le-maint | |
Generator-maint-modstatus-lb |
| Constraint | Name |
|---|---|
Generator-com-ext-p-lower | |
Generator-com-ext-p-upper-bigM | |
Generator-com-ext-p-upper |
Non-modular extendable committables keep the big-M status formulation with the McCormick capacity auxiliary ; modular committables use the integer-status product above instead.
Combination with other features
Maintenance scheduling can be combined with committable=True (unit commitment) and p_nom_extendable=True (capacity expansion). When all three are active, dispatch bounds use the big-M formulation with the McCormick auxiliary variable .
Caveats
- For committable components, a unit may be shut down () during maintenance. If it stays committed (e.g. forced by minimum up time), start-up costs and minimum up/down times interact with maintenance events.
- In rolling-horizon optimisation, the event count applies per horizon chunk and in-progress events are not carried over across chunk boundaries.
Mapping of symbols to component attributes
GeneratorLinkProcess
| Symbol | Attribute | Type |
|---|---|---|
n.generators_t.p | Decision variable | |
n.generators_t.maintenance | Decision variable | |
n.generators_t.maintenance_start | Decision variable | |
| internal, not written to outputs | Decision variable | |
| internal, not written to outputs | Decision variable | |
n.generators.p_nom | Parameter | |
n.generators.p_nom_min | Parameter | |
n.generators.p_nom_max | Parameter | |
n.generators_t.p_min_pu | Parameter | |
n.generators_t.p_max_pu | Parameter | |
n.generators.maintenance_pu | Parameter | |
n.generators.maintenance_duration | Parameter | |
n.generators.maintenance_events | Parameter |
| Symbol | Attribute | Type |
|---|---|---|
n.links_t.p | Decision variable | |
n.links_t.maintenance | Decision variable | |
n.links_t.maintenance_start | Decision variable | |
| internal, not written to outputs | Decision variable | |
| internal, not written to outputs | Decision variable | |
n.links.p_nom | Parameter | |
n.links.p_nom_min | Parameter | |
n.links.p_nom_max | Parameter | |
n.links_t.p_min_pu | Parameter | |
n.links_t.p_max_pu | Parameter | |
n.links.maintenance_pu | Parameter | |
n.links.maintenance_duration | Parameter | |
n.links.maintenance_events | Parameter |
The Process follows the Link formulation applied to its internal power .
| Symbol | Attribute | Type |
|---|---|---|
n.processes_t.p | Decision variable | |
n.processes_t.maintenance | Decision variable | |
n.processes_t.maintenance_start | Decision variable | |
| internal, not written to outputs | Decision variable | |
| internal, not written to outputs | Decision variable | |
n.processes.p_nom | Parameter | |
n.processes.p_nom_min | Parameter | |
n.processes.p_nom_max | Parameter | |
n.processes_t.p_min_pu | Parameter | |
n.processes_t.p_max_pu | Parameter | |
n.processes.maintenance_pu | Parameter | |
n.processes.maintenance_duration | Parameter | |
n.processes.maintenance_events | Parameter |
Examples
Maintenance Scheduling
Schedules optimal maintenance windows for generators with contiguous downtime blocks, partial outages, and multiple events.
[^1]: J. F. Dopazo and H. M. Merrill (1975), Optimal Generator Maintenance Scheduling Using Integer Programming, IEEE Transactions on Power Apparatus and Systems, 94, 5, 1537-1545, doi:10.1109/T-PAS.1975.31996. [^2]: F. Fourcade, E. Johnson, M. Bara, P. Cortey-Dumont (1997), Optimizing nuclear power plant refueling with mixed-integer programming, European Journal of Operational Research, 97, 2, 269-280, doi:10.1016/S0377-2217(96)00197-X. [^3]: T. Andrade (2025), On the tightness of linear relaxations of alternative mixed integer programming formulations for the generator maintenance scheduling problem, arXiv:2502.08855. [^4]: A. Froger, M. Gendreau, J. E. Mendoza, É. Pinson, L.-M. Rousseau (2016), Maintenance scheduling in the electricity industry: A literature review, European Journal of Operational Research, 251, 3, 695-706, doi:10.1016/j.ejor.2015.08.045.
2026-07-23
2026-07-23