jmejia8 / Metaheuristics.jl

High-performance metaheuristics for optimization coded purely in Julia.
https://jmejia8.github.io/Metaheuristics.jl/stable/
Other
253 stars 27 forks source link

Typo in `update_state!` for DE.jl #98

Closed jonathanfischer97 closed 7 months ago

jonathanfischer97 commented 7 months ago

In the file DE.jl, there is a reference to F_max on line 96 which is not defined in the scope of update_state! and throws an error when DE is constructed with an F_max value. Here is the typo:

Typo

if parameters.F_min < parameters.F_max
    F = parameters.F_min + (F_max - parameters.F_min) * rand(rng)
end

Solution

if parameters.F_min < parameters.F_max
    F = parameters.F_min + (parameters.F_max - parameters.F_min) * rand(rng)
end
mcamilletti1 commented 7 months ago

Submitted a PR to fix this!

jmejia8 commented 7 months ago

Thank you!

https://github.com/jmejia8/Metaheuristics.jl/pull/100

Merged.