# Find out which state(s) cause convergence problems

**URL:** https://discourse.julialang.org/t/find-out-which-state-s-cause-convergence-problems/113738
**Category:** Optimization (Mathematical)
**Tags:** question, ordinarydiffeq
**Created:** [May 2, 2024, 1:26pm UTC](https://discourse.julialang.org/t/find-out-which-state-s-cause-convergence-problems/113738 "2024-05-02T13:26:46Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![BdeKoning](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bdekoning/32/214557_2.png) [@BdeKoning](https://discourse.julialang.org/u/BdeKoning)
#### Post date: [May 2, 2024, 1:26pm UTC](https://discourse.julialang.org/t/find-out-which-state-s-cause-convergence-problems/113738/1 "2024-05-02T13:26:46Z")

</div>

I am solving various non-linear graph flow problems with OrdinaryDiffEq, with the states representing storages on the nodes. As the number of states can be quite large, it would be nice to have tooling to find out which states cause bottlenecks for stability/convergence, so that the graph can be adjusted accordingly. Is there a nice way available to do this?

[Deltares/Ribasim: Water resources modeling (github.com)](https://github.com/Deltares/Ribasim)

---

<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: [May 2, 2024, 2:22pm UTC](https://discourse.julialang.org/t/find-out-which-state-s-cause-convergence-problems/113738/2 "2024-05-02T14:22:08Z")

</div>

If you print the `EEst` it would be clear. I don’t know if we expose a debugging tool on that but that’s the easiest way to do it.

---

<div class="post-metadata">

### Author: ![BdeKoning](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bdekoning/32/214557_2.png) [@BdeKoning](https://discourse.julialang.org/u/BdeKoning)
#### Post date: [May 2, 2024, 3:17pm UTC](https://discourse.julialang.org/t/find-out-which-state-s-cause-convergence-problems/113738/3 "2024-05-02T15:17:34Z")

</div>

Thanks, is that `integrator.EEst`? Because that is a scalar in my cases

---

<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: [May 2, 2024, 3:55pm UTC](https://discourse.julialang.org/t/find-out-which-state-s-cause-convergence-problems/113738/4 "2024-05-02T15:55:19Z")

</div>

You want the atmp that generates it prior to reduction. But it’s algorithm-dependent and in the internals, so use at your own risk. We should expose it better in the future.
