A cost-based approach for evaluating the impact of a network of distributed energy systems on the centralized energy supply