[galib] Fw: Usage of GA2DArrayAlleleGenome
Sri
kskk02 at gmail.com
Fri Sep 1 00:09:02 EDT 2006
Hi,
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.
regards,
Sri Kanajan
Senior Research Engineer
As reference, here is my code:
GAAlleleSetArray<int> alleleSetArray;
for (Message *m = ML.First();m!=NULL;m = ML.Next(m)) {
m->computeCommAllele(commCycle);
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/20060901/8db9d3ba/attachment.htm
More information about the galib
mailing list