Issue on how to get the ids for agents in a specific position on a 2d grid

Using this line of code with Agents.jl:
ids_in_position( (2,2) , schelling )

I get this error:

MethodError: no method matching ids_in_position(::Tuple{Int64, Int64}, ::UnremovableABM{GridSpaceSingle{2, false}, SchellingAgent, Agents.Schedulers.Randomly, Dict{Symbol, Int64}, Xoshiro})
Closest candidates are:
  ids_in_position(::Union{Int64, Tuple{Int64, Int64, Float64}, Tuple{Vararg{Int64, N}}, Tuple{Vararg{var"#s5", M}} where var"#s5"<:AbstractFloat} where {N, M}, ::AgentBasedModel{<:GridSpace}) at ~/.julia/packages/Agents/PhazO/src/spaces/grid_multi.jl:243
  ids_in_position(::Union{Int64, Tuple{Int64, Int64, Float64}, Tuple{Vararg{Int64, N}}, Tuple{Vararg{var"#s5", M}} where var"#s5"<:AbstractFloat} where {N, M}, ::GridSpace) at ~/.julia/packages/Agents/PhazO/src/spaces/grid_multi.jl:244
  ids_in_position(::A, ::Any) where A<:AbstractAgent at ~/.julia/packages/Agents/PhazO/src/spaces/discrete.jl:56

Stacktrace:
 [1] top-level scope
   @ In[145]:1

Am I doing something wrong? I want to find out which agents reside on the position of a grid?

Gridspacesingke by construction cannit have more than one Id in a position :). I think we have the id_in_pisitio function for that. Singular

Sorry on my phone

CU!

George Datseris (he/him)

1 Like

found it,
https://juliadynamics.github.io/Agents.jl/stable/api/#Agents.id_in_position