Optimal Power Scheduling in a Virtual Power Plant