Description
Hi!
During JuliaCon I mentioned this already in Slack, so I'm now just posting an Issue to make sure you don't forget about my feature request 😄
It would be awesome to have an interface in NetworkDynamics.jl
for triggering events based on the state of individual components (nodes or edges), but right now that seems to be a little bit complicated and un-documented
For example for my work, I need to be able to trigger an event when the state of one node crosses above a critical value, which should then affect the state of a different node or edge.
A clean way to achieve that might be to only allow interactions via edges, but then there should be a way to specify a callback that is triggered based on the state of (one of) the edge's connected nodes and can affect the states of (one of) the connected nodes. Or maybe there should be an EventEdge
type?
Since DifferentialEquations.jl
already offers a specialized VectorContinuousCallback
, it'd probably be best if NetworkDynamics.jl
provided some convenient way to define individual call-backs on a per-node / per-edge basis, but then aggregated all of the individual continuous callbacks behind the scenes into one vector-valued callback. (Probably similar for other callback types, but I haven't given that much thought.)
For starters, I'd also be happy with a dirty hack, as this feature is the one thing currently keeping me from using NetworkDynamics.jl
. My use-case is in neuro-science, but one of you mentioned a use-case for modeling failures in a power-grid, and I imagine there are many more, so I'm sure this would be a useful feature to have!