Predictive control of an activated sludge process for long term operation