Fast Electrical Demand Optimization Under Real-Time Pricing