Create a seasonal wave function that oscillates between -1 and 1, with a specified period and shift. The wave peaks at the specified shift time.
Examples
# Create a simple model with a seasonal wave
sfm <- xmile() |>
build("a", "stock") |>
# Specify the global variable "times" as simulation times
build("input", "constant", eqn = "seasonal(times, 10, 0)") |>
build("inflow", "flow", eqn = "input(t)", to = "a")
sim <- simulate(sfm, only_stocks = FALSE)
plot(sim)