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
If you have parameters which only occur in an event, these are not inferred as parameters of the system (in the same way as e.g. parameters of equations).
E.g. in this MWE, the parameter thres is not found in either system (to which it belong).
using ModelingToolkit
@variables t X(t)
@parameters p d
@parameters thres
D =Differential(t)
eq =D(X) ~ p - d*X
discrete_events = [(X > thres) => [X ~ X/2.0]]
@mtkbuild osys1 =ODESystem([eq], t; discrete_events)
parameters(osys1) # [p, d]
continuous_events = [(X ~ thres) => [X ~ X/2.0]]
@mtkbuild osys2 =ODESystem([eq], t; discrete_events)
parameters(osys2) # [p, d]