

If the sheep is on a patch of grass, eat it. The use of the != did account for your increase by 11 (10 and 1) because it was always not on either of the patches. clear-all is a NetLogo command that clears up everything ready for us to.

Your original code with your != though inverted that, giving +10 for fries and +1 for burger. This makes it possible to explore the connection between: Slideshow 2628255 by. Modelers can give instructions to hundreds or thousands of independent ' agents ' all operating in parallel. Some other commands and reporters, such as set, can be run by different agent types. The above code increments weight by 1 for fries and by 10 for a burger. NetLogo is a programmable modeling environment for simulating complex systems. fd, on the other hand, can only be run by turtles. I was confused by your use of the != and what type of food you thought the turtle was on. That will make it super clear where the food variable is coming from. While the line if food = "Fries" will work I would recommend using the patch-here in an if statement with the name of the patch variable in brackets like this: to increase-weight "Fries" and "fries" are not exactly equal. The Major issue was the differences in strings.
