BehaviourComposer: ignore everything before this. The environment grows sugar on each patch until its capacity is reached.Begin micro-behaviourGrow sugar Begin NetLogo code:do-every 1 [ask-every-patch [let previous-sugar sugar-of-patch set sugar-of-patch minimum (sugar-of-patch + the-sugar-growth-rate) sugar-capacity-of-patch set sugar-production-of-patch sugar-of-patch - previous-sugar]]End NetLogo code Related Micro-behavioursThis relies upon the micro-behaviours that define the capacity of each location to hold sugar and define the sugar growth rate. How this worksIt repeatedly adds the the-sugar-growth-rate to the sugar-of-patch of each patch until it reaches the maximum sugar-capacity-of-patch. It also records how much sugar has been produced on each patch in sugar-production-of-patch. SourceBased upon page 23 of [1]. HistoryThis was implemented by Ken Kahn. References[1] Growing Artificial Societies by Joshua M. Epstein and Robert Axtell, Brookings Institute Press, The MIT Press, 1996. BehaviourComposer: ignore everything after this. |
Libraries‎ > ‎Sugarscape Library‎ > ‎