Skip to content

Commit 5f12bf5

Browse files
authored
initialized fmin in BAT
1 parent d8c1edb commit 5f12bf5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

optimizers/BAT.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ def BAT(objf, lb, ub, dim, N, Max_iteration):
5858
for i in range(0, n):
5959
Fitness[i] = objf(Sol[i, :])
6060

61-
# Find the initial best solution
61+
# Find the initial best solution and minimum fitness
6262
I = numpy.argmin(Fitness)
6363
best = Sol[I, :]
64+
fmin = min(Fitness)
6465

6566
# Main loop
6667
for t in range(0, N_gen):

0 commit comments

Comments
 (0)