io
This commit is contained in:
parent
1821f31f29
commit
202f7f1c38
2 changed files with 2 additions and 1 deletions
1
run.py
1
run.py
|
@ -33,6 +33,7 @@ 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()
|
||||||
|
|
|
@ -48,7 +48,7 @@ class Instance:
|
||||||
self.optimal_tour = np.zeros(self.nPoints)
|
self.optimal_tour = np.zeros(self.nPoints)
|
||||||
for i in range(self.nPoints):
|
for i in range(self.nPoints):
|
||||||
line_i = lines[5 + i].split(' ')
|
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):
|
def print_info(self):
|
||||||
print('name: ' + self.name)
|
print('name: ' + self.name)
|
||||||
|
|
Reference in a new issue