Skip to content

Commit

Permalink
initialized fmin in BAT
Browse files Browse the repository at this point in the history
  • Loading branch information
7ossam81 authored Nov 27, 2020
1 parent d8c1edb commit 5f12bf5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion optimizers/BAT.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ def BAT(objf, lb, ub, dim, N, Max_iteration):
for i in range(0, n):
Fitness[i] = objf(Sol[i, :])

# Find the initial best solution
# Find the initial best solution and minimum fitness
I = numpy.argmin(Fitness)
best = Sol[I, :]
fmin = min(Fitness)

# Main loop
for t in range(0, N_gen):
Expand Down

0 comments on commit 5f12bf5

Please sign in to comment.