A method for dispatching an operation of a distribution feeder of electrical power into a grid with heterogeneous prosumers, the method comprising the steps of establishing a dispatch plan on a computer by using forecast data of an aggregated consumption and local distributed generation at the grid for a predetermined period, and operating the distribution feeder according to the established dispatch plan during the predetermined period.