Skip to content

Please allow changing VectorContinuousCallback during affect! calls #1052

@evan-wehi

Description

@evan-wehi

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions