Observer Command
nsum variable1 variable2

For each patch, takes the sum of variable1 from all neighboring patches and places it in variable2. Variable should be a patch variable. Note: nsum must be run by the observer, even though it affects patches.

Examples:

nsum food surrounding-food takes the food variable of all the surrounding patches and stores the value of their sum in the patch-variable surrounding-food.

Related commands:
nsum4 diffuse