JuliaDynamics / NetworkDynamics.jl

Julia package for simulating Dynamics on Networks
https://juliadynamics.github.io/NetworkDynamics.jl/dev/
MIT License
128 stars 13 forks source link

Is it possible to change graphs and their adjacency matrices during problem solving? #124

Closed CCTV173 closed 1 year ago

CCTV173 commented 1 year ago

VHJ5NM34NYLIGX VO{`W M

CCTV173 commented 1 year ago

I‘m wondering whether NetworkDynamics.jl can change the adjacency matrix of graph in the process of solving ODEproblem? Is it possible to use CallbackSet ?

lindnemi commented 1 year ago

It's not possible to directly change the adjacency matrix. However you can introduce an edge weight and use a callback to set it to 0 during integration. Take a look at the cascading failure example.

CCTV173 commented 1 year ago

Thanks!

Micha @.***> 于2023年1月18日周三 17:14写道:

It's not possible to directly change the adjacency matrix. However you can introduce an edge weight and use a callback to set it to 0 during integration. Take a look at the cascading failure example https://github.com/PIK-ICoNe/NetworkDynamics.jl/blob/main/examples/cascading_failure.jl .

— Reply to this email directly, view it on GitHub https://github.com/PIK-ICoNe/NetworkDynamics.jl/issues/124#issuecomment-1386724374, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU46YZXK23JUU74C7FYFTVDWS6X7BANCNFSM6AAAAAAT6ZQROE . You are receiving this because you authored the thread.Message ID: @.***>