Learning And Control Applied To Demand Response And Electricity Distribution Networks