A method for controlling an electric power distribution grid