OutOfMemoryException when adding custom GeneticOperator

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

OutOfMemoryException when adding custom GeneticOperator

Ugo Sangiorgi
Hi everybody!
im using jgap to solve an optimization problem. suppose that i have 10 genes at a chromossome, and each allele represents a group of genes.
i mean:

when i group the "things" 3 and 2 i have:

that is, 3 groups of genes. So after this i calculate, based in some rules, the value of each group (a,b and d) to evaluate if my solution (the chromosome) its high or low.

Its quite simple. but maybe im doing something wrong, because i added a ReproductionOperator, and it starts evelving with 2 chromosomes, but it takes forever (OutOfMemoryException) to clone (as the documentation says) those 2 chromosomes.

I tried to implement some other GeneticOperators, to calculate other things based on those groups formation, but it takes forever too. i tried to decrease the number of the genes (i have 833 in the real situation) and decrease the population size.. but it keeps giving me OutofMemoryException.
ps: Im using Integer genes to represent the groups.

Somebody help me! if you guys wanted to read the code to understand better, i post it here too.
Many thanks in advance for anyone who try to help.


Ugo Braga Sangiorgi
Rox - Teoria dos Grafos [ http://www.projetorox.org ]
Rox Software Foundation [ http://rox.dev.java.net ]
Linux User #391393