Пример #1
0
 def test_BA_iters_fine(self):
     task = StoppingTask(D=10,
                         nGEN=1000,
                         optType=OptimizationType.MINIMIZATION,
                         benchmark=Sphere())
     algo = BatAlgorithm(NP=25)
     algo.runTask(task)
     iters = task.iters()
     self.assertEqual(1000, iters)
Пример #2
0
 def test_BA_iters_to_fes(self):
     task = StoppingTask(D=10,
                         nGEN=1000,
                         optType=OptimizationType.MINIMIZATION,
                         benchmark=Sphere())
     algo = BatAlgorithm(NP=10)
     algo.runTask(task)
     evals = task.evals()
     self.assertEqual(10000, evals)
Пример #3
0
 def test_BA_evals_fine(self):
     task = StoppingTask(D=10,
                         nFES=1000,
                         optType=OptimizationType.MINIMIZATION,
                         benchmark=Sphere())
     algo = BatAlgorithm(NP=25)
     algo.runTask(task)
     evals = task.evals()
     self.assertEqual(1000, evals)