예제 #1
0
 def __init__(self, populationSize, crossoverP, mutationP, nGenerations, nCities):     
     GA.__init__(self, populationSize, crossoverP, mutationP, nGenerations)
     self.nCities = nCities
 def __init__(self, populationSize, crossoverP, mutationP, nGenerations,
              possibleItems, limit):
     GA.__init__(self, populationSize, crossoverP, mutationP, nGenerations)
     self.limit = limit
     self.items = possibleItems
     self.nItems = len(possibleItems)
예제 #3
0
 def __init__(self):
     GA.__init__(self)
     self.prevSolution = None
     self.prevAvg = -1
     self.currentAvg = -1