This commit is contained in:
UmbertoJr 2019-11-18 08:22:23 +01:00
parent 2e9910d324
commit 6be767267d
2 changed files with 3 additions and 3 deletions

View file

@ -43,7 +43,7 @@ class Solver_TSP:
start = t()
self.solution = self.available_initializers[self.methods[0]](instance_)
assert self.check_if_solution_is_valid(self.solution), "Error the solution is not valid"
print("init ok")
# print("init ok")
for i in range(1, len(self.methods)):
self.solution = self.available_improvements[self.methods[i]](self.solution, self.instance)
print(len(self.solution))

View file

@ -64,7 +64,7 @@ class TwoOpt:
if new_reward < new_len:
new_len = new_reward
else:
return new_tsp_sequence.tolist(), new_len, uncross
return new_tsp_sequence.tolist()
# return new_tsp_sequence.tolist(), new_len, uncross
return new_tsp_sequence.tolist()
@ -156,7 +156,7 @@ class TwoDotFiveOpt:
if new_len < actual_len:
actual_len = new_len
else:
return new_tsp_sequence.tolist(), actual_len, uncross
return new_tsp_sequence.tolist()
# return new_tsp_sequence.tolist(), actual_len, uncross
return new_tsp_sequence.tolist()