Type inference failure for remake(::ODEProblem; u0, p)
with MTK generated problems
#985
Labels
bug
Something isn't working
Describe the bug 🐞
Similar to #981, this is the more advanced version where we actually have to change some values. The example below is contrived, but passing
u0
andp
with these types is encountered when usingsetsym_oop
. While theu0
andp
values are made type stable by SciML/ModelingToolkit.jl#3546 & SciML/SymbolicIndexingInterface.jl#118 (with something like SciML/SymbolicIndexingInterface.jl#119 on top), the issue is that the remake for the initialization data is very dynamic and completely loses the gains from the previous PRs.The starting point is
from which we get a
Union{Nothing, ReconstructInitializeprob}
that when called with anotherUnion
in theProblemState
(due tohistory_fn
) completely gives up on inference and we getnew_initp::Any
, which poisons the rest.Expected behavior
remake
should be inferred.Minimal Reproducible Example 👇
Without MRE, we would only be able to help you to a limited extent, and attention to the issue would be limited. to know more about MRE refer to wikipedia and stackoverflow.
Error & Stacktrace⚠️
The relevant part from
@descend
would beEnvironment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: