Más cerca a distancia pasos con =

From StarLogo Nova Wiki
This page is a translated version of the page Nearest Within Steps With = and the translation is 67% complete.
Other languages:
Nearest within steps with =

[▼] más cerca a distancia [_] pasos con [▼] = [_] es un bloque de código parte de Detección cajón.

nearest [▼] within [_] steps with [▼] = [_] is a code block part of the Detection drawer.

Uso

contra [▼] en [_] pasos se utiliza para proporcionar el número de agentes de una raza seleccionada que existen dentro de un determinado step límite en Spaceland.

Sintaxis

The Create Each Do Block

Entradas:

  1. una raza del primer menú desplegable
  2. un número


Example

Nearest Within Steps With = example gif
Nearest Within Steps With = example code

This is a model of a grazing herd of hungry elephants. In this model, there are two species of grass (blue and red). The elephants prefer blue glass but do not mind red grass. Because the elephants want to eat as much bue grass as possible, they walk toward the blue grass that is closest to them within their sensing radius (while eating red grass if they happen across it on the way). Toward the end of the simulation, you can observe that there is plenty of leftover red grass.

Usos comunes

Para tener en cuenta

Bloques relacionados