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

simulate agents moving over a grid of different values in python

I'd like to simulate agents that have different interests (e.g. some prefer "red" and some prefer "blue) moving over a grid on which red and blue squares are randomly distributed. At each time point I'd like the agent to compare its current…
0
votes
1 answer

Anylogic - Measuring time through multiple layers of a model

I'm simulating a train system and want to measure the time a passenger spends from entering the system to boarding. Entering the system happens on a higher, boarding on a lower level of the model. The problem is that the TimeMeasureEnd block doesn't…
Snuffduff
  • 11
  • 5
0
votes
1 answer

Netlogo - updating outlinks with turtles outside the network

I need to learn NetLogo rather quickly, so I turned here for help. I have spent quite a bit of time trying to solve this issue but I think anyone a bit more experienced will be able to help. I am creating a network of influence for turtles, that…
lomper
  • 379
  • 1
  • 12
0
votes
1 answer

Calculation of distance between coordinates in Python

Can somebody help me to calculate after each iterations the farthest point from the point that has been created? It's an agent based model that I created using Netlogo and now trying to transpose it to Python As to what kind of distance has been…
Dimi
  • 531
  • 3
  • 8
  • 20
0
votes
0 answers

TypeError: function() missing 1 required positional argument

I'm getting a TypeError: get_person_from_market() missing 1 required positional argument: 'person' in the function get_person_from_market() Sorry for the long code, I pasted all of it so you can be able to replicate it. I am unable to troubleshoot…
Susie
  • 9
  • 1
  • 5
0
votes
0 answers

Assign Summed Patch Variable to an Agent or Patch-Set

My simulation is of farms. Farmer agents own the farms and farms are created from a random number of patches around the agent that then "belong to" the farmer. Each patch owns a Rate of Production variable (random number up to 50). How do I then…
Melonie Richey
  • 65
  • 1
  • 1
  • 7
0
votes
1 answer

Mesa tutorial: plot of agent wealth is deterministic instead of random

thanks for taking the time. (Python 3.7.0) I'm a beginner at python and doing the Mesa tutorial since I want to make an agent-based model for a research. I have the following issue: when I run the following code, each time a randomized plot showing…
0
votes
0 answers

Creating synthetic data in python with Agent-based modelling

To create synthetic data there are two approaches: Drawing values according to some distribution or collection of distributions Agent-based modelling For the first approach we can use the numpy.random.choice function which gets a dataframe and…
Code Pope
  • 5,075
  • 8
  • 26
  • 68
0
votes
1 answer

in anylogic exception with Agent.setspeed()

i have a simple anylogic model for pedestrian movement from start line towards target line i want to change the speed of the moving agents at some condition. i test the condition using events if the number of agents in a specific area exceeds 20, i…
0
votes
0 answers

Composite lognormal Pareto distribution

For the model I am working on in NetLogo, I would like to distribute a certain variable X as a composite lognormal-pareto, which takes a lognormal density up to an unknown threshold value θ and a two-parameter Pareto density with scaling parameter α…
0
votes
1 answer

difficult to find the current location of agents in Anylogic simulation

i built a simple model for pedestrian movement from start line towards target line, I want to find the number of moving agents in some area using the XY-coordinates (from X=150 to X=350, Y is the same ) The action for the event is to get the count…
0
votes
1 answer

Creating agents from a CSV file in mesa - python

I have a CSV file which is storing the ratings (0:lowest to 5:highest) given by consumers for several laptops of different producers.Each row shows the ratings given by one consumer regarding different features. An example of 2 consumers is shown…
user710
  • 161
  • 2
  • 12
0
votes
1 answer

Proportions in AnyLogic

I am working an agent-based epidemic model. I am looking to move a certain proportion of those who are infected into another statechart called 'Death'. What would be the best way to trigger this transition in AnyLogic? Let's say 2% of those who were…
user3qpu
  • 67
  • 1
  • 10
0
votes
2 answers

Changing a main class parameter for select agents in AnyLogic

I have an agent-based simulation of an epidemic in which I use a standard SEIR model. I define the infection parameters in the main class. I now want to be able to change some agents during model runtime. For example: I have defined 'contact rate'…
0
votes
1 answer

How to test if mortality rate is correct

This question is related to a question I asked some time ago. I am trying to create a population in NetLogo. Therefore, I am trying to start with the mortality rate. However, I am not sure how to test if my code works. The age of the oldest dying…
Hannah H.
  • 266
  • 3
  • 14