Smart Grids Operation with Distributed generation and Demand Side Management