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
1
vote
0 answers

Seed dispersal around a tree provokes an infinite loop?

I've just started a project in which I intend to simulate (among other things) the seed dispersal around trees (named zsps). Neighboring patches can already be settled or unable for seeding due to low fertility. I wrote code that runs (at the…
PatrickC
  • 9
  • 2
1
vote
1 answer

Netlogo Land-use change model: foreach list command

I have made a code for a land use change model but one part does not work properly. I'm not very experienced with Netlogo and and can't manage to find my mistake(s). problem: the foreach part will not work although I copied it from the NETLOGO…
Rdb
  • 21
  • 5
1
vote
2 answers

Two-dimensional Proportional Navigation in Netlogo

I am trying to implement a two-dimensional proportional navigation in Netlogo as it is defined by these formulas: where v_r is the difference in velocities, r is the line of sight and phi is the angle. Theta is supposed to be the change in line of…
1
vote
0 answers

Netlogo Landuse Change modeling creating iterations

I'm using netlogo for a school project. This is the first time that I'm using netlogo and I'm running into some problems. For example I want to calculate a patch "willingness to change" based on is they are with enough fellow patches according to a…
Rdb
  • 21
  • 5
1
vote
1 answer

Global lists in NetLogo?

I'm implementing a model in which I need a global list to store some music notes during the execution. At the end of the execution, I would like to iterate over the list in order to listen all the musical phrase. I guess I need to use a global list…
sergi martinez
  • 165
  • 1
  • 8
1
vote
1 answer

Netlogo: finding min variable of patches at certain radius of patch

I'm trying to estimate slopes between patches, so need to find the minimum value of a patch variable called Elevation from all patches that are at radius 4 from a specific patch. Here is the code: ask patch 27 35 [let x min-one-of patches in-radius…
Javier Sandoval
  • 507
  • 3
  • 18
1
vote
1 answer

Netlogo: input a probability through a slider

I want to input a probability value in the code through a slider. The name of the slider is lawful-industry with a value range from 0 to 1, so the code I wrote is: [let probs [["lawful" lawful-industry]["unlawful" 1 - lawful-industry]] but NetLogo…
Javier Sandoval
  • 507
  • 3
  • 18
1
vote
3 answers

Is there a way to create an enum in netlogo?

I have some netlogo code that I would like to make more descriptive. So instead of: MOVE-TO ONE-OF PATCHES WITH [ PCOLOR = BLUE ] It would say: MOVE-TO ONE-OF PATCHES WITH [ WATER ] In java I would create an enum to accomplish this. How can I do…
Gabriel Fair
  • 4,081
  • 5
  • 33
  • 54
1
vote
2 answers

How can I get child id of hatched turtle inside the ask turtle context?

I just started using netlogo and I'm trying to transition away from OOP, so I apologize if my coding paradigm is the source of my issue. Problem Inside an ask turtle procedure I have hatched a turtle. I want to create a link to the hatched turtle…
Gabriel Fair
  • 4,081
  • 5
  • 33
  • 54
1
vote
1 answer

How do I choose from an agent-set that depends on an attribute?

I have a model where the male turtles get classified according to a threshold as follows: ifelse(condition > threshold) [set status 0 ] [set status 1] I want to count the potential male mates of each of the females in the population who meet…
adkane
  • 1,429
  • 14
  • 29
1
vote
0 answers

Error in Tabonuco-Yagrumo-Hybrid Netlogo model?

I am working through how Netlogo's Tabonuco-Yagrumo-Hybrid model (http://ccl.northwestern.edu/netlogo/models/TabonucoYagrumoHybrid) integrates system dynamics and agent-based modelling. As I understand it, the model replaces the traditional 'flows'…
user_15
  • 151
  • 9
1
vote
1 answer

what are all the required steps to convert a NetLogo GUI model to run headless mode on a cluster?

Other than avoiding clear-all in headless mode, do we need to convert "all" the switches and sliders to global variables? what else should be done to run a large NetLogo model on a cluster without GUI? I have followed this…
Marzy
  • 1,884
  • 16
  • 24
1
vote
1 answer

looping instead of manual input of multiple initial numbers variable Netlogo

I have a variable (grass) where you set in an initial number of grass. I want to see the result for different initial numbers, such as 50, 100, 150, ...., 1000, but it is too troublesome to set it manually, then run one by one. Is there anyway where…
1
vote
2 answers

Accessing owned traits in netlogo with nested ask

This is what i want to do: patches-own[ trait1 trait2 trait3 ] let similarityCounter 0 ask one-of patches[ ask one-of neighbors[ **for-each trait[ if neighborTrait = patchTrait**[ set similarityCounter…
Haukland
  • 677
  • 8
  • 25
1
vote
1 answer

Table functions/interpolation in Netlogo

I am combining and rewriting some system dynamics models (i.e. stock-and-flow models) with agent based models in Netlogo. System dynamics models often include table functions for describing non-linear relationships. If we have two continuous…
user_15
  • 151
  • 9
1 2 3
99
100