Simply two steps to code a multi-period recursive function in NetLogo:
- 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.
- Update the values of all input variables once the calculation completes. E.g. set Var Var + 1.
No comments:
Post a Comment