Modeling, Instrumentation, Automation, and Optimization of Wastewater Treatment Facilities