Knowledge-based system for river water quality management