A genetic algorithm optimization approach for smart energy management of microgrid