Mathematical modelling for reservoir water-quality management through hydraulic structures: a case study