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
When using a ContiniousCallback or a DiscreteCallback you provide a condition function
functioncondition(u,t,integrator)
end
Here, if you wish to interface the state or the time, it is recommended to use the u vector or the t variable. However, u is a normal vector and cannot be interfaced with MTK variables. Hence, this doesn't work. Instead one have to use the integrator, which poses two problems:
According to the doc, interfacing using integrator is worse for performance.
It is also kind of awkward to have a function include an argument (u) that is not used.
From an interface point of view, if possible, it seems that the best solution is to make these callbacks work well with only the integrator as an argument to condition.
More generally, it seems that we have all this internal DiffEq code that depend on indexing, which doesn't mesh with the MTK approach or not using indexes. I guess it would be a homogeneous project, but is there any plan to make MTK interfacing universal through the system, instead of relying on converting MTK converting its symbolic to value maps to value arrays of the right order everywhere?
The text was updated successfully, but these errors were encountered:
When using a
ContiniousCallback
or aDiscreteCallback
you provide a condition functionHere, if you wish to interface the state or the time, it is recommended to use the
u
vector or thet
variable. However,u
is a normal vector and cannot be interfaced with MTK variables. Hence, this doesn't work. Instead one have to use theintegrator
, which poses two problems:integrator
is worse for performance.u
) that is not used.From an interface point of view, if possible, it seems that the best solution is to make these callbacks work well with only the
integrator
as an argument tocondition
.More generally, it seems that we have all this internal DiffEq code that depend on indexing, which doesn't mesh with the MTK approach or not using indexes. I guess it would be a homogeneous project, but is there any plan to make MTK interfacing universal through the system, instead of relying on converting MTK converting its symbolic to value maps to value arrays of the right order everywhere?
The text was updated successfully, but these errors were encountered: