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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
38 views

Extracting values from lists in Netlogo

I have a model where patches have the value of "habitat" and I have a csv file of animal selection ratios. The goal is that I want each agent to survey the habitats within their next step to ...
Kilian Murphy's user avatar
0 votes
1 answer
27 views

Quantifying/converting abstract values to standard units in Netlogo simulations

I'm working on a simulation project in NetLogo and have encountered a challenge regarding the quantification of certain values. Specifically, I'm trying to understand how to effectively convert ...
Miles Jarra Gloekler's user avatar
-2 votes
0 answers
19 views

Validating Modifications to NetLogo Simulation for Muscle Development Model

I'm working on a NetLogo model for simulating muscle development and have recently made three specific alterations to the code. I'd like to validate if these changes are correctly implemented and if ...
Miles Jarra Gloekler's user avatar
-1 votes
0 answers
39 views

Modifying NetLogo muscle development simulator for 3-day workout, 1-day rest cycle

I'm working with the NetLogo muscle development simulator, which is part of the NetLogo library of simulations. My goal is to modify this simulator to reflect a common workout routine: 3 days of ...
Miles Jarra Gloekler's user avatar
0 votes
0 answers
17 views

Runnning NetLogo Mode from Python Throws RuntimeException

I am trying to connect NetLogo from Python. I am following the official pyNetLogo documentation. Here is my code. import pynetlogo netlogo = pynetlogo.NetLogoLink( gui=True, ...
Protik Nag's user avatar
0 votes
1 answer
26 views

how does 'netlogo' 's 'any? turtles-on patch-ahead 1' command work?

I'm trying to get my turtles to turn away when there is a turtle in the patch ahead of them. I have some code to setup clear-all reset-ticks ;random-seed 13 let xcord one-of (list min-pxcor ...
ifoxfoot's user avatar
  • 229
1 vote
1 answer
28 views

How can I fix the [distance myself] to work properly in NetLogo?

I want an agent breed mate to move towards a ball by itself. But this does not seem to be working. I think this may have to be with the label myself not being applicable to the breed but I am unsure. ...
Jonathan's user avatar
1 vote
0 answers
14 views

How to make turtles/people following a schedule in netlogo?

So I am making a code that simulates the demand in a city. I am trying to have people move from home to work based on the probability of them leaving at that time. And if they don't move at the hour ...
Phoebe Bloomfield's user avatar
0 votes
2 answers
30 views

How to make turtles gradually grow in size as they age?

I am working on an ecosystem model that consists of fish, sharks, and plankton. The fish eat the plankton for energy and the sharks eat the fish. However, I need the sharks and fish to grow in size as ...
abyssalstyx's user avatar
-1 votes
1 answer
32 views

Can I calculate the sum of two sliders?

I would like to calculate a sum based on values from two sliders that the user sets. This sum is then used to calculate another sum. Can I read the values of two sliders into a procedure, take the sum ...
SocSciStat's user avatar
0 votes
1 answer
25 views

Netlogo error message "people-movement in a observer context because people-movement is turtle only."

I keep getting this error message for fro my people-movemnt. I looked at my code which is trying to create water demand in a city. I couldn't figure out how to fix the code. I am trying to copy how ...
Phoebe Bloomfield's user avatar
0 votes
1 answer
27 views

Make turtles stop after crossing 5 patches in Netlogo?

I am quite new to netlogo modelling and got stuck on some part of my code. The idea itself is quite easy, but I do not know how to transfer it into coding. Maybe you can help, thanks a lot 😊! So, ...
sledgehammer's user avatar
0 votes
0 answers
32 views

Netlogo: How to create a diffuse function without the diffuse primitive?

I am a beginner using Netlogo, creating a model for principles in a biological space. I am struggling to "control" the diffuse primitive. By control, I don't necessarily mean they need to ...
Abigail J's user avatar
0 votes
0 answers
15 views

How do you parse json response in Netlogo

Im trying to connect from NetLogo to Knime(Machine Learning Platform) that provides prediction probabilities for the turtle variables that are passed via a REST from NetLogo. So communication is two ...
KaM's user avatar
  • 13
1 vote
3 answers
49 views

How can I get turtles to turn around at edge of world and avoid each other without getting stuck between the two commands?

I am using netlogo to simulate turtles randomly walking around, searching for something. I have two rules: I want turtles to turn around when they get to the edge of the world (or just turn slightly ...
ifoxfoot's user avatar
  • 229
0 votes
1 answer
64 views

How to choose only one of the item to run from a list?

I am working on a model to simulate the development model. Now, there is a tricky problem returned in my codes: to develop grow-population ask patches with [pcolor = grey][ask neighbors [set potential ...
user22570245's user avatar
0 votes
1 answer
23 views

NETLOGO - Agents draw random value from .csv

I have a csv called "Males.csv" with three columns "turning_angles" "speed" "step_length" I have created a very simple model of agents in a blank environment ...
Kilian Murphy's user avatar
0 votes
1 answer
37 views

Netlogo: I want a human (turtle) to walk to a weed (turtle) and then show in console that the human reached the weed and then do nothing

I want a human to walk to a weed and then show in console that it reached the weed and then stop. Whenever I initiate the model a human walks to a weed and shows that it reached the weed but then ...
Yolom's user avatar
  • 23
0 votes
0 answers
21 views

NetLogo code to move agents towards a goal using extension GIS and NW

My code is already running correctly to move the agents from node to node. However I want them to move towards "safe_area" when I press the "Evacuate Button". I am dealing with ...
Programmer_UniOl's user avatar
0 votes
0 answers
46 views

How to write an algorithm for a turtle to destroy patches in a specific pattern

I need a loop or "algorithm" that will make the turtle turn all of the green patches in this pattern to black patches. Aka "eating them". the pattern that the turtle must follow ...
abyssalstyx's user avatar
0 votes
0 answers
32 views

Testing stochasticity of Business Investor model in netlogo

I am working on the Business Investor model on netlogo. The question asks to use the attached frequencies (Frequency) as probabilities of investors choosing each decision alternative to show how often ...
user22570245's user avatar
1 vote
1 answer
19 views

NOT expected input to be a number but got the TRUE/FALSE true instead

I have written NetLogo code to make turtles change their decision process each run. But I got the message: NOT expected input to be a number but got the TRUE/FALSE true instead I am new to NetLogo, ...
user161089's user avatar
0 votes
1 answer
44 views

Mousetrap time trigger and time counting

I am working on mousetrap model using the primitives in Netlogo, to simulate the trap triggered(pop) and pcolor changed with considering ticks (time). There is a similar model in Netlogo library, code ...
user22570245's user avatar
-1 votes
1 answer
35 views

How to ask turtles to average the opinions of other turtles with a matching variable?

I'm trying to ask turtles in my NetLogo model to average other turtles' variables and save that average to a new variable. When I try to run my code setup, I get the following error: MEAN expected ...
Abe's user avatar
  • 391
0 votes
1 answer
29 views

Measuring variables for each turtle using BehaviorSearch

I am trying to use BehaviorSearch to get the changes in colour and size of every turtle in my model. So, I would like to obtain a table or csv output which includes the id, colour and size of turtles ...
Pol's user avatar
  • 161
0 votes
1 answer
38 views

How to flock turtles within vision distance and heading degrees?

I set a vision parameter in the interface as a slide, suppose vision was set as 5. Now, I want to set turtles flocking behavior within the vision distance, but also taking into account of within less ...
user22570245's user avatar
2 votes
1 answer
27 views

How can I save the distance between the two closest turtles as a variable for each turtles individually?

This is my code in netlogo: set distance [min-one-of turtles[distance myself]] I was expecting it to calculate the distance between the turtle executing the code and the nearest turtle and then ...
Yolom's user avatar
  • 23
2 votes
1 answer
37 views

How to ask turtles to link with their link-neighbor's neighbor?

For example: Turtle 1 have link-neighbors [2, 3] and Turtle 2 have link-neighbors [1, 3, 4]. I want Turtle 1 to create link with one of Turtle 2's link-neighbors, but don't want Turtle 1 to create a ...
Greenhill's user avatar
  • 135
0 votes
1 answer
40 views

How to let an agent identify another agent it is linked with and access its attributes

I am working on a private transport model where a vehicle owner hires a vehicle and the driver (operator) brings back the hire fee in the evening and receives a commission. I am having problems ...
Aruho's user avatar
  • 1
3 votes
2 answers
48 views

How to assign a dynamic memory to a turtle about its movements to a set of patches/agents in Netlogo?

I have two breeds buyers and sellers. (1) Each buyer will look for the closest seller and go there. (2) Buyer will do a transact and then look for next nearest seller and go there and so on. I tried ...
Jack's user avatar
  • 31
0 votes
0 answers
23 views

Netlogo Export World as ACII file

Can I export the final view of my map as a file that i can then input on a GIS software? The export section on the basic netlogo manual wasnt useful
bksnlow's user avatar
  • 111
1 vote
1 answer
21 views

Importing an existing movement data in a Netlogo network simulation

In my ABM model, I generate a network where agents (walkers breed) move from one node to another linked node. In my current code below derived from the examples in Netlogo, the walkers can only move ...
Yerrold's user avatar
  • 11
1 vote
1 answer
31 views

How do I weight movement options for agents in Netlogo?

I am trying to create a model that simulates agents moving from an origin point to an end point across a calorie surface imported from GIS. The calorie surface shows the relative difficulty of ...
Christopher Peske's user avatar
0 votes
1 answer
26 views

Netlogo How to store transfomed patches

I want to know if there is a quick way to know when a turtle is near a patch with certain characteristics and It changes it. I have some farmers, patches with agriculture and patches protected areas. ...
bksnlow's user avatar
  • 111
0 votes
0 answers
13 views

How do I loop through and import the images of a certain digit from the MNIST database in Netlogo?

In Netlogo, I would like to loop through and import all MNIST images of a particular digit one by one, having the turtles do some processing within every loop. The closest I came to doing this is ...
Joebevo's user avatar
  • 165
0 votes
0 answers
16 views

How long does it take for the slime mold network model from netlogo to finish finding the shortest path?

I am trying to simulate the behavior of the slime mold Physarum Polycephalum using Netlogos slime mold network model. I have let the model run for 6 hours in hopes of finding the shortest path but it ...
Talal Tariq's user avatar
1 vote
1 answer
77 views

How to turn turtle back and remain on the exact same track?

I want to turn turtle back to the start point but remain on the same track back, I followed these codes: turtles-own [path] to setup ca crt 1 [ set color red set path (list patch-here) pd ...
user22567873's user avatar
0 votes
1 answer
27 views

Move turtles random steps forward

I'm currently starting to learn NetLogo, and I'm trying to make four turtles race from the ground's top to the bottom. I'm trying to use a while command, and the check does not detect any issues. ...
Juan Diego Valderrama's user avatar
0 votes
1 answer
53 views

Optimizing police unit placement for fastest travel time in NetLogo model

I'm working on a NetLogo model that simulates police units patrolling in different beats. I'm trying to find the best relocation points for police units within their respective beats such that the sum ...
DeMelkbroer's user avatar
0 votes
2 answers
41 views

Netlogo Ask in-radius of a colored patch

I've seen some posts and I haven't gotten what I wanted. I believe it's pretty simple. I want my turtles to be in- radius 10 from a patch colored violet, However, I don't know how to ask both things ...
bksnlow's user avatar
  • 111
0 votes
0 answers
31 views

Issue with Calculating Perpendicular Distance in NetLogo

I'm working on a NetLogo model where I'm trying to connect new "call" turtles to the closest edge defined by two "node" turtles in a network. To achieve this, I'm using the ...
DeMelkbroer's user avatar
1 vote
1 answer
36 views

Convert string turtle-attribute to list in Netlogo

I have turtles with attributes (names, roles, duration) that look like this: names "LE1123, LE1345, LE5366, LE9998" roles "farmer, agent, priest, boxer" duration "...
DeMelkbroer's user avatar
1 vote
1 answer
50 views

I need to put netlogo turtles into a row

In netlogo I need to put an agent set of turtles in a row on a given row of patches What I came up with was (foreach sort-by [ [ t1 t2 ] -> [skill] of t1 > [skill] of t2 ] row-turtles (range ...
Snark's user avatar
  • 1,654
0 votes
1 answer
37 views

Best way to pair turtles in netlogo

I need to link every turtle to exactly 1 if possible (effectively have every turtle play a 2 player game round, so each link is a game with 2 players - but players can only play 1 game per tick or ...
Snark's user avatar
  • 1,654
0 votes
1 answer
34 views

Netlogo error message: you can't use tick in a turtle context because tick is observer only?

I am trying to write a model where a hunter goes out to a specific target, has a certain probability of actually killing the target animal, and if they do kill the animal then a certain amount of ...
Shelby Patrick's user avatar
-2 votes
1 answer
31 views

How to generate random between 0 and 1 in Netlogo with uniform distribution [closed]

I am trying to do some testing and stumble across the problem that (random 2 = 0) does always give me much more 0 than 1s, even though it is supposed to be uniform distribution. Any ideas?
rainbow's user avatar
1 vote
1 answer
43 views

How do I avoid the error: "Expected a literal value"?

I want to create a scenario where the probability for a certain event to happen increases every time the event happened. I wanted to define a local variable for this but the error: "Expected ...
Chiara Epifanio's user avatar
0 votes
0 answers
49 views

Assing item values to breeds using matrix .csv

I have a csv file with a matrix of cost transportation that looks like this on csv: enter image description here I have three breeds with the same name than the matrix data and I would like to assign ...
Verwelken's user avatar
0 votes
1 answer
33 views

Why is the model progressively getting slower?

I have this code were one agent searches for forests to destroy them, while the other agent looks for grass that is empty meaning that there is no other agents. The code works, however every tick it ...
bksnlow's user avatar
  • 111
1 vote
1 answer
30 views

How to add a random variable between a to z to a turtles-own

Is it possible to assign a random letter between a and z to a turtles-own? I know how to assign a random number but not a random letter. My goal is to have each letter represent a breed and when two ...
Dennis Venter's user avatar

1
2 3 4 5
83