The paper deals with the optimal sizing and allocation of dispersed generation, distributed storage systems and capacitor banks. The optimization aims at minimizing the sum of the costs sustained by the distributor for the power losses, for network upgrading, for carrying out the reactive power service and the costs of storage and capacitor installation, over a planning period of several years. A hybrid procedure based on a genetic algorithm and a sequential quadratic programming-based algorithm was used. A numerical application on a 18-busbar MV balanced 3-phase network was performed in order to show the feasibility of the proposed procedure.