Questions tagged [agent-based-modeling]

Agent-based modeling is a computer simulation method where agents make decisions based on their interactions with each other and their environment. It combines elements of game theory, complex systems, emergence, computational sociology, multi-agent systems, and evolutionary programming.

From Wikipedia:

An agent-based model (ABM) (also sometimes related to the term multi-agent system or multi-agent simulation) is a class of computational models for simulating the actions and interactions of autonomous agents (both individual or collective entities such as organizations or groups) with a view to assessing their effects on the system as a whole. It combines elements of game theory, complex systems, emergence, computational sociology, multi-agent systems, and evolutionary programming. Monte Carlo Methods are used to introduce randomness. ABMs are also called individual-based models.

474 questions
1
vote
1 answer

Comparing values within lists

I'm new to stackoverflow but have a question regarding my model. My model consists of two breeds of agents (fishers and processors). Currently I have two fishers and two processors. Both breeds have a certain price-perception variable called:…
Tiddo14
  • 13
  • 2
1
vote
0 answers

Agent based modeling for rebellion under information censorship, interface is opened but can't running

I am using the "mesa" library of Python to define an agent based model simulate rebellion action under censorship enviroment. Right now the model is built and successfully shown in interface, but unfortunately agents in my model can not move. I…
1
vote
1 answer

How to make a turtle run through a particular line

I am creating an urban environment that is robust from interruption for my university project. The problem I am facing is that I am not sure how to make each turtle follow a specific network line. The black line represents the electricity cable and…
BigM
  • 11
  • 3
1
vote
1 answer

When trying to move to nearest breed, what causes the "Nobody" error?

I built a model of a tiger eating wolves. When the tiger's energy is greater than half of the sum of wolves' energy, the tiger would find the wolf closest to it, eat it and gain energy. So I wrote: to tigers-feed ask tigers [ let WE-sum sum…
yy w
  • 65
  • 7
1
vote
0 answers

NetLogo: link an agent to another, ask things to the agent and other things to the linked agent

I'm working on extending NetLogo Robotic Factory with a mechanism where there can be only one robot per machine and where the machine takes several ticks to perform the task. To model this, I'm creating a link between the robot and the machine. And…
Xiiryo
  • 3,021
  • 5
  • 31
  • 48
1
vote
1 answer

How to ask links or turtles or variables that are formed at a certain time?

Thank you for the help you provide on the community. So I am trying to create links between agents that come within a radius of 1 of each other. If the turtles do not come within a radius of 1 of each other for 16 ticks, the link automatically dies.…
DailyReader
  • 43
  • 1
  • 8
1
vote
1 answer

How to plot a cumulative sum (running total) of a turtles-own variable in Netlogo?

I can plot the sum of worms per animal using the code below (visualized in Figure 1). plot sum [worm-number] of animals Figure 1. I want my graph to be cumulative however like Figure 2 but I don't know how to code this. Previous examples use older…
1
vote
1 answer

What is causing my patches to cover my turtles?

I have been following the tutorial listed here Netlogo tutorial pt3 In the section "Patches and variables" I simply do not observe the image shown when I followed the steps exactly. Instead, I can only see a green cube with my agents seemingly…
Ian Gibblet
  • 552
  • 3
  • 18
1
vote
1 answer

How to link turtles of different agentsets in Netlogo

Hi I'm new to NetLogo and would appreciate your assistance in creating links between agents. I've already written this code and it doesn't create links for some reason but does not indicate an error either. I want to randomly assign links between…
1
vote
2 answers

Agent-Based and Individual-Based Modeling (Railsback & Grimm, 2019) Chapter 5 Butterfly Hilltopping Exercise

I have been working on the butterfly hilltopping exercise but the corridor width value that I get is different from the one published in the book (p.68 Fig. 5.2). The book states: If you did everything right, you should obtain a corridor width of…
raurackl
  • 9
  • 4
1
vote
1 answer

How does agent death surely affect the `while` loop that the agent is running?

As the following test illustrates, if a turtle is running a while when it dies, this breaks out of the while (without any error). Is this behavior guaranteed by NetLogo? to test ca let age 0 crt 1 ask turtle 0 [ while [true] [ …
Alan
  • 9,410
  • 15
  • 20
1
vote
1 answer

How to simulate a pickup process happening in the parking lot in AnyLogic?

I am modeling a warehouse yard where trucks arrive, get loaded/offloaded and leave the site. The complexity arises when modeling the drop trailers. Those vehicles consist of two parts: tractor and trailer. Tractor and trailer enter the yard as one…
Yashar Ahmadov
  • 1,616
  • 2
  • 10
  • 21
1
vote
2 answers

Allow only a fixed number of agents to pass through a queue block periodically in Anylogic

I am using a Queue and hold block together, where the hold remains blocked until all the agents arrive at the Queue block. How to change it and want to allow only a fixed number of agents (say 5 agents) at fixed intervals of time(say every 3…
1
vote
3 answers

Change priority rule of a Queue block at runtime in Anylogic

I am trying to implement reinforcement learning in Anylogic using pathmind library, the RL agent can take either of two actions which is changing the priority rule of a Queue block. I have a Queue block where I'm using priority-based queueing. I…
1
vote
1 answer

Netlogo: How to set different colors to turtles?

A quick question: How to set every turtles different colors? Like, I'd to set the random color whose value ends in *6 or *3 to turtles. My code: ask turtles [set color ((random 14) * 10 + 6 ) or ((random 14) * 10 + 3 ))] But it doesn't work. Since…
Giorgio
  • 13
  • 2