INTELLIGENT SEWAGE DISCHARGE CONTROL IN A WASTEWATER TREATMENT PLANT