

Check what it does (this takes some time!) and run it a few times. Type “Virus” in the search box below to find the Netlogo program “ogo” in the biology section (not in the network section). Open Netlogo, and press to open the models library. In this example, we will add an experiment to an existing Netlogo program, run this experiment, process the results in R, and make a nice plot.

Of course the “do interesting thing with my_data” part needs further clarification, so here is an elaborated example. I have assumed that you have installed R and Rscript is in your path. RĪ typical R script to process the table above looks like the following: The present table may then be further processed by R. The run numbers do not monotonically increase because runs excute in parallel (at least when you ask for it). run 2 stopped at step 1000, and the values of the input and outputvariables are 94, 43, and 3.3132, respectively. Line 7 contains the header of this table: run number surrounded by brackets because it is system provided information, step number (also system provided information), two input variables “independent-1” and “independent-2” and one output variable “dependent”. Line 7 and further represent the actual table of experiment results. The first 6 lines (line 6 is "0","11","0","11") are not interesting for statistical processing. Let me explain the structure of this table somewhat. "min-pxcor","max-pxcor","min-pycor","max-pycor" After the experiment has ended, my_results.csv might look like this: csv (comma separated value) to store the table in. Then, Netlogo asks you to come up with a file name that ends in. Since I always use table output for further statistical processing, I un-tick “spreadsheet output” (for efficiency) and tick “table output” (for results). By default, “spreadsheet output” is ticked and “table output” is not ticked.
#NETLOGO BEHAVIOR SPACE HOW TO#
When you ask BehaviorSpace to execute an experiment, BehaviorSpace asks you how to save its output.
#NETLOGO BEHAVIOR SPACE MANUAL#
Further explanation on Netlogo's BehaviorSpace can best be taken from Netlogo's manual itself. In doing so the different program instantiations run parallel on all CPU cores and no output is visible. This collection of runs is the result of asking Netlogo to run your program with different parameter settings. Netlogo's BehaviorSpace is an empty suite that can be filled with experiments. To begin with, Netlogo faciliates the organisation of experiments by means of something that is called BehaviorSpace. R has a steep learning curve, which probably explains why there is plenty of secondary literature out there to help out end-users.Īlthough Netlogo and R come from different cultures they can be made to work together in a very productive way.

It is a tool made by, and made for, academic researchers.
#NETLOGO BEHAVIOR SPACE SOFTWARE#
