Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Commit

Permalink
Make abm_play have default dummystep for model
Browse files Browse the repository at this point in the history
  • Loading branch information
Datseris committed Sep 18, 2021
1 parent a518c37 commit 9026494
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "InteractiveDynamics"
uuid = "ec714cd0-5f51-11eb-0b6e-452e7367ff84"
repo = "https://github.com/JuliaDynamics/InteractiveDynamics.jl.git"
version = "0.17.2"
version = "0.17.3"

[deps]
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Expand Down
4 changes: 2 additions & 2 deletions src/agents/plots_videos.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ end
##########################################################################################

"""
abm_play(model, agent_step!, model_step!; kwargs...) → fig, abmstepper
abm_play(model, agent_step! [, model_step!]; kwargs...) → fig, abmstepper
Launch an interactive application that plots an agent based model and can animate
its evolution in real time. Requires `Agents`.
Expand All @@ -108,7 +108,7 @@ before the plot is updated, and "sleep" the `sleep()` time between updates.
* `ac, am, as, scheduler, offset, aspect, scatterkwargs`: propagated to [`abm_plot`](@ref).
* `spu = 1:100`: The values of the "spu" slider.
"""
function abm_play(model, agent_step!, model_step!; spu = 1:100, kwargs...)
function abm_play(model, agent_step!, model_step! = Agents.dummystep; spu = 1:100, kwargs...)
fig = Figure(; resolution = (600, 700), backgroundcolor = DEFAULT_BG)
ax = fig[1,1][1,1] = dimensionality(model) == 3 ? Axis3(fig) : Axis(fig)
abmstepper = abm_init_stepper_and_plot!(ax, fig, model; kwargs...)
Expand Down

0 comments on commit 9026494

Please sign in to comment.