MATLAB Answers

How to make nodes' removal from a graph as a function of time?

322 views (last 30 days)
Waseem AL Aqqad
Waseem AL Aqqad on 14 Jan 2021
Commented: Waseem AL Aqqad on 5 Feb 2021 at 8:40
I'm simulating failures of nodes in an interdependent system (two graphs, g and h) and their adjacency matrices are A and B. Some nodes in graph g (layer A) will get attacked randomly, and then this failure will get propagated to graph h (layer B) through the interlinks between the two graphs.
I'm trying to simulate failure or nodes removal based on time, that is,
at: t=1, remove first node in A.
t=2, remove the second node in A
t=3, failure propagates to B and first node in B get removed and so on.
Your help would be highly appreciated.

  1 Comment

Waseem AL Aqqad
Waseem AL Aqqad on 14 Jan 2021
It would be fine If you can show me how this works for a single layer. I can then apply it to multi-layers or graphs.

Sign in to comment.

Accepted Answer

Christine Tobler
Christine Tobler on 15 Jan 2021
You may want to look at the graph and digraph classes: Graph and Network Algorithms and their method rmnode specifically.


Show 3 older comments
Christine Tobler
Christine Tobler on 2 Feb 2021 at 12:16
I'm not sure what it means to add timesteps here. Would both G and F be changing? Could you just call Cascading_Failure after each change to G and F?
Waseem AL Aqqad
Waseem AL Aqqad on 2 Feb 2021 at 19:02
Thanks, Christine!
No, G and F will not be changing. But this could be another nice idea.
I wrote another function "Self_Healing" to try to recover as many as possible of those failed nodes. I want to call my "Self_Healing" function at a time instant right after the failure of the first nodes.
So, at t=1 Cascading_Failure starts by removing two nodes, at t=2 Self_Healing will start trying to recover the two removed nodes while at the same time instant the Cascading_Failure will be removing the next nodes, and so on.
Another question please, based on my Cascading_Failure function how can I simulate the time needed for each node to get failed? As I believe, in real world applications, one node might take 30 sec to get removed and another one might take several minutes.
Thanks again!
Waseem AL Aqqad
Waseem AL Aqqad on 5 Feb 2021 at 8:40
Hi Christine, I don’t mean to bother you but I was wondering if you have had a chance to look at my problem yet? Your help is greatly appreciated.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by