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
Is your feature request related to a problem? Please describe.
I’m modelling cell population dynamics. Cells die and divide so the size of system is always changing. Most of my state variables can trigger events (i.e. death or division) so it seems that VectorContinuousCallback is the way to go. Unfortunately, the constructor for VectorContinuousCallback requires the length of the returned vector which in my case will change frequently. I could specify a very large length and pad the return vector with non-zero values but that seems inelegant and inefficient.
Describe the solution you’d like
To able to change the length of the returned vector. Changing during a affect! call is adequate for my use case.
Describe alternatives you’ve considered
As suggested on the julialang forum: "a single ContinuousCallback that is the multiplication of conditions and then calculate which one had the crossing." I haven't tried this yet but seems like it should work.
Additional context
The text was updated successfully, but these errors were encountered:
where cb is the original callback. This would be used to find the correct callback in integrator.opts.callback. Is it then simply case of changing the len field. Do I need to do anything with the entries under integrator.callback_cache other than make sure they are long enough?
Is your feature request related to a problem? Please describe.
I’m modelling cell population dynamics. Cells die and divide so the size of system is always changing. Most of my state variables can trigger events (i.e. death or division) so it seems that
VectorContinuousCallback
is the way to go. Unfortunately, the constructor forVectorContinuousCallback
requires the length of the returned vector which in my case will change frequently. I could specify a very large length and pad the return vector with non-zero values but that seems inelegant and inefficient.Describe the solution you’d like
To able to change the length of the returned vector. Changing during a
affect!
call is adequate for my use case.Describe alternatives you’ve considered
As suggested on the julialang forum: "a single ContinuousCallback that is the multiplication of conditions and then calculate which one had the crossing." I haven't tried this yet but seems like it should work.
Additional context
The text was updated successfully, but these errors were encountered: