nocad.viz.control_cacti#
- nocad.viz.control_cacti(adj, method='path_finding', matching=None, shared=())[source]#
Decompose a controllability certificate into stems and buds (Lin’s cacti).
- Parameters:
- adj
network - method
str, default=”path_finding” Design method used to find the control matching when
matchingis None.- matching
Matching,optional A matching whose unmatched nodes have dedicated inputs.
- sharedarray_like
ofint Nodes that receive a shared input signal (signal sharing).
- adj
- Returns:
- cacti
Bunchwith stems: list of node lists; stem \(k\) starts at the driver node of input \(u_{k+1}\) and follows the matched edges;buds: list of node lists, the cycles of matched edges;attach: list of(u, v)per bud, the edge \(u\to v\) from a stem or an earlier bud into the bud ((-1, v)if the bud receives a shared input);owner: list, the stem (cactus) every bud belongs to (-1if unattached);depth: list, number of buds between the bud and its stem;unattached: indices of buds that no stem reaches (uncontrollable part).
- cacti
Notes
A stem is a directed path, a bud a directed cycle with an extra edge entering it (the distinguished edge); a cactus is a stem with buds attached recursively. A system is structurally controllable iff its graph is spanned by a disjoint union of cacti (Lin 1974). With the matching of a design the stems and cycles are fixed; the breadth-first search attaches every cycle through an edge from a node attached earlier, preferring stems, which keeps the cacti shallow.
Examples
>>> from nocad.datasets import load_nocad_example >>> c = control_cacti(load_nocad_example().adj) >>> c.stems, c.buds ([[7, 5, 6, 8]], [[0, 1, 2], [3, 4]])
Examples using nocad.viz.control_cacti#
Control cacti: a picture of why a system is controllable