min-of-patches-with
[condition] [list of commands]
Parameters:
[condition] |
List of commands |
list of commands that evaluate to true or false |
[list of commands] |
List of commands |
list of commands to that evaluate to a number |
Description:
Reports the lowest value of [list of commands] when run over the turtles that satisfy [condition]. If there are no patches in which [condition] is true, reports maxnum, the largest number possible without going into positive infinity.
Examples:
min-of-patches-with [color = red] [food]
reports the smallest value of the patch variable food for red patches.
Notes:
Note: If [list of commands] contains no numbers, the greatest possible number is returned. If some of the [list of commands], when evaluated, are not numbers, those values are ignored.
Related Commands:
average-of-patches-with
max-of-patches-with
median-of-patches-with
min-of-patches
min-of-patches-with
mode-of-patches-with
sdev-of-patches-with
sum-of-patches-with
variance-of-patches-with