Calculating energy loss for electric distribution networks by means of an equivalent injection current algorithm