sum-of-patches-with pred-ilist ilist
Reports the total value of ilist when run over the turtles that statisfy pred-ilist . If there are no patches in which pred-ilist is true, reports 0. Example: sum-of-patches-with (pc = green or pc = blue) [density] returns the sum of the densities of all patches which are blue or green.
Related commands:
|