ModelingToolkit -- changes with `remake`?

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?

Open an issue to discuss.

The issue here is that if you have an initialization problem then it is solved to start the simulation. You must’ve been in a case where you didn’t have an initialization problem before, so it kind of worked, but now there’s always an initialization problem, and so that’s likely the thing involved here.

@cryptic.ax maybe we should put a warning on that remake call if there’s an initialization problem? Something to make it a bit more transparent.

I have opened an issue for question/discussion. I have received some suggestions, but there are still some problems I face. More in the MTK issues section.