io
This commit is contained in:
parent
9f70d52b52
commit
1821f31f29
2 changed files with 2 additions and 2 deletions
2
run.py
2
run.py
|
@ -32,7 +32,7 @@ def run(show_plots=False):
|
||||||
if show_plots:
|
if show_plots:
|
||||||
solver.plot_solution()
|
solver.plot_solution()
|
||||||
|
|
||||||
if instance.optimal_tour:
|
if instance.exist_opt:
|
||||||
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])
|
self.optimal_tour[0] = 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