Increasing application of distributed generation on distribution networks is the direct impact of development of technology and the energy disasters that the world is encountering. Using these resources in distribution network is one of the most influential solutions to reduce losses, improve voltage profile and improve power quality. To obtain these goals the resources capacity and the installation place are of a crucial importance. In this paper a new method is proposed to find the optimal and simultaneous place and capacity of these resources to reduce losses, improve voltage profile and reduce network harmonics. The proposed method is also capable of identifying the appropriate number of resources. The method is tested on actual power network of Zanjan Province, Iran and the simulation results are presented and discussed. Genetic algorithm is used to obtain the best answers.