Energy markets and responsive grids : modeling, control, and optimization