# \#agentsjl

**URL:** https://discourse.julialang.org/tag/agentsjl/1397.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [How to trace positions of agents](https://discourse.julialang.org/t/how-to-trace-positions-of-agents/135340)

<div class="topic-metadata">

**Author:** [@ahcvankampen](https://discourse.julialang.org/u/ahcvankampen)\
**Replies:** 5\
**Last updated:** [January 30, 2026, 12:23pm UTC](https://discourse.julialang.org/t/how-to-trace-positions-of-agents/135340 "2026-01-30T12:23:39Z")

</div>

Hi, I have a multiagent model and want to extract agent data from this model. In one of the tutorial examples we have something like: adata = \[(cd4, count), (cd8, count), (dc, count)\] fig, ax, abmobs = abmplot(ln\_mode…

---

## [Why does GridSpace zero/ negative coordinates yields an Error but still adds the agents to the model](https://discourse.julialang.org/t/why-does-gridspace-zero-negative-coordinates-yields-an-error-but-still-adds-the-agents-to-the-model/135020)

<div class="topic-metadata">

**Author:** [@Farouk](https://discourse.julialang.org/u/Farouk)\
**Replies:** 3\
**Last updated:** [January 13, 2026, 11:25am UTC](https://discourse.julialang.org/t/why-does-gridspace-zero-negative-coordinates-yields-an-error-but-still-adds-the-agents-to-the-model/135020 "2026-01-13T11:25:18Z")

</div>

Hello guys, I have a question regarding Agents.jl GridSpace does it allow coordinates that are negative or zero like (0,0) or (-5,-1). In the test I’ve done (See code below) when I put a zero coordinates it returns an …

---

## [Computing distances in Agents.jl](https://discourse.julialang.org/t/computing-distances-in-agents-jl/134375)

<div class="topic-metadata">

**Author:** [@Lucia\_Lopez](https://discourse.julialang.org/u/Lucia_Lopez)\
**Replies:** 3\
**Last updated:** [December 7, 2025, 3:37am UTC](https://discourse.julialang.org/t/computing-distances-in-agents-jl/134375 "2025-12-07T03:37:11Z")

</div>

In Agents.jl, is there a built-in method to compute the distance from an agent within a GridSpace that automatically uses the appropriate distance metric (consistent with the one specified during the space’s initializati…

---

## [Error "type Missing has no field ScreenConfig" when using abmvideo](https://discourse.julialang.org/t/error-type-missing-has-no-field-screenconfig-when-using-abmvideo/134226)

<div class="topic-metadata">

**Author:** [@BananaMaster3](https://discourse.julialang.org/u/BananaMaster3)\
**Replies:** 1\
**Last updated:** [November 30, 2025, 6:57am UTC](https://discourse.julialang.org/t/error-type-missing-has-no-field-screenconfig-when-using-abmvideo/134226 "2025-11-30T06:57:47Z")

</div>

I’m trying to modify a particle life simulation, but I’m getting this weird error when using abmvideo or abmplot. Here is the minimum example: using Makie, Agents, TimerOutputs # import StaticArraysCore: SVector, MVecto…

---

## [Dealing with type stability when nothing can be returned](https://discourse.julialang.org/t/dealing-with-type-stability-when-nothing-can-be-returned/131040)

<div class="topic-metadata">

**Author:** [@sea\_slug](https://discourse.julialang.org/u/sea_slug)\
**Replies:** 1\
**Last updated:** [July 25, 2025, 9:58am UTC](https://discourse.julialang.org/t/dealing-with-type-stability-when-nothing-can-be-returned/131040 "2025-07-25T09:58:53Z")

</div>

I have a relatively complex Agent Based Model (ABM) that I am profiling. One function in particular (get\_shark\_pos) is dominating the runtime according to the flame graph. I am surprised because the function is very simp…

---

## [Clarification on save/load\_checkpoint() and populate\_from\_csv!()](https://discourse.julialang.org/t/clarification-on-save-load-checkpoint-and-populate-from-csv/129990)

<div class="topic-metadata">

**Author:** [@elisadonati23](https://discourse.julialang.org/u/elisadonati23)\
**Replies:** 0\
**Last updated:** [June 18, 2025, 1:32pm UTC](https://discourse.julialang.org/t/clarification-on-save-load-checkpoint-and-populate-from-csv/129990 "2025-06-18T13:32:23Z")

</div>

Dear all, I’m working on a relatively large agent-based model (ABM) for fish populations, without explicit spatial structure, using Agents.jl. The model includes individual stochasticity in parameter values and uses mul…

---

## [Pen-Down in Agents.jl](https://discourse.julialang.org/t/pen-down-in-agents-jl/125516)

<div class="topic-metadata">

**Author:** [@NebulaComplex](https://discourse.julialang.org/u/NebulaComplex)\
**Replies:** 1\
**Last updated:** [February 4, 2025, 6:59am UTC](https://discourse.julialang.org/t/pen-down-in-agents-jl/125516 "2025-02-04T06:59:00Z")

</div>

In NetLogo you can easily get a turtle to draw it’s path in continuous space with the pen-down command, how can I do this in Agents.jl - specifically in an interactive GUI? This code successfully adds a button to toggle …

---

## [ERROR: Tried to remove agent with ID 66 from the space, but that agent is not on the space](https://discourse.julialang.org/t/error-tried-to-remove-agent-with-id-66-from-the-space-but-that-agent-is-not-on-the-space/122674)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 7\
**Last updated:** [December 11, 2024, 5:12pm UTC](https://discourse.julialang.org/t/error-tried-to-remove-agent-with-id-66-from-the-space-but-that-agent-is-not-on-the-space/122674 "2024-12-11T17:12:25Z")

</div>

I was wondering what is most efficient and issue free way to create random positions for agents. At the moment Im using this where sides = \[1e3, 1e2, 5e2\] positions = \[sides .\* rand(SVector{3,Float64}) for \_ in 1:num…

---

## [Solid boundary for ABM model](https://discourse.julialang.org/t/solid-boundary-for-abm-model/113984)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 28\
**Last updated:** [December 10, 2024, 1:18pm UTC](https://discourse.julialang.org/t/solid-boundary-for-abm-model/113984 "2024-12-10T13:18:07Z")

</div>

Hello everyone, I’m building a model where particles roam around randomly in 3d space. At the moment issue is that I want particles to be contained in space though what I see is that it escapes boundary and comes on the…

---

## [ABM Agents.jl model properties as a nested dictionary](https://discourse.julialang.org/t/abm-agents-jl-model-properties-as-a-nested-dictionary/123110)

<div class="topic-metadata">

**Author:** [@elisadonati23](https://discourse.julialang.org/u/elisadonati23)\
**Replies:** 3\
**Last updated:** [November 29, 2024, 1:22pm UTC](https://discourse.julialang.org/t/abm-agents-jl-model-properties-as-a-nested-dictionary/123110 "2024-11-29T13:22:28Z")

</div>

Dear Julia and the Agents.jl community, I’m currently working on a multispecies agent-based model (ABM) with sardine and anchovy superindividuals, and I’m planning to transition to the multi-agent framework soon. My mod…

---

## [Issue in collision count for a ball in 2d space using agent.jl](https://discourse.julialang.org/t/issue-in-collision-count-for-a-ball-in-2d-space-using-agent-jl/122488)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 3\
**Last updated:** [November 18, 2024, 11:09am UTC](https://discourse.julialang.org/t/issue-in-collision-count-for-a-ball-in-2d-space-using-agent-jl/122488 "2024-11-18T11:09:36Z")

</div>

Hello everyone, I have made a MWE for collision problem (2d example) in Agent Based model this based on some of my previous questions. Im using interacting\_pairs to find pairs in model and count collision if it finds an…

---

## [Confusion in terminology dt & timing in agents.jl continuous time/EBM model](https://discourse.julialang.org/t/confusion-in-terminology-dt-timing-in-agents-jl-continuous-time-ebm-model/121748)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 3\
**Last updated:** [October 30, 2024, 7:11am UTC](https://discourse.julialang.org/t/confusion-in-terminology-dt-timing-in-agents-jl-continuous-time-ebm-model/121748 "2024-10-30T07:11:34Z")

</div>

Hello everyone, Im working with EBM continuous time model. Im little confused between dt given in model initiation function and timing term while defining events for model. It will be really helpful if someone can desc…

---

## [Large allocation problem while simulating agents model](https://discourse.julialang.org/t/large-allocation-problem-while-simulating-agents-model/118522)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 12\
**Last updated:** [August 23, 2024, 2:18pm UTC](https://discourse.julialang.org/t/large-allocation-problem-while-simulating-agents-model/118522 "2024-08-23T14:18:30Z")

</div>

Hello, This is a continuation of previous thread multithreading in agents. I have put an example here which overall is weird as a model but gives idea of memory allocation regions in my original model. Please ignore if y…

---

## [Why step function doesn't recognise local model initialisation inside a function?](https://discourse.julialang.org/t/why-step-function-doesnt-recognise-local-model-initialisation-inside-a-function/117586)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 3\
**Last updated:** [July 29, 2024, 9:33am UTC](https://discourse.julialang.org/t/why-step-function-doesnt-recognise-local-model-initialisation-inside-a-function/117586 "2024-07-29T09:33:45Z")

</div>

Here is my function where I try to run ABM model inside a function. Now inside this function when I initialise model it works and also prints model but while using step!() it says model is not defined. Can someone shed …

---

## [Progress bar in Agents](https://discourse.julialang.org/t/progress-bar-in-agents/117127)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 0\
**Last updated:** [July 17, 2024, 7:28am UTC](https://discourse.julialang.org/t/progress-bar-in-agents/117127 "2024-07-17T07:28:21Z")

</div>

Hello everyone, Im working on an ABM model. Model in itself contains alot of conditions and operations based on that, it also has integration of differential equations. At the moment model is taking too much time to run…

---

## [Original until() function](https://discourse.julialang.org/t/original-until-function/116903)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 2\
**Last updated:** [July 11, 2024, 12:33pm UTC](https://discourse.julialang.org/t/original-until-function/116903 "2024-07-11T12:33:38Z")

</div>

Hello everyone, Can someone point me to location of this function until() which is used as follow while until(s, t0, n, model) ....something.... end in agents.jl. I want to check the original function. I was lookin…

---

## [Gridspace search different distance in each dimension](https://discourse.julialang.org/t/gridspace-search-different-distance-in-each-dimension/116287)

<div class="topic-metadata">

**Author:** [@sea\_slug](https://discourse.julialang.org/u/sea_slug)\
**Replies:** 2\
**Last updated:** [July 4, 2024, 3:50am UTC](https://discourse.julialang.org/t/gridspace-search-different-distance-in-each-dimension/116287 "2024-07-04T03:50:28Z")

</div>

I’m using agents.jl to create an ABM. Looking at the help for GridSpace I should be able to search different distances for each of the dimensions in my GridSpace (assuming metric = :chebyshev) with functions nearby\_ids() …

---

## [Using Integrator in EventQueueABM model](https://discourse.julialang.org/t/using-integrator-in-eventqueueabm-model/116249)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 0\
**Last updated:** [June 26, 2024, 9:14am UTC](https://discourse.julialang.org/t/using-integrator-in-eventqueueabm-model/116249 "2024-06-26T09:14:30Z")

</div>

Hello everyone, I want to include some differential equation based model to my agents model. I want to integrate both of them. so at some points in simulation time, agent model get feed some info from differential model…

---

## [Agents constructor](https://discourse.julialang.org/t/agents-constructor/115941)

<div class="topic-metadata">

**Author:** [@martin\_sanchez](https://discourse.julialang.org/u/martin_sanchez)\
**Replies:** 8\
**Last updated:** [June 21, 2024, 2:09pm UTC](https://discourse.julialang.org/t/agents-constructor/115941 "2024-06-21T14:09:07Z")

</div>

Hi, I have two questions: On the first hand, quite recent videos explaining the use showed a use of the @agents macro as @agents NameAgentType GridAgent{2} begin someField end And when I do this with this synt…

---

## [Problems with Agent constructors](https://discourse.julialang.org/t/problems-with-agent-constructors/115761)

<div class="topic-metadata">

**Author:** [@stefkuypers](https://discourse.julialang.org/u/stefkuypers)\
**Replies:** 8\
**Last updated:** [June 18, 2024, 9:34am UTC](https://discourse.julialang.org/t/problems-with-agent-constructors/115761 "2024-06-18T09:34:28Z")

</div>

I’m probably not seeing something obvious but for some reason I have one Agent for which the constructor works and another one for which I get an error when I try to call the constructor and I have no clue why. Here is …

---

## [Modifying interaction\_pairs() for EventQueueABM](https://discourse.julialang.org/t/modifying-interaction-pairs-for-eventqueueabm/115233)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 1\
**Last updated:** [June 5, 2024, 2:27pm UTC](https://discourse.julialang.org/t/modifying-interaction-pairs-for-eventqueueabm/115233 "2024-06-05T14:27:31Z")

</div>

Hello everyone, I’m trying to modify inbuild function interaction\_pairs() to make it usable for EventQueueABM model too. Any suggestion will be helpful… :slight\_smile: Here is original code : function interacting\_pair…

---

## [Type parametrisation and the @agent macro](https://discourse.julialang.org/t/type-parametrisation-and-the-agent-macro/114846)

<div class="topic-metadata">

**Author:** [@stefkuypers](https://discourse.julialang.org/u/stefkuypers)\
**Replies:** 1\
**Last updated:** [May 28, 2024, 3:14pm UTC](https://discourse.julialang.org/t/type-parametrisation-and-the-agent-macro/114846 "2024-05-28T15:14:22Z")

</div>

Is it possible to use type parametrisation with the @agent macro? This is what I’d like to do: @agent struct AnAgent(NoSpaceAgent){C} \<: AbstractAgent{C \<: FixedDecimal} balance::C end But this syntax clearly does no…

---

## [Add title and axis labels using abmplot](https://discourse.julialang.org/t/add-title-and-axis-labels-using-abmplot/114593)

<div class="topic-metadata">

**Author:** [@daler6](https://discourse.julialang.org/u/daler6)\
**Replies:** 1\
**Last updated:** [May 23, 2024, 11:54am UTC](https://discourse.julialang.org/t/add-title-and-axis-labels-using-abmplot/114593 "2024-05-23T11:54:52Z")

</div>

Hi, I am using the abmplot function in Agents.jl to plot the location of my agents. It is plotting the agents fine, but I would like to add a title and axis labels. Nothing I have done seems to work. I am using CairoMak…

---

## [Id error on creating an agent](https://discourse.julialang.org/t/id-error-on-creating-an-agent/113270)

<div class="topic-metadata">

**Author:** [@stefkuypers](https://discourse.julialang.org/u/stefkuypers)\
**Replies:** 1\
**Last updated:** [April 20, 2024, 12:24pm UTC](https://discourse.julialang.org/t/id-error-on-creating-an-agent/113270 "2024-04-20T12:24:31Z")

</div>

I am in the process of updating my code for the Agents.jl 6.x package and I’m running into some trouble. I have the following Agents structures: @agent struct Actor(NoSpaceAgent) types::Set{Symbol} = Set{Symbol}() …

---

## [Loaded v1.10.2; receiving LoadError: MethodError: no method matching var"@agent](https://discourse.julialang.org/t/loaded-v1-10-2-receiving-loaderror-methoderror-no-method-matching-var-agent/112549)

<div class="topic-metadata">

**Author:** [@tfranks](https://discourse.julialang.org/u/tfranks)\
**Replies:** 7\
**Last updated:** [April 5, 2024, 3:34am UTC](https://discourse.julialang.org/t/loaded-v1-10-2-receiving-loaderror-methoderror-no-method-matching-var-agent/112549 "2024-04-05T03:34:38Z")

</div>

Hello, I’ve installed the latest version 1.10.2 and using the predator-prey example. When I run my code (shown below) and the predator-prey code, both get the same error message: LoadError: MethodError: no method matc…

---

## [Dictionarys on the GPU for Agents.jl](https://discourse.julialang.org/t/dictionarys-on-the-gpu-for-agents-jl/111233)

<div class="topic-metadata">

**Author:** [@Kemper](https://discourse.julialang.org/u/Kemper)\
**Replies:** 4\
**Last updated:** [March 13, 2024, 3:37pm UTC](https://discourse.julialang.org/t/dictionarys-on-the-gpu-for-agents-jl/111233 "2024-03-13T15:37:23Z")

</div>

Hello! I am working on an Agent Based Model with the Agents.jl framework and I am having performance problems. I am working with dictonarys to save positions and values. Is there a way to work with dictonaries on the G…

---

## [My first Agents.jl project - Toy model of rental market](https://discourse.julialang.org/t/my-first-agents-jl-project-toy-model-of-rental-market/111127)

<div class="topic-metadata">

**Author:** [@Piotr\_Zakrzewski](https://discourse.julialang.org/u/Piotr_Zakrzewski)\
**Replies:** 0\
**Last updated:** [March 4, 2024, 12:21pm UTC](https://discourse.julialang.org/t/my-first-agents-jl-project-toy-model-of-rental-market/111127 "2024-03-04T12:21:07Z")

</div>

I have long been interested in agent based simulations so I played around with Agents.jl to make a toy model of rental market. I published it here: GitHub - PiotrZakrzewski/real-estate-sim: Julia Agent Simulation of Rea…

---

## [Multi-threads error (undefRefError) in simple ABM with Agents.jl](https://discourse.julialang.org/t/multi-threads-error-undefreferror-in-simple-abm-with-agents-jl/110900)

<div class="topic-metadata">

**Author:** [@elisadonati23](https://discourse.julialang.org/u/elisadonati23)\
**Replies:** 21\
**Last updated:** [February 29, 2024, 8:57pm UTC](https://discourse.julialang.org/t/multi-threads-error-undefreferror-in-simple-abm-with-agents-jl/110900 "2024-02-29T20:57:26Z")

</div>

Dear all, I am working on an ABM and now I am trying to improve performance through in-model parallelization using @threads since I have 10^6 agents (I am working with fish populations and simulation is in 0D for now, I …

---

## [ABM - Scheduler.bytype just for 1 agent function](https://discourse.julialang.org/t/abm-scheduler-bytype-just-for-1-agent-function/107611)

<div class="topic-metadata">

**Author:** [@elisadonati23](https://discourse.julialang.org/u/elisadonati23)\
**Replies:** 2\
**Last updated:** [January 4, 2024, 5:25pm UTC](https://discourse.julialang.org/t/abm-scheduler-bytype-just-for-1-agent-function/107611 "2024-01-04T17:25:25Z")

</div>

Dear all, I am running an ABM model with NoSpaceAgent representing sardines populations over time with three lifestages identified by the field type::Symbol and with 2 sexes (sex::Symbol). Adults can spawn in a period …

---

## [Loading vector data to Gridspace in Agents.jl](https://discourse.julialang.org/t/loading-vector-data-to-gridspace-in-agents-jl/106459)

<div class="topic-metadata">

**Author:** [@imantha](https://discourse.julialang.org/u/imantha)\
**Replies:** 2\
**Last updated:** [November 20, 2023, 1:13pm UTC](https://discourse.julialang.org/t/loading-vector-data-to-gridspace-in-agents-jl/106459 "2023-11-20T13:13:58Z")

</div>

Hi, I am wondering whether there is a way in Agents.jl to load vector data (using perhaps .shpfile) to something like Grid space. Or is this possbile with open street map space? For context, what I am trying to do is m…

[Next page](https://discourse.julialang.org/tag/agentsjl/1397.md?match_all_tags=true&page=1&tags%5B%5D=agentsjl)
