update
This commit is contained in:
parent
e6090d2a29
commit
9acede718b
1 changed files with 3 additions and 2 deletions
|
@ -14,7 +14,7 @@ class Solver_TSP:
|
||||||
self.solved = False
|
self.solved = False
|
||||||
assert method in self.available_methods, f"the {method} method is not available currently."
|
assert method in self.available_methods, f"the {method} method is not available currently."
|
||||||
|
|
||||||
def __call__(self, instance_, verbose=True):
|
def __call__(self, instance_, verbose=True, return_value=True):
|
||||||
self.instance = instance_
|
self.instance = instance_
|
||||||
if verbose:
|
if verbose:
|
||||||
print("### solving ####")
|
print("### solving ####")
|
||||||
|
@ -23,7 +23,8 @@ class Solver_TSP:
|
||||||
if verbose:
|
if verbose:
|
||||||
print("### solution found ####")
|
print("### solution found ####")
|
||||||
self._gap()
|
self._gap()
|
||||||
return self.solution
|
if return_value:
|
||||||
|
return self.solution
|
||||||
|
|
||||||
def random_method(self, instance_):
|
def random_method(self, instance_):
|
||||||
n = int(instance_.nPoints)
|
n = int(instance_.nPoints)
|
||||||
|
|
Reference in a new issue