# Maintenance and production constraints The production at a given plant in Prodrisk is constrained by the last point on the plant's [PQ curve](https://docs.prodrisk.sintef.energy/examples/basic/PQ_curves/PQ_curves.html). This is not a time-dependent attribute, hence the reference PQ-curve given as input is constant in time throughout the simulation period. Since the PQ-curve is scaled internally in the model according to the head coefficient, maximum production depends on upstream and downstream reservoir levels. In order to achieve time-dependent or state-independent maximum production limits, additional attributes are needed. ## Maintenance The [maintenance](https://docs.prodrisk.sintef.energy/objects/module/module.html#maintenance) and [maintenance_hourly](https://docs.prodrisk.sintef.energy/objects/module/module.html#maintenance-hourly) attributes are used to mimic planned maintenance on a generator. Since Prodrisk uses an aggregated plant object, where multiple generators are represented by one common PQ-curve, this is done by reducing the maximum production of the reference PQ-curve such that it equals the maximum production of the remaining active generators. The resulting PQ-curve will still scale according to the head coefficient, and the maximum production will depend on upstream and downstream reservoir levels. The maintenance attributes specify the *reduction* in maximum production, given in MW. Note that even though [maintenance_hourly](https://docs.prodrisk.sintef.energy/objects/module/module.html#maintenance-hourly) is given with hourly resolution, it will be converted to weekly resolution within the Prodrisk core. ## The [pmax](https://docs.prodrisk.sintef.energy/objects/module/module.html#pmax) attribute In order to achieve a firm upper production limit for a plant, independent of the head coefficient, the [pmax](https://docs.prodrisk.sintef.energy/objects/module/module.html#pmax) attribute is used. Contrary to maintenance, the model reduces the maximum production of the PQ-curve *after* the head coefficient scaling. The maximum production will therefore be independent of upstream and downstream reservoir levels. The [pmax](https://docs.prodrisk.sintef.energy/objects/module/module.html#pmax) attribute specifies the new maximum production limit in MW. The attribute is given with hourly resolution, but is converted to price period resolution within the Prodrisk core.