From 86533bdefe274f1741c8897182e828c98f541cad Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 19 Jan 2023 20:30:14 +0100 Subject: [PATCH] go(de): declare initialised after pop.Init() --- algo/de/jDE.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/algo/de/jDE.go b/algo/de/jDE.go index a1c7253..7855d75 100644 --- a/algo/de/jDE.go +++ b/algo/de/jDE.go @@ -101,11 +101,14 @@ func (j *JDE) Init(generations, mutStrategy, adptScheme, np int, f, cr float64, j.Dimensions = dimensions j.BenchName = bench j.ch = ch - j.initialised = true pop := newPopulation(bench, j.NP) pop.Init() + + j.Population = pop + + j.initialised = true } // InitAndRun initialises the jDE algorithm, performs sanity checks on the