Portfolio optimization of energy communities to meet reductions in costs and emissions. (15th April 2019)