COMOKIT / COMOKIT-Model

A GAMA (http://gama-platform.org) model on the assessment and comparisons of intervention policies against the CoVid19 pandemics
https://comokit.org
GNU General Public License v3.0
25 stars 18 forks source link

Ben Tre dataset: Java error: ConcurrentModificationException #14

Closed hqnghi88 closed 4 years ago

hqnghi88 commented 4 years ago

Just pull and launch today version and after around 200+ cycle , i get: 2 occurrences in 2 agents at cycle 251: Java error: ConcurrentModificationException in ask bound.individuals where (flip(successful_contact_rate_human * reduction_factor) and (each.status = susceptible)) { do defineNewCase ; }

ConcurrentModificationException: null java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1388) java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) one.util.streamex.AbstractStreamEx.rawCollect(AbstractStreamEx.java:68) when applying the where operator on [Individual(2547),Individual(180),Individual(180),Individual(194),Individual(463),Individual(464),Individual(463),Individual(464),Individual(682),Individual(682),Individual(1173),Individual(1445),Individual(1173),Individual(1568),Individual(1445),Individual(1568),Individual(2435),Individual(2435),Individual(1553),Individual(1553)] and flip(successful_contact_rate_human reduction_factor) and (each.status = susceptible) in ask bound.individuals where (flip(successful_contact_rate_human reduction_factor) and (each.status = susceptible)) { do defineNewCase ; }

in agents Individual180, No Containment

hqnghi88 commented 4 years ago

It works without Parallelisme of experiment, i close this as we dont tackle this now, i think

AlexisDrogoul commented 4 years ago

Hum... Parallelism of experiment ? or simulations ? It should work in the second case, no matter what !

hqnghi88 commented 4 years ago

Sorry, of simulations, you are totally right, my bad

AlexisDrogoul commented 4 years ago

So it should normally work...

Second thing not so clear (and more for @ptaillandier ): the bound.individuals expression returns a list where individuals appear two times.. Is it normal ?

ptaillandier commented 4 years ago

No, I do not understand why.... before entering into a new building (adding themselves to the individuals list), individuals are supposed to leave the previous one (remove themselves from the individuals list)

hqnghi88 commented 4 years ago

i used old built (30 mars), i just rebuild a new one from git base, everything is ok. Sorry for disturbing.

hqnghi88 commented 4 years ago

test comment from slack View in Slack