Skip to content

Commit b7803d7

Browse files
committed
minor edit
1 parent 1507a44 commit b7803d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

FireflyAlgorithm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def __init__(self, D, NP, nFES, alpha, betamin, gamma, LB, UB, function):
1919
self.NP)] # intermediate pop
2020
self.Fitness = [0.0] * self.NP # fitness values
2121
self.I = [0.0] * self.NP # light intensity
22-
self.nbest = [0.0] * self.NP # the best solution found so far
22+
self.nbest = [0.0] * self.D # the best solution found so far
2323
self.LB = LB # lower bound
2424
self.UB = UB # upper bound
2525
self.fbest = None # the best
@@ -103,4 +103,4 @@ def Run(self):
103103
# move all fireflies to the better locations
104104
self.move_ffa()
105105

106-
return self.fbest
106+
return self.fbest

0 commit comments

Comments
 (0)