diff --git a/algo/de/jDE.go b/algo/de/jDE.go index 718aa0a..431d964 100644 --- a/algo/de/jDE.go +++ b/algo/de/jDE.go @@ -282,15 +282,9 @@ func (j *JDE) Run() { func (j *JDE) evaluate(pop *Population) float64 { f := bench.Functions[pop.Problem] - bestIndividual := pop.Population[0].CurX + bestIndividual := pop.Population[pop.GetBestIdx()].CurX bestSolution := f(bestIndividual) - for _, v := range pop.Population { - if solution := f(v.CurX); solution < bestSolution { - bestSolution = solution - } - } - return bestSolution }