diff --git a/Solid/SimulatedAnnealing.py b/Solid/SimulatedAnnealing.py index ab80b30..10144ed 100644 --- a/Solid/SimulatedAnnealing.py +++ b/Solid/SimulatedAnnealing.py @@ -144,7 +144,7 @@ def run(self, verbose=True): self.cur_steps += 1 if ((i + 1) % 100 == 0) and verbose: - print self + print(self) neighbor = self._neighbor() @@ -157,12 +157,12 @@ def run(self, verbose=True): self.best_state = deepcopy(self.current_state) if self.min_energy is not None and self.current_energy < self.min_energy: - print "TERMINATING - REACHED MINIMUM ENERGY" + print("TERMINATING - REACHED MINIMUM ENERGY") return self.best_state, self.best_energy self.adjust_temp() if self.current_temp < 0.000001: - print "TERMINATING - REACHED TEMPERATURE OF 0" + print("TERMINATING - REACHED TEMPERATURE OF 0") return self.best_state, self.best_energy - print "TERMINATING - REACHED MAXIMUM STEPS" - return self.best_state, self.best_energy \ No newline at end of file + print("TERMINATING - REACHED MAXIMUM STEPS") + return self.best_state, self.best_energy