NetLogo - Sandpile - Error -


i chasing tail piece if code. having rectified 1 error (with of stakoverflow) another. error reports "task expected 1 input, reporter or task command" , highlights word "task". not sure if brackets?

;; density of patches set random value set using variable init-errors on interface. ;; every patch uses task reports random value. ;; random value set using variable error-count on interface setup-random    ask patches [      if (random-float 100.0) < init-errors         [ setup task ] [ random error-count ] 

i think want setup task [ random error-count ], you're passing reporter block [ random error-count ] task. whole thing like:

to setup-random    ask patches [      if (random-float 100.0) < init-errors         [ setup task [ random error-count ] ] 

the above assumed setup procedure runnable patches. if modification of sandpile model in models library, want:

to setup-random    setup task [      ifelse-value (random-float 100.0 < init-errors) [        random error-count      ] [        0 ;; or whatever want non-"error" patches get.      ]    ] 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -