Closed baggepinnen closed 7 months ago
There are multiple problems here
observed
and they are all passed to DiscreteFunction
which assumes all equations are on the form x(t+1) ~ f(x(t))
, causing the delay.initialize_system_structure
assumes an ODESystem
, and only looks for Differential
variables. The call vars!(vars, eq.rhs)
defaults to vars!(vars, eq.rhs; op=Differential)
, but adding another vars!(vars, eq.rhs; op=Difference)
does not solve the problem. @YingboMa could there be some modifications to algorithms that should work for both differential and difference equations such that they operate on some common supertype of Differential
and Difference
? And similarly calls to functions isdifferential, isdifference
would call isdiff(x) = isdifferential(x) || isdifference(x)
?
Old discrete was removed.
In the following example, the variables
x
andy
are equal, buty
is delayed one step compared tox
in the solution.