real-time energy dispatch