Optimization-based methodology for the development of wastewater facilities for energy and nutrient recovery. (December 2015)