# Create a simple model with a seasonal wave
sfm <- stockflow() |>
update("a", "stock") |>
# Specify the global variable "times" as simulation times
update("input", "constant", eqn = "seasonal(times, 10, 0)") |>
update("inflow", "flow", eqn = "input(t)", to = "a")
sim <- simulate(sfm, only_stocks = FALSE)
plot(sim)
Run the code above in your browser using DataLab