What is a variable in NetLogo?
What is a variable in NetLogo?
Agent variables are places to store values (such as numbers) in an agent. Each turtle has its own value for every turtle variable. The same goes for patches and links. Some variables are built into NetLogo. For example, all turtles and links have a color variable, and all patches have a pcolor variable.
How do you plot turtles in NetLogo?
Create a plot by clicking the Add icon on the toolbar, selecting Plot next to it, and clicking on an open spot in the Interface. Change the name of the “default” pen to “turtles”. Enter plot count turtles under Pen Update Commands. Press the “Add Pen” button.
What is a reserved word in NetLogo?
patches-own, are reserved words in the Netlogo language. They can be any sequence of characters that follow Netlogo’s naming rules.
What are the variables for turtles in NetLogo?
Turtle, patch, and link variables are different. Each turtle has its own value for every turtle variable. The same goes for patches and links. Some variables are built into NetLogo. For example, all turtles and links have a color variable, and all patches have a pcolor variable.
What are values of global variables in NetLogo?
If a variable is a global variable, there is only one value for the variable, and every agent can access it. You can think of global variables as belonging to the observer. Turtle, patch, and link variables are different. Each turtle has its own value for every turtle variable.
What is the default who number for turtles?
By default who value starts with 0, the who number assigned to each turtles will never change unless clear-all or clear-turtles has been called, which creates new new turtles with new who numbers . You can set this variable with any number greater than or equal to 0.
Which is the variable that holds the color of a turtle?
The color variable holds the color of the turtle. This variable can be set to make the turtle change color. Color can be represented either as a single number or an RGB color (a list of 3 numbers). Turtles can be identified thru who variable. It holds the turtle’s “who number” or identification number.