Describe the bug
Indexing error when inspecting agents (enable_inspection = true) in abmplot etc for 3D models.
BoundsError: attempt to access 10×10×10 Array{Int64, 3} at index [0, 0, 0]
Minimal Working Example
@agent struct A3D(GridAgent{3}) end
function simple3d_step!(model)
has_empty_positions(model) || return
agent = random_agent(model, notsurrounded(model))
newpos = rand(abmrng(model), collect(empty_nearby_positions(agent, model)))
add_agent!(newpos, model)
end
function init_simple3d(;
dims = (10, 10, 10),
model_step! = simple3d_step!)
space = GridSpaceSingle(dims)
model = StandardABM(
A3D,
space;
model_step!)
add_agent!(dims .÷ 2, model)
model
end
function simple3d_exploration()
model = init_simple3d()
abmplot(model;
enable_inspection=true)
end
f, _ = simple3d_exploration(); f
# mouseover the agent
Describe the bug Indexing error when inspecting agents (
enable_inspection = true
) inabmplot
etc for 3D models.Minimal Working Example
Agents.jl version
Agents.jl 6.0.12