optiwindnet.clustering¶
Module Contents¶
- optiwindnet.clustering.clusterize(A: networkx.Graph, capacity: int) tuple[list[set[int]], list[int]][source]¶
Partition the terminals of A into one cluster per root.
For the moment, it enforces the minimum number of feeders, i.e. ceil(T/capacity).
The algorithm guarantees that the number of feeders for the entire location is not increased by the clustering. This means only one partition may have a subtree with capacity slack. It does not attempt to make uniform-sized clusters, terminals tend to be allocated to the closest root (distance measured in P_paths - see make_planar_embedding()).