def fitnessFunc(part):
    code = 0 if is_valid(part) else 1
    return benchmarks.sphere(part), array([code]), array([0]), array([1.0]) ## cost always 1
def MOFitnessFunc(part):
    code = 0 if is_valid(part) else 1
    #fitValues = (benchmarks.sphere(part)[0], benchmarks.rosenbrock(part)[0])
    fitValues = benchmarks.fonseca(part) + benchmarks.sphere(part)
    return fitValues, array([code]), array([0]), array([1.0]) ## cost always 1
Example #3
0
def esfera(individual):
    return benchmarks.sphere(individual)
Example #4
0
def sphere(x):
    return benchmarks.sphere(x)[0]
Example #5
0
def fitnessFunc(part, state):
    code = 0 if is_valid(part) else 1
    return ((array(benchmarks.sphere(part)), array([0.0]), array([0.0]), array([1.0])), state) ## cost always 1
Example #6
0
 def Funcao_thread(self, posicao, out_queue):
     return out_queue.put(dp.sphere(posicao))
Example #7
0
 def Funcao(self, posicao):
     return dp.sphere(posicao)