I have a @mtkbuild
model named hp_na_ns_oL
which uses some register_symbolic
function u_u_v(t)
that I specify via a constant value function u_v_const()
. I want to simulate the system to steady state, and use the steady state as initial value in the next simulation – where I intend to change u_u_v(t)
from being constant to u_u_v(t) = u_v_step(t)
.
I think the following used to work in the past:
tspan = (0,1e3)
prob_na_ns_oL = ODEProblem(hp_na_ns_oL, [], tspan)
u_u_v(t) = u_v_const(t)
sol = solve(prob_na_ns_oL, Rodas5())
x_ss = sol[end]
# remake problem with new initial state and new time span
tspan = (0,60)
prob_na_ns_oL = remake(prob_na_ns_oL, u0 = x_ss, tspan=tspan)
However, when I solve this “remake” model, it does not start in steady state! (Steady state is reached long before t=1e3
…)
Has there been a “recent” change (i.e., last few months?) with remake
? When I read the documentation, it mentions other functions in addition to remake
, such as setp
, setu
, and replace
. But the documentation seems a little sparse.
Any experience on how to set the initial states?