This was working fine for a while, but after reformulating my model I’m now hitting return codes of Unstable
. To be clear, I’ve got a loop like
my_value = 10
read_my_value(t) = my_value
@register_symbolic read_my_value(t)
while true
step!(integrator, dt, true)
my_value += 1 # super-simplified; in reality it's a GUI slider
end
I read the PSA and this part:
Double check if you’re doing anything that violates assumptions of being an ODE. As an ODE, the right-hand side
f
function should always give you the same result:u' = f(u,p,t)
needs to be uniquely defined. These issues are just fundamental to the mathematics: if you do these things inf
, thenf
no longer defines an ODE so of course it cannot be solved!
makes me worry that maybe step!
can go before the current time t
and get upset that f(t-1)
no longer returns the value it did before.