Exemplo n.º 1
0
 def __init__(self, *args, **kwargs):
     """ x0 is assumed to be an array, but then converted to a tuple. 
     The algorithm returns all individuals in the Pareto-front (and their fitnesses). """
     GA.__init__(self, *args, **kwargs)
     self.bestEvaluation = []
     self.bestEvaluable = [tuple(self.x0)]
     self.fitnesses = {}    
Exemplo n.º 2
0
 def __init__(self, *args, **kwargs):
     """ x0 is assumed to be an array, but then converted to a tuple. 
     The algorithm returns all individuals in the Pareto-front (and their fitnesses). """
     GA.__init__(self, *args, **kwargs)
     self.bestEvaluation = []
     self.bestEvaluable = [tuple(self.x0)]
     self.fitnesses = {}
Exemplo n.º 3
0
 def mutated(self, indiv):
     return tuple(GA.mutated(self,array(indiv)))
Exemplo n.º 4
0
 def initPopulation(self):
     if self.startPop == None:
         GA.initPopulation(self)
         self.currentpop = map(tuple, self.currentpop)
     else:
         self.currentpop = self.startPop
Exemplo n.º 5
0
 def mutated(self, indiv):
     return tuple(GA.mutated(self, array(indiv)))
Exemplo n.º 6
0
 def initPopulation(self):
     if self.startPop == None:
         GA.initPopulation(self)
         self.currentpop = map(tuple, self.currentpop)
     else:
         self.currentpop = self.startPop