Quantcast

I got an error !

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

I got an error !

tannaz alinaghi
Dear freinds,
I am developing a simple GA project using JGAP 2.5. I got "array index out of bound" exception randomly during diferent execution of the code. This exception occurance doesn't depend on the input, i.e. the same input will exit either with throwing exception or with code 0.
The exception is due to calling method "evovle", and the stack trace is shown below:
 
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4
 at org.jgap.supergenes.abstractSupergene.markImmutable(abstractSupergene.java:228)
 at org.jgap.supergenes.abstractSupergene.applyMutation(abstractSupergene.java:209)
 at org.jgap.impl.MutationOperator.mutateGene(MutationOperator.java:194)
 at org.jgap.impl.MutationOperator.operate(MutationOperator.java:171)
 at org.jgap.Genotype.applyGeneticOperator(Genotype.java:664)
 at org.jgap.Genotype.evolve(Genotype.java:248)
 at TaskManagement.GArun(TaskManagement.java:129)
 at TaskManagement.main(TaskManagement.java:162)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at com.intellij.rt.execution.application.AppMain.main(Unknown Source)
 
 
I wondered whether anyone could generously help.
Thank in advance
Parina


Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: I got an error !

Klaus Meffert
Hello Parina,
 
it seems that there is a problem with SuperGene in general. But you could use CompositeGene instead SuperGene. CompositeGene allows for the same as SuperGene except that is is not ensured that only valid constellations (in case more than one gene is included with CompositeGene) will appear. Would that be possible for you?
 
Best
 
Klaus


From: [hidden email] [mailto:[hidden email]] On Behalf Of tannaz alinaghi
Sent: Tuesday, December 13, 2005 5:24 PM
To: [hidden email]
Subject: [jgap-users] I got an error !

Dear freinds,
I am developing a simple GA project using JGAP 2.5. I got "array index out of bound" exception randomly during diferent execution of the code. This exception occurance doesn't depend on the input, i.e. the same input will exit either with throwing exception or with code 0.
The exception is due to calling method "evovle", and the stack trace is shown below:
 
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4
 at org.jgap.supergenes.abstractSupergene.markImmutable(abstractSupergene.java:228)
 at org.jgap.supergenes.abstractSupergene.applyMutation(abstractSupergene.java:209)
 at org.jgap.impl.MutationOperator.mutateGene(MutationOperator.java:194)
 at org.jgap.impl.MutationOperator.operate(MutationOperator.java:171)
 at org.jgap.Genotype.applyGeneticOperator(Genotype.java:664)
 at org.jgap.Genotype.evolve(Genotype.java:248)
 at TaskManagement.GArun(TaskManagement.java:129)
 at TaskManagement.main(TaskManagement.java:162)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at com.intellij.rt.execution.application.AppMain.main(Unknown Source)
 
 
I wondered whether anyone could generously help.
Thank in advance
Parina


Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping
Loading...