Impact of the time resolution for data gathering on loss calculation and demand side flexibility