Skip to content

Commit

Permalink
print_function
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Jun 28, 2017
1 parent e720876 commit 48c5f2e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Solid/SimulatedAnnealing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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
print("TERMINATING - REACHED MAXIMUM STEPS")
return self.best_state, self.best_energy

0 comments on commit 48c5f2e

Please sign in to comment.