cortore.blogg.se

Netlogo extensions
Netlogo extensions











netlogo extensions
  1. NETLOGO EXTENSIONS INSTALL
  2. NETLOGO EXTENSIONS CODE

If you haven’t used any extensions for NetLogo, it’s worth having a look at the NetLogo user manual.Ģ) Add some code to the setup procedure which will clear any existing data in R and send any plot commands to a separate window. Mind that this code will not work if the R extension is not installed correctly (most likely, NetLogo will simply close when you try to run it or check it). This will connect the model to the R extension. What we want to do in this example is collect some information about the population and send it to R for plotting.ġ) Add the code this to the top of the code page. Agents in this model determine how happy they are based on a preference for neighbors of a similar type, and will try to move elsewhere if they are unhappy. With the R-extension properly installed, let’s try and add it to some existing models in the NetLogo library.įirst we’ll use NetLogo’s Segregation Model, which is based on Thomas Schelling’s famous model of segregation. If you want to be using R to plot from NetLogo, you’ll need to have the JavaGD package installed as well. Basically, the things to watch out for are making sure that your environmental variables are set up correctly, and making sure that the Java and R you’re running are the same version ( 32 vs 64 bit). Step-by-step instructions are included in the download. Installing the extension is not as simple as dropping the files into the extension folder, but it’s worth the trouble.

NETLOGO EXTENSIONS INSTALL

I heartily recommend this online course (if you can’t wait for the course to start, you can watch the videos on YouTube here).įirst things first, you’ll need to have NetLogo installed, and download and install the extension.

netlogo extensions

If you don’t have familiarity with R but wish you did, check out the resources on our tutorials page. Thiele and Volker Grimm, the extension allows you to connect NetLogo directly to the beloved stats package, R. Have you been working on NetLogo models, but wish you could be making prettier plots? Wish you could be doing data analysis on the fly? Have mathematical calculations that are tripping up your code? Stef’s post the other day on the R turtle graphics reminded me about a tool I use all the time: the R-extension for NetLogo. Put together by Jan C.













Netlogo extensions