Optimization of a Water Supply System