calculate lengthOfTour according to TSPLIB docs