Ejemplo n.º 1
0
def logging_example(alg,
                    D=10,
                    nFES=50000,
                    nGEN=100000,
                    seed=None,
                    optType=OptimizationType.MINIMIZATION,
                    optFunc=MinMB,
                    **kn):
    task = TaskConvPrint(D=D,
                         nFES=nFES,
                         nGEN=nGEN,
                         optType=optType,
                         benchmark=optFunc())
    algo = alg(seed=seed, task=task)
    best = algo.run()
    logger.info('%s %s' % (best[0], best[1]))
Ejemplo n.º 2
0
def logging_example(alg,
                    cec,
                    fnum=1,
                    D=10,
                    nFES=50000,
                    nGEN=5000,
                    seed=[None],
                    optType=OptimizationType.MINIMIZATION,
                    optFunc=MinMB,
                    wout=False,
                    sr=[-100, 100],
                    **kwu):
    func = getCecBench(cec, D)
    task = TaskConvPrint(D=D,
                         nFES=nFES,
                         nGEN=nGEN,
                         optType=optType,
                         benchmark=optFunc(func, sr[0], sr[1], fnum))
    algo = alg(seed=seed[0], task=task)
    best = algo.run()
    logger.info('%s %s' % (best[0], best[1]))
Ejemplo n.º 3
0
	def setUp(self):
		self.D, self.nFES, self.nGEN = 10, 10, 10
		self.t = TaskConvPrint(D=self.D, nFES=self.nFES, nGEN=self.nGEN, benchmark=MyBenchmark())