Help in shedding light on these error messages

14 views
Skip to first unread message

MAF

unread,
Oct 8, 2015, 4:12:06 PM10/8/15
to Watchmaker Framework for Evolutionary Computation
Hi,

I am a self-taught Java programmer, so your advice will be really appreciated.

I have implemented the travelling salesman example and I am getting the following error messages:

    at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
    at java.util.ArrayList$Itr.next(ArrayList.java:851)
    at geneticalgorithms.LCBB.setRealWWTPCostsandGHG(LCBB.java:2346)
    at geneticalgorithms.LCBB.bbOutput(LCBB.java:2254)
    at geneticalgorithms.RouteEvaluator.getFitness(RouteEvaluator.java:101)
    at geneticalgorithms.RouteEvaluator.getFitness(RouteEvaluator.java:24)
    at org.uncommons.watchmaker.framework.FitnessEvalutationTask.call(FitnessEvalutationTask.java:52)
    at org.uncommons.watchmaker.framework.FitnessEvalutationTask.call(FitnessEvalutationTask.java:26)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)


Daniel Dyer

unread,
Oct 8, 2015, 4:16:04 PM10/8/15
to Watchmaker Framework for Evolutionary Computation
On Thursday, October 8, 2015 at 9:12:06 PM UTC+1, MAF wrote:
Hi,

I am a self-taught Java programmer, so your advice will be really appreciated.

I have implemented the travelling salesman example and I am getting the following error messages:

    at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)


Looks like you are modifying an ArrayList while you are iterating over its contents, which isn't supported (this is a Java issue rather than a Watchmaker issue).  If you need to do something like this you'll probably have to take a copy of the list before iterating over it so that you can modify the original.

Dan.
Reply all
Reply to author
Forward
0 new messages