GeneticAlgorithm  0.5 (beta)
A python framework for rapid GA prototyping
src/examples/KapsackSearch.py File Reference

Go to the source code of this file.

Classes

class  KapsackSearch.SearchNode
class  KapsackSearch.SearchManager

Namespaces

namespace  KapsackSearch

Variables

int KapsackSearch.nObjects = 12
list KapsackSearch.objectVolumes = [random.randrange(1, 20) for i in xrange(nObjects)]
list KapsackSearch.objectCosts = [random.randrange(10, 20) for i in xrange(nObjects)]
tuple KapsackSearch.maxVolume = reduce(lambda x, y: x+y, objectVolumes)
int KapsackSearch.volumeLambda = 10
tuple KapsackSearch.search = SearchManager(objectVolumes, maxVolume, objectCosts)
 All Classes Namespaces Files Functions Variables