The modelling and control of pollution in a river system