# ModelingToolkit -- changes with \`remake\`?

**URL:** https://discourse.julialang.org/t/modelingtoolkit-changes-with-remake/126004
**Category:** Modelling & Simulations
**Created:** [February 17, 2025, 6:08pm UTC](https://discourse.julialang.org/t/modelingtoolkit-changes-with-remake/126004 "2025-02-17T18:08:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)
#### Post date: [February 17, 2025, 6:08pm UTC](https://discourse.julialang.org/t/modelingtoolkit-changes-with-remake/126004/1 "2025-02-17T18:08:54Z")

</div>

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:

```julia
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?

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [February 19, 2025, 4:09pm UTC](https://discourse.julialang.org/t/modelingtoolkit-changes-with-remake/126004/2 "2025-02-19T16:09:35Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)
#### Post date: [February 19, 2025, 7:07pm UTC](https://discourse.julialang.org/t/modelingtoolkit-changes-with-remake/126004/3 "2025-02-19T19:07:19Z")

</div>

> [@ChrisRackauckas](#):
>
> Open an issue to discuss.

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.
