Smart and Clean Energy Microgrids: electric, and thermal