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
I'm really not sure what's going on here, but the variable type of Initial(p) seems to be silently changed to variable instead of parameter when substituting h = 1. This doesn't happen when any number other than 1 is substituted, or for normal parameters.
@constants h =1@variables x
eq = x ~ h *Initial(x)
dvs =Set(); ps =Set()
ModelingToolkit.collect_vars!(dvs, ps, eq, nothing; op = Initial) # dvs = Set(x), ps = Set(Initial(x))empty!(dvs); empty!(ps)
eq = Symbolics.substitute(eq, h =>1) # eq = x ~ Initial(x)
ModelingToolkit.collect_vars!(dvs, ps, eq, nothing; op = Initial) # dvs = Set(x, Initial(x)), ps = Set()
ModelingToolkit.isparameter(eq.rhs) # false