An Integrated Approach for Dynamic Process Modeling and Optimization of Wastewater Treatment Facilities