This commit is contained in:
UmbertoJr 2019-11-04 06:56:13 +01:00
parent 1821f31f29
commit 202f7f1c38
2 changed files with 2 additions and 1 deletions

1
run.py
View file

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

View file

@ -48,7 +48,7 @@ class Instance:
self.optimal_tour = np.zeros(self.nPoints)
for i in range(self.nPoints):
line_i = lines[5 + i].split(' ')
self.optimal_tour[0] = int(line_i[0]) - 1
self.optimal_tour[i] = int(line_i[0]) - 1
def print_info(self):
print('name: ' + self.name)