Skip to content

Commit

Permalink
Fix SearchBase parameter (#328)
Browse files Browse the repository at this point in the history
The class "SearchBase" method "generate_score" has a issue: parmameter "self.vclamp" will be assign to parmameter "bh_strategy" in class "GlobalBestPSO",class "GeneralOptimizerPSO" and class "LocalBestPSO".
Should use python keyword argument to fix it
  • Loading branch information
Kutim authored and ljvmiranda921 committed Apr 23, 2019
1 parent b3965ec commit a04b7e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyswarms/utils/search/base_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def generate_score(self, options):

# Intialize optimizer
f = self.optimizer(
self.n_particles, self.dims, options, self.bounds, self.vclamp
self.n_particles, self.dims, options, self.bounds, velocity_clamp=self.vclamp
)

# Return score
Expand Down

0 comments on commit a04b7e5

Please sign in to comment.