summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2007-12-18 01:49:29 +0100
committerGuillaume Seguin <guillaume@segu.in>2007-12-18 01:49:29 +0100
commit5355ca1cef56a8f40937ec26c1d029ed5969a5f8 (patch)
tree6d842f7f1994e06b8600b64e9663f87559600a1c
parentec4670d61255b0ed963c37b0f888ed0e5287d2e5 (diff)
downloadtsp-5355ca1cef56a8f40937ec26c1d029ed5969a5f8.tar.gz
tsp-5355ca1cef56a8f40937ec26c1d029ed5969a5f8.tar.bz2
* Fix need_init related code (correctly pass the inited path to runner)
-rwxr-xr-xtsp.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tsp.py b/tsp.py
index 178095d..dbdefb9 100755
--- a/tsp.py
+++ b/tsp.py
@@ -413,7 +413,8 @@ is called.'''
self.update_best (path = self.best,
time = self.get_time (start))
self.runner = self.algo.run (self.best)
- self.runner = self.algo.run ()
+ else:
+ self.runner = self.algo.run ()
while not self.terminate:
path = self.runner.next ()
if not self.best or path.length < self.best.length: