nocad.robustness.node_removal_robustness#

nocad.robustness.node_removal_robustness(adj, drivers=None, sensors=None)[source]#

Controllability and observability after the removal of every single state variable.

Parameters:
adjnetwork
drivers, sensorsarray_like of int, optional

Configurations to test (either may be omitted).

Returns:
resultBunch with controllable / observable (bool array over the removed

node), control_robustness / observe_robustness (share of survived removals) and control_critical / observe_critical (critical nodes).

Examples

>>> r = node_removal_robustness([[0, 1, 0], [0, 0, 1], [0, 0, 0]], drivers=[0])
>>> r.control_critical, r.control_robustness
(array([0, 1]), 0.3333333333333333)