diff --git a/algo/de/jDE.go b/algo/de/jDE.go index f48da0a..d0b52f4 100644 --- a/algo/de/jDE.go +++ b/algo/de/jDE.go @@ -35,6 +35,8 @@ type JDE struct { Population *Population // BenchName is a name of the problem to optimise. BenchName string + // ch is a channel for writing back computed results. + ch chan []stats.Stats // initialised denotes the initialisation state of the struct. initialised bool } @@ -99,6 +101,7 @@ func (j *JDE) Init(generations, mutStrategy, adptScheme, np int, f, cr float64, j.CR = cr j.Dimensions = dimensions j.BenchName = bench + j.ch = ch j.initialised = true pop := newPopulation(bench, j.NP)