From 201ecf91df61090ab430ba1c0358b4cd5b1d3888 Mon Sep 17 00:00:00 2001 From: "Navid C. Constantinou" Date: Wed, 29 Oct 2025 07:00:00 +1100 Subject: [PATCH 1/2] Enhance simulation docstring time step argument options Added support for Dates.Period in time step argument. --- src/Simulations/simulation.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Simulations/simulation.jl b/src/Simulations/simulation.jl index 1fe2962c69..2c19b4d4d5 100644 --- a/src/Simulations/simulation.jl +++ b/src/Simulations/simulation.jl @@ -47,7 +47,8 @@ Keyword arguments ================= - `Δt`: Required keyword argument specifying the simulation time step. Can be a `Number` - for constant time steps or a `TimeStepWizard` for adaptive time-stepping. + for constant time steps, or a `TimeStepWizard` for adaptive time-stepping, or a `Dates.Period` + if the `model` has a DateTime clock. - `stop_iteration`: Stop the simulation after this many iterations. Default: `Inf`. From 19cebca5c5fd97eb0fadfee3d379babcc585af4b Mon Sep 17 00:00:00 2001 From: "Navid C. Constantinou" Date: Wed, 29 Oct 2025 07:01:00 +1100 Subject: [PATCH 2/2] =?UTF-8?q?Fix=20formatting=20of=20=CE=94t=20keyword?= =?UTF-8?q?=20argument=20description?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Simulations/simulation.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Simulations/simulation.jl b/src/Simulations/simulation.jl index 2c19b4d4d5..7f267ecfb3 100644 --- a/src/Simulations/simulation.jl +++ b/src/Simulations/simulation.jl @@ -46,8 +46,8 @@ Construct a `Simulation` for a `model` with time step `Δt`. Keyword arguments ================= -- `Δt`: Required keyword argument specifying the simulation time step. Can be a `Number` - for constant time steps, or a `TimeStepWizard` for adaptive time-stepping, or a `Dates.Period` +- `Δt`: Required keyword argument specifying the simulation time step. Can be either a `Number` + for constant time steps, a `TimeStepWizard` for adaptive time-stepping, or a `Dates.Period` if the `model` has a DateTime clock. - `stop_iteration`: Stop the simulation after this many iterations. Default: `Inf`.