Libraries‎ > ‎Sugarscape Library‎ > ‎

Grow sugar

BehaviourComposer: ignore everything before this.

The environment grows sugar on each patch until its capacity is reached.

Begin micro-behaviour

Grow sugar

Begin NetLogo code:
do-every 1
       [let previous-sugar sugar-of-patch 
        set sugar-of-patch minimum (sugar-of-patch + the-sugar-growth-rate)
        set sugar-production-of-patch sugar-of-patch - previous-sugar]]
End NetLogo code

Related Micro-behaviours

This relies upon the micro-behaviours that define the capacity of each location to hold sugar and define the sugar growth rate.

How this works

It 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.


Based upon page 23 of [1].


This was implemented by Ken Kahn.


[1] Growing Artificial Societies by Joshua M. Epstein and Robert Axtell, Brookings Institute Press, The MIT Press, 1996.

BehaviourComposer: ignore everything after this.