Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weights in new crime procedures fail sometimes #163

Open
mariopaolucci opened this issue Sep 8, 2019 · 0 comments
Open

Weights in new crime procedures fail sometimes #163

mariopaolucci opened this issue Sep 8, 2019 · 0 comments

Comments

@mariopaolucci
Copy link
Contributor

Run #15, RUNTIME ERROR: Extension exception: Got -0.02934005120594313 as a wei
ght but all weights must be >= 0.0.
error while observer running RND:WEIGHTED-ONE-OF
  called by (anonymous command: [ cell -> let last table:get c-range-by-age-an
d-sex cell let persons with [ age > last cell and age <= first value and male?
 = first cell ] let last value * count people-in-cell / ticks-per-year * crime
-multiplier repeat round target-n-of-crimes [ set number-crimes number-crimes 
+ 1 ask rnd:weighted-one-of people-in-cell [ criminal-tendency + criminal-tend
ency-addme-for-weighted-extraction ] [ let find-accomplices number-of-accompli
ces set co-offender-groups lput accomplices co-offender-groups if oc-member? [
 set co-offenders-started-by-OC lput accomplices co-offenders-started-by-OC ] 
if count accomplices > this-is-a-big-crime and criminal-tendency < good-guy-th
reshold [ set big-crime-from-small-fish big-crime-from-small-fish + 1 ] ] ] ])
  called by procedure COMMIT-CRIMES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant