Skip to content

Commit

Permalink
Update ParticleSwarm.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Jul 6, 2017
1 parent 9cb1c8a commit a17d425
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Solid/ParticleSwarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def run(self, verbose=True):
self.scores = self._score(self.pos)
self._global_best()

if self.min_objective is not None and self._objective(self.global_best[0]) < self.min_objective:
if self._objective(self.global_best[0]) < (self.min_objective or 0):
print("TERMINATING - REACHED MINIMUM OBJECTIVE")
return self.global_best[0], self._objective(self.global_best[0])
print("TERMINATING - REACHED MAXIMUM STEPS")
Expand Down

0 comments on commit a17d425

Please sign in to comment.