Вопрос

I am currently trying to increase the value of an attribute belonging to every agent of the same breed. Every frame the attribute should increase by a pre-determined value, in this case 1.

ask breed [if attribute < max-value [set attribute attribute + 1]]

I have two agents of this breed in the model and they both change the attribute at the same pace i.e

tick0: 100 (100 is the starting value) tick1: 100 tick2: 101 tick3: 103 tick4: 106 tick5: 110 tick6: 121 tick7: 128

There seems to be a pattern here although I can't figure out why it's increasing the attribute rather than incrementing by 1. Anybody came across anything like this before?

Это было полезно?

Решение

Ah silly mistake. I was calling this through another agent whose population was increasing per frame!

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top