nw:generate-wheel
nw:generate-wheel turtle-breed link-breed num-nodes optional-command-block
Variants:
nw:generate-wheel-inward
nw:generate-wheel-outward
Generates a wheel network, which is basically a ring network with an additional “central” turtle that is connected to every other turtle.
The number of nodes must be at least four.
The nw:generate-wheel
only works with undirected link breeds. The nw:generate-wheel-inward
and nw:generate-wheel-outward
versions only work with directed link-breed. The inward
and outward
part of the primitive names refer to the direction that the “spokes” of the wheel point to relative to the central turtle.
If you specify an optional-command-block, it is executed for each turtle in the newly created network. For example:
nw:generate-wheel turtles links 100 [ set color red ]
Take me to the full Networks Extension Dictionary