On Tue, May 24, 2016 at 2:44 PM, 'Sam Taylor' via pyevolve 
<pyev...@googlegroups.com> wrote:
Each sensor be set up with different configurations. 
Lets assume there are 3 different configurations for each sensor, making a list of 60. Looking at this exercise, it seems I will be creating an object Sensor and add these 60 objects to the GAlleleList. I will be running these configurations, lets assume I am checking the energy consumption of the overall network. Thus, I can only set up one configuration per sensor. Assume my fitness function is, overall energy consumption of the sensor networks. 
That's reasonable.
Now my question is this, how do I ensure only one configuration is allowed for each sensor, do I force this as part of the eval_funct as done in the exercise 11 (i.e. make sure the chromosome at position contains a certain value). Is there another way to do this? 
I believe there is nothing wrong with checking uniqueness in `eval_func`.
Do you add alleles like this?
for i in xrange(20):
    duration_s = GAllele.GAlleleList([20, 30, 40])
    voltage = GAllele.GAlleleList(range(10, 110, 10))
    current = GAllele.GAlleleList([0.1, 0.2, 0.4, 0.8])
    state = GAllele.GAlleleList(['on', 'off'])
    mode = GAllele.GAlleleList(['zig-zag', 'steps'])
    magic = GAllele.GAlleleList(['novice', 'wizard])
    setOfAlleles.add(duration_s)
    setOfAlleles.add(voltage)
    setOfAlleles.add(current)
    setOfAlleles.add(state)
    setOfAlleles.add(mode) 
    setOfAlleles.add(magic)