Closed rmcsqrd closed 3 years ago
Yes that's normal since the functions do different things. run!
will step the model n
times. The video will record n
frames including the starting state of the model as a frame and thus will step the model n-1
times.
Describe the bug In a model that I am building I have one global parameter
num_steps
. Sometimes I just run a model and record data without producing an output mp4 to avoid incurring that overhead. When I run the model usingrun!()
I pass innum_steps
as the number of times tostep!()
the model.Other times when I call
InteractiveDynamics.abm_video()
, I pass inframes=num_steps
. I believe thatabm_video
steps the model one less time thanrun!()
. The relevant parts of the code are below which I interpret to make my MWE.Agents.jl/src/simulations/step.jl
:InteractiveDynamics.jl/src/agents/plots_videos.jl
:Minimal Working Example Assuming that
num_steps
is constant and passed in to both functions such thatn=num_steps
andframes=num_steps
respectively:Basically every time I increment
s
andx
step!()
would be called. My expected behavior would be thatabm_video
andrun!
would callstep!()
the same number of times. I am not sure if there is something that requires the upper bound of the for loop to beframes-1
but removing the-1
would be my proposed fix. Thanks.Agents.jl version
[46ada45e] Agents v4.1.3
/Users/riomcmahon/Programming/Agents.jl#FMP
[ec714cd0] InteractiveDynamics v0.13.5