solver
This commit is contained in:
parent
57c7702f6b
commit
4307fb2a3c
1 changed files with 0 additions and 3 deletions
|
@ -46,12 +46,9 @@ class Solver_TSP:
|
||||||
start = t()
|
start = t()
|
||||||
self.solution = self.available_initializers[self.methods[0]](instance_)
|
self.solution = self.available_initializers[self.methods[0]](instance_)
|
||||||
assert self.check_if_solution_is_valid(self.solution), "Error the solution is not valid"
|
assert self.check_if_solution_is_valid(self.solution), "Error the solution is not valid"
|
||||||
# print("init ok")
|
|
||||||
for i in range(1, len(self.methods)):
|
for i in range(1, len(self.methods)):
|
||||||
self.solution = self.available_improvements[self.methods[i]](self.solution, self.instance)
|
self.solution = self.available_improvements[self.methods[i]](self.solution, self.instance)
|
||||||
print(len(self.solution))
|
|
||||||
assert self.check_if_solution_is_valid(self.solution), "Error the solution is not valid"
|
assert self.check_if_solution_is_valid(self.solution), "Error the solution is not valid"
|
||||||
print("improve ok")
|
|
||||||
|
|
||||||
end = t()
|
end = t()
|
||||||
self.time_to_solve = np.around(end - start,3)
|
self.time_to_solve = np.around(end - start,3)
|
||||||
|
|
Reference in a new issue