

#REPORTER NETLOGO CODE#
Get the monitors showing what you want to export and then simply take the code that you ended up with and put it in the reporter box. You will get the output you requested.Ī good tip for working with BehaviorSpace when you are new to it, is to set up a monitor on your interface for each value that you want to save in your output. Run this with a BehaviourSpace setup that has of turtles as the reporter. Set consumption-rate quality / ( strength-of-competition * count turtles-here ) Set pcolor scale-color green quality 1 10Ĭreate-turtles 300 Here's a modified version of your code so that it is complete and self-contained. You need to specify whether it's that variable for all turtles, or only some turtles or whatever.
#REPORTER NETLOGO PATCH#
There is no problem in exporting a turtle or patch variable in BehaviorSpace, but you haven't told NetLogo which variable to export. Set consumption-rate ( of patch-here ) / ( strength-of-competition * count turtles-here ) Set pcolor scale-color green quality 1 10 ] Any advice or help? I also tried just typing in "consumption-rate" or "quality" in the "Measure runs using these reporters" box, but got an error saying I can't use a turtle or patch variable in an observer context, how can I make those into the observer context? Anyway around that? patches-own I am unsure of the format of code I would even begin to use to give me those exports. I took a shot into the blue and tried using primitives like "show consumption-rate" or "report consumption-rate". Am I able to export a turtle or patch variable there? If so, what code would I use? All the examples for this part of behavior space online just show "count turtles" or something similar. I also need to export a patches-own variable I created called quality for every patch in my model at each tick, and I have the same issue. For instance I mostly get an error that says "Experiment aborted due to syntax error: Expected reporter". For example, we cannot just write ticks in the code. NetLogo has some useful built-in reporters that cannot be changed directly such as ticks, pi, e, world-width, and world-height. From my understanding of behavior space, I would somehow put consumption-rate in the box that says "Measure runs using these reporters" in order for it to be exported, but I keep getting different errors every time I try. A reporter is a predefined procedure that returns a value and, unlike a command, cannot be a stand-alone code element. I want to export the consumption-rate of each turtle for every tick of my run. In my model, I created a turtles-own variable called consumption-rate. I am running my Netlogo model in behavior space.
