nocad.placement.Placement#
- class nocad.placement.Placement(kind='sensors', method='gdfcmsa', r_max=None, n_add=None, beta=0.5, n_iter=500, n_runs=10, base='path_finding', random_state=None)[source]#
Bases:
BaseEstimatorPlace additional driver or sensor nodes to bound the relative order.
- Parameters:
- kind{“sensors”, “drivers”}, default=”sensors”
- method{“set_cover”, “retrofit”, “centrality”, “mclasa”, “gdfcmsa”}, default=”gdfcmsa”
- r_max
int,optional Required bound on the relative order (network distance). Needed by the set covering and centrality methods; the annealing methods add nodes until it holds.
- n_add
int,optional Number of nodes added by the annealing methods when
r_maxis None.- beta
float, default=0.5 Weight of the worst case in the cost.
- n_iter, n_runs
int, default=500, 10 Annealing iterations and independent runs.
- base
str, default=”path_finding” Method of the initial (fixed) configuration, see
nocad.driver_nodes().- random_state
int,GeneratororNone
- Attributes:
- base_nodes_
ndarray Matching-based configuration that ensures controllability (observability).
- nodes_
ndarray Final configuration.
- n_added_
int - cost_, max_order_, mean_order_
float - depth_
ndarrayofshape(N,) Control (observation) depth of every state for the final configuration.
- history_
pandas.DataFrame Annealing methods: best result for every number of added nodes.
- base_nodes_
Examples
>>> from nocad.datasets import load_nocad_example >>> p = Placement(kind="drivers", method="retrofit", r_max=2).fit(load_nocad_example().adj) >>> p.base_nodes_, p.nodes_, p.max_order_ (array([7]), array([3, 7]), 2.0)