An optimal procedure for sizing and siting of DGs and smart meters in active distribution networks considering loss reduction