Text this: Virtual power plant and microgrids controller for energy management based on optimization techniques