nocad.design.InputOutputDesign#
- class nocad.design.InputOutputDesign(method='path_finding')[source]#
Bases:
BaseEstimatorDesign inputs and outputs that make a network controllable and observable.
- Parameters:
- method{“path_finding”, “signal_sharing”, “minimum”, “matching”}, default=”path_finding”
How perfectly matched source (sink) SCCs are handled; see the module docstring.
- Attributes:
- adj_
scipy.sparse.csr_arrayofshape(N,N) Boolean adjacency matrix of the network.
- labels_
listofstr Node names (networkx node names or DataFrame index of the input, else
x1, x2, ...).- A_, B_, C_, D_
scipy.sparse.csr_array State-space matrices, \(\mathbf{A}=\mathbf{W}^{\mathsf T}\) (weights kept).
- control_matching_
Matching Matching of \(\mathcal{G}\) whose unmatched nodes have dedicated inputs.
- observation_matching_
Matching Matching of \(\mathcal{G}^{\mathsf T}\) whose unmatched nodes have dedicated outputs.
- driver_nodes_, sensor_nodes_
ndarrayofint All nodes receiving an input / measured by an output (shared ones included).
- shared_driver_nodes_, shared_sensor_nodes_
ndarrayofint Nodes on a shared signal (signal sharing only).
- n_inputs_, n_outputs_, n_drivers_, n_sensors_
int
- adj_
Examples
>>> from nocad.datasets import load_nocad_example >>> design = InputOutputDesign().fit(load_nocad_example().adj) >>> design.driver_nodes_, design.sensor_nodes_ (array([7]), array([0, 8]))
- annotate(**kwargs)[source]#
Node and edge tables of the design (
nocad.annotation.annotate()).
- to_networkx(**kwargs)[source]#
Annotated NetworkX digraph of the design (
nocad.io.to_networkx()).
- write(path, **kwargs)[source]#
Write the annotated design to a file; the format follows the extension (
nocad.io.write()).