[galib] Usage of GA2DArrayAlleleGenome

Sri kskk02 at gmail.com
Tue Sep 5 23:34:05 EDT 2006


I am a GALib user. I noticed the posting at http://pch.mit.edu/pipermail/galib/2005-February/001140.html which describes the issue with the GA2DArrayAlleleGenome class. I too have the same problem where only the first alleleSet in the AlleleSetArray is applied to all the genomes. 

Any help in clarification would be greatly appreciated. Thank you sir.


As reference, here is my code:

GAAlleleSetArray<int> alleleSetArray;

for (Message *m = ML.First();m!=NULL;m = ML.Next(m)) {


m->computeSlotAllele (commCycle, slotSize, cycleOH);

GAAlleleSet<int> alleleSetFix1(sizeof(m->getCommAllele())/4,m->getCommAllele()); // For Comm Cycle Allele Set

GAAlleleSet<int> alleleSetFix2(sizeof(m->getSlotAllele())/4,m->getSlotAllele()); // For Slot ID Allele Set

alleleSetArray.add(alleleSetFix1); // Add the allele set for comm cycle to message i

alleleSetArray.add(alleleSetFix2); // Add the allele set for slot size to message i


GA2DArrayAlleleGenome<int> genome(2, nw->NumOfSignals , alleleSetArray, Objective);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/galib/attachments/20060905/0b1eeae5/attachment.htm

More information about the galib mailing list