You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We get orphaned symbolics in the function bodies of generated callback functions because symbolic callbacks don't apply substitutions and solved states generated during structural_simplify.
# nonsense example but demos the problemusing ModelingToolkit, OrdinaryDiffEq
@variables t x(t) y(t)
@parameters τ
D =Differential(t)
@named fol_separate =ODESystem([ y ~1- x, D(x) ~ y/τ]; discrete_events = [(y ==4.0) => [x ~ x +10]])
fol_simplified =structural_simplify(fol_separate)
ModelingToolkit.get_discrete_events(fol_simplified) # still has y(t) state
prob =ODEProblem(fol_simplified, [x =>0.0], (0.0,10.0), [τ =>3.0]) # missing preface + substitution
sol =solve(prob, Tsit5()) # error
The text was updated successfully, but these errors were encountered:
wsphillips
changed the title
alias_elimination pass not applied to symbolic callback expressions
variable substitution omitted for symbolic callback expressions during structural_simplify
Aug 3, 2022
wsphillips
changed the title
variable substitution omitted for symbolic callback expressions during structural_simplify
variable substitution and solved states not applied to symbolic callback expressions
Aug 3, 2022
We get orphaned symbolics in the function bodies of generated callback functions because symbolic callbacks don't apply substitutions and solved states generated during structural_simplify.
The text was updated successfully, but these errors were encountered: