Open mariopaolucci opened 4 years ago
To reproduce the issue, I have set
set num-persons 1000
set num-oc-persons 1000
set number-crimes-yearly-per10k 10000
and I have changed a line of code to pump up arrests: set arrest-rate number-arrests-per-year / ticks-per-year / number-crimes-yearly-per10k / 1000 * count persons
instead of set arrest-rate number-arrests-per-year / ticks-per-year / number-crimes-yearly-per10k / 10000 * count persons
.
I run with while [length removed-fatherships < 3] [go] print "finito"
and I kill all the prisoners with observer> ask turtle-set map [a -> last but-last a] removed-fatherships [ if my-job != nobody [ ask my-job [ set my-worker nobody ] ] if my-school != nobody [ ask my-school [ set my-students other my-students ] ] die]
(bit long, ok).
Under those conditions, I get removed-fatherships to length 8 at step 14. This means that even if the kids are very small, I'll get a re-add before long - that is, if the kids are 12, they will get to 18 in 72 steps.. how old are they? And then there's just a chance they get re-added- should have tweaked that too.
Indeed, it uncooly arrived to 230 steps without anything happening. I'm starting to think it's the turtle-set
that solved it for dead fathers - maybe it's a dead offspring?
And yes, it was a dead OFFSPRING - exactly same error obtained - something that points to family reunitions happening too rarely. Let's review that:
if (random-float 1) < 6 / (first a) [
ask last a [ create-offspring-link-from father ]
set removed-fatherships remove a removed-fatherships
]
Can't find a way to explain that - 6 / the number of ticks? That variable contains ((18 * ticks-per-year + birth-tick) - ticks)
. Well it's ok, it amounts to just the number of ticks spent in separation, and makes them slower to return. However, in two years they should all be back.
Ok, it should be solved when interface goes up.. in the end I clean up the list during the death routine.
Here, pretty self-explanatory. The bug comes out in the runs of the 0.9.3 series