Maximum allowable distributed generation with protection system coordination and power loss considerations