npap.AggregationProfile#
- class npap.AggregationProfile[source]#
Bases:
objectConfigure aggregation separating physical from statistical operations.
This profile distinguishes between:
Topology: How the graph structure is reduced
Physical: Electrical laws that must be preserved (coupled properties)
Statistical: Simple operations on independent properties
- physical_strategy#
Physical aggregation strategy (“kron_reduction”, “equivalent_impedance”).
- physical_properties#
Properties handled by physical strategy (e.g., [“reactance”, “resistance”]).
- Type:
list[str]
- physical_parameters#
Additional parameters for physical strategies.
- Type:
dict[str,Any]
- node_properties#
Mapping of node property names to aggregation strategies.
- Type:
dict[str,str]
- edge_properties#
Mapping of edge property names to aggregation strategies.
- Type:
dict[str,str]
- edge_type_properties#
Per-edge-type strategy overrides. Maps edge type values (from the
edge_type_attributeattribute on edges) to per-type property strategy dicts. When populated, edges are aggregated separately per type and the result graph is a MultiDiGraph with one edge per type per cluster pair. Falls back toedge_propertiesfor edges whose type is not listed here.- Type:
dict[str,dict[str,str]]
- edge_type_attribute#
Name of the edge attribute that stores the type label. Only used when
edge_type_propertiesis populated. Defaults to"type".- Type:
- mode#
Indicator of which pre-defined mode is being used.
- Type:
- Attributes:
- physical_strategy
- __init__(topology_strategy='simple', physical_strategy=None, physical_properties=<factory>, physical_parameters=<factory>, node_properties=<factory>, edge_properties=<factory>, edge_type_properties=<factory>, edge_type_attribute='type', default_node_strategy='average', default_edge_strategy='sum', warn_on_defaults=True, mode=AggregationMode.CUSTOM)#
Methods
__init__([topology_strategy, ...])Attributes
-
mode:
AggregationMode= 'custom'#
- __init__(topology_strategy='simple', physical_strategy=None, physical_properties=<factory>, physical_parameters=<factory>, node_properties=<factory>, edge_properties=<factory>, edge_type_properties=<factory>, edge_type_attribute='type', default_node_strategy='average', default_edge_strategy='sum', warn_on_defaults=True, mode=AggregationMode.CUSTOM)#