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
2 answers

Anylogic, finding agents in a given radius

I have agents in a grid and for any arbitrary agent I want to somehow define a radius r and find all the other agents in that area given r. Is this possible, is there any implemented method for that in AnyLogic?
Inocenciaa
  • 113
  • 2
0
votes
1 answer

track agent movement in anylogic

I am running a pedestrian simulation in Anylogic and want greater granularity in the agent position information that I get at the end of my model. Currently, I have it set up to show a heat map of traffic density, but I would like to trace the…
0
votes
2 answers

error applying an age distribution from csv file

I just discovered an error in my model where I create a population with a household-size distribution and dependent age distribution. My problem is that my procedure doesn't seem to assign the probabilities for each outcome correctly when deciding…
Johanna
  • 11
  • 4
0
votes
1 answer

Accessing parameter and variable from a given agent onto Main

Trying to visualize the value of a variable and a parameter in a time plot from the agent "SteelMill" onto the "Main" Agent. Cannot seem to access it through the SteelMill agent itself, and both the variable and parameter is both public. Any…
Telso
  • 131
  • 8
0
votes
2 answers

distance expected input to be an agent but got nobody instead

An error occurs in NetLogo with the code below. What I would like to do is for each turtle to check the nearest turtle and calculate the distance between myself (turtle) and its nearest turtle. If the distance is below 8, the turtle is unsatisfied…
loet23
  • 21
  • 2
0
votes
1 answer

What code can make the lower bounds of turtle and patch variables stay above zero?

Egg number variable goes into minus figures Turtles-own and patches-own variables continue to dive into minus numbers despite the codes attempted below. Attempt 1: This code placed immediately after defining Patches-own and Turtles-own variables. to…
0
votes
0 answers

Reproduction Number (R0) of Agent Based Simulation (NetLogo) for COVID19 spread

I am trying to calculate R0 of a model similar to "VIRUS" model in the Netlogo models library. I referred to code of "EpiDEM Basic" in the models library to get an idea on how to find R0, but I couldn't understand how it works. My second option was…
Lawan
  • 13
  • 3
0
votes
1 answer

Problem with adding and removing agents in anylogic

I'm new in anylogic and I have faced with a problem while creating new agents using add_agent(). I am simulating an online shop having consumers, vendors and products as agents. Each product belongs to a vendor and consumers buy them during the…
0
votes
1 answer

NetLogo: how to let turtles return after one tick

hope you can help me out! I have a NetLogo question about the following code: breed [tourists tourist] turtles-own [satisfaction] to setup clear-all reset-ticks end to go tick ask n-of initial-number-tourists patches [ sprout…
loet23
  • 21
  • 2
0
votes
0 answers

AnyLogic Agent population sequence FIFO

I am using AnyLogic 8 University 8.7.0 version and doing Agent Based Modelling. When I create an agent population of Passenger agents, they are being created in FIFO sequence (default behaviour of AnyLogic) but after transitioning through a Branch,…
0
votes
1 answer

Creating conditional links between two breeds

I am writing a NetLogo model of a housing market and its political ramifications. There are two breeds in the model: households and houses. An early step in my development with which I am having difficulty is having households match to houses via…
Abe
  • 393
  • 2
  • 13
0
votes
1 answer

How to run a command multiple times?

I am working on an agent-based model and I would like to run the following command 1,000 times: model = MyModel() for i in range(100): model.step() I decided to use the while loop: repetition = 0 maxRepetition = 1000 while repetition <=…
0
votes
1 answer

Is there any built in function to get the list of nodes (point node) within a certain diameter range in anylogic?

When a person agent is absorbing one node, I am trying to find the list/array of other nodes (point node) around him within a certain diameter range (let's say 10feet). Is there any built-in function to sort those nodes around the agent? I was…
Tariq
  • 57
  • 6
0
votes
1 answer

NetLogo IF statement color change

Hi im building my first NetLogo model and this is a statement I want to have inside my code ask turtles [ ifelse calm <= agigated 20% [set opposite turtle color] ] If a calm agent meets an agitated agent with a different vote there is a 20%…
Blackbobo
  • 3
  • 2
0
votes
1 answer

Simulating limited resources with Agent-Based Modeling

I am making an Agent-Based Model in AnyLogic where agent behavior is described in Statechart. I want to allocate certain resources to those agents (primarily rooms, in form of nodes), which is spatially placed in a blueprint of a certain building.…