balancing energy supply and demand