Questions tagged [netlogo]

NetLogo is an agent-based programming language and integrated modeling environment. NetLogo is free and open source software, under a GPL license. Commercial licenses are also available. It is written in Scala and Java and runs on the Java Virtual Machine.

NetLogo is a multi-agent programmable modeling environment. It is used by tens of thousands of students, teachers and researchers worldwide. It also powers HubNet participatory simulations. It is authored by Uri Wilensky and developed at the CCL. It is free and open source.

4110 questions
7
votes
2 answers

Including a Netlogo source file into another

How can I include the procedures from one Netlogo file into another? Basically, I want to separate the code of a genetic algorithm from my (quite complicated) fitness function, but, obviously, I want the fitness reporter, which will reside in…
CamilB
  • 1,377
  • 1
  • 12
  • 27
7
votes
2 answers

How do you generate a histogram in NetLogo?

I have a breed called players. Each player-owns a player-strategy. There are 6 possible player-strategies. When I write histogram [player-strategy] of players nothing appears on my plot. I have one plot with one pen -- and don't set either the…
RussAbbott
  • 2,660
  • 4
  • 24
  • 37
7
votes
1 answer

How to compare two lists in Netlogo?

I have two breeds, buyers and suppliers, and buyers are building a list (sup_list) of suppliers that have attributes stored in list 'att' that are greater than a list of criteria stored in list 'b'. The following line does this for the first…
ThomasC
  • 861
  • 6
  • 12
7
votes
1 answer

Report Distance Between Two Turtles

I have a model with two turtles, and the measurement of interest is the distance between them. I'd like to create a reporter that can be plotted that says simply that: the distance between the turtles. Can someone please help? I'm sure this is a…
Alex Vornsand
  • 83
  • 1
  • 5
7
votes
2 answers

Netlogo: Assign variable using probabilities

How to assign a string or integer variable to turtle, using probabilities of the variables in a group/list? For example it is 0.4 probability that one specific variable is used from specific group/list. The function selects randomly the variable…
Nety
  • 129
  • 1
  • 8
7
votes
2 answers

Enlarge NetLogo (menus, fonts) to fit high screen resolution

for NetLogo 5.3.1 on linux/Gnome: my screen has a 2550 * 1440 resolution and makes NetLogo almost unreadable. I know that during a running session, I can increase the font size in the editor. But where can I configure NetLogo to always start with a…
lionfather
  • 69
  • 4
7
votes
1 answer

Is there something similar to contains in netlogo

Im trying to do an if statement with an condition that if the string contains a certain word like bellow if(phrase) = "word") Any ideas?
KayKoder
  • 75
  • 4
6
votes
3 answers

NetLogo - How to show the current coordinates of a turtle

I have been trying for quite some time to show the current coordinates of a turtle in NetLogo. I'm aware that to show one of the coordinates, I could use: show [xcor] of turtle 0 or show [ycor] of turtle 0 But how do I show both coordinates?…
aHaH
  • 223
  • 2
  • 6
  • 16
6
votes
2 answers

Netlogo how to add a legend?

I started to use netlogo and I would like to add a legend to the model. I didn't found any way to do it. Is there some standard way to do it? I thought about adding image to the interface but I didn't find any way to do it. For example I want that…
arn
  • 103
  • 6
6
votes
1 answer

Can NetLogo handle millions of agents?

For a project we need to decide between NetLogo and RepastS. We will model a network of institutions with people moving between them. People enter and exit these institutions that are implemented as black boxes. We see no problem using NetLogo for…
Rainer
  • 73
  • 2
6
votes
1 answer

Why was NetLogo implemented in a mixture of Java and Scala?

Why was NetLogo implemented in a mixture of Java and Scala? Was it because of better support for concurrency? I am not familiar with Scala, but I think the functional programming style is better suited for expressing guarantees for concurrent…
knb
  • 9,138
  • 4
  • 58
  • 85
6
votes
4 answers

NetLogo: 1 tick = how many seconds?

How many ticks in a NetLogo simulation (at normal speed) are equal to 1 'real world' second?
user399466
  • 117
  • 4
  • 10
6
votes
1 answer

Installing NetLogo in Linux

I have been trying to install NetLogo under my Ubuntu setup. I have downloaded the latest NetLogo 5.3 files and have extracted them. I placed the files in the /opt/netlogo-5.3.0/ directory. I then proceeded to create a symbolic link to the NetLogo…
csstudent
  • 107
  • 2
  • 6
6
votes
2 answers

Creating color brewer and obtaining its average value

I am trying to assign a color brewer to my turtles in 2 different boxes each time they hatch and find the mean color of the turtles in each hatch. I could have easily done it with the pallet extension but it hasn't been updated for Netlogo 5.1 and…
Sahar
  • 169
  • 2
6
votes
8 answers

Getting R to use newer versions of java

This question is related to this other question. I am trying to use RNetLogo with R and get the following error. nl.path <- "/Applications/NetLogo 5.1.0" NLStart(nl.path) Error in .jnew("nlcon/Preprocess") : …