Optimisation-based methodology for the design and operation of sustainable wastewater treatment facilities