Discharge and maintenance planning