Design of a prosumer EMS for energy trading. (March 2018)