Pages

Thursday 19 September 2013

How to Code Recursive Functions in NetLogo


Simply two steps to code a multi-period recursive function in NetLogo: 
  1. Set up the initial value of the input variable (which is used to calculate a value in later periods) in advance of coding the function. You can never obtain the initial value within the function. E.g., set Var 0.
  2. Update the values of all input variables once the calculation completes. E.g. set Var Var + 1.

No comments:

Post a Comment