Open GHE-HS opened 9 months ago
I think I found the piece of code that is responsible for this transformation but fixing it is beyond what I can do I'm afraid: In model_parsing.jl, l 73-77:
if ext[] === nothing
push!(exprs.args, :(var"#___sys___" = $sys))
else
push!(exprs.args, :(var"#___sys___" = $extend($sys, $(ext[]))))
end
Any advice will be appreciated!
the names of many observed variables (ie. variable X(t)) become var"XΛt" in an equation describing an observed state
That's not the same variable. The latter is the dummy derivative of the first variable
Describe the bug π
When
structural_simplify
ing a system, the names of many observed variables (ie. variableX(t)
) becomevar"XΛt"
in an equation describing an observed state, messing up with everything downstream.Expected behavior
The variable should not change name after applying
structural_simplify
.Minimal Reproducible Example π
Unfortunately my code is quite complex, so simplifying it to make a MWE would take me a time I don't have right now, I mostly wanted to report the issue. I will provide one later if time allows.
Environment:
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
Additional context
What I am doing in my code is to symbolically discretize a PDE system with MethodOfLines and then tinkering with the ODESystem that comes out of it then simplyfying and finally solving it with MTK. I believe this problem only happens with the discretized variables (written X(t)[n]).