This commit is contained in:
UmbertoJr 2019-11-04 08:05:30 +01:00
parent d13cfe45f1
commit aafe6c1a09
2 changed files with 1 additions and 2 deletions

1
run.py
View file

@ -33,7 +33,6 @@ def run(show_plots=False):
solver.plot_solution() solver.plot_solution()
if instance.exist_opt: if instance.exist_opt:
print(instance.optimal_tour)
solver.solution = np.concatenate([instance.optimal_tour, [instance.optimal_tour[0]]]) solver.solution = np.concatenate([instance.optimal_tour, [instance.optimal_tour[0]]])
solver.method = "optimal" solver.method = "optimal"
solver.plot_solution() solver.plot_solution()

View file

@ -31,7 +31,7 @@ class Instance:
self.points = np.zeros((self.nPoints, 3)) self.points = np.zeros((self.nPoints, 3))
for i in range(self.nPoints): for i in range(self.nPoints):
line_i = self.lines[7 + i].split(' ') line_i = self.lines[7 + i].split(' ')
self.points[i, 0] = line_i[0] self.points[i, 0] = int(line_i[0])
self.points[i, 1] = line_i[1] self.points[i, 1] = line_i[1]
self.points[i, 2] = line_i[2] self.points[i, 2] = line_i[2]