go(de): don't run evolve concurrently for dimens
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
2e5bb5c538
commit
8f55d80731
@ -6,7 +6,6 @@ package de
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
"git.dotya.ml/wanderer/math-optim/bench"
|
||||
"git.dotya.ml/wanderer/math-optim/stats"
|
||||
@ -131,28 +130,18 @@ func (j *JDE) Run() {
|
||||
jDELogger.Fatalln("jDE needs to be initialised before calling Run(), exiting...")
|
||||
}
|
||||
|
||||
// have a wait group.
|
||||
var wg sync.WaitGroup
|
||||
|
||||
// we're be spawning goroutines per dimension and that is the number of
|
||||
// goroutines we need to wait for.
|
||||
wg.Add(len(j.Dimensions))
|
||||
|
||||
// run Evolve for for all dimensions.
|
||||
// run evolve for for all dimensions.
|
||||
for _, dim := range j.Dimensions {
|
||||
maxFES := bench.GetGAMaxFES(dim)
|
||||
|
||||
j.evolve(maxFES, &wg)
|
||||
j.evolve(maxFES)
|
||||
}
|
||||
|
||||
// wait for all.
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
// evolve evolves a population by running the jDE (self-adapting Differential
|
||||
// Evolution) algorithm on the passed population until termination conditions
|
||||
// are met.
|
||||
func (j *JDE) evolve(maxFES int, wg *sync.WaitGroup) {}
|
||||
func (j *JDE) evolve(maxFES int) {}
|
||||
|
||||
// NewjDE returns a pointer to a new, uninitialised jDE instance.
|
||||
func NewjDE() *JDE {
|
||||
|
Loading…
Reference in New Issue
Block a user