1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-16 08:26:44 +00:00
This commit is contained in:
2020-05-24 02:22:05 +08:00
parent 04832b8b02
commit 73600d3595
4 changed files with 11 additions and 10 deletions

View File

@@ -583,7 +583,7 @@ func VectorFactory(rng *rand.Rand) eaopt.Genome {
}
func main3() {
numTask := 5
numTask := 20
nodesMap = map[string]Node{}
tasksMap = map[string]Task{}
@@ -646,7 +646,7 @@ func main3() {
ga.EarlyStop = func(ga *eaopt.GA) bool {
gap := math.Abs(ga.HallOfFame[0].Fitness - bestFitness)
if gap <= 0.000001 || ga.HallOfFame[0].Fitness >= bestFitness {
if count >= 50 || time.Since(ts) > time.Second*30 {
if count >= 30 || time.Since(ts) > time.Second*30 {
fmt.Println("Early Stop")
return true
} else {