Hi,
I’m trying to visualize my agents moving, however, I keep running into this error:
MethodError: Cannot convert an object of type Tuple{Int64} to an object of type GeometryBasics.OffsetInteger{-1, UInt32}
The image I have loaded into my script is .bmp file of dimensions (2337, 3377). I made sure to update abm_video to abmvideo, but am still facing problems.
These are my inputs:
begin
CairoMakie.activate!()
static_preplot!(ax, model) = scatter!(ax, model.goal; color = (:red, 50), marker = ‘x’)
abm_video(
“maze.gif”,
model,
agent_step!;
resolution=(2337, 3377),
frames=1200,
framerate=30,
ac=:red,
as=11,
heatarray = _ → pathfinder.walkmap,
add_colorbar = false,
)
end
Advice would be much appreciated.
Thanks in advance.
I’m not exactly sure where the error is coming from, but my guess is the resolution keyword argument is not part of abmvideo. I think you have to specify this in the beginning when making your figure
fig = Figure(resolution = ( ))
From the docs, it seems you can also use the figure keyword argument like this (example here)