|
@@ -26,7 +26,7 @@ def rand_order(cities):
|
|
|
|
|
|
# returns distance between 2 vertices
|
|
|
def dist(city1, city2):
|
|
|
- return math.sqrt((city1[2] - city2[2]) ** 2 + (city1[3] - city2[3]) ** 2)
|
|
|
+ return math.sqrt(int((city1[2]) - int(city2[2])) ** 2 + (int(city1[3]) - int(city2[3])) ** 2)
|
|
|
|
|
|
|
|
|
# returns total cost/distance of a tour (list of cities)
|