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

Specifying agent properties when using .inject()

For logic testing purposes, I am using a clickable button triggering "source.inject()." The preceding logic for the agents is dependent on agent characteristics. Thus, it is preferable to have control over which characteristics they get during…
Gaute
  • 49
  • 7
1
vote
1 answer

Accessing specific Agent during Runtime by clicking on it in 2D-view, debugging

I am debugging my simulation. There is a patient (agent) that is stuck where it should not be. I want to see where in the statechart the patient is stuck but I find it tedious to punch through the list of agents in Developer panel every time and…
Gaute
  • 49
  • 7
1
vote
1 answer

Accessing Queue Priorities in a Seize Block

According to the AnyLogic's documentation, a Seize block embeds a Queue block, and "The rich interface of Queue (ability to use priorities, timeouts, remove agents, etc.) is fully exposed by Seize.". I want to access the queue portion of a seize…
Gaute
  • 49
  • 7
1
vote
1 answer

Checking agents in a Seize Block

I wonder how I can trigger a conditional state chart transition (located in an agent, Patient) by checking if a queue (located in Main in a Seize Block) contains patients with a certain characteristic (p_contaminated, boolean parameter here should…
Gaute
  • 49
  • 7
1
vote
3 answers

Create many objects in Scala

I'm working on creating a (simple) agent-based model to learn Scala and functional programming. I already created it in Python, so my idea is to code it following the already existing ideas, but I ran into a problem just at the beginning: I have a…
plr
  • 244
  • 1
  • 15
1
vote
1 answer

How can I communicate with another agent (anylogic) within certain vision angle?

I am trying to do modeling using Anylogic pedestrian library where an agent (A) will communicate with another agent (B) only if the other agent is within certain vision angles and arc radius of A. The conventional way of communication is to define…
Tariq
  • 57
  • 6
1
vote
0 answers

Netlogo ask turtles to go to the second destination after reaching the first destination

I am trying to write some code in Netlogo to ask my turtles to go to the second destination after reaching the first destination. Here's my code and hope it will help explain my question. SETUP: First, the patch will generate turtles, and I will…
DJJKZ
  • 175
  • 12
1
vote
0 answers

Multiagent in Python using Spade localhost configuration issue

I want to try Multi Agent programming in Python using SPADE, but i can't seem to make this simple example work. The error refers to the server, so how can i set up the agents to work in the localhost ? here is my code : class SenderAgent(Agent): …
Venom
  • 77
  • 8
1
vote
1 answer

Netlogo how to ask turtles wait until others turtles more than a specific distance

I am trying to write code in Netlogo to ask turtles wait for a certain time (eg:2 seconds) if his neighbours are less than a certain distance. after the distance between him and his neighbours is more than that distance, this turtle can start to…
DJJKZ
  • 175
  • 12
1
vote
1 answer

Sampling 30 values and finding standard-deviation + mean

I was able to include the recovery or die but now I'm having trouble getting the standard deviation and of the turtles that died. I think I got the standard deviation but can't get the mean if random-float 1 < recover-or-die [ set epi-state…
1
vote
1 answer

How can I make the model run?

I am essentially trying to combine elements of the 'Segregation' model and 'Rebellion' model to form a model that is representative of alliance forming. Here is what I have so far- when I attempt to run it I receive the error: THREATS breed does not…
Cfitzg
  • 11
  • 1
1
vote
1 answer

Copy turtle variable depending on if statement

I am building a model for a predator prey system and I am incorporating a small basic machine learning internal model in the predator. Predators have 4 strategies (strat is the variable), at the start of the day they select a strat and at the end…
Kilian Murphy
  • 321
  • 2
  • 14
1
vote
1 answer

How to get the distance between nodes with Mesa and Networkx on Python?

I am following this example called Virus on Network from the Mesa library which creates network graphs using Networkx. Here is its function screening a node's neighbors to try to infect them with a virus. def try_to_infect_neighbors(self): …
KubiK888
  • 4,377
  • 14
  • 61
  • 115
1
vote
0 answers

Unexpected display error when trying to remove specific edges from network graph using Python, Mesa and Networkx

I am extending the Virus on Network example from Mesa. The current network graph is like this. However, I want to remove the edges from the dead hosts (black). My attempt is within the try_check_death(): model_agent.py import random import…
KubiK888
  • 4,377
  • 14
  • 61
  • 115
1
vote
2 answers

Divide regions accordingly to physical features

I'm working on a smaller project and got stuck on an issue, I'm not really sure if it's possible to solve it in NetLogo but I want to give StackOverflow a go! I got a model that divides the world into different parts and randomly add physical…
ecl
  • 369
  • 1
  • 15