Distributed generation (DG) of power has played an ever-increasing role in a smart power system, often termed as a smart grid. Their use can, however, cause more risk to the entire system since their power outputs are often affected by uncontrollable environments, e.g., weather. Power flow problems as a nonlinear optimization one become much more challenging when one or more distributed generators fail to achieve their desired performance levels. This work formulates a particle swarm optimization method to solve them by considering controllable and uncontrollable distributed generators in a smart grid. Such a method is often sensitive to the initialization conditions and weighting factors. This work presents several typical different initialization strategies and decides the most suitable weighting factors. They are comprehensively investigated via an IEEE 14-bus system subject to the failure of uncontrollable distributed generators.