go(de): add stats chan to the model
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
7e358b01af
commit
2e5bb5c538
@ -35,6 +35,8 @@ type JDE struct {
|
|||||||
Population *Population
|
Population *Population
|
||||||
// BenchName is a name of the problem to optimise.
|
// BenchName is a name of the problem to optimise.
|
||||||
BenchName string
|
BenchName string
|
||||||
|
// ch is a channel for writing back computed results.
|
||||||
|
ch chan []stats.Stats
|
||||||
// initialised denotes the initialisation state of the struct.
|
// initialised denotes the initialisation state of the struct.
|
||||||
initialised bool
|
initialised bool
|
||||||
}
|
}
|
||||||
@ -99,6 +101,7 @@ func (j *JDE) Init(generations, mutStrategy, adptScheme, np int, f, cr float64,
|
|||||||
j.CR = cr
|
j.CR = cr
|
||||||
j.Dimensions = dimensions
|
j.Dimensions = dimensions
|
||||||
j.BenchName = bench
|
j.BenchName = bench
|
||||||
|
j.ch = ch
|
||||||
j.initialised = true
|
j.initialised = true
|
||||||
|
|
||||||
pop := newPopulation(bench, j.NP)
|
pop := newPopulation(bench, j.NP)
|
||||||
|
Loading…
Reference in New Issue
Block a user