Optimise the management of water and wastewater treatment networks