Smart Policies for a SmartGrid (or, the other way around)