A power distribution system is dynamically and adaptively configured in real-time to improve energy efficiency, reliability and power quality, particularly if the system includes renewable sources and storages. An optimal multi-objective scheduling and partitioning method is provided to partition the system into self-sufficient sections (SSS) through optimally combination of adjacent basic switching sections (BSS). The SSSs enable system operating at a lower cost, with less power losses, more energy efficiency, improved power quality, and sufficient transient security. The method uses two storage based transient security indices, storage compensation power margin (SCPM) and storage compensation energy margin (SCEM) evaluate the transient stability margin of distribution system. A minimal stability margin is used to ensure that the system remains stable when subject to large unexpected load deviations.