This isn't how ECJ's breeding pipelines work. A pipeline is a stream of objects. One end of the stream is a SELECTION METHOD which selects an individual from the *old* population and passes it forward. This individual is then continued forward through various mutators and crossover operators etc. until it is finally handed to the Breeder, which puts the individual in a *new* population. The new and old populations are different, with different arrays.
It seems that you've got some kind of code which is modifying the old population in-place. As a result the new individual will never appear in the new population because nobody put it there.
On Oct 18, 2016, at 7:04 PM, Atm Golam Bari <[log in to unmask]> wrote:
> I am writing a variant of mutation class as described in Tutorial 2.
> All the individuals are mutated and sent to another custom class for evaluation.
> Then produce(...) method is returned. However, I override finishProducing(...) that waits until
> all the evaluation results of parent and child individuals are obtained.
> As soon as the evaluation of a parent and its child individual is available, it requires to
> put either parent or child in corresponding individual index ie. in q index using the following
> method inside mutation class.
> But, I never get the original(parent) individual in q index though I set
> parents genome there. I can't understand where I am missing.
> public static void setBetterOne(someobject which has q, parent[q] genome and child[q] genome)
> Individual ind = ((Individual)(state.population.subpops.individuals[someobj.q]));
> IntegerVectorIndividual indiv = (IntegerVectorIndividual)ind;
> if (parent is better)
> indiv.genome[x] = parent[q]'s genome
> indiv.genome[x] = child[q]'s genome
> I understand that "ind" in above method provides the reference of q'th individual of subpopulation 0?
> So, now if I change the genome of ind here then why can't I see that change on next step ie. evaluate() method
> of problem class or the selection methods?
> Thanks in advance,