An advanced real time energy management system for microgrids. (1st November 2016)