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
0
votes
1 answer

How to detect another agent that is located on the left or right side of the current agent and also in a patch set?

I am currently trying to divide an agent's vision into multiple areas from two in-cone rather than him perceiving with only one area from a radius. More concretely, what I am looking to achieve is to get : a cone in front of the agent and centered…
tinkyqal
  • 3
  • 2
0
votes
1 answer

NetLogo: How to make turtles (1) move to a patch with patch variable matching condition based on turtle variable and (2) take patch id as variable

I'm trying to do the following: Ask turtles (households here) to check whether there are any patches that have (1) is-home = true and (2) cost less than the household's money; Take as my-home the patch id of the first patch that meets these…
Abe
  • 393
  • 2
  • 13
0
votes
0 answers

Agent based modelling for covid with mesa python

before that I was a new user in python, I really didn't understand Python, especially in Mesa, while my final assignment was about agent based models for covid 19 in Python, any suggestions where I can start learning agent-based models really for…
0
votes
0 answers

schelling segregation model in shiny

I tried to run the Schelling segregation model in shiny. I got 3 inputes: number of houses, number of neighbors and alike_preference and sorting should be done within 1000 seconds. The problem is I don't get the output. Also, I put my renderTable()…
melaniii
  • 5
  • 2
0
votes
1 answer

How can I make it so agents only perform action during a certain time step in mesa (python)?

I'm trying to create an agent-based model using the mesa python framework. I want my agents to reproduce only on certain days of the year. Specifically, on days 203 through 209. Here is my model so far: import mesa import random #set up class for…
ifoxfoot
  • 195
  • 7
0
votes
1 answer

Dividing turtles with percentages and assign values according to their groups

I have a set of agents represented by turtles. I need to divide the turtles in group according to certain percentages. Then, I need to assign values for a turtle-owned variable (X) against the respective groups. Following is the code I developed…
0
votes
0 answers

NetLogo: How to change shape of a turtle if condition is true?

I want to make 2 turtles(a male and a female) get married. I have 2 different shapes for males and females in my simulation. If a female meets a male on the same patch, they get married. When they do, I want to bundle them as one unit (i.e. I want…
0
votes
0 answers

How to communicate variables between agent populations in AnyLogic?

I have two populations of agents (only one of which I want to control) and I want to program one agent's actions based on the distance to the agents in the other population. I can get the location of each agent in their own population by using…
Drew1
  • 1
0
votes
0 answers

Anylogic NullPointer Exception Process Modeling Blocks

I have created a very simple model in AnyLogic consisting of source, Service, sink and resourcepool blocks. The source is connected to service which is then connected to sink. The source block generates agents of type 1 and resourcepool has agent…
Shriram
  • 1
  • 1
0
votes
1 answer

How to place predefined number of agents to multiple regions in AnyLogic

Let say I have a shapefile uploaded in AnyLogic with multiple regions (region1, region2,...region5). I have an excel file with a column "No. of people" [10,15,20,30,15] for those 5 regions. How can I place those agents to the corresponding regions?…
0
votes
1 answer

Asking Agents if their memory contains a minumum Number of a certain value

Hey I am developing a model that should feature a relatively simple memory that updates with this procedure and puts a 1 every time the agent perceives there is something wrong with the environment through the following: ifelse fishpop <…
0
votes
1 answer

How to convert multiple small regions to one big region in AnyLogic

I am trying to create an agent based model. I have a GIS shapefile for a county that consists of 190 census tracts. I have uploaded the shapefile into AnyLogic and have 190 regions in Main>Presentation>level>map. Now Using first 15 regions (census…
0
votes
1 answer

The word function have a problem with decimal values

I'm having a problem with the following code.I would like to display the amount of money of people with the $ sign. In the interface there is a monitor that shows the actual money of an agent, but with the function word it shows to me all the…
0
votes
1 answer

Netlogo: How do I assign patches with one color to an agentset?

I have patches of yellow and blue color. I wanted to assign all patches with color blue to an agentset workspaces. This is what I tried. set patches with [pcolor = blue] workspaces However, I'm getting an error saying This isn't something you can…
0
votes
1 answer

Exporting a list of patches to a shapefile in NetLogo

I'm building an agent-based model in NetLogo where the agents walk to a target. I'm using the GIS Extension for NetLogo 6.3. At each tick they record the patch where they are currently standing on a list called "path". I want to include a button to…