Skip to content

Commit

Permalink
Integrating Agents.jl with DifferentialEquations.jl Makie Figure call…
Browse files Browse the repository at this point in the history
… uses resolution over size (#1134)

* Update diffeq.jl

Updated link to fixed SciML integrator interface

* Update resolution to size for makie Figure call diffeq.jl
  • Loading branch information
fieldofnodes authored Jan 30, 2025
1 parent 9050444 commit b9aea2e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/diffeq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Random.seed!(6549) #hide
model = initialise()
_, results = run!(model, 20; mdata = [:stock])

f = Figure(resolution = (600, 400))
f = Figure(size = (600, 400))
ax = f[1, 1] = Axis(
f,
xlabel = "Year",
Expand Down Expand Up @@ -180,7 +180,7 @@ model = initialise()
yearly(model, s) = s % 365 == 0
_, results = run!(model, 20 * 365; mdata = [:stock], when = yearly)

f = Figure(resolution = (600, 400))
f = Figure(size = (600, 400))
ax =
f[1, 1] = Axis(
f,
Expand Down Expand Up @@ -294,7 +294,7 @@ Random.seed!(6549) #hide
modeldeq = initialise_diffeq()
_, resultsdeq = run!(modeldeq, 20; mdata = [:stock])

f = Figure(resolution = (600, 400))
f = Figure(size = (600, 400))
ax = f[1, 1] = Axis(
f,
xlabel = "Year",
Expand Down Expand Up @@ -327,7 +327,7 @@ length(modeldeq.i.sol.t)
# Compare our two results directly, both start with the same random seed and evolve in
# precisely the same manner:

f = Figure(resolution = (600, 400))
f = Figure(size = (600, 400))
ax =
f[1, 1] = Axis(
f,
Expand Down Expand Up @@ -405,7 +405,7 @@ sol = OrdinaryDiffEq.solve(
callback = OrdinaryDiffEq.CallbackSet(fish, reset),
)
discrete = vcat(sol(0:365:(365 * 20))[:,:]...)
f = Figure(resolution = (600, 400))
f = Figure(size = (600, 400))
ax = f[1, 1] = Axis(
f,
xlabel = "Year",
Expand Down

0 comments on commit b9aea2e

Please sign in to comment.